Standalone vs embedded iD editor?

Martin mentioned that there are two separate copies of iD available thru the OSM website:

I didn’t realize this – could someone (@tyr_asd ?) expand on why, and what other differences there are?

I was maybe a bit imprecise… let me clarify. osm.org has only one built-in version of iD, but it is possible to access it in two different ways (of which only the first option is intended to be directly used by mappers, see below for the reason behind that):

  • the page when you click on the edit button (available on the URL osm.org/edit/?editor=id): you get iD that is seamlessly integrated into the osm website, including the header bar (with the osm logo, links to different other pages of the website and your profile/settings menu)
  • under the hood, the above mentioned page is including the iD editor via an iframe from the URL osm.org/id. This is just the pure iD editor without the header bar.

These two pages purposely behave differently when it comes how you can feed external parameters to it. The osm.org/edit?editor=… page is providing a consistent interface to link to different editors (either manually specified in the editor=… parameter, or depending on the user’s preference): It can either fire up iD, or load JOSM via its remote control plugin. In the past there was also the option to map using Potlatch from that page, and in the future more editor options could be added. Now, because different editors have different possibilities of which external parameters are supported and how those have to be formatted, the edit page provides a unified interface to all of them. The currently offered parameters of the edit page have been established mostly before iD became the default editor on osm.org, so the parameters look different from how a standalone[1] instance of iD would be called.[2] This is however a good thing: the interface is consistent, and does not depend on which editor a mapper has selected as their default, stays the same even when a new version of an editor would potentially change its API in a not backwards compatible way, and old links continue to work flawlessly even when an editor is discontinued.

Compared to that, the osm.org/id page is a deep link directly to version of iD deployed on osm, and should not normally be used directly by a mapper. I mentioned it in the thread about MapRoulette as a possible approach to implement a requested feature @mvexel asked about, because the use case within MapRoulette is relatively specific: As mappers are asked to decide which editor they would like to use to work on a MapRoulette challenge, it is probably OK to more directly link to the respective editor, thus allowing MapRoulette to use iD features that are not available through the osm.org/edit interface. This is actually quite analogue to how MapRoulette is directly interfacing with JOSM’s remote control API instead of going through the OSM website for that (via /edit/editor=remote).

I hope this answers your question. :blush:


  1. To complete the full picture, in addition to the integrated (“embedded”) version on osm.org, iD can also run as a “standalone” web application (this is used for example for the developer preview instance on https://preview.ideditor.com/). The main difference between the embedded and the standalone version is that on osm.org you are already logged in with your osm account, so additional authentication steps can be skipped. ↩︎

  2. see iD/API.md at develop · openstreetmap/iD · GitHub for more information about the differences ↩︎

6 Likes

Thank you, that explains it very well!

That’s a $100,000 piece of information. Thanks!
Anything that can save me one line of screen space,
I’m going to use, and never go back!

You can also press F11 to go into full screen mode: that way you can use even more of your valuable screen estate for mapping!

1 Like