|
|
@ -33,9 +33,11 @@ function loadLeafletMap() {
|
|
|
|
var locationSets = locations.locations;
|
|
|
|
var locationSets = locations.locations;
|
|
|
|
map = L.map(container).setView([lat, long], zoomLevel);
|
|
|
|
map = L.map(container).setView([lat, long], zoomLevel);
|
|
|
|
L.tileLayer(tileSet, {attribution: attribution}).addTo(map);
|
|
|
|
L.tileLayer(tileSet, {attribution: attribution}).addTo(map);
|
|
|
|
|
|
|
|
var initTime = locations.times[0].time, lastTime = locations.times[locationSets.length - 1].time;
|
|
|
|
for(var i = 0; i < locationSets.length; i++){
|
|
|
|
var totalTime = lastTime - initTime;
|
|
|
|
var m = L.marker(locationSets[i]).addTo(map).bindPopup(new Date(locations.times[i].time).toISOString())
|
|
|
|
for (var i = 0; i < locationSets.length; i++) {
|
|
|
|
|
|
|
|
var opacVal = (locations.times[i].time - initTime) / totalTime;
|
|
|
|
|
|
|
|
var m = L.marker(locationSets[i], {"opacity": opacVal}).addTo(map).bindPopup(new Date(locations.times[i].time).toISOString());
|
|
|
|
m.on('mouseover', function (e) {
|
|
|
|
m.on('mouseover', function (e) {
|
|
|
|
this.openPopup();
|
|
|
|
this.openPopup();
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -53,7 +55,7 @@ function loadLeafletMap() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
$(document).ready(function () {
|
|
|
|
$("a[data-toggle='tab']").on("shown.bs.tab", function() {
|
|
|
|
$("a[data-toggle='tab']").on("shown.bs.tab", function () {
|
|
|
|
var url = $(this).prop("href");
|
|
|
|
var url = $(this).prop("href");
|
|
|
|
var hash = url.substring(url.indexOf("#") + 1);
|
|
|
|
var hash = url.substring(url.indexOf("#") + 1);
|
|
|
|
|
|
|
|
|
|
|
|