Skip to content

Commit

Permalink
Add demo using unpkg.com
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed May 1, 2020
1 parent fdf6df0 commit 2418679
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions demo-unpkg/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Control Geocoder</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<link
rel="stylesheet"
href="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css"
/>
</head>
<body>
<div id="map" style="width: 600px; height: 400px;"></div>
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
<script>
var map = L.map('map').setView([0, 0], 2);
L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',
}).addTo(map);

L.Control.geocoder({
geocoder: L.Control.Geocoder.nominatim(),
}).addTo(map);
</script>
</body>
</html>

0 comments on commit 2418679

Please sign in to comment.