editor-layer-index
editor-layer-index copied to clipboard
Feature request: launch iD editor on clicked location
On https://osmlab.github.io/editor-layer-index/
- Click anywhere on the map
- A popup is displayed
- Click on one of the "iD" button
- iD editor is opened but in wrong location

Can you please, "register" the latitude, longitude and zoom level when the user click on the map. Then in the popup, add latitude, longitude and zoom in the iD editor url
For exemple the URL: https://www.openstreetmap.org/edit?editor=id&background=custom%3ASPOT
Should become: https://www.openstreetmap.org/edit?editor=id&background=custom%3ASPOT#map=19/45.3460/36.2891
(I added #map=ZOOM/LATITUDE/LONGITUDE)
Thank you & have a nice day.
Yeah I agree we should do this.
Salut @Binnette I implemented that the link now should jump to the position of the map when clicked. However, it seems that iD does not open always the custom layer passed with the URL. Not sure if this is something I introduced or there is something else going on.
Hi @rbuffat, thank for your fix. Here is the documentation for the url parameters for id https://github.com/openstreetmap/iD/blob/develop/API.md
And yes, there are still some errors in editor-layer-index links:
- Url: https://www.openstreetmap.org/edit?editor=id&background=custom:https://{switch:a,b,c}.tile.openstreetmap.fr/route500/{zoom}/{x}/{y}.png#map=18/45.18956/5.74343
- Should be: https://www.openstreetmap.org/edit?editor=id&background=custom:https://{switch:a,b,c}.tile.openstreetmap.fr/route500/{zoom}/{x}/{y}.png&map=18/45.18956/5.74343
- Url: https://www.openstreetmap.org/edit?editor=id&background=custom:https://{switch:a,b,c}.tile.openstreetmap.fr/route500hydro/{zoom}/{x}/{y}.png#map=18/45.18956/5.74343
- Should be: https://www.openstreetmap.org/edit?editor=id&background=custom:https://{switch:a,b,c}.tile.openstreetmap.fr/route500hydro/{zoom}/{x}/{y}.png&map=18/45.18956/5.74343
The fix is easy 👍 You have to change the '#' just before 'map=' by '&'. In fact 'map' in an url parameter like the others 😊
Have a nice day... Merci et bonne journée.
@Binnette Thanks for the link to the API. I was not aware that iD has an API and did not think about looking for one!
I'm a bit confused:
This opens iD at the correct location but no imagery:
https://www.openstreetmap.org/edit?editor=id&background=custom%3Ahttps%3A%2F%2Fwww.geoservice.apps.be.ch%2Fgeoservice2%2Fservices%2Fa42geo%2Fa42geo_hoehenwms_d_fk%2FMapServer%2FWMSServer%3FLAYERS%3DGEODB.LDOM50CM_LORELIEF_KMGDM1%26STYLES%3Ddefault%26FORMAT%3Dimage%2Fjpeg%26CRS%3D%7Bproj%7D%26WIDTH%3D%7Bwidth%7D%26HEIGHT%3D%7Bheight%7D%26BBOX%3D%7Bbbox%7D%26VERSION%3D1.3.0%26SERVICE%3DWMS%26REQUEST%3DGetMap&lat=46.74557&lon=7.63367&zoom=15.00
These URL opens iD with the correct imagery but no location:
https://www.openstreetmap.org/edit?editor=id&background=custom%3Ahttps%3A%2F%2Fwww.geoservice.apps.be.ch%2Fgeoservice2%2Fservices%2Fa42geo%2Fa42geo_hoehenwms_d_fk%2FMapServer%2FWMSServer%3FLAYERS%3DGEODB.LDOM50CM_LORELIEF_KMGDM1%26STYLES%3Ddefault%26FORMAT%3Dimage%2Fjpeg%26CRS%3D%7Bproj%7D%26WIDTH%3D%7Bwidth%7D%26HEIGHT%3D%7Bheight%7D%26BBOX%3D%7Bbbox%7D%26VERSION%3D1.3.0%26SERVICE%3DWMS%26REQUEST%3DGetMap
https://www.openstreetmap.org/edit?editor=id&background=custom%3Ahttps%3A%2F%2Fwww.geoservice.apps.be.ch%2Fgeoservice2%2Fservices%2Fa42geo%2Fa42geo_hoehenwms_d_fk%2FMapServer%2FWMSServer%3FLAYERS%3DGEODB.LDOM50CM_LORELIEF_KMGDM1%26STYLES%3Ddefault%26FORMAT%3Dimage%2Fjpeg%26CRS%3D%7Bproj%7D%26WIDTH%3D%7Bwidth%7D%26HEIGHT%3D%7Bheight%7D%26BBOX%3D%7Bbbox%7D%26VERSION%3D1.3.0%26SERVICE%3DWMS%26REQUEST%3DGetMap&map=15/46.74557/7.63367
https://www.openstreetmap.org/edit?editor=id&background=custom%3Ahttps%3A%2F%2Fwww.geoservice.apps.be.ch%2Fgeoservice2%2Fservices%2Fa42geo%2Fa42geo_hoehenwms_d_fk%2FMapServer%2FWMSServer%3FLAYERS%3DGEODB.LDOM50CM_LORELIEF_KMGDM1%26STYLES%3Ddefault%26FORMAT%3Dimage%2Fjpeg%26CRS%3D%7Bproj%7D%26WIDTH%3D%7Bwidth%7D%26HEIGHT%3D%7Bheight%7D%26BBOX%3D%7Bbbox%7D%26VERSION%3D1.3.0%26SERVICE%3DWMS%26REQUEST%3DGetMap&map=15%2F46.74557%2F7.63367
Thank you for opening this issue 👍 Let's wait for an answer from the iD maintainers/developers 😊