Skip to content

Commit

Permalink
Refurbished spring icon (fix #325 using @imagico first tests) (#3189)
Browse files Browse the repository at this point in the history
* Refurbished spring icon (fix #325 using @imagico first tests)

* Use @imagico code to display springs below waterways

* Removed useless SVG code

* Remove St_Centroid(way) performance regression
  • Loading branch information
Penegal authored and kocio-pl committed Apr 30, 2018
1 parent 32a1193 commit 5e8292b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 13 deletions.
6 changes: 0 additions & 6 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1201,12 +1201,6 @@
marker-clip: false;
}

[feature = 'natural_spring'][zoom >= 14] {
marker-file: url('symbols/spring.svg');
marker-placement: interior;
marker-clip: false;
}

[feature = 'power_generator']['generator:source' = 'wind'],
[feature = 'power_generator'][power_source = 'wind'] {
[zoom >= 15] {
Expand Down
18 changes: 18 additions & 0 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,24 @@ Layer:
type: shape
properties:
minzoom: 8
- id: springs
geometry: point
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way, "natural"
FROM planet_osm_polygon
WHERE "natural" IN ('spring')
UNION ALL
SELECT
way, "natural"
FROM planet_osm_point
WHERE "natural" IN ('spring')
) AS springs
properties:
minzoom: 14
- id: water-lines
class: water-lines
geometry: linestring
Expand Down
28 changes: 21 additions & 7 deletions symbols/spring.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions water-features.mss
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,11 @@
}
}
}

#springs {
[natural = 'spring'][zoom >= 14] {
marker-file: url('symbols/spring.svg');
marker-placement: interior;
marker-clip: false;
}
}

0 comments on commit 5e8292b

Please sign in to comment.