[Pkg-javascript-commits] [leaflet] 10/40: Added test case for setView immediately after map is initialized

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:33:06 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit 974dcb8e33127de40465b43274328426c5808e3d
Author: Per Liedman <per at liedman.net>
Date:   Tue Apr 15 21:06:28 2014 +0200

    Added test case for setView immediately after map is initialized
---
 debug/tests/setview_marker_setview.html | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/debug/tests/setview_marker_setview.html b/debug/tests/setview_marker_setview.html
new file mode 100644
index 0000000..e8bcba5
--- /dev/null
+++ b/debug/tests/setview_marker_setview.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Leaflet debug page</title>
+
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+
+    <link rel="stylesheet" href="../css/screen.css" />
+
+    <link rel="stylesheet" href="../../dist/leaflet.css" />
+</head>
+<body>
+    <div id="map" style=></div>
+    <script type="text/javascript" src="../../build/deps.js"></script>
+    <script src="../leaflet-include.js"></script>
+    <script>
+        map = L.map('map');
+        L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg').addTo(map);
+        map.setView([51.505, -0.09], 15);
+        L.circleMarker([51.5, -0.09], {}).addTo(map);
+        L.marker([51.505, -0.09]).addTo(map);
+        map.setZoom(14); //comment this to make it work
+    </script>
+</body>
+</html>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list