2011-12-03 01:04:19 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Leaflet debug page</title>
|
|
|
|
|
|
|
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
2013-03-22 22:27:07 +08:00
|
|
|
|
2011-12-03 01:04:19 +08:00
|
|
|
<link rel="stylesheet" href="../css/mobile.css" />
|
2013-03-22 22:27:07 +08:00
|
|
|
|
2013-01-31 18:29:39 +08:00
|
|
|
<script type="text/javascript" src="../../build/deps.js"></script>
|
2011-12-03 01:04:19 +08:00
|
|
|
<script src="../leaflet-include.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="map"></div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
2013-03-22 22:27:07 +08:00
|
|
|
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/d4fc77ea4a63471cab2423e66626cbb6/997/256/{z}/{x}/{y}.png',
|
2011-12-03 01:04:19 +08:00
|
|
|
cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
|
|
|
|
cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}),
|
2011-12-07 21:58:06 +08:00
|
|
|
bounds = new L.LatLngBounds(new L.LatLng(49.5, -11.3), new L.LatLng(61.2, 2.5));
|
2013-03-22 22:27:07 +08:00
|
|
|
|
2011-12-03 01:04:19 +08:00
|
|
|
var map = new L.Map('map', {
|
|
|
|
center: bounds.getCenter(),
|
|
|
|
zoom: 7,
|
|
|
|
layers: [cloudmade],
|
|
|
|
maxBounds: bounds
|
|
|
|
});
|
2013-03-22 22:27:07 +08:00
|
|
|
|
2013-11-14 23:21:53 +08:00
|
|
|
var latlngs = L.rectangle(bounds).getLatLngs();
|
|
|
|
L.polyline(latlngs.concat([latlngs[0]])).addTo(map);
|
2011-12-03 01:04:19 +08:00
|
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
2013-03-22 22:27:07 +08:00
|
|
|
</html>
|