NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello.

I would like to embed the iD-Editor into an own web project. What I have is a list of osm-objects which I am interested in which would be displayed next to the iD "frame". With a click on a list item I would like to jump to the coordinate of the object and select it. Is it possible to solve this programmatically with javascript? Is there some kind of API for iD to achieve this?

Thanks.

asked 09 Mar '17, 08:13

autumnus's gravatar image

autumnus
1213311
accept rate: 0%

edited 10 Mar '17, 00:15

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


Okay, I found a solution myself:

With the help of this API

https://github.com/openstreetmap/iD/blob/master/API.md

I can construct an URL with osm_type, osm_id and coordinate that does what I want.

And then with the help of that:

http://stackoverflow.com/questions/18145273/how-to-load-an-external-webpage-into-a-div-of-a-html-page

I display the result in a <div>.

By the way: I use a self hosted iD Editor.

permanent link

answered 09 Mar '17, 13:07

autumnus's gravatar image

autumnus
1213311
accept rate: 0%

edited 09 Mar '17, 13:09

thanks for sharing! :)

(10 Mar '17, 00:15) aseerel4c26 ♦

You are welcome!

But if anybody maybe has a more elegant solution...

(10 Mar '17, 06:57) autumnus

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×301
×113
×60

question asked: 09 Mar '17, 08:13

question was seen: 2,695 times

last updated: 10 Mar '17, 06:57

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum