Closed enocholumide closed 7 years ago
You can fix your problem by not including from the lib
folder, but using a default import
instead.
import { GeoSearchControl, OpenStreetMapProvider } from 'leaflet-geosearch';
const provider = new OpenStreetMapProvider();
const searchControl = new GeoSearchControl({
provider: provider,
});
const map = new L.Map('map');
map.addControl(searchControl);
Please check the readme and the provided snippets in the demo: http://smeijer.github.io/leaflet-geosearch
I installed via npm, but my map reload was prevented saying can not find module.. dont know what is wrong: please help