stefanocudini / leaflet-search

Search stuff in a Leaflet map
https://opengeo.tech/maps/leaflet-search/
MIT License
772 stars 334 forks source link

How do I use my own local nominatim server? #302

Closed martinenkoEduard closed 1 year ago

martinenkoEduard commented 1 year ago

How do I use my own local nominatim server?

martinenkoEduard commented 1 year ago

Found it - I need to use something like this -

map.addControl(new L.Control.Search({ url: 'http://192.168.56.115:8082/search?format=json&q={s}', jsonpParam: 'json_callback', propertyName: 'display_name', propertyLoc: ['lat','lon'], markerLocation: true, autoType: false, autoCollapse: true, minLength: 2, zoom:16 }));

stefanocudini commented 1 year ago

https://github.com/stefanocudini/leaflet-search/blob/master/examples/geocoding-nominatim.html