18

I am considering replacement of Google Maps with Open Street Maps and the Leaflet JS API. Does the Leaflet JS API provide a Geocoding service?

16

Leaflet itself does not provide geocoding services, but you can look at Nominatim for example. http://wiki.openstreetmap.org/wiki/Nominatim

4

I found a Leaflet plugin that works great. It's a Bing geocoder which you'll need your own key for https://github.com/sa3m/leaflet-control-bing-geocoder

2

I have fallen in love with the Mapbox Geocoding API -- they do a great job of aggregating a lot of data sources that would be a pain for me to aggregate on my own. I found it to do a better job of reverse-geocoding than Nominatim. If I ever needed to build out my own geocoder, Nominatim would be a great place to start, but for most projects it feels to me like overkill.

  • 1
    From Mapbox docs (unless have granted access to mapbox.places-permanent): Supports 1 geocode per request. Must be displayed on a Mapbox map. Which is not gonna work if used with leaflet API. Also coverage is quite low, having only 13 countries. – Aivaras Prudnikovas Jul 23 '15 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.