Skip to content
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

Order of selectors with pseudoelements #44

Open
zerkms opened this issue Jun 29, 2018 · 0 comments
Open

Order of selectors with pseudoelements #44

zerkms opened this issue Jun 29, 2018 · 0 comments

Comments

@zerkms
Copy link

zerkms commented Jun 29, 2018

I've tried to convert https://github.com/mapbox/osm-bright to mapnik xml and has found that magnacarto does not keep the right order of the selectors with pseudoelements.

The roads in OSM Bright are defined something like

#roads_high::outline[zoom>=11][zoom<=20],
#tunnel[render='1_outline'][zoom>=11][zoom<=20],
#bridge[render='1_outline'][zoom>=11][zoom<=20]{
...
}
#roads_high[zoom>=11][zoom<=20],
#tunnel[render='3_inline'][zoom>=11][zoom<=20],
#bridge[render='3_inline'][zoom>=11][zoom<=20]{
...
}

The resulting magnacarto generated xml looks

  <Layer name="roads_high" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" maxzoom="400000" minzoom="500">
    <StyleName>roads_high</StyleName>
    <StyleName>roads_high-outline</StyleName>

while it should be

  <Layer name="roads_high" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
    <StyleName><![CDATA[roads_high-outline]]></StyleName>
    <StyleName><![CDATA[roads_high]]></StyleName>

(the latter was generated using different tool hence other minor differences)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant