Hi there! Say I have an arbitrary OSM entity which I want to display on a third party map (Google maps for arguments sake).. Say I want to display London Heathrow airport on my map. This is how I would like it highlighted here: London Heathrow Airport Now, my server uses the awesome Overpass API, so if I want the bounds of the airport, I can get them like so: Raw Data from Overpass API for Heathrow Airport Now this is the problem, I now have the ways and nodes that consist of the airport BUT the ways/ nodes are NOT in the correct order to outline. So how can I outline the data from the second link, like it is in the first one?? Or if this isnt easy/ trivial, is there any way to embed just the map section from the first link on a webpage?! Thanks in advance! asked 15 Jun '15, 21:47 gmeister41 |
There's a misconception here: the nodes are in fact not in the wrong order, as the sequence information is stored in another location. You'd need to look at the node ids as they're listed in the way section of the Overpass API response. This will tell you in which sequence all nodes appear: Here's the relevant part:
I'd suggest to try following alternative, which might be easier for you to parse: all nodes belonging to a way are put in place in the right order.
Overpass Turbo Link: http://overpass-turbo.eu/s/9WS Please don't forget about correct OSM attribution, when embedding OSM data in other maps! answered 15 Jun '15, 22:08 mmd 1
The geom command was exactly what I was after, thanks mmd. I have of course made appropriate references to the OSM data. You're the best!
(17 Jun '15, 21:16)
gmeister41
|