4 <title>Leaflet debug page
</title>
6 <link rel=
"stylesheet" href=
"../../dist/leaflet.css" />
7 <!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->
9 <link rel=
"stylesheet" href=
"../css/screen.css" />
11 <script src=
"../leaflet-include.js"></script>
14 <div id=
"map" style=
"width: 800px; height: 600px; border: 1px solid #ccc"></div>
16 <script src=
"route.js"></script>
18 var cloudmadeUrl
= 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
19 cloudmade
= new L
.TileLayer(cloudmadeUrl
, {maxZoom
: 18});
21 for (var i
= 0, latlngs
= [], len
= route
.length
; i
< len
; i
++) {
22 latlngs
.push(new L
.LatLng(route
[i
][0], route
[i
][1]));
24 var path
= new L
.Polyline(latlngs
);
26 var map
= new L
.Map('map', {layers
: [cloudmade
]});
28 map
.fitBounds(new L
.LatLngBounds(latlngs
));
30 map
.addLayer(new L
.Marker(latlngs
[0]));
31 map
.addLayer(new L
.Marker(latlngs
[len
- 1]));
35 path
.bindPopup("Hello world");