Modify

Opened 8 years ago

Last modified 8 years 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 (3)

comment:1 Changed 8 years ago by Don-vip

Cc: bastiK added

@bastiK: do you know the answer ? :)

comment:2 Changed 8 years ago by bastiK

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 Changed 8 years ago by imagic

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.

Modify Ticket

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

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.