-
Notifications
You must be signed in to change notification settings - Fork 20
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
Map attributes parsing #9
Comments
Making this issue easier to find: cascadenik support for "minimum_version" |
Is this still a thing? Did "font_directory" get added? |
Yes, it did. And before the 2.0.0 release all parameters were made to use consistent dashes (instead of underscores), so its now |
Usage: Map { font-directory: url("fonts/"); } Fixes mapnik#9
So, I'm trying to fix this because I'm off in the weeds on a Friday evening... I've gotten as far as getting However, I'm having trouble associating it with a Cascadenik/cascadenik/output.py Line 32 in 82f6685
It's an "extra param" (i.e. not directly part of the public API, along with Ideas? |
mmap.parameters.append(mapnik._mapnik.Parameter("font-directory", "fonts/"))
mapnik.save_map(mmap, "style.xml") outputs: <?xml version="1.0" encoding="utf-8"?>
<Map srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<Parameters>
<Parameter name="font-directory" type="string">fonts/</Parameter>
</Parameters>
</Map> This what I was expecting (https://github.com/mapnik/mapnik/blob/master/tests/data/good_maps/extra_known_map_attributes.xml, effectively): <Map srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" font-directory="fonts/" /> @springmeyer are these intended to be interchangeable? https://github.com/mapnik/mapnik/blob/49feda9b13e6db416647afad8204b8d7d6c22024/src/load_map.cpp#L263 makes me think that they're not (since it's reading Is this a bug in the Python bindings? |
Yes, a bug in the bindings resulting from the oddity of this parameter. Basically, |
hmm, forgot that I actually did away with this support (mapnik/mapnik@ea5a46f#diff-bc721da090a4fdd48972b8aad7f14ec8). So, |
Well, crap. Thanks for looking into it. |
it this lack of round tripping a major problem? |
No, I think I've got a better way of dealing with it that doesn't involve Cascadenik. |
great. so I'll close this. Ping back if you have reservations. I'm planning on reworking the behavior of |
note: font-directory round tripping will work around at Mapnik 2.3.x |
Awww.. That was very kind of you--thanks! Reopening since it's fixable now! |
We should respect map level attributes like 'min_version' when an mml parsed by python, and stuff like 'font_directory' which will be available in mapnik2.
I'll take this on, but it can happen after initial release.
The text was updated successfully, but these errors were encountered: