Installed leaflet in extlib
[mediagoblin.git] / extlib / leaflet / debug / map / map-mobile.html
diff --git a/extlib/leaflet/debug/map/map-mobile.html b/extlib/leaflet/debug/map/map-mobile.html
new file mode 100644 (file)
index 0000000..27d12ed
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html>\r
+<html>\r
+<head>\r
+       <title>Leaflet debug page</title>\r
+\r
+       <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />\r
+       \r
+       <link rel="stylesheet" href="../../dist/leaflet.css" />\r
+       <!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->\r
+       \r
+       <link rel="stylesheet" href="../css/mobile.css" />\r
+       \r
+       <script src="../leaflet-include.js"></script>\r
+</head>\r
+<body>\r
+\r
+       <div id="map"></div>\r
+\r
+       <script type="text/javascript">\r
+\r
+               var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',\r
+                       cloudmadeAttribution = 'Map data &copy; 2011 OpenStreetMap contributors, Imagery &copy; 2011 CloudMade',\r
+                       cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution});\r
+       \r
+               var map = new L.Map('map').addLayer(cloudmade);\r
+               \r
+               map.on('locationfound', function(e) {\r
+                       var marker = new L.Marker(e.latlng);\r
+                       map.addLayer(marker);\r
+                       \r
+                       marker.bindPopup("<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p><p>Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque felis.</p>");\r
+               });\r
+               \r
+               map.on('locationerror', function(e) {\r
+                       alert(e.message);\r
+                       map.fitWorld();\r
+               });\r
+               \r
+               map.locateAndSetView();\r
+       </script>\r
+</body>\r
+</html>
\ No newline at end of file