OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2016-12-13 10:43:03

Treant
New Member
Registered: 2016-12-13
Posts: 1

Proper query of OSM APIs and 'polygons.openstreetmap.fr'

Hi, I'm pretty new to OSM.  I'm working on web application in WebGL, and I have 2 major questions:

1. I would like to know how to correctly query for city boundaries polygon. I've tried to use JSONP and http.get requests to get data form 'http://polygons.openstreetmap.fr/get_ge … id=1582777' but i cant get it, because of CORS policy. This server seems to be JSONP disabled. Does any other kind of similar API exists?

2. To get proper relations of my address i'm querying 'nominatim.openstreetmap.org' multiple times, every time constructing new url. Query for address to get city, city to get country, etc. This works but feels really tiresome. How do I query nominatim, knowing street address and getting all info that I need (city, country, continent) ?

Can you give me some hints?

Last edited by Treant (2016-12-13 11:54:26)

Offline

#2 2016-12-14 15:10:47

mmd
Member
Registered: 2010-11-06
Posts: 1,771

Re: Proper query of OSM APIs and 'polygons.openstreetmap.fr'

Offline

Board footer

Powered by FluxBB