Opened 11 years ago
Last modified 7 months ago
#8588 new defect
MapCSS: pixels per meter
Reported by: | imagic | Owned by: | team |
---|---|---|---|
Priority: | trivial | Milestone: | |
Component: | Core mappaint | Version: | |
Keywords: | Cc: | bastiK |
Description
In a MapCSS style it is possible to specify different rules for different zoom level. So it is possible e.g. to specify different widths of a way for different zoom level. The problem is that JOSM allows frictionless zooming, but the style only knows about (integer) zoom levels.
For a more detailed, precise rendering it would be a nice-to-have to be able to determine the exact pixels per meter (or any other length measure). If this might screw the rendering cache I withdraw this request immediately ;-)
Attachments (0)
Change History (4)
comment:1 by , 11 years ago
Cc: | added |
---|
comment:2 by , 11 years ago
The rendering cache relies on these zoom levels, i.e. the style for each object is computed only once per zoom level. (In fact, when evaluating the style sheet for one object, it will figure out the maximum zoom range where the result is valid, so it depends on the number of different zoom levels that are used in the style sheet.)
However, what you suggest is not completely impossible. In addition to the "static" eval Expressions in the current implementation (which are completely evaluated before the values are written to the style cache) one could introduce "dynamic" Expressions, where part of the evaluation is done "at runtime", i.e. when it is painted.
The most simple, but also most useful case would be fixed_number * current_scale
. In contrast to that, a more general solution (i.e. use scale()
like a function in any eval expression) would be more challenging to implement in an efficient manner.
comment:3 by , 11 years ago
Sounds to me like too much work for too less gain. There are other tickets that need the attention much more compared to this one (e.g. the embedded SVG memory issue). It's really only a nice-to-have. So feel free to close this ticket. Thanks for the info.
@bastiK: do you know the answer ? :)