-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small fixes to golf features #4467
Conversation
No objections from me. Would it be preferable to set the color for the SVG in the MSS, though, per the current map icon guidelines? |
👍 If only we could set the color... Mapnik doesn't support such a setting for patterns (polygon-pattern reference). |
comp-op should not be used in patterns - if i had seen that in #4381 i would have requested to change that. Just design the pattern to directly generate the desired results on the background it is to be used on (or with the background included in the pattern). That is simple enough to do, jsdotpattern allows to preview the pattern in a chosen color. But in general we will likely continue to use comp-op elsewhere - currently in particular for admin boundaries, potentially also for #3854 and in #4128. |
@pitdicker would you be able to address this? "design the pattern to directly generate the desired results on the background it is to be used on (or with the background included in the pattern)" |
I believe this was addressed by setting the pattern color directly in the SVG file. |
@jeisenbe As @jgruca says. To say a bit more: Before making this PR I played a few hours with jsdotpattern, trying to get a similar looking pattern that would fit in a small tile such as 64x64. Just an experiment, and I got nowhere :-). To keep the changes minimal, I made this PR with just the color adjusted in the already existing SVG, based on jsdotpattern. The end result is no different from setting the color in jsdotpattern and regenerating the SVG, except that I now didn't need to figure out a similar looking command sequence. In #4463 (comment) I added a 128x128 version of the |
Two minor fixes after the merge of #4381. They are mostly to keep my own setup working, but I hope it makes sense for others.
golf-color
for the golf holes, lines and text instead of reusingaddress-color
.comp-op: soft-light
with thegolf_rough
.About
comp-op
This is a feature supported by Mapnik, but not really by its SVG export. #3653 hit that issue. What happens is that the exported SVG either contains a rasterized image, or uses non-standard extensions (when exporting with the non-existing SVG 1.2). At some point proposals for SVG 1.2 including
comp-op
floated around and were implemented in Inkscape, librsvg and Mapnik, but those proposals were later dropped.The result in most image viewers (those that are not based on librsvg) and in all browsers:
5x:
The only current use of
comp-op
before #4381 was for admin boundaries, and it is a lot less noticeable when those don't look perfectly as intended.I believe using
comp-op
in OSM-carto is desirable, and it would be nice to get workarounds at some point. SVG supports masks and filters, so a lot should be possible. But can the use ofcomp-op
and the need for workarounds (or dropping support for exporting vector images) be delayed until there is a feature that is really worth it, such as #3854?For now I would just like to use the simple solution: adjust the color of the SVG pattern for
golf_rough
, to use the colorcomp-op: soft-light
would have resulted in:@jgruca Are these changes acceptable?