summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-04-11 12:23:17 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-04-11 12:23:17 +0100
commit96a1f068525356d96713c02e50debe1b18fde6fc (patch)
treea341e9f10002d2a2144d6ccd2d2578bd375f5527 /examples
parent9b2e9210f9e3a152124a071946d7a8d8b343963f (diff)
downloadleaflet-soton-96a1f068525356d96713c02e50debe1b18fde6fc.tar
leaflet-soton-96a1f068525356d96713c02e50debe1b18fde6fc.tar.gz
Add vending machines example
Diffstat (limited to 'examples')
-rw-r--r--examples/index.html1
-rw-r--r--examples/vendingmachines.html45
2 files changed, 46 insertions, 0 deletions
diff --git a/examples/index.html b/examples/index.html
index 122f883..c835004 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -93,6 +93,7 @@ h6 { font-size: 1em; line-height: 1.3125; }
<li><a href="indoor.html">Indoor Example</a></li>
<li><a href="workstations.html">Workstations Example</a></li>
<li><a href="zepler.html">Zepler Example</a></li>
+ <li><a href="vendingmachines.html">Vending Machines Example</a></li>
</ul>
<h2>OpenStreetMap</h2>
diff --git a/examples/vendingmachines.html b/examples/vendingmachines.html
new file mode 100644
index 0000000..2018547
--- /dev/null
+++ b/examples/vendingmachines.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Vending Machines</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+
+ <link rel="stylesheet" href="../src/leaflet-soton.css" />
+
+ <link rel="stylesheet" href="../resources/leaflet/dist/leaflet.css" />
+
+ <style>
+ body {
+ padding: 0;
+ margin: 0;
+ }
+
+ html, body, #map {
+ height: 100%;
+ }
+ </style>
+</head>
+<body>
+ <div id="map"></div>
+
+ <script src="../resources/leaflet/dist/leaflet.js"></script>
+ <script src="../resources/leaflet-markercluster/dist/leaflet.markercluster.js"></script>
+ <script src="../resources/leaflet-indoor/leaflet-indoor.js"></script>
+
+ <script src="../src/leaflet-soton.js"></script>
+
+ <script type="text/javascript">
+ LS.imagePath = '../resources/images/';
+ LS.dataPath = '../data.json';
+
+ var map = LS.map('map', {
+ indoor: false,
+ });
+
+ LS.getData(function(data) {
+ var layer = LS.getVendingMachinesLayer();
+ layer.addTo(map);
+ });
+ </script>
+</body>
+</html>