Open OnkelTem opened 8 years ago
Seems like this part (scaling) doesn't work properly.
For example, openstreetmap-carto's roads.mss has the code (near 3000th line):
.directions::directions {
[zoom >= 16] {
// intentionally omitting highway_platform, highway_construction
[feature = 'highway_motorway'],
[feature = 'highway_motorway_link'],
[feature = 'highway_trunk'],
[feature = 'highway_trunk_link'],
[feature = 'highway_primary'],
[feature = 'highway_primary_link'],
[feature = 'highway_secondary'],
[feature = 'highway_secondary_link'],
[feature = 'highway_tertiary'],
[feature = 'highway_tertiary_link'],
[feature = 'highway_residential'],
[feature = 'highway_unclassified'],
[feature = 'highway_living_street'],
[feature = 'highway_road'],
[feature = 'highway_service'],
[feature = 'highway_pedestrian'],
[feature = 'highway_raceway'],
[feature = 'highway_cycleway'],
[feature = 'highway_footway'],
[feature = 'highway_path'],
[feature = 'highway_steps'],
[feature = 'highway_track'],
[feature = 'highway_bridleway'] {
[oneway = 'yes'],
[oneway = '-1'] {
marker-placement: line;
marker-spacing: 180;
...
and if you change 180
to 180pt
(or other unit), you'll get a recursion with 46 iterations, where the value is changing with every step starting from 180.
Initial Value: 180
New value: 250
Initial Value: 250
New value: 275.59
Initial Value: 275.59
New value: 303.8
Initial Value: 303.8
New value: 334.9
Initial Value: 334.9
New value: 369.18
Initial Value: 369.18
New value: 406.97
and etc.
Currently, it's impossible to scale sizes specified with in px-units, e.g.:
text-size: 13
will be always 13 at any dpi/ppi. While this is similar to how browsers treat px-sizes (at least before retina-displays era), for maps this would mean that scaling is not possible at all.What I suggest is to consider a change which would allow for px-scaling. A quick patch:
This behavior is not necessary to trigger by default, instead a command-line switch can be added.
Thoughts?