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

Marker-type only being parsed out of first style block #39

Closed
andrewxhill opened this issue Nov 27, 2012 · 2 comments
Closed

Marker-type only being parsed out of first style block #39

andrewxhill opened this issue Nov 27, 2012 · 2 comments
Assignees
Labels

Comments

@ghost ghost assigned strk Nov 27, 2012
@strk
Copy link
Contributor

strk commented Nov 27, 2012

In more readable code, this is about this Mapnik-2.0.x style:

#carto_tests { marker-type:ellipse; } 
#carto_tests [id=1] { marker-fill:red; }

Needing to be converted to 2.1.0, where the default marker-type with lineal and polygonal input changed from arrow to ellipse.

Our current transformer adds [mapnik-geometry-type>1] { marker-type:arrow; } when it sees no explicit marker-type directive given in a block. In this case the explicit directive is given in another block, so the [id=1] block (which catches all input, btw) still gets the marker-type:arrow directly added.

@strk
Copy link
Contributor

strk commented Nov 27, 2012

Current plan to fix this: consider blocks with no conditions in a special way, considering they'll be applied to all later blocks.

To research: what happens if the same directive appears multiple times, which one takes precedence.
Also: what happens when multiple blocks with no conditions are added (same thing: which one takes precedence).

Of course this won' t fix all cases, but hopefully most common ones.

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

No branches or pull requests

2 participants