Skip to content
Permalink
Browse files
first
  • Loading branch information
ac0745 committed Oct 2, 2018
1 parent 92d22e8 commit 11c990a56ed792cc1e40d70d8009a0f6b82c1d4a
Show file tree
Hide file tree
Showing 68 changed files with 2,180 additions and 0 deletions.

Large diffs are not rendered by default.

BIN +42 Bytes img/blank.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +342 Bytes img/east-mini.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +758 Bytes img/marker-blue.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +703 Bytes img/marker-gold.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +753 Bytes img/marker-green.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +601 Bytes img/marker.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +378 Bytes img/north-mini.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +247 Bytes img/slider.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +373 Bytes img/south-mini.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +360 Bytes img/west-mini.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +291 Bytes img/zoom-minus-mini.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +386 Bytes img/zoom-plus-mini.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +882 Bytes img/zoom-world-mini.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN +350 Bytes img/zoombar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">

<title>Realtime search demo</title>
</head>

<style type="text/css">
.search-box{
margin-top: 1rem;
}
.result{
margin-top: 1rem;
}
.list-group-item{
margin-top: 10px;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.24);
}

.column {
float: left;
width: 50%;
}

/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
</style>

<body>

<div class="container row">
<div class="column">
<div class="col-xs-8 col-xs-offset-2 search-box">
<div class="input-group">
<input oninput="updateResult(this.value)" type="search" class="form-control" placeholder="Search..." />
</div>
</div>

<div class="container">
<ul class="list-group result"></ul>
</div>
</div>

<div class="column">
<div id="map" style="height:350px"></div>
</div>
</div>

<script src="OpenLayers.js"></script>


</body>

<script src="main.js"></script>

</html>
63 main.js
@@ -0,0 +1,63 @@
let arr = [ {data:[-1.499725,52.405211,15], rooms: ["EC1-01","EC1-02","EC1-03","EC1-11","EC1-12","EC1-13","EC1-14","EC1-21","EC1-22","EC1-23","EC1-26","EC1-27A","EC1-27B","EC1-28","EC1-29","EC2-01","EC2-02","EC2-03","EC2-04","EC2-12","EC2-13","EC2-14","EC2-24","EC2-25","ECG-01","ECG-02","ECG-03","ECG-04","ECG-12","ECG-13","ECG-14","ECG-15","ECG-24","ECG-26","ECG-27","ECG-35","ECG-36","ECG-SS","ECL-10","ECL-13","ECL-16B","ECL-19","ECL-24","ECL-26","ECL-27","ECL-28","ECL-29","ECL-30/31","ECL-32","ECL-33","ECL-34A","ECL-34B","ECL-34C","ECL-34E1","ECL-34E2","ECL-34E4","ECL-34F","ECL-34J","ECL-34WT","ECM-01A","ECM-01B","ECM-15","ECM-15A","ECM-18"]},
{rooms: ["AAAA"], data: "d"},
{rooms: ["AAAA"], data: ""} ];

var map = new OpenLayers.Map("map");
map.addLayer(new OpenLayers.Layer.OSM());

var markers = new OpenLayers.Layer.Markers( "Markers" );
map.addLayer(markers);

var fromProjection = new OpenLayers.Projection("EPSG:4326");
var toProjection = new OpenLayers.Projection("EPSG:900913");

window.onload = function()
{
console.log("onload");
updateMap( 0, 0, 1 );
};

function updateMap(long, lat, zoom)
{
console.log("updateMap()");

var position = new OpenLayers.LonLat(long,lat).transform(fromProjection, toProjection);
map.setCenter(position, zoom);


markers.addMarker(new OpenLayers.Marker(position));
};

const updateResult = query =>
{
let resultList = document.querySelector(".result");
resultList.innerHTML = "";

query = query.toUpperCase();

for( var i in arr )
{
let rooms = arr[i].rooms;
let data = arr[i].data;
for( var j in rooms )
{
let room = rooms[j];
if( room.indexOf(query) != -1 )
resultList.innerHTML += `<li class="list-group-item" onclick="updateMap(${data[0]},${data[1]},${data[2]})">${room}</li>`;
}
}

/*let found = false;
for( var i=0; !found && i<arr.length; ++i )
{
let pattern = arr[i][0]
let url = arr[i][1];
if( pattern.indexOf(query) != -1 )
{
resultList.innerHTML += `<li class="list-group-item">${pattern}</li>`;
}
}*/
}

updateResult("")
@@ -0,0 +1,9 @@
.olLayerGoogleCopyright {
right: 3px;
bottom: 2px;
left: auto;
}
.olLayerGooglePoweredBy {
left: 2px;
bottom: 2px;
}
@@ -0,0 +1 @@
.olLayerGoogleCopyright{right:3px;bottom:2px;left:auto;}.olLayerGooglePoweredBy{left:2px;bottom:2px;}
@@ -0,0 +1,10 @@
.olControlZoomPanel div {
background-image: url(img/zoom-panel-NOALPHA.png);
}
.olControlPanPanel div {
background-image: url(img/pan-panel-NOALPHA.png);
}
.olControlEditingToolbar {
width: 200px;
}

Some generated files are not rendered by default. Learn more.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 11c990a

Please sign in to comment.