Opened 13 years ago
Closed 13 years ago
#7935 closed defect (invalid)
Mapcss parser throws an error when zoom limiting a 'node:connected' selector
Reported by: | AndrewBuck | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | mapcss | Cc: |
Description (last modified by )
A mapcss style file that tries to limit the drawing of connected nodes to only certain zoom levels will throw a parse error (and the corresponding rendering rule will be ignored) if you try to limit the drawing of nodes shared between more than one way to only certain zoom levels. The example below parses and works as expected for the normal node clause, but the node:connected clause throws a parse error and is ignored.
node|z16-
{
symbol-shape: circle;
symbol-size: 4;
}
node:connection|z16-
{
symbol-shape: circle;
symbol-size: 8;
}
The snippet above is taken from the Styles/Surface-DataEntry paint style.
A possibly related issue (although it may be a separate bug, or a problem with the mapcss stylesheet above) is that when I remove the |z16- clause from the node:connection statement, if I then split a way in JOSM, the node where the split happened is not changed into a 'connection' node and is just left as a normal node. Disabling and re-enabling the paint style redraws the node correctly as a node:connection style node.
Attachments (0)
Change History (4)
comment:1 by , 13 years ago
Description: | modified (diff) |
---|
comment:2 by , 13 years ago
comment:3 by , 13 years ago
Replying to AndrewBuck:
A mapcss style file that tries to limit the drawing of connected nodes to only certain zoom levels will throw a parse error (and the corresponding rendering rule will be ignored) if you try to limit the drawing of nodes shared between more than one way to only certain zoom levels. The example below parses and works as expected for the normal node clause, but the node:connected clause throws a parse error and is ignored.
node|z16-
{
symbol-shape: circle;
symbol-size: 4;
}
node:connection|z16-
{
symbol-shape: circle;
symbol-size: 8;
}
This is a known limitation: the order of selectors is fixed, you have to write:
node|z16-:connection
{
symbol-shape: circle;
symbol-size: 8;
}
The snippet above is taken from the Styles/Surface-DataEntry paint style.
A possibly related issue (although it may be a separate bug, or a problem with the mapcss stylesheet above) is that when I remove the |z16- clause from the node:connection statement, if I then split a way in JOSM, the node where the split happened is not changed into a 'connection' node and is just left as a normal node. Disabling and re-enabling the paint style redraws the node correctly as a node:connection style node.
Unrelated, but clearly a bug - please open another ticket.
comment:4 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I have openened a new ticket as requested which is number #7941. I will mark this ticket as closed since there is no problem in JOSM, just a (now fixed) problem in my stylesheet. Thanks for the help.
Just in case it is of use to people working on debugging this issue, this is the error message the parser throws when it hits that part of the style file: