leaflet-plugins
Version:
Miscellaneous plugins for Leaflet library for services that need to display route information and need satellite imagery from different providers
23 lines (19 loc) • 706 B
HTML
<html>
<head>
<title>Leaflet</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet.js"></script>
<script src="../layer/vector/OSM.js"></script>
</head>
<body>
<div style="width:100%; height:100%" id="map"></div>
<script type='text/javascript'>
var map = L.map('map', { center: L.latLng(55.7, 37.6), zoom: 9, zoomAnimation: false});
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
var layer = new L.OSM('test.osm').on('loaded', function (e) {
map.fitBounds(e.target.getBounds());
}).addTo(map);
L.control.layers({}, {'OSM':layer}).addTo(map);
</script>
</body>
</html>