summaryrefslogtreecommitdiff
path: root/examples/bus.html
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-09-17 15:06:15 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-09-17 15:06:15 +0100
commit9373af8df20df1e125e72c96ec18b5fc67c73405 (patch)
tree84f26cc1e604bc08adec80a8e14a0549536c59ce /examples/bus.html
parent541329d02b32c0ce547d62e5b7b7f42ea9fd2a40 (diff)
downloadleaflet-soton-9373af8df20df1e125e72c96ec18b5fc67c73405.tar
leaflet-soton-9373af8df20df1e125e72c96ec18b5fc67c73405.tar.gz
Less globals in examples
Fix a problem highlighted by this in the vending manchines layer.
Diffstat (limited to 'examples/bus.html')
-rw-r--r--examples/bus.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/bus.html b/examples/bus.html
index 17daae9..43de40f 100644
--- a/examples/bus.html
+++ b/examples/bus.html
@@ -41,12 +41,14 @@
LS.imagePath = '../resources/images/';
LS.dataPath = '../data.json';
- var map = LS.map('map', {
- busRoutes: true,
- busRouteControl: true
- });
-
- L.control.locate().addTo(map);
+ (function() {
+ var map = LS.map('map', {
+ busRoutes: true,
+ busRouteControl: true
+ });
+
+ L.control.locate().addTo(map);
+ })();
</script>
</body>
</html>