Modify

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 Don-vip, 11 years ago

Cc: bastiK added

@bastiK: do you know the answer ? :)

comment:2 by bastiK, 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 imagic, 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.

comment:4 by taylor.smock, 7 months ago

Ticket #23254 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to imagic.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.