Skip to content
This repository
tree: a864572aea
Fetching contributors…

Cannot retrieve contributors at this time

file 24 lines (21 sloc) 0.789 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<html>
<head>
<title>Leaflet</title>
<link rel="stylesheet" href="/leaflet/leaflet.css" />
<script src="/leaflet/leaflet.js"></script>
<script src="../layer/vector/KML.js"></script>
</head>
<body>
<!-- define a DIV into which the map will appear. Make it take up the whole window -->
<div style="width:100%; height:100%" id="map"></div>
<script type='text/javascript'>
var map = new L.Map('map', {center: new L.LatLng(58.4, 43.0), zoom: 11});
var osm = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');

var track = new L.KML("KML_Samples.kml", {async: true});
track.on("loaded", function(e) { map.fitBounds(e.target.getBounds()); });

map.addLayer(track);
map.addLayer(osm);
map.addControl(new L.Control.Layers({}, {'Track':track}));
</script>
 
</body>
</html>
Something went wrong with that request. Please try again.