summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-06-06 11:52:55 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-06-06 12:14:23 +0100
commit586cda60293cebd617f0af275d63343f68abd525 (patch)
tree8cf5b916ce24d6c35031b3fc0eb5b6a80d48c24a /examples
parentcfa92e45a7f4550885917022ee8e19ee2a410de1 (diff)
downloadleaflet-soton-586cda60293cebd617f0af275d63343f68abd525.tar
leaflet-soton-586cda60293cebd617f0af275d63343f68abd525.tar.gz
Add a RouteLayer and RouteControl
Add the leaflet-textpath submodule as it is used in the RouteLayer Improve the bus route extraction: - Now supports polygons for platforms - Supports routes not in a route master - Filter out all but one U1C route (in an attempt to make the interface less confusing) Add an example using the RouteLayer and RouteControl. Hard code the centers for some "University" buildings on the Isle of White and in Basingstoke, such that workstations listed as in these buildings appear on the map.
Diffstat (limited to 'examples')
-rw-r--r--examples/bus.html47
-rw-r--r--examples/index.html1
2 files changed, 48 insertions, 0 deletions
diff --git a/examples/bus.html b/examples/bus.html
new file mode 100644
index 0000000..a936262
--- /dev/null
+++ b/examples/bus.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Map - University of Southampton</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+
+ <link rel="stylesheet" href="../resources/leaflet-locatecontrol/src/L.Control.Locate.css" />
+ <link rel="stylesheet" href="../resources/leaflet/dist/leaflet.css" />
+
+ <link rel="stylesheet" href="../src/leaflet-soton.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-src.js"></script>
+ <script src="../resources/leaflet-markercluster/dist/leaflet.markercluster.js"></script>
+ <script src="../resources/leaflet-locatecontrol/src/L.Control.Locate.js"></script>
+ <script src="../resources/leaflet-hash/leaflet-hash.js"></script>
+ <script src="../resources/leaflet-textpath/leaflet.textpath.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', {
+ busRoutes: true,
+ busRouteControl: true
+ });
+
+ L.control.locate().addTo(map);
+ </script>
+</body>
+</html>
diff --git a/examples/index.html b/examples/index.html
index fb1095b..782314a 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -95,6 +95,7 @@ h6 { font-size: 1em; line-height: 1.3125; }
<li><a href="zepler.html">Zepler Example</a></li>
<li><a href="vendingmachines.html">Vending Machines Example</a></li>
<li><a href="cycleparkingheatmap.html">Cycle Parking Heatmap Example</a></li>
+ <li><a href="bus.html">Bus Routes Example</a></li>
</ul>
<h2>OpenStreetMap</h2>