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">
|
|
|
|
|
2014-03-04 23:54:41 +08:00
|
|
|
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
2014-03-05 00:04:00 +08:00
|
|
|
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
|
|
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
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,
|
2014-03-04 23:54:41 +08:00
|
|
|
layers: [osm],
|
2011-12-03 01:04:19 +08:00
|
|
|
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>
|