Skip to content

gabrielflorit/L.GeoSearch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Leaflet.GeoSearch Adds support for address lookup to Leaflet. This fork adds a Leaflet-style widget to the original repo:

One Two Three Four Five

#About the control The control uses providers to take care of building the correct service url and parsing the retrieved data into a uniform format. Thanks to this split-up, it is pretty easy to write your own providers, so you can use your own geocoding service(s).

The control comes with a default set of five providers:

  • L.GeoSearch.Provider.Bing
  • L.GeoSearch.Provider.Esri
  • L.GeoSearch.Provider.Google
  • L.GeoSearch.Provider.Nokia
  • L.GeoSearch.Provider.OpenStreetMap

#Using the control

For example, Esri:

new L.Control.GeoSearch({
    provider: new L.GeoSearch.Provider.Esri()
}).addTo(map);

Google:

new L.Control.GeoSearch({
    provider: new L.GeoSearch.Provider.Google()
}).addTo(map);

OpenStreetMap:

new L.Control.GeoSearch({
    provider: new L.GeoSearch.Provider.OpenStreetMap()
}).addTo(map);

About

Leaflet geosearching/geocoding control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%