This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Embed idEditor into another website

0

Hello,

I'm in the process of making a website that enables users to add street names to an OSM map.

The website will have only one functionality, which is adding street names for unnamed streets.

I want to create this website for my hometown, because streets in my hometown are not named. So, I want to provide an easy way for the locals in my community to suggest and add street names for unnamed streets.

I've used idEditor and I like the feature where I can click on a street and it will give me the option of changing a street name, or add one if none already exists.

I want to use this UI in my future website, so that the website basically has a map, the user comes and chooses a street (like in idEditor) and the user will be prompted to enter a street name.

Pretty simple I guess, but my experience in web development is pretty minimal and I don't really know where to start from.

I would appreciate any guidance or help.

Thanks

asked 28 Feb '18, 17:30

aljulanda's gravatar image

aljulanda
11112
accept rate: 0%

edited 28 Feb '18, 22:22

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


One Answer:

2

Pretty simple I guess, but my experience in web development is pretty minimal and I don't really know where to start from. I would appreciate any guidance or help.

What you are describing does sound pretty simple! I'd advise you to fork a local copy of iD and get that working first.

Once you are comfortable with the basics of using git, building a JavaScript project, and deploying the app somewhere for testing, then you can change it so that it only uses the presets/fields that you are interested in.

To replace the presets, you can just set iD.data.presets = to something else, and call init() to replace them.

Here is an example app I made for "building damage assessment". The only file that is changed from default iD is the index.html. In it, I did this:

  • replaced all the presets, adding only a few presets and fields for tagging building damage
  • added some CSS so things would render a bit different
  • adjusted the limits on the feature filters (In this case, to show all the buildings, but you could also use this trick to turn off everything except roads).

https://github.com/bhousel/iD/blob/ace02741ed8cab1cb68103696a4a55710b6a95db/index.html

answered 28 Feb '18, 17:52

bhousel's gravatar image

bhousel
2.1k12528
accept rate: 38%

edited 28 Feb '18, 17:53

Source code available on GitHub .