From 881165be429151d8f2593c6893dd23da90a5288b Mon Sep 17 00:00:00 2001 From: Code WvS Date: Sat, 28 Feb 2015 16:03:45 +0100 Subject: add map coordinate control --- snap.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'snap.html') diff --git a/snap.html b/snap.html index 81ec7a9..51c861f 100755 --- a/snap.html +++ b/snap.html @@ -5,8 +5,10 @@ Snap! Build Your Own Blocks. Beta + + @@ -55,7 +57,7 @@ }; // Snap! YOW starts here - var world, map, layer, spriteGroup, defaultCostume; + var world, map, layer, spriteGroup; function loop() { world.doOneCycle(); @@ -81,6 +83,12 @@ layer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors' }).addTo(map); + L.control.coordinates({ + decimals: 7, + enableUserInput: false, + labelTemplateLng: "Lon {x}", + position: "topright" + }).addTo(map); // continuously update the local location variable map.on('locationfound', setGlobalPosition); -- cgit v1.3.1