Leaflet-search demo
This is a demonstration of Leaflet-search, a plugin for the Leaflet mapping software. It adds a button with searching capabilities to the map. Leaflet-search makes use of the Nominatim (a part of OpenStreetMap) geocoding service, but it can be configured to use another service.
Code<html>
<head>
<link href="//unpkg.com/leaflet@1.6.0/dist/leaflet.css" rel="stylesheet">
...
</head>
<body>
...
<div id="map" style="height: 400px;"></div>
...
<script src="//unpkg.com/leaflet@1.6.0/dist/leaflet.js"></script>
<script src="/assets/531cbf94/leaflet-search.js"></script>
<script>
var map = L.map("map", {
center: [ 52.3727598, 4.8936041 ],
zoom: 14,
});
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { attribution: "Map data ..."}).addTo(map);
map.addControl(L.control.search());
</script>
</body>
</html>