forked from gravitystorm/openstreetmap-carto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial pass at rendering golf=* features (gravitystorm#661)
- Update landcover layer to include golf area features - Add golf-lines layer - Add style/golf.mss and specify rendering for: - golf=green and golf=tee (light green color between @grass and @park; tee with gray point labeled with ref) - golf=fairway and golf=driving_range (@grass) - golf=bunker (color and pattern for @sand and beach) - golf=rough (darker green between @scrub and @grass) - golf=hole as way (dashed line, darker green derived from @golf_course; labeled with ref) - golf=hole as point and golf=pin (symbols/golf_pin.svg; labeled with ref) Based largely on imagico/osm-carto-alternative-colors.
- Loading branch information
1 parent
a2077c0
commit 48ec53d
Showing
3 changed files
with
107 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#landcover[zoom >= 14] { | ||
::high-zoom[zoom >= 12] { | ||
[feature = 'golf_green'], | ||
[feature = 'golf_tee'] { | ||
polygon-fill: mix(@grass, @park, 50%); | ||
} | ||
[feature = 'golf_fairway'], | ||
[feature = 'golf_driving_range'] { | ||
polygon-fill: @grass; | ||
} | ||
[feature = 'golf_bunker'] { | ||
polygon-fill: @sand; | ||
polygon-pattern-file: url('symbols/beach.png'); | ||
} | ||
[feature = 'golf_rough'] { | ||
polygon-fill: mix(@scrub, @grass, 50%); | ||
} | ||
} | ||
} | ||
|
||
#golf-lines[zoom >= 16] { | ||
[golf = 'hole'][geo = 'line'] { | ||
line-color: darken(@golf_course, 40%); | ||
line-width: 0.5; | ||
line-dasharray: 6, 2; | ||
[name = ''][ref != ''] { | ||
text-placement: line; | ||
text-name: "[ref]"; | ||
text-size: 11; | ||
text-fill: darken(@golf_course, 40%); | ||
text-face-name: @oblique-fonts; | ||
text-halo-radius: 1; | ||
text-halo-fill: fadeout(white, 30%); | ||
} | ||
} | ||
[golf = 'hole'][geo = 'point'], | ||
[golf = 'pin'] { | ||
point-file: url('symbols/golf_pin.svg'); | ||
[ref != ''] { | ||
text-fill: #444; | ||
text-name: "[ref]"; | ||
text-face-name: @book-fonts; | ||
text-dy: -10; | ||
text-halo-radius: 1; | ||
text-halo-fill: fadeout(white, 30%); | ||
} | ||
} | ||
[golf = 'tee'] { | ||
marker-fill: grey; | ||
marker-width: 3; | ||
marker-height: 3; | ||
[ref != ''] { | ||
text-name: "[ref]"; | ||
text-face-name: @book-fonts; | ||
text-dy: 6; | ||
text-halo-radius: 1; | ||
text-halo-fill: fadeout(white, 30%); | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.