2011-05-17 00:40:49 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Leaflet debug page</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
|
|
|
<!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->
|
2012-07-27 17:32:24 +08:00
|
|
|
|
2011-05-17 00:40:49 +08:00
|
|
|
<link rel="stylesheet" href="../css/screen.css" />
|
2012-07-27 17:32:24 +08:00
|
|
|
|
2011-06-02 22:07:56 +08:00
|
|
|
<script src="../leaflet-include.js"></script>
|
2011-05-17 00:40:49 +08:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="map" style="width: 800px; height: 600px; border: 1px solid #ccc"></div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
var map = new L.Map('map');
|
2012-07-27 17:32:24 +08:00
|
|
|
|
|
|
|
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/{styleId}/256/{z}/{x}/{y}.png',
|
2011-05-17 00:40:49 +08:00
|
|
|
cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
|
2012-07-27 17:32:24 +08:00
|
|
|
cloudmade = new L.TileLayer(cloudmadeUrl, {styleId: 997, attribution: cloudmadeAttribution}),
|
|
|
|
cloudmade2 = new L.TileLayer(cloudmadeUrl, {styleId: 998, attribution: cloudmadeAttribution});
|
|
|
|
|
2011-05-17 00:40:49 +08:00
|
|
|
var nexrad = new L.TileLayer.WMS("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", {
|
|
|
|
layers: 'nexrad-n0r-900913',
|
|
|
|
format: 'image/png',
|
|
|
|
transparent: true,
|
2011-05-23 19:09:15 +08:00
|
|
|
attribution: "Weather data © 2011 IEM Nexrad",
|
|
|
|
opacity: 0.4
|
2011-05-17 00:40:49 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
var bounds = new L.LatLngBounds(new L.LatLng(32, -126), new L.LatLng(50, -64));
|
2012-07-27 17:32:24 +08:00
|
|
|
|
2011-05-17 00:40:49 +08:00
|
|
|
map.addLayer(cloudmade).addLayer(nexrad).fitBounds(bounds);
|
2012-07-27 17:32:24 +08:00
|
|
|
|
|
|
|
L.control.layers({"CM": cloudmade, "CM2": cloudmade2}, {"NexRad": nexrad}).addTo(map);
|
2011-05-17 00:40:49 +08:00
|
|
|
</script>
|
|
|
|
</body>
|
2012-07-27 17:32:24 +08:00
|
|
|
</html>
|