Id: Alternative map styles

Created on 3 Jul 2019  ·  11Comments  ·  Source: openstreetmap/iD

The default map styling is fine for most users most of the time, but there are times when domain-specific styling could be useful. For example:

  • Road maxspeed (#5662)
  • Road access (#2068)
  • Route membership (#659)
  • Unnamed roads
  • Unreviewed imports

We should build a general-purpose "lens" system that lets people quickly toggle between these styles ("lenses"). As part of #6483, lenses should be defined atomically and could be swapped in and out by downstream projects. Only some lenses would be suitable to ship with iD to everyone on osm.org, but ideally users could plug in their own lenses too.

I assume JOSM already has a feature like this. We should see how they do it.

map-renderer new-feature

Most helpful comment

Looks like JSOM uses MapCSS. I wonder if iD should try to use that.

All 11 comments

The toolbar might not be the best place for these to live, but for inspiration:

Screen Shot 2019-07-03 at 4 31 54 PM
Screen Shot 2019-07-03 at 4 40 58 PM

I assume JOSM already has a feature like this. We should see how they do it.

It is called map paint styles in JOSM. See doc at https://josm.openstreetmap.de/wiki/Styles

https://josm.openstreetmap.de/raw-attachment/wiki/Styles/addstyle.gif

Looks like JSOM uses MapCSS. I wonder if iD should try to use that.

Not sure how hard is to implement it, but making possible to use all styles made for JOSM sounds very nice.

.... For example:

  • Road maxspeed (#5662)
  • Road access (#2068)
  • Route membership (#659)
  • Unnamed roads
  • Unreviewed imports

Sounds interesting, please add for me in the list

  • Road destination
  • Road lanes
  • Road turn:lanes

Many of the layers provided by the former ito! Map tool would be useful as lenses.

@quincylvania see https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation for the JOSM documentation. We use it both for styling and for validator rules.

I like how you can overlay multiple styles in JOSM -- they're additive. While this can get messy and produce unpredictable results, it does allow for more detailed tweaking. Not sure if this is something we'd want for iD, though.

I like how you can overlay multiple styles in JOSM -- they're additive. While this can get messy and produce unpredictable results, it does allow for more detailed tweaking. Not sure if this is something we'd want for iD, though.

While I can see how this might be useful sometimes, I'm not sure the added complexity is worth it. "Messy and unpredictable" goes against iD's goals. Perhaps there's an elegant way we could allow multiple complementary styles in the future, but I think one-at-a-time is sufficient as an initial implementation.

Unreviewed imports

Potlatch 2 has a “Highlight unedited TIGER (US roads)” option that still comes in handy in some parts of the U.S. Lenses like TIGER could be limited to certain regions (similar to imagery layers) or shareable somehow.

Since the change highlighting in #6843 came out pretty well, I'm thinking we might use the same outline mechanism for these other styles. The benefit is that we wouldn't lose the type information conveyed in the base rendering.

I'm inclined to forge ahead with a quick solution and not worry about MapCSS right now.

We'll also need a legend component somewhere to explain what the colors mean.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sirvanalie picture Sirvanalie  ·  3Comments

tmcw picture tmcw  ·  3Comments

tordans picture tordans  ·  3Comments

manfredbrandl picture manfredbrandl  ·  3Comments

jidanni picture jidanni  ·  3Comments