commit - 63fc58b63d6ccc9f5e1ba6cabeb34d5286803239
commit + 11bbc02db60f9effe20633b742a0fe584f425707
blob - a31c4a4247602442b9014e8e5f76e7019bbdeb55
blob + 2f84d6c589dfe2bbcc5b3a260ae472f0b2d9ace8
--- static/index.html
+++ static/index.html
<!--[if lte IE 8]><link rel="stylesheet" href="leaflet/leaflet.ie.css" /><![endif]-->
<script src="leaflet.js"></script>
<!-- Bring in the leaflet KML plugin -->
- <script src="KML.js"></script>
+ <script src="KML.js"></script>
+
<script language="javascript">
function init() {
- var map = new L.Map('map');
- L.tileLayer('http://{s}.tiles.wmflabs.org/hikebike/{z}/{x}/{y}.png', {
- attribution: '© <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',
+ var map = new L.Map('map');
+ L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+ attribution: '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors',
maxZoom: 18
}).addTo(map);
map.attributionControl.setPrefix(''); // Don't show the 'Powered by Leaflet' text.
-
var kmlLayer = new L.KML("runmap.kml", {async: true});
- kmlLayer.on("loaded", function(e) {
+ kmlLayer.on("loaded", function(e) {
map.fitBounds(e.target.getBounds());
});
map.addLayer(kmlLayer);
</head>
<body onLoad="javascript:init();">
<div style="position:absolute; top:0; left:0%; width:100%; height:100%" id="map"></div>
-</body>
+</body>
</html>