Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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 bastiK)

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 bastiK, 10 years ago

Description: modified (diff)

comment:2 by bastiK, 10 years ago

Description: modified (diff)

comment:3 by Klumbumbus, 10 years ago

That would be great. Currently with JOSM_pref() it is not very user friendly.

comment:4 by skyper, 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 Don-vip, 10 years ago

Milestone: 14.08

comment:6 by bastiK, 10 years ago

Resolution: fixed
Status: newclosed

In 7450/josm:

fixed #10421 - User-settings for mapcss mappaint styles

  • only boolean setting for now
  • no shortcut support so far

comment:7 by bastiK, 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 Klumbumbus, 10 years ago

Great. Would it be possible to release 7450 as latest now, so we can test this today?

comment:9 by bastiK, 10 years ago

Sure can do.

comment:10 by Klumbumbus, 10 years ago

Thanks. Seems to work perfectly fine :)

comment:11 by Klumbumbus, 10 years ago

First use of this in default style, see ticket:10363#comment:64
Second use of this in Styles/Coloured_Streets

Last edited 10 years ago by Klumbumbus (previous) (diff)

in reply to:  4 comment:12 by skyper, 10 years ago

Replying to skyper:

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.

See #10435

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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