brouter-web
brouter-web copied to clipboard
Add "Edit in JOSM" Button near the existing "Edit in OpenStreetMap" in the bottom right corner
I heavily use the "OpenStreetMap" link in the lower right corner to open the OpenStreetMap and then from there open and edit the area in JOSM.
It would be great if this jump (Remote JOSM Editing) could be done directly from brouter / bikerouter.de.
Wording could be short and easy "JOSM" or "Edit in JOSM".
Screendesign Mockup:

Just my (uneducated) thoughts:
- There are many OSM editors (iD, JOSM, Level0, RapiD, Potlatch, Merkaartor, ...). iD has about 10x the usage JOSM has. Why single out JOSM?
- The OpenStreetMap link is only there when the OpenStreetMap base layer is selected. Should other layers also offer links to editors?
- It should be relatively easy to write a bookmarklet or GreaseMonkey script to link directly to your favorite editor, even from other mapping sites like Google Maps.
That "OpenStreetMap" link is not (only) meant as "edit in OSM" but part of the general feature to open the original map of the current layer at the same position.
What I could imagine is having a button that opens a menu of editors, e.g. Leaflet.EditInOSM plugin. What I also have in mind is a button to open Mapillary/Street View like Street View Buttons plugin, maybe both in a common menu?
Related:
- #403
Related: @mjaschen pointed out a helpful browser extension in https://github.com/nrenner/brouter-web/issues/769#issuecomment-1686172231, although I don't know whether it could be made to support JOSM.
a button that opens a menu of editors
What we probably want to avoid is getting into the business of maintaining a list of editors (including their URL quirks) ourselves. Thus linking to osm.org where there is a button with more editors should be enough for occasional users, IMO. For power users, there is "OSM Smart Menu". Not (re-)implementing all of this in BRouter-Web also avoids UI clutter.
Leaflet.EditInOSM plugin
I had a look, but have a couple of reservations:
- The "multiButton" widget is a bit ugly and distracts from our primary use case.
- The "attributionBox" widget is less ugly, but only offers the same functionality as the
attributionEditLinkoption from the MapBBCode attribution control we already ship (see PR below), i.e. there would be no menu in that case anyway. - It is unmaintained since years, and reported to not work on mobile / touch.
Zverik/leaflet-streetview
This one is similar in concept and a bit more elegant, but needs more space and is also a bit too prominent on the screen given the actual purpose of BRouter is route planning.
If only the site-specific code would be separate from the UI in both plugins…
There's a powerful browser extension called “OSM Smart Menu” which allows navigating between different map products with a single click and works, of course, from BRouter-Web instances.
We definitely should add a link to that addon to our FAQ, since it is ideal for anyone needing to quickly switch map products/sites, and a perfect fit for the request mentioned above. There is really no need for us to replicate it.
I don't know whether it could be made to support JOSM.
I just tried it, it's working somewhat tolerable: In JOSM, enable remote control (Edit > Preferences > Remote Control > Enable). In "OSM Smart Menu", add this template:
https://www.openstreetmap.org/edit?editor=remote#map={zoom}/{latitude}/{longitude}.
See jgpacker/osm-smart-menu#213 for how this could be improved.
This leaves the following (non-power user) use cases:
- Allow users to open the current view in Mapillary (not sure if we should support less open services like Google StreetView, Komoot, Waze etc. too).
- Make users aware of the fact that they are allowed and even encouraged to contribute to OSM. Getting them hooked is an interesting challenge, so we could provide multiple links tailored to different audiences:
- Link to a "Getting started with contributing" guide.
- Provide an "Add a note to the map" button linking to osm.org.
- Supply an "Edit the map" link, also forwarding to osm.org.
I'm afraid putting both 1. and 2. into a single menu would not be a good fit, they are too different in purpose and it would mean to compromise on the menu's naming (making it too generic) and wrt. usability. I'd propose something like this instead:
- Create a "Contribute to the map" link right next to the "OpenStreetMap" link, both styled the same. It would open a menu or a Bootstrap popup with links to contribute, i.e. it would essentially be an ad to gain new OSM contributors. It is expected to be used only once or twice per user, i.e. it is not meant to be used to edit the map regularly (for power users, we recommend the browser addon to start their preferred map editor instead).
- Create a separate menu somewhere else (most likely in the toolbar – to be determined) to host buttons for Mapillary and other services. It is expected to be used more regularly and thus should get a bigger click target area than that tiny link text in the lower right (e.g. comparable in size to other toolbar buttons). OTOH, we could also just refer to "OSM Smart Menu" for Mapillary.
That being said, I just discovered that adding an "Edit" button is a simple config change and essentially no extra work at all, so I'll send a PR for that in a bit to improves things at least somewhat right now. Later a more elaborate menu/popup as discussed above is also welcome, but more work obviously.