Leaflet GeoSearch
Edit page
IntroductionUsageLeaflet Control
Providers

Geoapify Provider

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

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