#10421 closed enhancement (fixed)
User-settings for mapcss mappaint styles
Reported by: | bastiK | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 14.08 |
Component: | Core mappaint | Version: | |
Keywords: | Cc: |
Description (last modified by )
We could allow the user to customize the rendering of a style in a more user friendly way. There would be one or more additional entries in the right click menu of the style (in the mappaint toggle dialog). This entry would bring up a new window, where settings can be customized, or a simple boolean value could be done in a submenu entry.
We'd also need a language to specify and use these settings in the mapcss style. Here is a draft:
/* simple boolean value yes/no */ setting::highway_casing { type: boolean; label: tr("Show highway casing"); default: false; } /* a list of options where exactly one option is selected */ setting::zoom_behavior { type: list_selection; label: tr("Zoom"); option-keys: list(zoom_auto, zoom_show_all); option-labels: list(tr("Auto (hide icons at low zoom)"), tr("Fixed (show all icons and labels)")); default: zoom_auto; } /* a color value */ setting::motorway_color { type: color; label: tr("Motorway"); default: #809bc0; } /* float, int, ... */ /* show casing if setting is true */ way.highway_casing[highway] { casing-width: 1; casing-color: gray; } /* hide nodes at z0-15 if zoom is auto */ node|z-16.zoom_auto { icon-image: none; } /* show motorway with corresponding color */ way[highway=motorway] { width: 3; color: prop("motorway_color"); }
Attachments (0)
Change History (12)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
Description: | modified (diff) |
---|
comment:3 by , 10 years ago
follow-up: 12 comment:4 by , 10 years ago
Yes, please. Would be a major enhancement.
Some external styles would need the same feature.
Maybe, same map style with different settings make sense, as a middle layer between full featured default and wire frame. We need to have short cuts to switch, though.
comment:5 by , 10 years ago
Milestone: | → 14.08 |
---|
comment:7 by , 10 years ago
syntax:
setting::highway_casing { type: boolean; label: tr("Draw highway casing"); default: true; } way[highway][setting("highway_casing")] { casing-width: 2; casing-color: white; }
comment:8 by , 10 years ago
Great. Would it be possible to release 7450 as latest now, so we can test this today?
comment:11 by , 10 years ago
First use of this in default style, see ticket:10363#comment:64
Second use of this in Styles/Coloured_Streets
That would be great. Currently with JOSM_pref() it is not very user friendly.