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

Can I get current neighbourhood using lat and lon?

0

I'm new to the API, and am having a hard time going through the API documentation.

I am using browser JavaScript to get the geolocation (latitude and longitude), and would like to display the current neighbourhood/city based on the lat and long data. For example, having the lat and lon of 43.653225, -79.383186 would result in Toronto.

Is there a specific API GET request I can make? (i.e. https://api.openstreetmap.org/api/0.6/lat=${lat}&long=${lon}...

Any help would be deeply appreciated. Thank you.

asked 27 Nov '19, 15:50

SamSverkoCurate's gravatar image

SamSverkoCurate
26113
accept rate: 0%


One Answer:

1

answered 27 Nov '19, 16:06

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

This is perfect! Thank you :)

(27 Nov '19, 16:15) SamSverkoCurate

Source code available on GitHub .