cleanup
parent
2170a4a3fd
commit
c4e9d7462b
|
|
@ -1,45 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet.heat demo</title>
|
||||
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
|
||||
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
|
||||
<style>
|
||||
#map { width: 1024px; height: 768px; }
|
||||
body { font: 16px/1.4 "Helvetica Neue", Arial, sans-serif; }
|
||||
.ghbtns { position: relative; top: 4px; margin-left: 5px; }
|
||||
a { color: #0077ff; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<!-- <script src="../node_modules/simpleheat/simpleheat.js"></script>
|
||||
<script src="../src/HeatLayer.js"></script> -->
|
||||
|
||||
<script src="https://rawgit.com/Leaflet/Leaflet.heat/gh-pages/dist/leaflet-heat.js"></script>
|
||||
|
||||
<script src="./heat_data.js"></script>
|
||||
<script>
|
||||
var options = {maxZoom:22};
|
||||
var map = L.map('map', options).setView(coords[0], 17);
|
||||
L.control.scale().addTo(map);
|
||||
var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
|
||||
function addHeat(coords){
|
||||
var heat = L.heatLayer(coords).addTo(map);
|
||||
}
|
||||
//coords = coords.map(function (p) { return [p[1], p[0], 0.05]; });
|
||||
|
||||
//var heat = L.heatLayer(coords).addTo(map);
|
||||
addHeat(coords);
|
||||
</script>
|
||||
<!--script src="./coord.js"></script>
|
||||
<script>
|
||||
//addHeat(coords);
|
||||
</script-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
version: "2"
|
||||
services:
|
||||
http:
|
||||
image: httpd:alpine
|
||||
volumes:
|
||||
- ./:/usr/local/apache2/htdocs
|
||||
ports:
|
||||
- 5001:80
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<script
|
||||
src="https://code.jquery.com/jquery-3.2.1.min.js"
|
||||
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
|
||||
crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css"
|
||||
integrity="sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ=="
|
||||
crossorigin=""/>
|
||||
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"
|
||||
integrity="sha512-lInM/apFSqyy1o6s89K4iQUKg6ppXEgsVxT35HbzUupEVRh2Eu9Wdl4tHj7dZO0s1uvplcYGmt3498TtHq+log=="
|
||||
crossorigin=""></script>
|
||||
|
||||
<script src="https://rawgit.com/Leaflet/Leaflet.heat/gh-pages/dist/leaflet-heat.js"></script>
|
||||
|
||||
<script src="my.js"></script>
|
||||
<link href="style.css" rel="stylesheet"/>
|
||||
<main>
|
||||
<div class="mapDiv" id="mainMap"></div>
|
||||
<div class="sequenceContainer">
|
||||
<div class="sequence"></div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!--div style="font-size:0.1px;position:absolute;bottom:0;">OSM Logo: CC-BY-SA
|
||||
http://wiki.openstreetmap.org/wiki/File:Mag_map-120x120.png
|
||||
</div-->
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<script
|
||||
src="https://code.jquery.com/jquery-3.2.1.min.js"
|
||||
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
|
||||
crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css"
|
||||
integrity="sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ=="
|
||||
crossorigin=""/>
|
||||
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"
|
||||
integrity="sha512-lInM/apFSqyy1o6s89K4iQUKg6ppXEgsVxT35HbzUupEVRh2Eu9Wdl4tHj7dZO0s1uvplcYGmt3498TtHq+log=="
|
||||
crossorigin=""></script>
|
||||
|
||||
<script src="log.js"></script>
|
||||
<style>
|
||||
.map { width: 512px; height: 512px; }
|
||||
</style>
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
$.getJSON("data/fooo", function (data) {
|
||||
var list = $("<ul />");
|
||||
var mapC = $("<div />", {class: "map", id: "map"});
|
||||
mapC.appendTo("body");
|
||||
var track = [];
|
||||
var times = [];
|
||||
$.each(data.spatials, function (i, elem) {
|
||||
track.push([elem.coordinates[1], elem.coordinates[0]]);
|
||||
times.push(i);
|
||||
});
|
||||
var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||
});
|
||||
var map = L.map("map", {layers: [tiles]});
|
||||
L.control.scale().addTo(map);
|
||||
var layer = L.polyline(track).addTo(map);
|
||||
map.fitBounds(layer.getBounds());
|
||||
$.each(data, function (key, value) {
|
||||
//console.log(key, value);
|
||||
//key: instance_id, value: AnlysisResult
|
||||
//value.result.instance: InstanceConfig_id
|
||||
// console.log(key, value[0].result.store[0].timestamp);
|
||||
/*$.each(value[0].result.store, function (index, entry) {
|
||||
//console.log(entry);
|
||||
var time = new Date(entry.timestamp);
|
||||
var item = $("<li>", {html: entry.sequence + " @ " + time.toLocaleDateString() + " "+ time.toLocaleTimeString()});
|
||||
var container = $("<p />");
|
||||
if (entry.track.length > 0) {
|
||||
var mapName = "map" + index;
|
||||
//console.log(mapName, entry.track.length);
|
||||
var mapContainer = $("<div />", {id: mapName, class: "map"});
|
||||
var track = [];
|
||||
$.each(entry.track, function (i, elem) {
|
||||
track.push([elem.coordinates[1], elem.coordinates[0]]);
|
||||
});
|
||||
maps[mapName] = track;
|
||||
|
||||
mapContainer.appendTo(container);
|
||||
}
|
||||
$.each(entry.events, function (i, event) {
|
||||
if ("image" in event) {
|
||||
$("<img />", {src: event.image, height: 200}).appendTo(container);
|
||||
}
|
||||
});
|
||||
container.appendTo(item);
|
||||
item.appendTo(list);
|
||||
});*/
|
||||
});
|
||||
list.appendTo("body");
|
||||
var slider = $("<input />", {type: "range", start:0,end:100});
|
||||
slider.appendTo("body");
|
||||
/*});
|
||||
|
||||
$(window).on("load", function () {*/
|
||||
// setTimeout(function () {
|
||||
|
||||
//console.log(maps);
|
||||
/*$.each(maps, function (mapName, track) {
|
||||
//console.log("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa");
|
||||
var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||
});
|
||||
var map = L.map(mapName, {layers: [tiles]});
|
||||
L.control.scale().addTo(map);
|
||||
// console.log(mapName, track);
|
||||
var layer = L.polyline(track, {color: "green"}).addTo(map);
|
||||
map.fitBounds(layer.getBounds());
|
||||
//console.log(layer)
|
||||
//L.control.layers({"osm":tiles}, {layer]).addTo(map);
|
||||
});*/
|
||||
// }, 2000);
|
||||
});
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
//$.getJSON("data/ff8f1e8f-6cf5-4a7b-835b-5e2226c1e771_03b9b6b4-c8ab-4182-8902-1620eebe8889.json", function (data) { //urach
|
||||
//$.getJSON("data/ff8f1e8f-6cf5-4a7b-835b-5e2226c1e771_de7df5b5-edd5-4070-840f-68854ffab9aa.json", function (data) { //urach
|
||||
//$.getJSON("data/90278021-4c57-464e-90b1-d603799d07eb_07da99c9-398a-424f-99fc-2701763a63e9.json", function (data) { //eichstätt
|
||||
//$.getJSON("data/13241906-cdae-441a-aed0-d57ebeb37cac_d33976a6-8a56-4a63-b492-fe5427dbf377.json", function (data) { //stadtökologie
|
||||
$.getJSON("data/5e64ce07-1c16-4d50-ac4e-b3117847ea43_2f664d7b-f0d8-42f5-8731-c034ef86703e.json", function (data) { //filderstadt
|
||||
//$.getJSON("data/17d401a9-de21-49a2-95bc-7dafa53dda64_98edcb70-03db-4465-b185-a9c9574995ce.json", function (data) { //oeb2016
|
||||
var images = {};
|
||||
var tiles = {
|
||||
"openstreetmap": L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxNativeZoom: 19,
|
||||
maxZoom: 24,
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
}),
|
||||
"esri sat": L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
|
||||
maxNativeZoom: 19,
|
||||
maxZoom: 24,
|
||||
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
||||
}),
|
||||
"google sat": L.tileLayer('https://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
|
||||
maxNativeZoom: 20,
|
||||
maxZoom: 24,
|
||||
subdomains: ['mt0', 'mt1', 'mt2', 'mt3']
|
||||
})
|
||||
};
|
||||
var map = L.map("mainMap", {layers: [tiles.openstreetmap]});
|
||||
|
||||
function styleTrack(feature) {
|
||||
var styles = {};
|
||||
styles.color = data.colors[feature.properties.activity_type];
|
||||
return styles;
|
||||
}
|
||||
|
||||
var highlighted = null;
|
||||
|
||||
function onClick(e) {
|
||||
var start = e.target.feature.geometry.properties.start_timestamp;
|
||||
var end = e.target.feature.geometry.properties.end_timestamp;
|
||||
var changed = highlighted !== e.target.feature;
|
||||
$.each(images, function (timestamp, board) {
|
||||
if ((timestamp >= start && timestamp < end) && changed) {
|
||||
board.image.first().addClass("highlight");
|
||||
} else {
|
||||
board.image.removeClass("highlight");
|
||||
highlighted = null;
|
||||
}
|
||||
}
|
||||
);
|
||||
if (changed) {
|
||||
highlighted = e.target.feature;
|
||||
}
|
||||
}
|
||||
|
||||
var coords = [];
|
||||
|
||||
function onEachFeature(feature, layer) {
|
||||
layer.setStyle(styleTrack(feature));
|
||||
layer.on('click', onClick);
|
||||
if (feature.coordinates.length > 1) {
|
||||
coords = coords.concat(feature.coordinates.map(function (p) {
|
||||
return [p[1], p[0], 0.1];
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
var track = L.geoJSON(data['track'], {
|
||||
//style: styleTrack,
|
||||
onEachFeature: onEachFeature
|
||||
}).addTo(map);
|
||||
|
||||
map.fitBounds(track.getBounds());
|
||||
|
||||
var heat = L.heatLayer(coords);
|
||||
L.control.layers(tiles, {"heatmap": heat}).addTo(map);
|
||||
|
||||
var list = $("<ul />");
|
||||
var current = {
|
||||
"pos":data["boards"][1].coordinate.coordinates
|
||||
};
|
||||
console.log(current);
|
||||
var marker = L.marker([current.pos[1], current.pos[0]]).addTo(map);
|
||||
$.each(data["boards"], function (index, entry) {
|
||||
//console.log(index, entry);
|
||||
var item = $("<li>", {class: entry.extra_data.activity_type});
|
||||
var container = $("<div>", {class: "board"});
|
||||
var image = $("<img>", {src: entry.image.replace("static/progress/", "")});
|
||||
image.attr("data-time", entry.timestamp);
|
||||
image.hover(function () {
|
||||
marker.setLatLng([entry.coordinate.coordinates[1], entry.coordinate.coordinates[0]]);
|
||||
}, function () {
|
||||
marker.setLatLng(current.pos.coordinates[1], current.pos.coordinates[0]);
|
||||
});
|
||||
image.click(function (e) {
|
||||
current.board = image;
|
||||
current.pos = entry.coordinate;
|
||||
});
|
||||
images[entry.timestamp] = {image: image, coordinate: entry.coordinate};
|
||||
image.appendTo(container);
|
||||
container.appendTo(item);
|
||||
item.appendTo(list);
|
||||
});
|
||||
current.board=images[data["boards"][1].timestamp];
|
||||
list.appendTo(".sequence");
|
||||
});
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
/*.mapDiv {
|
||||
width: 1024px;
|
||||
height: 768px;
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
.highlight {
|
||||
/*what a nice way to highlight*/
|
||||
display: none;
|
||||
}
|
||||
|
||||
.simu {
|
||||
background-color: blue;
|
||||
}
|
||||
|
||||
.question {
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.image {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.audio {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.video {
|
||||
background-color: purple;
|
||||
}
|
||||
|
||||
.other {
|
||||
background-color: brown;
|
||||
}
|
||||
|
||||
.map {
|
||||
background-color: violet;
|
||||
}
|
||||
|
||||
.error {
|
||||
background-color: grey;
|
||||
}
|
||||
|
||||
|
||||
.board {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.board img {
|
||||
max-width: 32px;
|
||||
max-height: 32px;
|
||||
position: absolute;
|
||||
/*bottom: 0px;*/
|
||||
}
|
||||
|
||||
.board:hover img{
|
||||
max-width: 205px;
|
||||
max-height: 295px;
|
||||
z-index: 99;
|
||||
top: 5px;
|
||||
right:0px;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
overflow: auto;
|
||||
overflow-y: hidden;
|
||||
display: inline-block;
|
||||
/*max-width:100%;
|
||||
margin: 0 0 1em;
|
||||
white-space: nowrap;
|
||||
height:200px;*/
|
||||
}
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
padding: 2px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
body{
|
||||
height: 100%;
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
main{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.mapDiv {
|
||||
flex-grow:1;
|
||||
}
|
||||
.sequenceContainer{
|
||||
flex-grow: 0;
|
||||
min-height:300px;
|
||||
padding-right: 210px;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Leaflet.heat demo</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css"
|
||||
integrity="sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ=="
|
||||
crossorigin=""/>
|
||||
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"
|
||||
integrity="sha512-lInM/apFSqyy1o6s89K4iQUKg6ppXEgsVxT35HbzUupEVRh2Eu9Wdl4tHj7dZO0s1uvplcYGmt3498TtHq+log=="
|
||||
crossorigin=""></script>
|
||||
<style>
|
||||
#map { width: 1024px; height: 768px; }
|
||||
body { font: 16px/1.4 "Helvetica Neue", Arial, sans-serif; }
|
||||
.ghbtns { position: relative; top: 4px; margin-left: 5px; }
|
||||
a { color: #0077ff; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<!-- <script src="../node_modules/simpleheat/simpleheat.js"></script>
|
||||
<script src="../src/HeatLayer.js"></script> -->
|
||||
|
||||
<script src="http://rawgit.com/Leaflet/Leaflet.heat/gh-pages/dist/leaflet-heat.js"></script>
|
||||
|
||||
<script src="./track_data.js"></script>
|
||||
<script>
|
||||
var options = {maxZoom:22};
|
||||
//var map = L.map('map', options).setView([49.90299388, 10.87004638], 17);
|
||||
var map = L.map('map', options);
|
||||
L.control.scale().addTo(map);
|
||||
var tiles = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
|
||||
function addHeat(coords){
|
||||
//var transformed = coords.map(function (p) { return [p[1], p[0], 0.25]; });
|
||||
var heat = L.heatLayer(coords).addTo(map);
|
||||
}
|
||||
var layers=[];
|
||||
function addTrack(tracks, i){
|
||||
var elem = L.polyline(tracks[i], {color:"green"});
|
||||
// layers[i] =L.LayerGroup([elem]);
|
||||
layers[i] = elem;
|
||||
map.fitBounds(elem.getBounds());
|
||||
layers[i].on('mouseover', function (e) {
|
||||
e.target.setStyle({'color':'red'});
|
||||
});
|
||||
layers[i].on('mouseout', function (e) {
|
||||
e.target.setStyle({'color':'green'});
|
||||
});
|
||||
}
|
||||
//coords = coords.map(function (p) { return [p[1], p[0], 0.05]; });
|
||||
|
||||
//var heat = L.heatLayer(coords).addTo(map);
|
||||
//addHeat(coords);
|
||||
for (var i in tracks) {
|
||||
addTrack(tracks, i);
|
||||
}
|
||||
L.control.layers(null, layers).addTo(map);
|
||||
</script>
|
||||
<!--script src="./heat_data.js"></script>
|
||||
<script>
|
||||
addHeat(coords);
|
||||
</script-->
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue