Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #4205 I offered to clean up all svg files, and work on the problems that keep some patterns from being usable as vector images.
I have been at it for a couple of weeks, and am mostly there (also working on three related Mapnik issues).
This is the first of three PRs. The rest wil come as time allows ;-)
This PR is a tiny one that only touches the shields.
Previously they were generated with a width and height of 100%. Percentages are allowed by the SVG specification, but don't make much sense. Inkscape, viewers, browsers and Mapnik differ in their interpretation. Is the percentage relative to a screen, the whole map, a tile, or user supplied marker dimensions? Or to implicit image dimensions?
In the case of mapnik it falls back to the width and height of the viewBox, and scales them by the percentage. If the SVG contains no viewBox, it acts as if no width and height are given.
It all doesn't matter much in the end, as the rendering in Mapnik was already as desired. But it was little work to update the shield generation script to Python 3 (no expert by far, but it seems to work), and change it to simply write out the true width and height.