Opened 11 years ago
Last modified 11 years ago
#10421 closed enhancement
User-settings for mapcss mappaint styles — at Version 1
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: auto_zoom; } /* 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"); }