PdokNl Provider
For more options and configurations, see the PDOK Locatieserver.
import { PdokNlProvider } from 'leaflet-geosearch';const provider = new PdokNlProvider();// add to leafletimport { GeoSearchControl } from 'leaflet-geosearch';map.addControl(new GeoSearchControl({provider,style: 'bar',}),);
Optional parameters
PDOK Locatieserver supports a number of optional parameters. As the api requires those parameters to be added to the url, they can be added to the params key of the provider.
All options defined next to the params key, would have been added to the request body.
const provider = new PdokNlProvider({params: {fq: 'gemeentenaam:Leiden', // limit search results to municipalitylat: 0, // Latitude in degreelon: 0, // Longitude in degree},});