summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/buildingsearch.html187
-rw-r--r--examples/index.html1
2 files changed, 0 insertions, 188 deletions
diff --git a/examples/buildingsearch.html b/examples/buildingsearch.html
deleted file mode 100644
index 6826cca..0000000
--- a/examples/buildingsearch.html
+++ /dev/null
@@ -1,187 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
-
- <title>Building Search</title>
-
- <link rel="stylesheet" href="../src/leaflet-soton.css" />
- <link rel="stylesheet" href="../resources/leaflet/dist/leaflet.css" />
-
-<style type="text/css">
-
-html { height: 100% }
-body { height: 100%; margin: 0px; padding: 0px }
-#top_bar {
- height: 10%;
- width:100%;
- height:5%;
- border-bottom: 1px solid #000;
- overflow:hidden;
- background-color:#ccc
-}
-
-#map_canvas { height: 90% }
-
-.info_photo {
- float:right;
- padding: 0em 0em 0.3em 1em;
-}
-.info {
- font-family: sans-serif;
- width: 400px;
- height: 200px;
- overflow-y: auto;
-}
-.info_label {
- font-weight: bold;
- font-size: 130%;
-}
-.info_n {
- font-size: 200%;
-}
-.info_link {
- margin-bottom: 1em;
- font-size: small;
-}
-.info_txt {
- margin-bottom: 0.5em;
-}
-#resultsDiv {
- padding-bottom: 2em;
-}
-#resultsDiv a {
- display: block;
- padding-top: 0.3em;
- padding-left: 5%;
- padding-right: 5%;
-}
-#resultsDiv a .n {
- padding-right: 0.5em;
- display: block;
- float: right;
- font-size: 90%;
-}
-#resultsDiv a .label {
- display: block;
- padding-left: 0.5em;
- border-bottom: solid 1px #ccc;
- padding-bottom: 0.3em;
- font-size: 120%;
-}
-
-#searchBox {
- text-align: center;
- width: 90%;
- font-size: 140%;
- padding: 0.1em;
- border: solid 1px #000;
-}
-
-</style>
-
-</head>
-<body>
-<div id="top_bar">
-<div style='font-size:40px;padding:5px 5px 3px 5px;'>
- Building Search
-</div>
-</div>
-<div id="map" style="width:70%; height:95%; float:right"></div>
-
-<div style='height:95%;overflow-y:auto;border-right:1px solid #000'>
-
- <div style='padding-bottom:0.5em;border-bottom:solid 1px #000;margin-bottom:0.5em'>
-
- <div style='margin:0.3em;text-align:center;clear:both;'>
- <input id='searchBox' />
- </div>
- <div style='text-align:center'>
- <label>
- <input id='res' type='checkbox' name='res' value='yes' />
- Include Halls and Residential Buildings
- </label>
- </div>
- <div style='text-align:center;margin-top:0.3em;font-size:80%'>
- Type "b12." to search for a specific building number.
- </div>
- </div>
-
- <div id='resultsDiv'>
- </div>
-</div>
-
-<script src="../resources/leaflet/dist/leaflet.js"></script>
-<script src="../src/leaflet-soton.js"></script>
-<script src="../resources/leaflet-indoor/leaflet-indoor.js"></script>
-<script src="../resources/uos-live.js/libraries/pollymer/pollymer.js"></script>
-<script src="../resources/uos-live.js/uos-live.js"></script>
-
-<script type="text/javascript">
- LS.imagePath = '../resources/images/';
- LS.dataPath = '../data.json';
-
- (function() {
- var map = LS.map('map', {
- indoor: true
- });
-
- LS.on("dataload", function(data) {
- var searchBox = document.getElementById("searchBox");
- var residentialTickBox = document.getElementById("res");
- var resultsDiv = document.getElementById("resultsDiv");
-
- var buildings = data.buildings.features.sort(function(a, b) {
- return a.properties.name.localeCompare(b.properties.name);
- });
-
- function filter() {
- var searchText = searchBox.value.toLowerCase();
-
- resultsDiv.innerHTML = "";
-
- var results = [];
-
- buildings.forEach(function(building) {
- var name = building.properties.name;
-
- if (name.length === 0)
- return;
-
- if (name.toLowerCase().indexOf(searchText) !== -1) {
- var a = document.createElement("a");
- a.href = "#";
-
- a.onclick = function() {
- map.panByURI(building.properties.uri);
- };
-
- var label = document.createElement("span");
- label.textContent = name;
- label.className = "label";
- a.appendChild(label);
-
- var n = document.createElement("span");
- n.textContent = building.properties.loc_ref;
- n.className = "n";
- a.appendChild(n);
-
- resultsDiv.appendChild(a);
-
- results.push(building.properties.uri);
- }
- });
-
- if (results.length === 1) {
- map.showPopupByURI(results[0]);
- }
- }
-
- searchBox.onkeyup = filter;
-
- filter();
- });
- })();
-</script>
-</body>
-</html>
diff --git a/examples/index.html b/examples/index.html
index 1e40d65..ea68c68 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -89,7 +89,6 @@ h6 { font-size: 1em; line-height: 1.3125; }
<ul>
<li><a href="basic.html">Basic</a></li>
<li><a href="full.html">Full</a></li>
- <li><a href="buildingsearch.html">Building Search</a></li>
<li><a href="indoor.html">Indoor</a></li>
<li><a href="workstations.html">Workstations</a></li>
<li><a href="zepler.html">Zepler</a></li>