Hi I'm implementing a webpage that embedded an openstreetmap map. I want to let the user select an area and export it to osm file from my webpage. Is this feasible ?? asked 11 Feb '14, 20:23 Nour K aseerel4c26 ♦ |
Likely it is. You just need to extract the bounding box of the selection and then pass it to the OSM API (please, this way only if you have a low traffic, private webpage and it only works for small areas). It may be useful to know which map library you are using (e.g. OpenLayers or Leaflet) or if you do not care. Probably the selection part is the harder part of your idea. For OpenLayers this FAQ entry might help. You might also want to have a look at www.osm.org which does such a selection (uses Leaflet). answered 12 Feb '14, 01:09 aseerel4c26 ♦ So it is feasible!! Thanks a lot. That's true the selection is the harder part. I'm using OpenLayers as my map library. I have succeed to embed the openstreetmap map into my webpage but I don't have any idea yet on how to implement the selection of an area from this map and the extraction of the bounding box of the selected area.
(12 Feb '14, 11:13)
Nour K
1
I would suggest to make the pure "rectangular selection in OpenLayers by user" (for example by a box drawn by the user's mouse) question a new question as it is not specific to your export thing afterwards. And, maybe an OpenLayers forum (instead of this help site) would be more useful as it is not specific to OSM anymore. However, many OpenLayers questions are on this help site despite that.
(12 Feb '14, 13:47)
aseerel4c26 ♦
|