Leaflet GeoSearch
Edit page
IntroductionUsageLeaflet Control
Providers

LocationIQ Provider

note: LocationIQ services require an API key. Obtain here. For more options and configurations, see the LocationIQ developer docs.

import { LocationIQProvider } from 'leaflet-geosearch';
const provider = new LocationIQProvider({
params: {
key: '__YOUR_LOCATIONIQ_KEY__',
},
});
// add to leaflet
import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);