Skip to content

Commit

Permalink
Change boundary nature reserve / national park areas
Browse files Browse the repository at this point in the history
Render nature reserve / national park areas with a double uninterruped line,
like marinas are currently rendered.

* Resolves #69
* Resolves #563
  • Loading branch information
matthijsmelissen committed Oct 18, 2014
1 parent 1df67df commit 96d724a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
29 changes: 18 additions & 11 deletions admin.mss
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,28 @@
}

#nature-reserve-boundaries {
[zoom >= 7] {
[zoom >= 7][way_pixels > 100] {
::fill [zoom < 13] {
opacity: 0.05;
polygon-fill: green;
}
::line {
opacity: 0.15;
line-color: green;
line-width: 1.5;
line-dasharray: 4,2;
[zoom >= 10] {
line-width: 3;
line-dasharray: 6,2;
line-join: bevel;
}
a/line-width: 1;
a/line-offset: -0.5;
a/line-color: green;
a/line-opacity: 0.15;
a/line-join: round;
a/line-cap: round;
b/line-width: 3;
b/line-offset: -1.5;
b/line-color: green;
b/line-opacity: 0.15;
b/line-join: round;
b/line-cap: round;
[zoom >= 14] {
a/line-width: 2;
a/line-offset: -1;
b/line-width: 6;
b/line-offset: -3;
}
}
}
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Datasource": {
"extent": "-20037508,-20037508,20037508,20037508",
"table": "(SELECT way, way_area, name, boundary FROM planet_osm_polygon WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') AND building IS NULL) AS national_park_boundaries",
"table": "(SELECT way, way_area, name, boundary, way_area/(!pixel_width!*!pixel_height!) AS way_pixels FROM planet_osm_polygon WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') AND building IS NULL) AS national_park_boundaries",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down
2 changes: 1 addition & 1 deletion project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ Layer:
Datasource:
<<: *osm2pgsql
table: |2-
(SELECT way, way_area, name, boundary FROM planet_osm_polygon WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') AND building IS NULL) AS national_park_boundaries
(SELECT way, way_area, name, boundary, way_area/(!pixel_width!*!pixel_height!) AS way_pixels FROM planet_osm_polygon WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') AND building IS NULL) AS national_park_boundaries
advanced: {}
- id: "theme-park"
name: "theme-park"
Expand Down

0 comments on commit 96d724a

Please sign in to comment.