Plus Icon Maß verkleinern, Card oben rechts und links in dropdown semibold für checkbox kein bold.
Unten links TALAS.Map semibold, Version kein bold
1305
MapTypC.aspx/MapTypC.andy
Normal file
46
MapTypC.aspx/MapTypC.aspx
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Standard.Master" AutoEventWireup="true" CodeBehind="MapTypC.aspx.cs" Inherits="TALAS_V5.MessagesMap.MapTypC" %>
|
||||||
|
<%@ Register assembly="DevExpress.Web.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web" tagprefix="dx" %>
|
||||||
|
|
||||||
|
<asp:Content ID="NaviContent" ContentPlaceHolderID="NaviContent" runat="server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
|
<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.responsive-iframe-wrapper {
|
||||||
|
position: relative !important;
|
||||||
|
width: 100% !important;
|
||||||
|
height: 97.2vh !important; /* Setzt die Höhe des Wrappers auf die Höhe des Viewports */
|
||||||
|
overflow: hidden !important; /* Verhindert Scrollbalken innerhalb des Wrappers */
|
||||||
|
padding: 0 0 0 0 !important;
|
||||||
|
margin: 0 0 0 0 !important;
|
||||||
|
}
|
||||||
|
.responsive-iframe-wrapper iframe {
|
||||||
|
position: absolute !important;
|
||||||
|
top: 0 !important;
|
||||||
|
left: 0 !important;
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
border: none !important; /* Removes the border */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="responsive-iframe-wrapper">
|
||||||
|
<iframe frameborder="0"></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
var url = new URL(window.location.href);
|
||||||
|
var mValue = url.searchParams.get("m");
|
||||||
|
var uValue = url.searchParams.get("u");
|
||||||
|
|
||||||
|
// Setzen der src-Eigenschaft des iframe mit den abgerufenen Parametern
|
||||||
|
document.querySelector('.responsive-iframe-wrapper iframe').src =
|
||||||
|
// "http://10.10.0.70:3000?m=" + encodeURIComponent(mValue) + "&u=" + encodeURIComponent(uValue);
|
||||||
|
"http://10.10.0.13:3000?m=" + encodeURIComponent(mValue) + "&u=" + encodeURIComponent(uValue);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
46
MapTypC.aspx/MapTypC.aspx.ismail
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Standard.Master" AutoEventWireup="true" CodeBehind="MapTypC.aspx.cs" Inherits="TALAS_V5.MessagesMap.MapTypC" %>
|
||||||
|
<%@ Register assembly="DevExpress.Web.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web" tagprefix="dx" %>
|
||||||
|
|
||||||
|
<asp:Content ID="NaviContent" ContentPlaceHolderID="NaviContent" runat="server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
|
<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.responsive-iframe-wrapper {
|
||||||
|
position: relative !important;
|
||||||
|
width: 100% !important;
|
||||||
|
height: 95vh !important; /* Setzt die Höhe des Wrappers auf die Höhe des Viewports */
|
||||||
|
overflow: hidden !important; /* Verhindert Scrollbalken innerhalb des Wrappers */
|
||||||
|
padding: 0 0 0 0 !important;
|
||||||
|
margin: 0 0 0 0 !important;
|
||||||
|
}
|
||||||
|
.responsive-iframe-wrapper iframe {
|
||||||
|
position: absolute !important;
|
||||||
|
top: 0 !important;
|
||||||
|
left: 0 !important;
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
border: none !important; /* Removes the border */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="responsive-iframe-wrapper">
|
||||||
|
<iframe frameborder="0"></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
var url = new URL(window.location.href);
|
||||||
|
var mValue = url.searchParams.get("m");
|
||||||
|
var uValue = url.searchParams.get("u");
|
||||||
|
|
||||||
|
// Setzen der src-Eigenschaft des iframe mit den abgerufenen Parametern
|
||||||
|
document.querySelector('.responsive-iframe-wrapper iframe').src =
|
||||||
|
// "http://10.10.0.70:3000?m=" + encodeURIComponent(mValue) + "&u=" + encodeURIComponent(uValue);
|
||||||
|
"http://10.10.0.13:3000?m=" + encodeURIComponent(mValue) + "&u=" + encodeURIComponent(uValue);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
BIN
Recoil in Next.js-Projekt _ Wiki.js2.pdf
Normal file
@@ -108,7 +108,7 @@ function DataSheet() {
|
|||||||
<select
|
<select
|
||||||
onChange={handleAreaChange} // Verwenden der neuen handleAreaChange Funktion
|
onChange={handleAreaChange} // Verwenden der neuen handleAreaChange Funktion
|
||||||
id="stationListing"
|
id="stationListing"
|
||||||
className="border-solid-1 p-2 rounded ml-1"
|
className="border-solid-1 p-2 rounded ml-1 font-semibold"
|
||||||
>
|
>
|
||||||
<option>Station wählen</option>
|
<option>Station wählen</option>
|
||||||
{stationListing.map((station) => (
|
{stationListing.map((station) => (
|
||||||
@@ -132,7 +132,7 @@ function DataSheet() {
|
|||||||
checked={mapLayersVisibility[system.name] || false}
|
checked={mapLayersVisibility[system.name] || false}
|
||||||
onChange={(e) => handleCheckboxChange(system.name, e)}
|
onChange={(e) => handleCheckboxChange(system.name, e)}
|
||||||
/>
|
/>
|
||||||
<label className="text-sm font-bold ml-2">{system.name}</label>
|
<label className="text-sm ml-2">{system.name}</label>
|
||||||
<br />
|
<br />
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -26,16 +26,17 @@ import { InformationCircleIcon } from "@heroicons/react/20/solid"; // oder 'outl
|
|||||||
const plusRoundIcon = L.icon({
|
const plusRoundIcon = L.icon({
|
||||||
//iconUrl: "/img/plus_round.png", // Update with your actual path
|
//iconUrl: "/img/plus_round.png", // Update with your actual path
|
||||||
iconUrl: "/img/plus_round.png", // Update with your actual path
|
iconUrl: "/img/plus_round.png", // Update with your actual path
|
||||||
iconSize: [32, 32],
|
iconSize: [22, 22],
|
||||||
iconAnchor: [35, 55],
|
iconAnchor: [28, 55],
|
||||||
className: "absolute top-0 left-0 z-10", // Adjust with Tailwind CSS classes
|
className: "absolute top-0 left-0 z-10", // Adjust with Tailwind CSS classes
|
||||||
});
|
});
|
||||||
|
|
||||||
const MapComponent = ({ locations, onLocationUpdate }) => {
|
const MapComponent = ({ locations, onLocationUpdate }) => {
|
||||||
const [showVersionInfoModal, setShowVersionInfoModal] = useState(false);
|
const [showVersionInfoModal, setShowVersionInfoModal] = useState(false);
|
||||||
const zoomTrigger = useRecoilValue(zoomTriggerState);
|
const zoomTrigger = useRecoilValue(zoomTriggerState);
|
||||||
const offlineTileLayer = "../TileMap/mapTiles/{z}/{x}/{y}.png";
|
const offlineTileLayer = "/mapTiles/{z}/{x}/{y}.png";
|
||||||
const onlineTileLayer = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
const onlineTileLayer = "/mapTiles/{z}/{x}/{y}.png";
|
||||||
|
//const onlineTileLayer = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
||||||
//const onlineTileLayer = "mapTiles/{z}/{x}/{y}.png";
|
//const onlineTileLayer = "mapTiles/{z}/{x}/{y}.png";
|
||||||
// Create map layers
|
// Create map layers
|
||||||
const TALAS = new L.layerGroup();
|
const TALAS = new L.layerGroup();
|
||||||
@@ -1687,13 +1688,14 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
|||||||
style={{ height: "100vh", width: "100vw" }}
|
style={{ height: "100vh", width: "100vw" }}
|
||||||
></div>
|
></div>
|
||||||
|
|
||||||
<div className="absolute bottom-5 left-24 w-72 p-4 bg-white rounded-lg shadow-md z-50">
|
<div className="absolute bottom-3 left-3 w-72 p-4 bg-white rounded-lg shadow-md z-50">
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<div>
|
<div>
|
||||||
<span className="text-black text-lg font-bold">
|
<span className="text-black text-lg font-semibold"> TALAS.Map </span>
|
||||||
TALAS.Map
|
|
||||||
<br />
|
<br />
|
||||||
Version 0.5.6
|
<span className="text-black text-lg">
|
||||||
|
Version 1.0.0
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -1736,7 +1738,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
|||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-gray-700 text-center font-bold mt-4 leading-relaxed">
|
<p className="text-gray-700 text-center font-bold mt-4 leading-relaxed">
|
||||||
TALAS.Map Version 0.5.6
|
TALAS.Map Version 1.0.0
|
||||||
</p>
|
</p>
|
||||||
<button
|
<button
|
||||||
onClick={closeVersionInfoModal}
|
onClick={closeVersionInfoModal}
|
||||||
|
|||||||
@@ -1,107 +0,0 @@
|
|||||||
geoDataListComb.forEach((c) => {
|
|
||||||
const myArray = c.split(",");
|
|
||||||
//console.log("c: "+myArray[0]+myArray[1]);
|
|
||||||
if (!uniqueData.includes(myArray[0] + myArray[1])) {
|
|
||||||
uniqueData.push(myArray[0] + myArray[1]);
|
|
||||||
uniqueDataTooltip.push(c);
|
|
||||||
listIdLDs.push(parseInt(myArray[3]));
|
|
||||||
//console.log(c);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
doubleData.push(myArray[0] + "," + myArray[1]);
|
|
||||||
//console.log(doubleData);
|
|
||||||
L.marker([myArray[0], myArray[1]],
|
|
||||||
{
|
|
||||||
icon: markerGroup
|
|
||||||
|
|
||||||
}).addTo(map);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dataMeasures.forEach((c) => {
|
|
||||||
//console.log(c);
|
|
||||||
if (!uniqueGMAFilter.includes(c.IdLD)) {
|
|
||||||
uniqueGMAFilter.push(c.IdLD);
|
|
||||||
uniqueGMA.push(c);
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//console.log(uniqueGMA);
|
|
||||||
|
|
||||||
for (let index = 0; index < uniqueDataTooltip.length; index++) {
|
|
||||||
let element = uniqueDataTooltip[index].split(",");
|
|
||||||
let lat = element[0];
|
|
||||||
let lng = element[1];
|
|
||||||
let ID = element[2];
|
|
||||||
let IdLD = element[3];
|
|
||||||
|
|
||||||
const Tooltip = L.marker([lat, lng], { icon: invisibleMarker }).bindTooltip('<div>'
|
|
||||||
+ '<div id="value1-' + IdLD + '" style="font-weight:700;">---</div>'
|
|
||||||
+ '<div id="value2-' + IdLD + '" style="font-weight:700;">---</div>'
|
|
||||||
+ '<div id="value3-' + IdLD + '" style="font-weight:700;">---</div>'
|
|
||||||
+ '<div id="value4-' + IdLD + '" style="font-weight:700;">---</div>'
|
|
||||||
+ '</div>', { permanent: true, direction: "right", opacity: 0.8, offset: L.point({ x: 10, y: 0 }) }).openTooltip().addTo(GMA);
|
|
||||||
|
|
||||||
}
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
let uniqueDataApp = [];
|
|
||||||
let uniqueGMAApp = [];
|
|
||||||
|
|
||||||
console.log(geoDataListComb);
|
|
||||||
console.log(dataMeasures);
|
|
||||||
console.log(uniqueGMA);
|
|
||||||
|
|
||||||
geoDataListComb.forEach((c) => {
|
|
||||||
const myArray = c.split(",");
|
|
||||||
console.log("c: "+myArray[0]+myArray[1]);
|
|
||||||
if (!uniqueDataApp.includes(myArray[0]+myArray[1]+myArray[2]+myArray[3])) {
|
|
||||||
uniqueDataApp.push(myArray[0]+myArray[1]+myArray[2]+myArray[3]);
|
|
||||||
//console.log(c);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
dataMeasures.forEach((c) => {
|
|
||||||
const myArray = c.split(",");
|
|
||||||
if (!uniqueGMAApp.includes(myArray[0]+myArray[1]+myArray[2]+myArray[3])) {
|
|
||||||
uniqueGMAApp.push(myArray[0]+myArray[1]+myArray[2]+myArray[3]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("Datalist");
|
|
||||||
console.log(uniqueDataApp);
|
|
||||||
console.log("GMAlist");
|
|
||||||
console.log(uniqueGMAApp);
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/*Polyline example
|
|
||||||
[53.46130277, 7.91247367],
|
|
||||||
[53.46010189, 7.92521953],
|
|
||||||
[53.45266587, 7.91526317],
|
|
||||||
[53.44338822, 8.02525520],
|
|
||||||
[53.39612505, 8.10301780],
|
|
||||||
[53.35034638, 8.119068145],
|
|
||||||
[53.29661923, 8.14344406],
|
|
||||||
[53.24229794, 8.17610263],
|
|
||||||
[53.24241351, 8.17718625]
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
var polyline = L.polyline(latlngs, {color: 'green',weight: 5,lineCap: 'square'}).bindPopup('<b style="font-size:1.25rem;">Name</b><br /><b>Device</b><br /><b>Area</b> ( Area Name )<br /><b>Location Short</b> ( Test )').addTo(map);
|
|
||||||
|
|
||||||
polyline.on('mouseover', function (e) {
|
|
||||||
this.openPopup();
|
|
||||||
this.setStyle({
|
|
||||||
weight: 15
|
|
||||||
});
|
|
||||||
});
|
|
||||||
polyline.on('mouseout', function (e) {
|
|
||||||
this.closePopup();
|
|
||||||
this.setStyle({
|
|
||||||
weight: 5
|
|
||||||
});
|
|
||||||
});*/
|
|
||||||
@@ -1,451 +0,0 @@
|
|||||||
// Generated by CoffeeScript 1.6.2
|
|
||||||
/** @preserve OverlappingMarkerSpiderfier
|
|
||||||
https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet
|
|
||||||
Copyright (c) 2011 - 2012 George MacKerron
|
|
||||||
Released under the MIT licence: http://opensource.org/licenses/mit-license
|
|
||||||
Note: The Leaflet maps API must be included *before* this code
|
|
||||||
*/
|
|
||||||
console.log("OverlappingMarkerSpiderfier.js loaded..");
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
var __hasProp = {}.hasOwnProperty,
|
|
||||||
__slice = [].slice;
|
|
||||||
|
|
||||||
if (this["L"] == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this["OverlappingMarkerSpiderfier"] = (function () {
|
|
||||||
var p, twoPi;
|
|
||||||
|
|
||||||
p = _Class.prototype;
|
|
||||||
|
|
||||||
p["VERSION"] = "0.2.6";
|
|
||||||
|
|
||||||
twoPi = Math.PI * 2;
|
|
||||||
|
|
||||||
p["keepSpiderfied"] = false;
|
|
||||||
|
|
||||||
p["nearbyDistance"] = 20;
|
|
||||||
|
|
||||||
p["circleSpiralSwitchover"] = 9;
|
|
||||||
|
|
||||||
p["circleFootSeparation"] = 25;
|
|
||||||
|
|
||||||
p["circleStartAngle"] = twoPi / 12;
|
|
||||||
|
|
||||||
p["spiralFootSeparation"] = 28;
|
|
||||||
|
|
||||||
p["spiralLengthStart"] = 11;
|
|
||||||
|
|
||||||
p["spiralLengthFactor"] = 5;
|
|
||||||
|
|
||||||
p["legWeight"] = 1.5;
|
|
||||||
|
|
||||||
p["legColors"] = {
|
|
||||||
usual: "#222",
|
|
||||||
highlighted: "#f00",
|
|
||||||
};
|
|
||||||
|
|
||||||
function _Class(map, opts) {
|
|
||||||
var e,
|
|
||||||
k,
|
|
||||||
v,
|
|
||||||
_i,
|
|
||||||
_len,
|
|
||||||
_ref,
|
|
||||||
_this = this;
|
|
||||||
|
|
||||||
this.map = map;
|
|
||||||
if (opts == null) {
|
|
||||||
opts = {};
|
|
||||||
}
|
|
||||||
for (k in opts) {
|
|
||||||
if (!__hasProp.call(opts, k)) continue;
|
|
||||||
v = opts[k];
|
|
||||||
this[k] = v;
|
|
||||||
}
|
|
||||||
this.initMarkerArrays();
|
|
||||||
this.listeners = {};
|
|
||||||
_ref = ["click", "zoomend"];
|
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
||||||
e = _ref[_i];
|
|
||||||
this.map.addEventListener(e, function () {
|
|
||||||
return _this["unspiderfy"]();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p.initMarkerArrays = function () {
|
|
||||||
this.markers = [];
|
|
||||||
return (this.markerListeners = []);
|
|
||||||
};
|
|
||||||
|
|
||||||
p["addMarker"] = function (marker) {
|
|
||||||
var markerListener,
|
|
||||||
_this = this;
|
|
||||||
|
|
||||||
if (marker["_oms"] != null) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
marker["_oms"] = true;
|
|
||||||
markerListener = function () {
|
|
||||||
return _this.spiderListener(marker);
|
|
||||||
};
|
|
||||||
marker.addEventListener("click", markerListener);
|
|
||||||
this.markerListeners.push(markerListener);
|
|
||||||
this.markers.push(marker);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
p["getMarkers"] = function () {
|
|
||||||
return this.markers.slice(0);
|
|
||||||
};
|
|
||||||
|
|
||||||
p["removeMarker"] = function (marker) {
|
|
||||||
var i, markerListener;
|
|
||||||
|
|
||||||
if (marker["_omsData"] != null) {
|
|
||||||
this["unspiderfy"]();
|
|
||||||
}
|
|
||||||
i = this.arrIndexOf(this.markers, marker);
|
|
||||||
if (i < 0) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
markerListener = this.markerListeners.splice(i, 1)[0];
|
|
||||||
marker.removeEventListener("click", markerListener);
|
|
||||||
delete marker["_oms"];
|
|
||||||
this.markers.splice(i, 1);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
p["clearMarkers"] = function () {
|
|
||||||
var i, marker, markerListener, _i, _len, _ref;
|
|
||||||
|
|
||||||
this["unspiderfy"]();
|
|
||||||
_ref = this.markers;
|
|
||||||
for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
|
|
||||||
marker = _ref[i];
|
|
||||||
markerListener = this.markerListeners[i];
|
|
||||||
marker.removeEventListener("click", markerListener);
|
|
||||||
delete marker["_oms"];
|
|
||||||
}
|
|
||||||
this.initMarkerArrays();
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
p["addListener"] = function (event, func) {
|
|
||||||
var _base, _ref;
|
|
||||||
|
|
||||||
((_ref = (_base = this.listeners)[event]) != null
|
|
||||||
? _ref
|
|
||||||
: (_base[event] = [])
|
|
||||||
).push(func);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
p["removeListener"] = function (event, func) {
|
|
||||||
var i;
|
|
||||||
|
|
||||||
i = this.arrIndexOf(this.listeners[event], func);
|
|
||||||
if (!(i < 0)) {
|
|
||||||
this.listeners[event].splice(i, 1);
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
p["clearListeners"] = function (event) {
|
|
||||||
this.listeners[event] = [];
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
p.trigger = function () {
|
|
||||||
var args, event, func, _i, _len, _ref, _ref1, _results;
|
|
||||||
|
|
||||||
(event = arguments[0]),
|
|
||||||
(args = 2 <= arguments.length ? __slice.call(arguments, 1) : []);
|
|
||||||
_ref1 = (_ref = this.listeners[event]) != null ? _ref : [];
|
|
||||||
_results = [];
|
|
||||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
|
||||||
func = _ref1[_i];
|
|
||||||
_results.push(func.apply(null, args));
|
|
||||||
}
|
|
||||||
return _results;
|
|
||||||
};
|
|
||||||
|
|
||||||
p.generatePtsCircle = function (count, centerPt) {
|
|
||||||
var angle, angleStep, circumference, i, legLength, _i, _results;
|
|
||||||
|
|
||||||
circumference = this["circleFootSeparation"] * (2 + count);
|
|
||||||
legLength = circumference / twoPi;
|
|
||||||
angleStep = twoPi / count;
|
|
||||||
_results = [];
|
|
||||||
for (
|
|
||||||
i = _i = 0;
|
|
||||||
0 <= count ? _i < count : _i > count;
|
|
||||||
i = 0 <= count ? ++_i : --_i
|
|
||||||
) {
|
|
||||||
angle = this["circleStartAngle"] + i * angleStep;
|
|
||||||
_results.push(
|
|
||||||
new L.Point(
|
|
||||||
centerPt.x + legLength * Math.cos(angle),
|
|
||||||
centerPt.y + legLength * Math.sin(angle)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return _results;
|
|
||||||
};
|
|
||||||
|
|
||||||
p.generatePtsSpiral = function (count, centerPt) {
|
|
||||||
var angle, i, legLength, pt, _i, _results;
|
|
||||||
|
|
||||||
legLength = this["spiralLengthStart"];
|
|
||||||
angle = 0;
|
|
||||||
_results = [];
|
|
||||||
for (
|
|
||||||
i = _i = 0;
|
|
||||||
0 <= count ? _i < count : _i > count;
|
|
||||||
i = 0 <= count ? ++_i : --_i
|
|
||||||
) {
|
|
||||||
angle += this["spiralFootSeparation"] / legLength + i * 0.0005;
|
|
||||||
pt = new L.Point(
|
|
||||||
centerPt.x + legLength * Math.cos(angle),
|
|
||||||
centerPt.y + legLength * Math.sin(angle)
|
|
||||||
);
|
|
||||||
legLength += (twoPi * this["spiralLengthFactor"]) / angle;
|
|
||||||
_results.push(pt);
|
|
||||||
}
|
|
||||||
return _results;
|
|
||||||
};
|
|
||||||
|
|
||||||
p.spiderListener = function (marker) {
|
|
||||||
var m,
|
|
||||||
mPt,
|
|
||||||
markerPt,
|
|
||||||
markerSpiderfied,
|
|
||||||
nearbyMarkerData,
|
|
||||||
nonNearbyMarkers,
|
|
||||||
pxSq,
|
|
||||||
_i,
|
|
||||||
_len,
|
|
||||||
_ref;
|
|
||||||
|
|
||||||
markerSpiderfied = marker["_omsData"] != null;
|
|
||||||
if (!(markerSpiderfied && this["keepSpiderfied"])) {
|
|
||||||
this["unspiderfy"]();
|
|
||||||
}
|
|
||||||
if (markerSpiderfied) {
|
|
||||||
return this.trigger("click", marker);
|
|
||||||
} else {
|
|
||||||
nearbyMarkerData = [];
|
|
||||||
nonNearbyMarkers = [];
|
|
||||||
pxSq = this["nearbyDistance"] * this["nearbyDistance"];
|
|
||||||
markerPt = this.map.latLngToLayerPoint(marker.getLatLng());
|
|
||||||
_ref = this.markers;
|
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
||||||
m = _ref[_i];
|
|
||||||
if (!this.map.hasLayer(m)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
mPt = this.map.latLngToLayerPoint(m.getLatLng());
|
|
||||||
if (this.ptDistanceSq(mPt, markerPt) < pxSq) {
|
|
||||||
nearbyMarkerData.push({
|
|
||||||
marker: m,
|
|
||||||
markerPt: mPt,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
nonNearbyMarkers.push(m);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (nearbyMarkerData.length === 1) {
|
|
||||||
return this.trigger("click", marker);
|
|
||||||
} else {
|
|
||||||
return this.spiderfy(nearbyMarkerData, nonNearbyMarkers);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
p.makeHighlightListeners = function (marker) {
|
|
||||||
var _this = this;
|
|
||||||
|
|
||||||
return {
|
|
||||||
highlight: function () {
|
|
||||||
return marker["_omsData"].leg.setStyle({
|
|
||||||
color: _this["legColors"]["highlighted"],
|
|
||||||
});
|
|
||||||
},
|
|
||||||
unhighlight: function () {
|
|
||||||
return marker["_omsData"].leg.setStyle({
|
|
||||||
color: _this["legColors"]["usual"],
|
|
||||||
});
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
p.spiderfy = function (markerData, nonNearbyMarkers) {
|
|
||||||
var bodyPt,
|
|
||||||
footLl,
|
|
||||||
footPt,
|
|
||||||
footPts,
|
|
||||||
leg,
|
|
||||||
marker,
|
|
||||||
md,
|
|
||||||
mhl,
|
|
||||||
nearestMarkerDatum,
|
|
||||||
numFeet,
|
|
||||||
spiderfiedMarkers;
|
|
||||||
|
|
||||||
this.spiderfying = true;
|
|
||||||
numFeet = markerData.length;
|
|
||||||
bodyPt = this.ptAverage(
|
|
||||||
(function () {
|
|
||||||
var _i, _len, _results;
|
|
||||||
|
|
||||||
_results = [];
|
|
||||||
for (_i = 0, _len = markerData.length; _i < _len; _i++) {
|
|
||||||
md = markerData[_i];
|
|
||||||
_results.push(md.markerPt);
|
|
||||||
}
|
|
||||||
return _results;
|
|
||||||
})()
|
|
||||||
);
|
|
||||||
footPts =
|
|
||||||
numFeet >= this["circleSpiralSwitchover"]
|
|
||||||
? this.generatePtsSpiral(numFeet, bodyPt).reverse()
|
|
||||||
: this.generatePtsCircle(numFeet, bodyPt);
|
|
||||||
spiderfiedMarkers = function () {
|
|
||||||
var _i,
|
|
||||||
_len,
|
|
||||||
_results,
|
|
||||||
_this = this;
|
|
||||||
|
|
||||||
_results = [];
|
|
||||||
for (_i = 0, _len = footPts.length; _i < _len; _i++) {
|
|
||||||
footPt = footPts[_i];
|
|
||||||
footLl = this.map.layerPointToLatLng(footPt);
|
|
||||||
nearestMarkerDatum = this.minExtract(markerData, function (md) {
|
|
||||||
return _this.ptDistanceSq(md.markerPt, footPt);
|
|
||||||
});
|
|
||||||
marker = nearestMarkerDatum.marker;
|
|
||||||
leg = new L.Polyline([marker.getLatLng(), footLl], {
|
|
||||||
color: this["legColors"]["usual"],
|
|
||||||
weight: this["legWeight"],
|
|
||||||
clickable: false,
|
|
||||||
});
|
|
||||||
this.map.addLayer(leg);
|
|
||||||
marker["_omsData"] = {
|
|
||||||
usualPosition: marker.getLatLng(),
|
|
||||||
leg: leg,
|
|
||||||
};
|
|
||||||
if (this["legColors"]["highlighted"] !== this["legColors"]["usual"]) {
|
|
||||||
mhl = this.makeHighlightListeners(marker);
|
|
||||||
marker["_omsData"].highlightListeners = mhl;
|
|
||||||
marker.addEventListener("mouseover", mhl.highlight);
|
|
||||||
marker.addEventListener("mouseout", mhl.unhighlight);
|
|
||||||
}
|
|
||||||
marker.setLatLng(footLl);
|
|
||||||
marker.setZIndexOffset(1000000);
|
|
||||||
_results.push(marker);
|
|
||||||
}
|
|
||||||
return _results;
|
|
||||||
}.call(this);
|
|
||||||
delete this.spiderfying;
|
|
||||||
this.spiderfied = true;
|
|
||||||
return this.trigger("spiderfy", spiderfiedMarkers, nonNearbyMarkers);
|
|
||||||
};
|
|
||||||
|
|
||||||
p["unspiderfy"] = function (markerNotToMove) {
|
|
||||||
var marker, mhl, nonNearbyMarkers, unspiderfiedMarkers, _i, _len, _ref;
|
|
||||||
|
|
||||||
if (markerNotToMove == null) {
|
|
||||||
markerNotToMove = null;
|
|
||||||
}
|
|
||||||
if (this.spiderfied == null) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
this.unspiderfying = true;
|
|
||||||
unspiderfiedMarkers = [];
|
|
||||||
nonNearbyMarkers = [];
|
|
||||||
_ref = this.markers;
|
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
|
||||||
marker = _ref[_i];
|
|
||||||
if (marker["_omsData"] != null) {
|
|
||||||
this.map.removeLayer(marker["_omsData"].leg);
|
|
||||||
if (marker !== markerNotToMove) {
|
|
||||||
marker.setLatLng(marker["_omsData"].usualPosition);
|
|
||||||
}
|
|
||||||
marker.setZIndexOffset(0);
|
|
||||||
mhl = marker["_omsData"].highlightListeners;
|
|
||||||
if (mhl != null) {
|
|
||||||
marker.removeEventListener("mouseover", mhl.highlight);
|
|
||||||
marker.removeEventListener("mouseout", mhl.unhighlight);
|
|
||||||
}
|
|
||||||
delete marker["_omsData"];
|
|
||||||
unspiderfiedMarkers.push(marker);
|
|
||||||
} else {
|
|
||||||
nonNearbyMarkers.push(marker);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
delete this.unspiderfying;
|
|
||||||
delete this.spiderfied;
|
|
||||||
this.trigger("unspiderfy", unspiderfiedMarkers, nonNearbyMarkers);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
p.ptDistanceSq = function (pt1, pt2) {
|
|
||||||
var dx, dy;
|
|
||||||
|
|
||||||
dx = pt1.x - pt2.x;
|
|
||||||
dy = pt1.y - pt2.y;
|
|
||||||
return dx * dx + dy * dy;
|
|
||||||
};
|
|
||||||
|
|
||||||
p.ptAverage = function (pts) {
|
|
||||||
var numPts, pt, sumX, sumY, _i, _len;
|
|
||||||
|
|
||||||
sumX = sumY = 0;
|
|
||||||
for (_i = 0, _len = pts.length; _i < _len; _i++) {
|
|
||||||
pt = pts[_i];
|
|
||||||
sumX += pt.x;
|
|
||||||
sumY += pt.y;
|
|
||||||
}
|
|
||||||
numPts = pts.length;
|
|
||||||
return new L.Point(sumX / numPts, sumY / numPts);
|
|
||||||
};
|
|
||||||
|
|
||||||
p.minExtract = function (set, func) {
|
|
||||||
var bestIndex, bestVal, index, item, val, _i, _len;
|
|
||||||
|
|
||||||
for (index = _i = 0, _len = set.length; _i < _len; index = ++_i) {
|
|
||||||
item = set[index];
|
|
||||||
val = func(item);
|
|
||||||
if (
|
|
||||||
typeof bestIndex === "undefined" ||
|
|
||||||
bestIndex === null ||
|
|
||||||
val < bestVal
|
|
||||||
) {
|
|
||||||
bestVal = val;
|
|
||||||
bestIndex = index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return set.splice(bestIndex, 1)[0];
|
|
||||||
};
|
|
||||||
|
|
||||||
p.arrIndexOf = function (arr, obj) {
|
|
||||||
var i, o, _i, _len;
|
|
||||||
|
|
||||||
if (arr.indexOf != null) {
|
|
||||||
return arr.indexOf(obj);
|
|
||||||
}
|
|
||||||
for (i = _i = 0, _len = arr.length; _i < _len; i = ++_i) {
|
|
||||||
o = arr[i];
|
|
||||||
if (o === obj) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
};
|
|
||||||
|
|
||||||
return _Class;
|
|
||||||
})();
|
|
||||||
}).call(this);
|
|
||||||
160
public/js/app.js
@@ -1,160 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file app.js
|
|
||||||
* @author Andreas Tholen
|
|
||||||
* Contact: info@littwin-systechnik.de
|
|
||||||
* @version 0.5.3
|
|
||||||
* @description Basic Functions
|
|
||||||
*/
|
|
||||||
|
|
||||||
$(document).foundation();
|
|
||||||
|
|
||||||
//document.getElementById("fullSideMenuCard").style.height = windowHeight+"px";
|
|
||||||
|
|
||||||
// Sidemenu Config
|
|
||||||
if ((!standardSideMenu) || (fullSideMenu)) {
|
|
||||||
const collection = document.getElementsByClassName("standardSideMenu");
|
|
||||||
for (let i = 0; i < collection.length; i++) {
|
|
||||||
collection[i].style.display = "none";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((!fullSideMenu) || (standardSideMenu)) {
|
|
||||||
const collectionb = document.getElementsByClassName("fullSideMenu");
|
|
||||||
for (let i = 0; i < collectionb.length; i++) {
|
|
||||||
collectionb[i].style.display = "none";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var stationCardTempList = "";
|
|
||||||
var stationCardTemp = '<div class="card">'
|
|
||||||
+'<div class="title-bar">'
|
|
||||||
+'<div class="title-bar-left">'
|
|
||||||
+'<span class="title-bar-title" style="color:#000000;padding-left:0.5rem ;">Standort</span>'
|
|
||||||
+'</div>'
|
|
||||||
+'<div class="title-bar-right">'
|
|
||||||
+'<a><i class="fi-alert" title="Weitere Infos" style="color:red;font-size:1.5rem;padding-right:10px;" data-open="weitereInfos"></i></a>'
|
|
||||||
+'</div>'
|
|
||||||
+'</div>'
|
|
||||||
+'<div class="card-section" style="padding: 0px 0px 1rem 1rem !important">'
|
|
||||||
+'Test'
|
|
||||||
+'</div>'
|
|
||||||
+'</div>';
|
|
||||||
|
|
||||||
for (let index = 0; index < 11; index++) {
|
|
||||||
stationCardTempList += stationCardTemp;
|
|
||||||
}
|
|
||||||
|
|
||||||
//document.getElementById('stationenFullSideMenu').innerHTML = stationCardTempList;
|
|
||||||
|
|
||||||
function getDataMenu() {
|
|
||||||
var stationsListing = [];
|
|
||||||
|
|
||||||
// Stationen erfassen
|
|
||||||
for (var i = 0; i < dataStaticlength; i++) {
|
|
||||||
var gisStatics = dataStatic[i];
|
|
||||||
if(filterSystems.includes(gisStatics.System)){
|
|
||||||
var stationListing = gisStatics.Area_Name; // Area_Name
|
|
||||||
stationsListing.push(stationListing);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Doppelte Einträge löschen
|
|
||||||
console.log("%cMAP| Einträge der Stationen werden geprüft",'color: green');
|
|
||||||
let uniqueStations = [];
|
|
||||||
stationsListing.forEach((c) => {
|
|
||||||
if (!uniqueStations.includes(c)) {
|
|
||||||
uniqueStations.push(c);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("%cMAP| Stationen indexiert: %c"+uniqueStations.sort(),'color: green', 'color:grey');
|
|
||||||
uniqueStations = uniqueStations.sort();
|
|
||||||
|
|
||||||
var select = document.getElementById("stationListing");
|
|
||||||
|
|
||||||
for(var i = 0; i < uniqueStations.length; i++) {
|
|
||||||
var opt = uniqueStations[i];
|
|
||||||
var el = document.createElement("option");
|
|
||||||
el.textContent = opt;
|
|
||||||
el.value = opt;
|
|
||||||
el.style.color = "#000000";
|
|
||||||
el.style.fontWeight = "thin";
|
|
||||||
select.appendChild(el);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*var checkbox = document.querySelector("#box-TALAS");
|
|
||||||
|
|
||||||
checkbox.addEventListener('change', function() {
|
|
||||||
if (this.checked) {
|
|
||||||
map.addLayer(TALAS);
|
|
||||||
|
|
||||||
console.log("TALAS is checked..");
|
|
||||||
} else {
|
|
||||||
map.removeLayer(TALAS);
|
|
||||||
|
|
||||||
console.log("TALAS is not checked..");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var checkbox = document.querySelector("#box-GMA");
|
|
||||||
|
|
||||||
checkbox.addEventListener('change', function() {
|
|
||||||
if (this.checked) {
|
|
||||||
map.addLayer(GMA);
|
|
||||||
document.getElementById("data-"+LocID).style.display = "none";
|
|
||||||
console.log("GMA is checked..");
|
|
||||||
} else {
|
|
||||||
map.removeLayer(GMA);
|
|
||||||
|
|
||||||
console.log("GMA is not checked..");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var checkbox = document.querySelector("#box-MODEM");
|
|
||||||
|
|
||||||
checkbox.addEventListener('change', function() {
|
|
||||||
if (this.checked) {
|
|
||||||
map.addLayer(GSM);
|
|
||||||
|
|
||||||
console.log("GSM is checked..");
|
|
||||||
} else {
|
|
||||||
map.removeLayer(GSM);
|
|
||||||
|
|
||||||
console.log("GSM is not checked..");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var checkbox = document.querySelector("#box-SIEMENS");
|
|
||||||
|
|
||||||
checkbox.addEventListener('change', function() {
|
|
||||||
if (this.checked) {
|
|
||||||
map.addLayer(Siemens);
|
|
||||||
|
|
||||||
console.log("Notrufsäulen is checked..");
|
|
||||||
} else {
|
|
||||||
map.removeLayer(Siemens);
|
|
||||||
|
|
||||||
console.log("Notrufsäulen is not checked..");
|
|
||||||
}
|
|
||||||
});*/
|
|
||||||
|
|
||||||
|
|
||||||
// ISS Positions-Update Test
|
|
||||||
var iss;
|
|
||||||
function update_position() {
|
|
||||||
$.getJSON('http://api.open-notify.org/iss-now.json', function(data) {
|
|
||||||
var latitude = data["iss_position"]["latitude"];
|
|
||||||
var longitude = data["iss_position"]["longitude"];
|
|
||||||
if (!iss) {
|
|
||||||
iss = L.marker([latitude,longitude], {icon: spaceStationMarker}).bindPopup("Ich bin die ISS").addTo(map);
|
|
||||||
}
|
|
||||||
iss.setLatLng([latitude,longitude]).update();
|
|
||||||
setTimeout(update_position, 1000);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
update_position();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,206 +0,0 @@
|
|||||||
var statusData = [];
|
|
||||||
var statusDataCable = [];
|
|
||||||
var statusDataKue = [];
|
|
||||||
|
|
||||||
function getConditions() {
|
|
||||||
//console.log("%cDAT | Angezeigte Punkte : 4880", "color:blue;");
|
|
||||||
//console.log("%cDAT | Angezeigte Linien : ---", "color:blue;");
|
|
||||||
|
|
||||||
console.log("%cSYS | Meldungen werden geladen","color:orange;");
|
|
||||||
|
|
||||||
var req = new XMLHttpRequest();
|
|
||||||
req.open("GET", jsonStatusURL , true);
|
|
||||||
|
|
||||||
req.onreadystatechange = function(){
|
|
||||||
if ( req.readyState == 4) {
|
|
||||||
if ( req.status >= 200 && req.status < 300 ||req.status == 304 ) {
|
|
||||||
var returnData = req.responseText;
|
|
||||||
console.log('Statis geladen');
|
|
||||||
statusData = JSON.parse(returnData);
|
|
||||||
setConditions();
|
|
||||||
} else {
|
|
||||||
console.log("Fehler; request.status = " + req.status);
|
|
||||||
}
|
|
||||||
req = null;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
req.send();
|
|
||||||
}
|
|
||||||
|
|
||||||
function getConditionsCable() {
|
|
||||||
console.log("%cSYS | Meldungen werden geladen","color:orange;");
|
|
||||||
|
|
||||||
var req = new XMLHttpRequest();
|
|
||||||
req.open("GET", jsonServiceURL , true);
|
|
||||||
|
|
||||||
req.onreadystatechange = function(){
|
|
||||||
if ( req.readyState == 4) {
|
|
||||||
if ( req.status >= 200 && req.status < 300 ||req.status == 304 ) {
|
|
||||||
var returnData = req.responseText;
|
|
||||||
console.log('Dienst Statis geladen');
|
|
||||||
statusDataCable = JSON.parse(returnData);
|
|
||||||
getConditionsKue();
|
|
||||||
} else {
|
|
||||||
console.log("Fehler; request.status = " + req.status);
|
|
||||||
}
|
|
||||||
req = null;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
req.send();
|
|
||||||
}
|
|
||||||
|
|
||||||
function getConditionsKue() {
|
|
||||||
console.log("%cSYS | Meldungen werden geladen","color:orange;");
|
|
||||||
|
|
||||||
var req = new XMLHttpRequest();
|
|
||||||
req.open("GET", jsonKueStatusURL , true);
|
|
||||||
|
|
||||||
req.onreadystatechange = function(){
|
|
||||||
if ( req.readyState == 4) {
|
|
||||||
if ( req.status >= 200 && req.status < 300 ||req.status == 304 ) {
|
|
||||||
var returnData = req.responseText;
|
|
||||||
console.log('KUE Statis geladen');
|
|
||||||
statusDataKue= JSON.parse(returnData);
|
|
||||||
setConditionsCable();
|
|
||||||
document.getElementById("loadingMap").innerHTML = "";
|
|
||||||
} else {
|
|
||||||
console.log("Fehler; request.status = " + req.status);
|
|
||||||
}
|
|
||||||
req = null;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
req.send();
|
|
||||||
}
|
|
||||||
|
|
||||||
function setConditions() {
|
|
||||||
// Shape Color Change
|
|
||||||
var anzahlStatis = statusData.Statis.length;
|
|
||||||
var IdLalt = 0;
|
|
||||||
var idlSet = [];
|
|
||||||
|
|
||||||
for (var n = 0; n < anzahlStatis; n++) {
|
|
||||||
|
|
||||||
if (statusData.Statis[n].IdL > 0) {
|
|
||||||
//console.log(statusData.Statis[n].IdL);
|
|
||||||
var statusID = statusData.Statis[n].IdL;
|
|
||||||
var statusColor = statusData.Statis[n].Co;
|
|
||||||
var statusFeld = statusData.Statis[n].Feld;
|
|
||||||
var statusNa = statusData.Statis[n].Na;
|
|
||||||
var shape = stage.find("#stationCircle"+statusID);
|
|
||||||
|
|
||||||
if(idlSet.indexOf(statusID) !== -1){
|
|
||||||
//console.log("ID vorhanden! "+statusID)
|
|
||||||
|
|
||||||
} else{
|
|
||||||
//console.log("ID noch nicht vorhanden! "+statusID)
|
|
||||||
|
|
||||||
shape.fill(statusColor);
|
|
||||||
var shapeQuad = stage.find("#station"+statusFeld+"f"+statusID);
|
|
||||||
//console.log("StatusID= station"+statusFeld+"f"+statusID+" Statusfarbe= "+statusColor);
|
|
||||||
shapeQuad.fill(statusColor);
|
|
||||||
|
|
||||||
|
|
||||||
if (newScale <= 10){
|
|
||||||
shape.height((standardMeldestationen/5)*meldungMeldestationen);
|
|
||||||
shape.width((standardMeldestationen/5)*meldungMeldestationen);
|
|
||||||
shape.strokeWidth((standardMeldestationen/100)*meldungMeldestationen);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
shape.height(standardMeldestationen/5);
|
|
||||||
shape.width(standardMeldestationen/5);
|
|
||||||
shape.strokeWidth(standardMeldestationen/100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
IdLalt = statusID;
|
|
||||||
idlSet.push(statusID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
layer.batchDraw();
|
|
||||||
}
|
|
||||||
|
|
||||||
function setConditionsCable() {
|
|
||||||
// Menge an Meldungen Service
|
|
||||||
var anzahlStatis = statusDataCable.Statis.length;
|
|
||||||
console.log("Anzahl geladener Dienst Stati : "+anzahlStatis);
|
|
||||||
// Menge an Meldungen KUE
|
|
||||||
var anzahlStatisKue = statusDataKue.Statis.length;
|
|
||||||
console.log("Anzahl geladener KUEG Stati : "+anzahlStatisKue);
|
|
||||||
|
|
||||||
// Dienste Meldungen
|
|
||||||
if (document.getElementById("buttonDienste").style.opacity > 0.6) {
|
|
||||||
for (var n = 0; n < anzahlStatis; n++) {
|
|
||||||
var sucheTemp = statusDataCable.Statis[n].IdLD;
|
|
||||||
console.log("IdlD Services: "+sucheTemp);
|
|
||||||
for (var x = 0; x < jso.Services.length; x++) {
|
|
||||||
if (sucheTemp == jso.Services[x].IdLD) {
|
|
||||||
//console.log("Test: "+sucheTemp+" IdS "+jso.Services[x].IdS);
|
|
||||||
var statusColor = statusDataCable.Statis[n].Co;
|
|
||||||
var shape = stage.find("#line"+jso.Services[x].IdS);
|
|
||||||
shape.stroke(statusColor);
|
|
||||||
shape.strokeWidth(meldungCableThickness/20);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("Dienste Layer abgeschaltet");
|
|
||||||
}
|
|
||||||
|
|
||||||
// KUE Meldungen
|
|
||||||
if (document.getElementById("buttonKabel").style.opacity > 0.6) {
|
|
||||||
for (var n = 0; n < anzahlStatisKue; n++) {
|
|
||||||
var sucheTemp = statusDataKue.Statis[n].IdLD;
|
|
||||||
var sucheSlTemp = statusDataKue.Statis[n].Sl;
|
|
||||||
|
|
||||||
for (var x = 0; x < jko.Services.length; x++) {
|
|
||||||
if (sucheTemp == jko.Services[x].IdLD && sucheSlTemp == jko.Services[x].Sl) {
|
|
||||||
//console.log("Test: "+sucheTemp+" IdS "+jko.Services[x].IdS);
|
|
||||||
var statusColor = statusDataKue.Statis[n].Co;
|
|
||||||
var shape = stage.find("#line"+jko.Services[x].IdS);
|
|
||||||
shape.stroke(statusColor);
|
|
||||||
shape.strokeWidth(meldungCableThickness/5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("KÜG Layer abgeschaltet");
|
|
||||||
}
|
|
||||||
|
|
||||||
layer.batchDraw();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function ulafCableDisable() {
|
|
||||||
var anzahlUlafKabel = jso.Services.length;
|
|
||||||
for (var n = 0; n < anzahlUlafKabel; n++) {
|
|
||||||
var shape = stage.find("#line"+jso.Services[n].IdS);
|
|
||||||
//console.log(jso.Services[n].IdS);
|
|
||||||
shape.hide();
|
|
||||||
layer.batchDraw();
|
|
||||||
}
|
|
||||||
var anzahlKUEKabel = jko.Services.length;
|
|
||||||
for (var n = 0; n < anzahlKUEKabel; n++) {
|
|
||||||
var shape = stage.find("#line"+jko.Services[n].IdS);
|
|
||||||
//console.log(jko.Services[n].IdS);
|
|
||||||
shape.show();
|
|
||||||
layer.batchDraw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function kueCableDisable() {
|
|
||||||
var anzahlKUEKabel = jko.Services.length;
|
|
||||||
for (var n = 0; n < anzahlKUEKabel; n++) {
|
|
||||||
var shape = stage.find("#line"+jko.Services[n].IdS);
|
|
||||||
//console.log(jso.Services[n].IdS);
|
|
||||||
shape.hide();
|
|
||||||
layer.batchDraw();
|
|
||||||
}
|
|
||||||
var anzahlUlafKabel = jso.Services.length;
|
|
||||||
for (var n = 0; n < anzahlUlafKabel; n++) {
|
|
||||||
var shape = stage.find("#line"+jso.Services[n].IdS);
|
|
||||||
//console.log(jko.Services[n].IdS);
|
|
||||||
shape.show();
|
|
||||||
layer.batchDraw();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file config.js
|
|
||||||
* @author Andreas Tholen
|
|
||||||
* Contact: info@littwin-systechnik.de
|
|
||||||
* @version 0.5.3
|
|
||||||
* @description Config-File for the TALAS.Map
|
|
||||||
**/
|
|
||||||
|
|
||||||
//Versionsnummer
|
|
||||||
var mapVersion = "0.5.3";
|
|
||||||
|
|
||||||
//Zoom
|
|
||||||
var mapZoomMin = 4;
|
|
||||||
var mapZoomMax = 15;
|
|
||||||
|
|
||||||
//Datenquelle
|
|
||||||
var offlineData = true; //
|
|
||||||
|
|
||||||
// GMA LTE Modem
|
|
||||||
var mapDataStaticUrl = "http://10.10.0.13/talas5/ClientData/WebserviceMap.asmx/GisStationsStatic?idMap=8";
|
|
||||||
var mapDataStatusUrl = "http://10.10.0.13/talas5/ClientData/WebserviceMap.asmx/GisStationsStatus?idMap=8";
|
|
||||||
var notrufDataStaticUrl = "http://10.10.0.13/talas5/ClientData/WebserviceMap.asmx/GisStationsStatic?idMap=10";
|
|
||||||
var notrufDataStatusUrl = "http://10.10.0.13/talas5/ClientData/WebserviceMap.asmx/GisStationsStatus?idMap=10";
|
|
||||||
const mapStaticOfflineURL = "offlineTestData/idMap8GisStationenStatic.json";
|
|
||||||
const mapStatusOfflineURL = "offlineTestData/idMap8GisStationenStatus.json";
|
|
||||||
const notrufStaticOfflineURL = "offlineTestData/idMap10GisStationenStatic.json";
|
|
||||||
const notrufStatusOfflineURL = "offlineTestData/idMap10GisStationenStatus.json";
|
|
||||||
if (offlineData = true) {
|
|
||||||
console.log("%cSYSTEM| Offline Daten aktiviert!", 'color: blue');
|
|
||||||
mapDataStaticUrl = mapStaticOfflineURL;
|
|
||||||
mapDataStatusUrl = mapStatusOfflineURL;
|
|
||||||
notrufDataStaticUrl = notrufStaticOfflineURL;
|
|
||||||
notrufDataStatusUrl = notrufStatusOfflineURL;
|
|
||||||
console.log("%cSYSTEM| Static URL: %c"+mapDataStaticUrl, 'color: blue', 'color: green');
|
|
||||||
console.log("%cSYSTEM| Status URL: %c"+mapDataStatusUrl, 'color: blue', 'color: green');
|
|
||||||
console.log("%cSYSTEM| Static URL: %c"+notrufDataStaticUrl, 'color: blue', 'color: green');
|
|
||||||
console.log("%cSYSTEM| Status URL: %c"+notrufDataStatusUrl, 'color: blue', 'color: green');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update Zeit
|
|
||||||
var updateIntervall = 5000; // in Millisekunden
|
|
||||||
|
|
||||||
// example -> L.marker([51.5, -0.09], {icon: greenIcon}).addTo(map);
|
|
||||||
console.log("%cSYSTEM| Kartenfunktionen geladen", 'color: blue');
|
|
||||||
console.log("%cSYSTEM| Die aktuelle Fenstergröße Breite: " + window.innerWidth+"px Höhe: "+window.innerHeight + "px", 'color: blue');
|
|
||||||
console.log("%cMAP| Marker-Icons preload abgeschlossen", 'color: green');
|
|
||||||
console.log("%cMAP| Updateintervall: "+updateIntervall+" ms", 'color: green');
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
|
|
||||||
// /public/js/config.js
|
|
||||||
// Umgebungsvariablen und Konfigurationseinstellungen
|
|
||||||
const mapVersion = "0.5.3";
|
|
||||||
const standardSideMenu = true;
|
|
||||||
const fullSideMenu = false;
|
|
||||||
const offlineData = false;
|
|
||||||
const serverURL = "http://10.10.0.13";
|
|
||||||
|
|
||||||
let windowHeight, url_string, url, c, user;
|
|
||||||
let mapDataStaticUrl, mapDataStatusUrl, mapDataMeasures, mapDataIconUrl, mapDataSystemUrl;
|
|
||||||
let mapStaticOfflineURL, mapStatusOfflineURL, mapSystemOfflineURL, mapIconsOfflineURL, mapMeasuresOfflineURL;
|
|
||||||
|
|
||||||
if (typeof window !== "undefined") {
|
|
||||||
// Dieser Code wird nur im Browser ausgeführt
|
|
||||||
windowHeight = window.innerHeight;
|
|
||||||
url_string = window.location.href;
|
|
||||||
url = new URL(url_string);
|
|
||||||
c = url.searchParams.get("m") || '10'; // Standardwert, falls nichts gesetzt ist
|
|
||||||
user = url.searchParams.get("u") || '487'; // Standardwert, falls nichts gesetzt ist
|
|
||||||
|
|
||||||
mapDataStaticUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStaticDistrict?idMap=${c}&idUser=${user}`;
|
|
||||||
mapDataStatusUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStatusDistrict?idMap=${c}&idUser=${user}`;
|
|
||||||
mapDataMeasures = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsMeasurements?idMap=${c}`;
|
|
||||||
mapDataIconUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic`;
|
|
||||||
mapDataSystemUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic?idMap=${c}&idUser=${user}`;
|
|
||||||
|
|
||||||
mapStaticOfflineURL = `offlineTestData/idMap${c}GisStationenStatic.json`;
|
|
||||||
mapStatusOfflineURL = `offlineTestData/idMap${c}GisStationenStatus.json`;
|
|
||||||
mapSystemOfflineURL = `offlineTestData/idMap${c}GisSystemStatic.json`;
|
|
||||||
mapIconsOfflineURL = "offlineTestData/icons.json";
|
|
||||||
mapMeasuresOfflineURL = `offlineTestData/idMap${c}GisSystemMeasures.json`;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Export von Variablen und Funktionen
|
|
||||||
export {
|
|
||||||
mapVersion, standardSideMenu, fullSideMenu, offlineData, serverURL,
|
|
||||||
windowHeight, url_string, url, c, user,
|
|
||||||
mapDataStaticUrl, mapDataStatusUrl, mapDataMeasures, mapDataIconUrl, mapDataSystemUrl,
|
|
||||||
mapStaticOfflineURL, mapStatusOfflineURL, mapSystemOfflineURL, mapIconsOfflineURL, mapMeasuresOfflineURL
|
|
||||||
};
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file config.js
|
|
||||||
* @author Andreas Tholen
|
|
||||||
* Contact: info@littwin-systechnik.de
|
|
||||||
* @version 0.5.3
|
|
||||||
* @description Config-File for the TALAS.Map
|
|
||||||
**/
|
|
||||||
|
|
||||||
//Versionsnummer
|
|
||||||
var mapVersion = "0.5.3";
|
|
||||||
|
|
||||||
//Zoom
|
|
||||||
var mapZoomMin = 4;
|
|
||||||
var mapZoomMax = 15;
|
|
||||||
|
|
||||||
//Datenquelle
|
|
||||||
var offlineData = false;
|
|
||||||
var serverURL = "http://10.10.0.13";
|
|
||||||
|
|
||||||
var url_string = window.location;
|
|
||||||
console.log(window.location);
|
|
||||||
var url = new URL(url_string);
|
|
||||||
var c = url.searchParams.get("m");
|
|
||||||
console.log("idMap: "+c);
|
|
||||||
|
|
||||||
// Kartedaten einlesen
|
|
||||||
var mapDataStaticUrl = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GisStationsStatic?idMap="+c;
|
|
||||||
var mapDataStatusUrl = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GisStationsStatus?idMap="+c;
|
|
||||||
var mapDataIconUrl = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic";
|
|
||||||
const mapStaticOfflineURL = "offlineTestData/idMap"+c+"GisStationenStatic.json";
|
|
||||||
const mapStatusOfflineURL = "offlineTestData/idMap"+c+"GisStationenStatus.json";
|
|
||||||
const mapIconsOfflineURL = "offlineTestData/icons.json";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (offlineData) {
|
|
||||||
console.log("%cSYSTEM| Offline Daten aktiviert!", 'color: blue');
|
|
||||||
mapDataStaticUrl = mapStaticOfflineURL;
|
|
||||||
mapDataStatusUrl = mapStatusOfflineURL;
|
|
||||||
mapDataIconUrl = mapIconsOfflineURL;
|
|
||||||
console.log("%cSYSTEM| Static URL: %c"+mapDataStaticUrl, 'color: blue', 'color: green');
|
|
||||||
console.log("%cSYSTEM| Status URL: %c"+mapDataStatusUrl, 'color: blue', 'color: green');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update Zeit
|
|
||||||
var updateIntervall = 5000; // in Millisekunden
|
|
||||||
|
|
||||||
// example -> L.marker([51.5, -0.09], {icon: greenIcon}).addTo(map);
|
|
||||||
console.log("%cSYSTEM| Kartenfunktionen geladen", 'color: blue');
|
|
||||||
console.log("%cSYSTEM| Die aktuelle Fenstergröße Breite: " + window.innerWidth+"px Höhe: "+window.innerHeight + "px", 'color: blue');
|
|
||||||
console.log("%cMAP| Marker-Icons preload abgeschlossen", 'color: green');
|
|
||||||
console.log("%cMAP| Updateintervall: "+updateIntervall+" ms", 'color: green');
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file config.js
|
|
||||||
* @author Andreas Tholen
|
|
||||||
* Contact: info@littwin-systechnik.de
|
|
||||||
* @version 0.5.3
|
|
||||||
* @description Config-File for the TALAS.Map
|
|
||||||
**/
|
|
||||||
|
|
||||||
//Versionsnummer
|
|
||||||
var mapVersion = "0.5.3";
|
|
||||||
|
|
||||||
//Visual Config
|
|
||||||
var standardSideMenu = true;
|
|
||||||
var fullSideMenu = false;
|
|
||||||
|
|
||||||
// Window Height erkennen
|
|
||||||
var windowHeight = window.innerHeight;
|
|
||||||
//console.log("windowheighet:"+windowHeight);
|
|
||||||
|
|
||||||
//Zoom
|
|
||||||
var mapZoomMin = 4;
|
|
||||||
var mapZoomMax = 17;
|
|
||||||
|
|
||||||
//Datenquelle
|
|
||||||
var offlineData = false;
|
|
||||||
var serverURL = "http://10.10.0.13";
|
|
||||||
|
|
||||||
var url_string = window.location;
|
|
||||||
var url = new URL(url_string);
|
|
||||||
var c = url.searchParams.get("m");
|
|
||||||
//c = 10;
|
|
||||||
console.log("idMap: "+c);
|
|
||||||
|
|
||||||
var user = url.searchParams.get("u");
|
|
||||||
if (user === null) {
|
|
||||||
user = 487;
|
|
||||||
}
|
|
||||||
console.log("idUser: "+user);
|
|
||||||
|
|
||||||
// Kartedaten einlesen
|
|
||||||
var mapDataStaticUrl = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GisStationsStaticDistrict?idMap="+c+"&idUser="+user;
|
|
||||||
var mapDataStatusUrl = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GisStationsStatusDistrict?idMap="+c+"&idUser="+user;
|
|
||||||
var mapDataMeasures = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GisStationsMeasurements?idMap="+c;
|
|
||||||
var mapDataIconUrl = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic";
|
|
||||||
var mapDataSystemUrl = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic?idMap="+c+"&idUser="+user;
|
|
||||||
const mapStaticOfflineURL = "offlineTestData/idMap"+c+"GisStationenStatic.json";
|
|
||||||
const mapStatusOfflineURL = "offlineTestData/idMap"+c+"GisStationenStatus.json";
|
|
||||||
const mapSystemOfflineURL = "offlineTestData/idMap"+c+"GisSystemStatic.json";
|
|
||||||
const mapIconsOfflineURL = "offlineTestData/icons.json";
|
|
||||||
const mapMeasuresOfflineURL = "offlineTestData/idMap"+c+"GisSystemMeasures.json";
|
|
||||||
|
|
||||||
if (offlineData) {
|
|
||||||
console.log("%cSYSTEM| Offline Daten aktiviert!", 'color: blue');
|
|
||||||
mapDataStaticUrl = mapStaticOfflineURL;
|
|
||||||
mapDataSystemUrl = mapSystemOfflineURL;
|
|
||||||
mapDataStatusUrl = mapStatusOfflineURL;
|
|
||||||
mapDataIconUrl = mapIconsOfflineURL;
|
|
||||||
mapDataMeasures = mapMeasuresOfflineURL;
|
|
||||||
console.log("%cSYSTEM| Static URL: %c"+mapDataStaticUrl, 'color: blue', 'color: green');
|
|
||||||
console.log("%cSYSTEM| Status URL: %c"+mapDataStatusUrl, 'color: blue', 'color: green');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update Zeit
|
|
||||||
var updateIntervall = 5000; // in Millisekunden
|
|
||||||
|
|
||||||
// example -> L.marker([51.5, -0.09], {icon: greenIcon}).addTo(map);
|
|
||||||
console.log("%cSYSTEM| Kartenfunktionen geladen", 'color: blue');
|
|
||||||
console.log("%cSYSTEM| Die aktuelle Fenstergröße Breite: " + window.innerWidth+"px Höhe: "+window.innerHeight + "px", 'color: blue');
|
|
||||||
console.log("%cMAP| Marker-Icons preload abgeschlossen", 'color: green');
|
|
||||||
console.log("%cMAP| Updateintervall: "+updateIntervall+" ms", 'color: green');
|
|
||||||
@@ -1,463 +0,0 @@
|
|||||||
function fitStageIntoParentContainer() {
|
|
||||||
|
|
||||||
var container = document.querySelector('#stage-parent');
|
|
||||||
|
|
||||||
// now we need to fit stage into parent
|
|
||||||
var containerWidth = container.offsetWidth;
|
|
||||||
// to do this we need to scale the stage
|
|
||||||
var scale = containerWidth / stageWidth;
|
|
||||||
|
|
||||||
// stage. und layer. Test
|
|
||||||
|
|
||||||
stage.width(stageWidth * scale);
|
|
||||||
stage.height(stageHeight * scale);
|
|
||||||
stage.scale({ x: scale, y: scale });
|
|
||||||
|
|
||||||
stage.on('wheel', (e) => {
|
|
||||||
//getConditions()
|
|
||||||
e.evt.preventDefault();
|
|
||||||
var oldScale = stage.scaleX();
|
|
||||||
|
|
||||||
var pointer = stage.getPointerPosition();
|
|
||||||
|
|
||||||
var mousePointTo = {
|
|
||||||
x: (pointer.x - stage.x()) / oldScale,
|
|
||||||
y: (pointer.y - stage.y()) / oldScale,
|
|
||||||
};
|
|
||||||
|
|
||||||
newScale = e.evt.deltaY > 0 ? oldScale * scaleBy : oldScale / scaleBy; // Mouse Wheel Richtung > oder <
|
|
||||||
scaleRatio = newScale;
|
|
||||||
localStorage.setItem('zoomStage', newScale);
|
|
||||||
//console.log("Scale Wert: "+scaleRatio+" x: "+stage.x() +" y: "+stage.y());
|
|
||||||
|
|
||||||
//console.log("Pointer Wert x: "+pointer.x+" y: "+pointer.y);
|
|
||||||
if (newScale > 0.20 && newScale < 150){
|
|
||||||
stage.scale({ x: newScale, y: newScale });
|
|
||||||
//console.log("ZOOM");
|
|
||||||
var newPos = {
|
|
||||||
x: pointer.x - mousePointTo.x * newScale,
|
|
||||||
y: pointer.y - mousePointTo.y * newScale,
|
|
||||||
};
|
|
||||||
|
|
||||||
stage.position(newPos);
|
|
||||||
var pos = JSON.stringify(stage.position());
|
|
||||||
localStorage.setItem("Position",pos);
|
|
||||||
if(newScale <= 10 && big === 0) {
|
|
||||||
big = 1;
|
|
||||||
setConditions();
|
|
||||||
}
|
|
||||||
if(newScale > 10 && big === 1) {
|
|
||||||
big = 0;
|
|
||||||
setConditions();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
layer.batchDraw();
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function fitStageReset() {
|
|
||||||
localStorage.removeItem('xStage');
|
|
||||||
localStorage.removeItem('yStage');
|
|
||||||
localStorage.removeItem('Position');
|
|
||||||
localStorage.removeItem('Scale');
|
|
||||||
localStorage.removeItem('zoomStage');
|
|
||||||
localStorage.removeItem('AbsolutePosition');
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
function getStageData() {
|
|
||||||
localStorage.removeItem('xStage');
|
|
||||||
localStorage.removeItem('yStage');
|
|
||||||
localStorage.removeItem('Position');
|
|
||||||
localStorage.removeItem('Scale');
|
|
||||||
localStorage.removeItem('zoomStage');
|
|
||||||
localStorage.removeItem('AbsolutePosition');
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
fitStageIntoParentContainer();
|
|
||||||
// adapt the stage on any window resize
|
|
||||||
window.addEventListener('resize', fitStageIntoParentContainer);
|
|
||||||
|
|
||||||
function getDistance(p1, p2) {
|
|
||||||
return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCenter(p1, p2) {
|
|
||||||
return {
|
|
||||||
x: (p1.x + p2.x) / 2,
|
|
||||||
y: (p1.y + p2.y) / 2,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function stageTouchController(){
|
|
||||||
var lastCenter = null;
|
|
||||||
var lastDist = 0;
|
|
||||||
|
|
||||||
stage.on('touchmove', function (e) {
|
|
||||||
stage.draggable(true);
|
|
||||||
stage.listening(false);
|
|
||||||
e.evt.preventDefault();
|
|
||||||
var touch1 = e.evt.touches[0];
|
|
||||||
var touch2 = e.evt.touches[1];
|
|
||||||
|
|
||||||
if (touch1 && touch2) {
|
|
||||||
// if the stage was under Konva's drag&drop
|
|
||||||
// we need to stop it, and implement our own pan logic with two pointers
|
|
||||||
if (stage.isDragging()) {
|
|
||||||
stage.stopDrag();
|
|
||||||
}
|
|
||||||
|
|
||||||
var p1 = {
|
|
||||||
x: touch1.clientX,
|
|
||||||
y: touch1.clientY,
|
|
||||||
};
|
|
||||||
var p2 = {
|
|
||||||
x: touch2.clientX,
|
|
||||||
y: touch2.clientY,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!lastCenter) {
|
|
||||||
lastCenter = getCenter(p1, p2);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var newCenter = getCenter(p1, p2);
|
|
||||||
|
|
||||||
var dist = getDistance(p1, p2);
|
|
||||||
|
|
||||||
if (!lastDist) {
|
|
||||||
lastDist = dist;
|
|
||||||
}
|
|
||||||
|
|
||||||
// local coordinates of center point
|
|
||||||
var pointTo = {
|
|
||||||
x: (newCenter.x - stage.x()) / stage.scaleX(),
|
|
||||||
y: (newCenter.y - stage.y()) / stage.scaleX(),
|
|
||||||
};
|
|
||||||
|
|
||||||
var scale = stage.scaleX() * (dist / lastDist);
|
|
||||||
|
|
||||||
stage.scaleX(scale);
|
|
||||||
stage.scaleY(scale);
|
|
||||||
|
|
||||||
// calculate new position of the stage
|
|
||||||
var dx = newCenter.x - lastCenter.x;
|
|
||||||
var dy = newCenter.y - lastCenter.y;
|
|
||||||
|
|
||||||
var newPos = {
|
|
||||||
x: newCenter.x - pointTo.x * scale + dx,
|
|
||||||
y: newCenter.y - pointTo.y * scale + dy,
|
|
||||||
};
|
|
||||||
|
|
||||||
stage.position(newPos);
|
|
||||||
stage.batchDraw();
|
|
||||||
|
|
||||||
//setConditions();
|
|
||||||
//setConditionsCable();
|
|
||||||
|
|
||||||
lastDist = dist;
|
|
||||||
lastCenter = newCenter;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
stage.on('touchend', function () {
|
|
||||||
stage.draggable(false);
|
|
||||||
stage.listening(true);
|
|
||||||
lastDist = 0;
|
|
||||||
lastCenter = null;
|
|
||||||
});
|
|
||||||
|
|
||||||
var container = stage.container();
|
|
||||||
|
|
||||||
// make it focusable
|
|
||||||
|
|
||||||
container.tabIndex = 1;
|
|
||||||
// focus it
|
|
||||||
// also stage will be in focus on its click
|
|
||||||
container.focus();
|
|
||||||
|
|
||||||
const DELTA = 10;
|
|
||||||
|
|
||||||
container.addEventListener('keydown', function (e) {
|
|
||||||
if (e.keyCode === 39 || e.keyCode === 68) {
|
|
||||||
stage.listening(false);
|
|
||||||
stage.x(stage.x() - DELTA);
|
|
||||||
} else if (e.keyCode === 40 || e.keyCode === 83) {
|
|
||||||
stage.listening(false);
|
|
||||||
stage.y(stage.y() - DELTA);
|
|
||||||
} else if (e.keyCode === 37 || e.keyCode === 65) {
|
|
||||||
stage.listening(false);
|
|
||||||
stage.x(stage.x() + DELTA);
|
|
||||||
} else if (e.keyCode === 38 || e.keyCode === 87) {
|
|
||||||
stage.listening(false);
|
|
||||||
stage.y(stage.y() + DELTA);
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
layer.batchDraw();
|
|
||||||
});
|
|
||||||
container.addEventListener('keyup', function (e) {
|
|
||||||
if (e.keyCode === 39 || e.keyCode === 68) {
|
|
||||||
stage.listening(true);
|
|
||||||
} else if (e.keyCode === 40 || e.keyCode === 83) {
|
|
||||||
stage.listening(true);
|
|
||||||
} else if (e.keyCode === 37 || e.keyCode === 65) {
|
|
||||||
stage.listening(true);
|
|
||||||
} else if (e.keyCode === 38 || e.keyCode === 87) {
|
|
||||||
stage.listening(true);
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
e.preventDefault();
|
|
||||||
layer.batchDraw();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
stageTouchController();
|
|
||||||
|
|
||||||
function sideReload() {
|
|
||||||
window.location.reload(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getStationInfos(id,color) {
|
|
||||||
//console.log("getStationInfo Test: "+id+" Farbe: "+color);
|
|
||||||
var res = id.split("station");
|
|
||||||
var stationIdInfo = res[1];
|
|
||||||
//console.log("Stations Listen ID: "+stationIdInfo);
|
|
||||||
var stationName = "";
|
|
||||||
for(i=0;i<anzahlStationen;i++) {
|
|
||||||
if(jdo.Points[i].IdL == stationIdInfo) {
|
|
||||||
stationName = jdo.Points[i].Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
document.getElementById("tooltipTest").innerHTML = "<h4 style='text-transform: uppercase;'><i class='fi-marker'></i> "+stationName+"</h4><b style='color:"+color+";text-transform: uppercase;'><i class='fi-alert'></i> Fehlertext Test</b><p style='padding-top:5px;'>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et...</p>";
|
|
||||||
}
|
|
||||||
|
|
||||||
function getLineInfos(id,color) {
|
|
||||||
//console.log("getStationInfo Test: "+id+" Farbe: "+color);
|
|
||||||
var res = id.split("line");
|
|
||||||
var lineId = res[1];
|
|
||||||
//console.log("Strang Listen ID: "+lineId);
|
|
||||||
document.getElementById("tooltipTest").innerHTML = "<h4 style='text-transform: uppercase;'><i class='fi-share'></i> Strang ID: "+jco.Lines[lineId].Short+"</h4><b style='color:"+color+";text-transform: uppercase;'><i class='fi-x'></i> Fehlertext Test</b><p style='padding-top:5px;'>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et...</p>";
|
|
||||||
}
|
|
||||||
|
|
||||||
dragElement(document.getElementById("mainDataSheet"));
|
|
||||||
|
|
||||||
function dragElement(elmnt) {
|
|
||||||
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
|
|
||||||
if (document.getElementById(elmnt.id + "header")) {
|
|
||||||
// if present, the header is where you move the DIV from:
|
|
||||||
document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
|
|
||||||
} else {
|
|
||||||
// otherwise, move the DIV from anywhere inside the DIV:
|
|
||||||
elmnt.onmousedown = dragMouseDown;
|
|
||||||
}
|
|
||||||
|
|
||||||
function dragMouseDown(e) {
|
|
||||||
e = e || window.event;
|
|
||||||
e.preventDefault();
|
|
||||||
// get the mouse cursor position at startup:
|
|
||||||
pos3 = e.clientX;
|
|
||||||
pos4 = e.clientY;
|
|
||||||
document.onmouseup = closeDragElement;
|
|
||||||
// call a function whenever the cursor moves:
|
|
||||||
document.onmousemove = elementDrag;
|
|
||||||
}
|
|
||||||
|
|
||||||
function elementDrag(e) {
|
|
||||||
e = e || window.event;
|
|
||||||
e.preventDefault();
|
|
||||||
// calculate the new cursor position:
|
|
||||||
pos1 = pos3 - e.clientX;
|
|
||||||
pos2 = pos4 - e.clientY;
|
|
||||||
pos3 = e.clientX;
|
|
||||||
pos4 = e.clientY;
|
|
||||||
// set the element's new position:
|
|
||||||
elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
|
|
||||||
elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
|
|
||||||
localStorage.setItem("mainDataSheetX", elmnt.style.left);
|
|
||||||
localStorage.setItem("mainDataSheetY", elmnt.style.top);
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeDragElement() {
|
|
||||||
// stop moving when mouse button is released:
|
|
||||||
document.onmouseup = null;
|
|
||||||
document.onmousemove = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (localStorage.getItem("mainDataSheetX")) {
|
|
||||||
document.getElementById("mainDataSheet").style.left = localStorage.getItem("mainDataSheetX");
|
|
||||||
document.getElementById("mainDataSheet").style.top = localStorage.getItem("mainDataSheetY");
|
|
||||||
}
|
|
||||||
|
|
||||||
function mainDataSheetPositionReset() {
|
|
||||||
localStorage.removeItem("mainDataSheetX");
|
|
||||||
localStorage.removeItem("mainDataSheetY");
|
|
||||||
document.getElementById("mainDataSheet").style.left = "";
|
|
||||||
document.getElementById("mainDataSheet").style.right = "25px";
|
|
||||||
document.getElementById("mainDataSheet").style.top = "25px";
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById("mousovertext").innerHTML = "OGE Masterkarte<br />Version 0.9.7";
|
|
||||||
|
|
||||||
setInterval(() => {
|
|
||||||
if (swapShiftKey === 0) {
|
|
||||||
//document.getElementById("loadingMap").innerHTML = "<div class='spinner-wrapper'><span class='spinner-text'>Update der Daten...</span><span class='spinner'></span></div>";
|
|
||||||
cableReset();
|
|
||||||
}
|
|
||||||
}, (updateInterval*60000));
|
|
||||||
|
|
||||||
stage.on('dragstart', function () {
|
|
||||||
layer.listening(false);
|
|
||||||
var pos = JSON.stringify(stage.position());
|
|
||||||
localStorage.setItem("Position",pos);
|
|
||||||
var sca = JSON.stringify(stage.scale());
|
|
||||||
localStorage.setItem("Scale",sca);
|
|
||||||
console.log("AUS");
|
|
||||||
});
|
|
||||||
stage.on('dragend', function () {
|
|
||||||
layer.listening(true);
|
|
||||||
var pos = JSON.stringify(stage.absolutePosition());
|
|
||||||
localStorage.setItem("AbsolutePosition",pos);
|
|
||||||
var pos = JSON.stringify(stage.position());
|
|
||||||
localStorage.setItem("Position",pos);
|
|
||||||
var sca = JSON.stringify(stage.scale());
|
|
||||||
localStorage.setItem("Scale",sca);
|
|
||||||
layer.batchDraw();
|
|
||||||
console.log("EIN");
|
|
||||||
});
|
|
||||||
|
|
||||||
function stationButtonChange() {
|
|
||||||
var el = document.getElementById("buttonStation");
|
|
||||||
if(el.style.opacity > 0.6) {
|
|
||||||
console.log("Aus");
|
|
||||||
el.style.border = "none";
|
|
||||||
el.style.opacity = 0.4;
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("Ein");
|
|
||||||
el.style.border = "2px solid #63de17";
|
|
||||||
el.style.opacity = 1;
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function ustationButtonChange() {
|
|
||||||
|
|
||||||
var el = document.getElementById("buttonUStation");
|
|
||||||
if(el.style.opacity > 0.6) {
|
|
||||||
console.log("Aus");
|
|
||||||
el.style.border = "none";
|
|
||||||
el.style.opacity = 0.4;
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("Ein");
|
|
||||||
el.style.border = "2px solid #63de17";
|
|
||||||
el.style.opacity = 1;
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function pstationButtonChange() {
|
|
||||||
|
|
||||||
var el = document.getElementById("buttonPStation");
|
|
||||||
if(el.style.opacity > 0.6) {
|
|
||||||
console.log("Aus");
|
|
||||||
el.style.border = "none";
|
|
||||||
el.style.opacity = 0.4;
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("Ein");
|
|
||||||
el.style.border = "2px solid #63de17";
|
|
||||||
el.style.opacity = 1;
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function diensteButtonChange() {
|
|
||||||
|
|
||||||
var el = document.getElementById("buttonDienste");
|
|
||||||
if(el.style.opacity > 0.6) {
|
|
||||||
console.log("Aus");
|
|
||||||
el.style.border = "none";
|
|
||||||
el.style.opacity = 0.4;
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("Ein");
|
|
||||||
el.style.border = "2px solid #63de17";
|
|
||||||
el.style.opacity = 1;
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function kabelButtonChange() {
|
|
||||||
|
|
||||||
var el = document.getElementById("buttonKabel");
|
|
||||||
if(el.style.opacity > 0.6) {
|
|
||||||
console.log("Aus");
|
|
||||||
el.style.border = "none";
|
|
||||||
el.style.opacity = 0.4;
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("Ein");
|
|
||||||
el.style.border = "2px solid #63de17";
|
|
||||||
el.style.opacity = 1;
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function ebenenSpeichern() {
|
|
||||||
var ebenenNamen = ["buttonStation","buttonUStation","buttonPStation","buttonDienste","buttonKabel"];
|
|
||||||
var ebenenTemp = [];
|
|
||||||
for (x = 0;x < 5; x++){
|
|
||||||
var el = document.getElementById(ebenenNamen[x]);
|
|
||||||
if(el.style.opacity > 0.6) {
|
|
||||||
ebenenTemp.push(1);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
ebenenTemp.push(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
localStorage.setItem("ebenenLayer",ebenenTemp);
|
|
||||||
cableReset();
|
|
||||||
}
|
|
||||||
|
|
||||||
function ebenenZuruecksetzen() {
|
|
||||||
var ebenenNamen = ["buttonStation","buttonUStation","buttonPStation","buttonDienste","buttonKabel"];
|
|
||||||
document.getElementById("ebenenSpeichernButton").style.opacity = 0;
|
|
||||||
ebenenLayer = localStorage.getItem("ebenenLayer");
|
|
||||||
ebenenLayer = ebenenLayer.replaceAll(",","");
|
|
||||||
//console.log("Layer "+ebenenLayer);
|
|
||||||
for (x = 0;x < 5; x++){
|
|
||||||
if (parseInt(ebenenLayer[x]) > 0) {
|
|
||||||
//console.log("Layer "+x+" Ein - " +ebenenLayer[x]);
|
|
||||||
var el = document.getElementById(ebenenNamen[x]);
|
|
||||||
el.style.border = "2px solid #63de17";
|
|
||||||
el.style.opacity = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
//console.log("Layer "+x+" Aus - " +ebenenLayer[x]);
|
|
||||||
var el = document.getElementById(ebenenNamen[x]);
|
|
||||||
el.style.border = "none";
|
|
||||||
el.style.opacity = 0.4;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
ebenenZuruecksetzen();
|
|
||||||
}, 5000);
|
|
||||||
@@ -1,896 +0,0 @@
|
|||||||
// OK
|
|
||||||
var greenMarkerBox = L.icon({
|
|
||||||
//iconUrl: 'img/icons/green-marker-icon.png',
|
|
||||||
iconUrl: 'img/group_round_white.png',
|
|
||||||
iconSize: [20, 20], // Größe
|
|
||||||
iconAnchor: [31, 51], // Ankerpunkt
|
|
||||||
popupAnchor: [-3, -76] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 0
|
|
||||||
var redMarkerBoxlg = L.divIcon({
|
|
||||||
iconSize: [30, 75], // Größe
|
|
||||||
iconAnchor: [-20, 65], // Ankerpunkt
|
|
||||||
html:'<div style="border-right:5px solid green">'
|
|
||||||
+'<div class="value1" style="padding-left:5px;font-weight:700;color:blue;">20</div>'
|
|
||||||
+'<div class="value2" style="padding-left:5px;font-weight:700;">20</div>'
|
|
||||||
+'<div class="value3" style="padding-left:5px;font-weight:700;">20</div>'
|
|
||||||
+'<div class="value4" style="padding-left:5px;font-weight:700;color:red;">20</div>'
|
|
||||||
+'</div>'
|
|
||||||
});
|
|
||||||
|
|
||||||
var markerGroup = L.icon({
|
|
||||||
iconUrl: 'img/plus_round.png',
|
|
||||||
iconSize: [20, 20], // Größe
|
|
||||||
iconAnchor: [25, 50], // Ankerpunkt
|
|
||||||
popupAnchor: [-3, -76] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var invisibleMarker = L.icon({
|
|
||||||
iconUrl: 'img/plus_round.png',
|
|
||||||
iconSize: [1, 1], // Größe
|
|
||||||
iconAnchor: [25, 50], // Ankerpunkt
|
|
||||||
popupAnchor: [-3, -76] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var redMarkerBox = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-lr-critical.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 1 - Eis
|
|
||||||
var systemMarker1 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-ac-unit.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker1 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-ac-unit.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker1 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-ac-unit.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker1 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-ac-unit.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 2 - Luft
|
|
||||||
var systemMarker2 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-air.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker2 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-air.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker2 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-air.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker2 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-air.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 3 - Antenne
|
|
||||||
var systemMarker3 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker3 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker3 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker3 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
// 4 - Baugruppenträger
|
|
||||||
var systemMarker4 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-bgt2.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker4 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-bgt2.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker4 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-bgt2.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker4 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-bgt2.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 5 - PC Client
|
|
||||||
var systemMarker5 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-desktop-windows.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker5 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-desktop-windows.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker5 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-desktop-windows.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker5 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-desktop-windows.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 6 - Gerät
|
|
||||||
var systemMarker6 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-devices.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker6 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-devices.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker6 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-devices.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker6 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-devices.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 7 - KFZ
|
|
||||||
var systemMarker7 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker7 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker7 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker7 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// 8 - Person
|
|
||||||
var systemMarker8 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker8 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker8 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker8 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 9 - DNS
|
|
||||||
var systemMarker9 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker9 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker9 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker9 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 10 - Monitor Tabelle
|
|
||||||
var systemMarker10 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker10 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker10 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker10 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 11 - Techniker
|
|
||||||
var systemMarker11 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker11 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker11 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker11 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 12 - Blitz
|
|
||||||
var systemMarker12 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker12 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker12 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker12 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 13 - Haus
|
|
||||||
var systemMarker13 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker13 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker13 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker13 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 14 - LAN
|
|
||||||
var systemMarker14 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker14 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker14 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker14 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 15 - Management
|
|
||||||
var systemMarker15 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker15 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker15 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker15 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 16 - Tür
|
|
||||||
var systemMarker16 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker16 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker16 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker16 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 17 - Speicher
|
|
||||||
var systemMarker17 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker17 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker17 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker17 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 18 - Alarmglocke
|
|
||||||
var systemMarker18 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker18 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker18 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker18 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 19 - Telefon
|
|
||||||
var redMarkerTelefonBox = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-phone-talk.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var spaceStationMarker = L.icon({
|
|
||||||
iconUrl: 'img/space-station.png',
|
|
||||||
iconSize: [50, 50], // Größe
|
|
||||||
iconAnchor: [25, 50], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -60] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 20 - Router
|
|
||||||
var systemMarker20 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker20 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker20 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker20 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 21 - Sicherheit
|
|
||||||
var systemMarker21 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker21 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker21 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker21 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 22 - Einstellungen
|
|
||||||
var systemMarker22 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker22 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker22 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker22 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 23 - Messwerk
|
|
||||||
var systemMarker23 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker23 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker23 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker23 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 24 - Lager
|
|
||||||
var systemMarker24 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker24 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker24 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker24 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 25 - Thermometer
|
|
||||||
var systemMarker25 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker25 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker25 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker25 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 26 - Gewitter
|
|
||||||
var systemMarker26 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker26 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker26 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker26 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 27 - Kamera
|
|
||||||
var systemMarker27 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker27 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker27 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker27 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 28 - Schlüssel
|
|
||||||
var systemMarker28 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker28 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker28 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker28 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 29 - Warnung
|
|
||||||
var systemMarker29 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker29 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker29 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker29 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 30 - Wasser
|
|
||||||
var systemMarker30 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker30 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker30 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker30 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
//Markergrafiken
|
|
||||||
var greenMarker = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-green.png',
|
|
||||||
iconSize: [18, 30], // Größe
|
|
||||||
iconAnchor: [9, 30], // Ankerpunkt
|
|
||||||
popupAnchor: [4, -25] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var redMarker = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-red.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var yellowMarker = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-yellow.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [-3, -76] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var greenMarkerBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-green-box.png',
|
|
||||||
iconSize: [18, 30], // Größe
|
|
||||||
iconAnchor: [9, 30], // Ankerpunkt
|
|
||||||
popupAnchor: [4, -25] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var redMarkerBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-red-box.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var yellowMarkerBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-yellow-box.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [-3, -76] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var redMarkerBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-lr-critical.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var systemMarkerModemBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/system-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarkerModemBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarkerModemBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/major-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarkerModemBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/minor-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var redMarkerTelefonBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-phone-talk.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var spaceStationMarker = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/space-station.png',
|
|
||||||
iconSize: [50, 50], // Größe
|
|
||||||
iconAnchor: [25, 50], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -60] // PopUp Anker
|
|
||||||
});
|
|
||||||
4
public/js/jquery.min.js
vendored
@@ -1,107 +0,0 @@
|
|||||||
geoDataListComb.forEach((c) => {
|
|
||||||
const myArray = c.split(",");
|
|
||||||
//console.log("c: "+myArray[0]+myArray[1]);
|
|
||||||
if (!uniqueData.includes(myArray[0] + myArray[1])) {
|
|
||||||
uniqueData.push(myArray[0] + myArray[1]);
|
|
||||||
uniqueDataTooltip.push(c);
|
|
||||||
listIdLDs.push(parseInt(myArray[3]));
|
|
||||||
//console.log(c);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
doubleData.push(myArray[0] + "," + myArray[1]);
|
|
||||||
//console.log(doubleData);
|
|
||||||
L.marker([myArray[0], myArray[1]],
|
|
||||||
{
|
|
||||||
icon: markerGroup
|
|
||||||
|
|
||||||
}).addTo(map);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dataMeasures.forEach((c) => {
|
|
||||||
//console.log(c);
|
|
||||||
if (!uniqueGMAFilter.includes(c.IdLD)) {
|
|
||||||
uniqueGMAFilter.push(c.IdLD);
|
|
||||||
uniqueGMA.push(c);
|
|
||||||
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//console.log(uniqueGMA);
|
|
||||||
|
|
||||||
for (let index = 0; index < uniqueDataTooltip.length; index++) {
|
|
||||||
let element = uniqueDataTooltip[index].split(",");
|
|
||||||
let lat = element[0];
|
|
||||||
let lng = element[1];
|
|
||||||
let ID = element[2];
|
|
||||||
let IdLD = element[3];
|
|
||||||
|
|
||||||
const Tooltip = L.marker([lat, lng], { icon: invisibleMarker }).bindTooltip('<div>'
|
|
||||||
+ '<div id="value1-' + IdLD + '" style="font-weight:700;">---</div>'
|
|
||||||
+ '<div id="value2-' + IdLD + '" style="font-weight:700;">---</div>'
|
|
||||||
+ '<div id="value3-' + IdLD + '" style="font-weight:700;">---</div>'
|
|
||||||
+ '<div id="value4-' + IdLD + '" style="font-weight:700;">---</div>'
|
|
||||||
+ '</div>', { permanent: true, direction: "right", opacity: 0.8, offset: L.point({ x: 10, y: 0 }) }).openTooltip().addTo(GMA);
|
|
||||||
|
|
||||||
}
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
let uniqueDataApp = [];
|
|
||||||
let uniqueGMAApp = [];
|
|
||||||
|
|
||||||
console.log(geoDataListComb);
|
|
||||||
console.log(dataMeasures);
|
|
||||||
console.log(uniqueGMA);
|
|
||||||
|
|
||||||
geoDataListComb.forEach((c) => {
|
|
||||||
const myArray = c.split(",");
|
|
||||||
console.log("c: "+myArray[0]+myArray[1]);
|
|
||||||
if (!uniqueDataApp.includes(myArray[0]+myArray[1]+myArray[2]+myArray[3])) {
|
|
||||||
uniqueDataApp.push(myArray[0]+myArray[1]+myArray[2]+myArray[3]);
|
|
||||||
//console.log(c);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
dataMeasures.forEach((c) => {
|
|
||||||
const myArray = c.split(",");
|
|
||||||
if (!uniqueGMAApp.includes(myArray[0]+myArray[1]+myArray[2]+myArray[3])) {
|
|
||||||
uniqueGMAApp.push(myArray[0]+myArray[1]+myArray[2]+myArray[3]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("Datalist");
|
|
||||||
console.log(uniqueDataApp);
|
|
||||||
console.log("GMAlist");
|
|
||||||
console.log(uniqueGMAApp);
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/*Polyline example
|
|
||||||
[53.46130277, 7.91247367],
|
|
||||||
[53.46010189, 7.92521953],
|
|
||||||
[53.45266587, 7.91526317],
|
|
||||||
[53.44338822, 8.02525520],
|
|
||||||
[53.39612505, 8.10301780],
|
|
||||||
[53.35034638, 8.119068145],
|
|
||||||
[53.29661923, 8.14344406],
|
|
||||||
[53.24229794, 8.17610263],
|
|
||||||
[53.24241351, 8.17718625]
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
var polyline = L.polyline(latlngs, {color: 'green',weight: 5,lineCap: 'square'}).bindPopup('<b style="font-size:1.25rem;">Name</b><br /><b>Device</b><br /><b>Area</b> ( Area Name )<br /><b>Location Short</b> ( Test )').addTo(map);
|
|
||||||
|
|
||||||
polyline.on('mouseover', function (e) {
|
|
||||||
this.openPopup();
|
|
||||||
this.setStyle({
|
|
||||||
weight: 15
|
|
||||||
});
|
|
||||||
});
|
|
||||||
polyline.on('mouseout', function (e) {
|
|
||||||
this.closePopup();
|
|
||||||
this.setStyle({
|
|
||||||
weight: 5
|
|
||||||
});
|
|
||||||
});*/
|
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file app.js
|
|
||||||
* @author Andreas Tholen
|
|
||||||
* Contact: info@littwin-systechnik.de
|
|
||||||
* @version 0.5.3
|
|
||||||
* @description Basic Functions
|
|
||||||
*/
|
|
||||||
|
|
||||||
$(document).foundation();
|
|
||||||
|
|
||||||
document.getElementById("fullSideMenuCard").style.height = windowHeight+"px";
|
|
||||||
|
|
||||||
// Sidemenu Config
|
|
||||||
if ((!standardSideMenu) || (fullSideMenu)) {
|
|
||||||
const collection = document.getElementsByClassName("standardSideMenu");
|
|
||||||
for (let i = 0; i < collection.length; i++) {
|
|
||||||
collection[i].style.display = "none";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((!fullSideMenu) || (standardSideMenu)) {
|
|
||||||
const collectionb = document.getElementsByClassName("fullSideMenu");
|
|
||||||
for (let i = 0; i < collectionb.length; i++) {
|
|
||||||
collectionb[i].style.display = "none";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var stationCardTempList = "";
|
|
||||||
var stationCardTemp = '<div class="card">'
|
|
||||||
+'<div class="title-bar">'
|
|
||||||
+'<div class="title-bar-left">'
|
|
||||||
+'<span class="title-bar-title" style="color:#000000;padding-left:0.5rem ;">Standort</span>'
|
|
||||||
+'</div>'
|
|
||||||
+'<div class="title-bar-right">'
|
|
||||||
+'<a><i class="fi-alert" title="Weitere Infos" style="color:red;font-size:1.5rem;padding-right:10px;" data-open="weitereInfos"></i></a>'
|
|
||||||
+'</div>'
|
|
||||||
+'</div>'
|
|
||||||
+'<div class="card-section" style="padding: 0px 0px 1rem 1rem !important">'
|
|
||||||
+'Test'
|
|
||||||
+'</div>'
|
|
||||||
+'</div>';
|
|
||||||
|
|
||||||
for (let index = 0; index < 11; index++) {
|
|
||||||
stationCardTempList += stationCardTemp;
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById('stationenFullSideMenu').innerHTML = stationCardTempList;
|
|
||||||
|
|
||||||
function getDataMenu() {
|
|
||||||
var stationsListing = [];
|
|
||||||
|
|
||||||
// Stationen erfassen
|
|
||||||
for (var i = 0; i < dataStaticlength; i++) {
|
|
||||||
var gisStatics = dataStatic[i];
|
|
||||||
var stationListing = gisStatics.Area_Name; // Area_Name
|
|
||||||
stationsListing.push(stationListing);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Doppelte Einträge löschen
|
|
||||||
console.log("%cMAP| Einträge der Stationen werden geprüft",'color: green');
|
|
||||||
let uniqueStations = [];
|
|
||||||
stationsListing.forEach((c) => {
|
|
||||||
if (!uniqueStations.includes(c)) {
|
|
||||||
uniqueStations.push(c);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("%cMAP| Stationen indexiert: %c"+uniqueStations.sort(),'color: green', 'color:grey');
|
|
||||||
uniqueStations = uniqueStations.sort();
|
|
||||||
|
|
||||||
var select = document.getElementById("stationListing");
|
|
||||||
|
|
||||||
for(var i = 0; i < uniqueStations.length; i++) {
|
|
||||||
var opt = uniqueStations[i];
|
|
||||||
var el = document.createElement("option");
|
|
||||||
el.textContent = opt;
|
|
||||||
el.value = opt;
|
|
||||||
el.style.color = "#000000";
|
|
||||||
el.style.fontWeight = "thin";
|
|
||||||
select.appendChild(el);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var checkbox = document.querySelector("#box-TALAS");
|
|
||||||
|
|
||||||
checkbox.addEventListener('change', function() {
|
|
||||||
if (this.checked) {
|
|
||||||
map.addLayer(TALAS);
|
|
||||||
|
|
||||||
console.log("TALAS is checked..");
|
|
||||||
} else {
|
|
||||||
map.removeLayer(TALAS);
|
|
||||||
|
|
||||||
console.log("TALAS is not checked..");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var checkbox = document.querySelector("#box-GMA");
|
|
||||||
|
|
||||||
checkbox.addEventListener('change', function() {
|
|
||||||
if (this.checked) {
|
|
||||||
map.addLayer(GMA);
|
|
||||||
document.getElementById("data-"+LocID).style.display = "none";
|
|
||||||
console.log("GMA is checked..");
|
|
||||||
} else {
|
|
||||||
map.removeLayer(GMA);
|
|
||||||
|
|
||||||
console.log("GMA is not checked..");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var checkbox = document.querySelector("#box-MODEM");
|
|
||||||
|
|
||||||
checkbox.addEventListener('change', function() {
|
|
||||||
if (this.checked) {
|
|
||||||
map.addLayer(GSM);
|
|
||||||
|
|
||||||
console.log("GSM is checked..");
|
|
||||||
} else {
|
|
||||||
map.removeLayer(GSM);
|
|
||||||
|
|
||||||
console.log("GSM is not checked..");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var checkbox = document.querySelector("#box-SIEMENS");
|
|
||||||
|
|
||||||
checkbox.addEventListener('change', function() {
|
|
||||||
if (this.checked) {
|
|
||||||
map.addLayer(Siemens);
|
|
||||||
|
|
||||||
console.log("Notrufsäulen is checked..");
|
|
||||||
} else {
|
|
||||||
map.removeLayer(Siemens);
|
|
||||||
|
|
||||||
console.log("Notrufsäulen is not checked..");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// ISS Positions-Update Test
|
|
||||||
var iss;
|
|
||||||
function update_position() {
|
|
||||||
$.getJSON('http://api.open-notify.org/iss-now.json', function(data) {
|
|
||||||
var latitude = data["iss_position"]["latitude"];
|
|
||||||
var longitude = data["iss_position"]["longitude"];
|
|
||||||
if (!iss) {
|
|
||||||
iss = L.marker([latitude,longitude], {icon: spaceStationMarker}).bindPopup("Ich bin die ISS").addTo(map);
|
|
||||||
}
|
|
||||||
iss.setLatLng([latitude,longitude]).update();
|
|
||||||
setTimeout(update_position, 1000);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
update_position();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file config.js
|
|
||||||
* @author Andreas Tholen
|
|
||||||
* Contact: info@littwin-systechnik.de
|
|
||||||
* @version 0.5.3
|
|
||||||
* @description Config-File for the TALAS.Map
|
|
||||||
**/
|
|
||||||
|
|
||||||
//Versionsnummer
|
|
||||||
var mapVersion = "0.5.3";
|
|
||||||
|
|
||||||
//Zoom
|
|
||||||
var mapZoomMin = 4;
|
|
||||||
var mapZoomMax = 15;
|
|
||||||
|
|
||||||
//Datenquelle
|
|
||||||
var offlineData = true; //
|
|
||||||
|
|
||||||
// GMA LTE Modem
|
|
||||||
var mapDataStaticUrl = "http://10.10.0.13/talas5/ClientData/WebserviceMap.asmx/GisStationsStatic?idMap=8";
|
|
||||||
var mapDataStatusUrl = "http://10.10.0.13/talas5/ClientData/WebserviceMap.asmx/GisStationsStatus?idMap=8";
|
|
||||||
var notrufDataStaticUrl = "http://10.10.0.13/talas5/ClientData/WebserviceMap.asmx/GisStationsStatic?idMap=10";
|
|
||||||
var notrufDataStatusUrl = "http://10.10.0.13/talas5/ClientData/WebserviceMap.asmx/GisStationsStatus?idMap=10";
|
|
||||||
const mapStaticOfflineURL = "offlineTestData/idMap8GisStationenStatic.json";
|
|
||||||
const mapStatusOfflineURL = "offlineTestData/idMap8GisStationenStatus.json";
|
|
||||||
const notrufStaticOfflineURL = "offlineTestData/idMap10GisStationenStatic.json";
|
|
||||||
const notrufStatusOfflineURL = "offlineTestData/idMap10GisStationenStatus.json";
|
|
||||||
if (offlineData = true) {
|
|
||||||
console.log("%cSYSTEM| Offline Daten aktiviert!", 'color: blue');
|
|
||||||
mapDataStaticUrl = mapStaticOfflineURL;
|
|
||||||
mapDataStatusUrl = mapStatusOfflineURL;
|
|
||||||
notrufDataStaticUrl = notrufStaticOfflineURL;
|
|
||||||
notrufDataStatusUrl = notrufStatusOfflineURL;
|
|
||||||
console.log("%cSYSTEM| Static URL: %c"+mapDataStaticUrl, 'color: blue', 'color: green');
|
|
||||||
console.log("%cSYSTEM| Status URL: %c"+mapDataStatusUrl, 'color: blue', 'color: green');
|
|
||||||
console.log("%cSYSTEM| Static URL: %c"+notrufDataStaticUrl, 'color: blue', 'color: green');
|
|
||||||
console.log("%cSYSTEM| Status URL: %c"+notrufDataStatusUrl, 'color: blue', 'color: green');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update Zeit
|
|
||||||
var updateIntervall = 5000; // in Millisekunden
|
|
||||||
|
|
||||||
// example -> L.marker([51.5, -0.09], {icon: greenIcon}).addTo(map);
|
|
||||||
console.log("%cSYSTEM| Kartenfunktionen geladen", 'color: blue');
|
|
||||||
console.log("%cSYSTEM| Die aktuelle Fenstergröße Breite: " + window.innerWidth+"px Höhe: "+window.innerHeight + "px", 'color: blue');
|
|
||||||
console.log("%cMAP| Marker-Icons preload abgeschlossen", 'color: green');
|
|
||||||
console.log("%cMAP| Updateintervall: "+updateIntervall+" ms", 'color: green');
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file config.js
|
|
||||||
* @author Andreas Tholen
|
|
||||||
* Contact: info@littwin-systechnik.de
|
|
||||||
* @version 0.5.3
|
|
||||||
* @description Config-File for the TALAS.Map
|
|
||||||
**/
|
|
||||||
|
|
||||||
//Versionsnummer
|
|
||||||
var mapVersion = "0.5.3";
|
|
||||||
|
|
||||||
//Zoom
|
|
||||||
var mapZoomMin = 4;
|
|
||||||
var mapZoomMax = 15;
|
|
||||||
|
|
||||||
//Datenquelle
|
|
||||||
var offlineData = false;
|
|
||||||
var serverURL = "http://10.10.0.13";
|
|
||||||
|
|
||||||
var url_string = window.location;
|
|
||||||
console.log(window.location);
|
|
||||||
var url = new URL(url_string);
|
|
||||||
var c = url.searchParams.get("m");
|
|
||||||
console.log("idMap: "+c);
|
|
||||||
|
|
||||||
// Kartedaten einlesen
|
|
||||||
var mapDataStaticUrl = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GisStationsStatic?idMap="+c;
|
|
||||||
var mapDataStatusUrl = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GisStationsStatus?idMap="+c;
|
|
||||||
var mapDataIconUrl = serverURL+"/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic";
|
|
||||||
const mapStaticOfflineURL = "offlineTestData/idMap"+c+"GisStationenStatic.json";
|
|
||||||
const mapStatusOfflineURL = "offlineTestData/idMap"+c+"GisStationenStatus.json";
|
|
||||||
const mapIconsOfflineURL = "offlineTestData/icons.json";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (offlineData) {
|
|
||||||
console.log("%cSYSTEM| Offline Daten aktiviert!", 'color: blue');
|
|
||||||
mapDataStaticUrl = mapStaticOfflineURL;
|
|
||||||
mapDataStatusUrl = mapStatusOfflineURL;
|
|
||||||
mapDataIconUrl = mapIconsOfflineURL;
|
|
||||||
console.log("%cSYSTEM| Static URL: %c"+mapDataStaticUrl, 'color: blue', 'color: green');
|
|
||||||
console.log("%cSYSTEM| Status URL: %c"+mapDataStatusUrl, 'color: blue', 'color: green');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update Zeit
|
|
||||||
var updateIntervall = 5000; // in Millisekunden
|
|
||||||
|
|
||||||
// example -> L.marker([51.5, -0.09], {icon: greenIcon}).addTo(map);
|
|
||||||
console.log("%cSYSTEM| Kartenfunktionen geladen", 'color: blue');
|
|
||||||
console.log("%cSYSTEM| Die aktuelle Fenstergröße Breite: " + window.innerWidth+"px Höhe: "+window.innerHeight + "px", 'color: blue');
|
|
||||||
console.log("%cMAP| Marker-Icons preload abgeschlossen", 'color: green');
|
|
||||||
console.log("%cMAP| Updateintervall: "+updateIntervall+" ms", 'color: green');
|
|
||||||
@@ -1,896 +0,0 @@
|
|||||||
// OK
|
|
||||||
var greenMarkerBox = L.icon({
|
|
||||||
//iconUrl: 'img/icons/green-marker-icon.png',
|
|
||||||
iconUrl: 'img/group_round_white.png',
|
|
||||||
iconSize: [20, 20], // Größe
|
|
||||||
iconAnchor: [31, 51], // Ankerpunkt
|
|
||||||
popupAnchor: [-3, -76] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 0
|
|
||||||
var redMarkerBoxlg = L.divIcon({
|
|
||||||
iconSize: [30, 75], // Größe
|
|
||||||
iconAnchor: [-20, 65], // Ankerpunkt
|
|
||||||
html:'<div style="border-right:5px solid green">'
|
|
||||||
+'<div class="value1" style="padding-left:5px;font-weight:700;color:blue;">20</div>'
|
|
||||||
+'<div class="value2" style="padding-left:5px;font-weight:700;">20</div>'
|
|
||||||
+'<div class="value3" style="padding-left:5px;font-weight:700;">20</div>'
|
|
||||||
+'<div class="value4" style="padding-left:5px;font-weight:700;color:red;">20</div>'
|
|
||||||
+'</div>'
|
|
||||||
});
|
|
||||||
|
|
||||||
var markerGroup = L.icon({
|
|
||||||
iconUrl: 'img/plus_round.png',
|
|
||||||
iconSize: [20, 20], // Größe
|
|
||||||
iconAnchor: [25, 50], // Ankerpunkt
|
|
||||||
popupAnchor: [-3, -76] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var invisibleMarker = L.icon({
|
|
||||||
iconUrl: 'img/plus_round.png',
|
|
||||||
iconSize: [1, 1], // Größe
|
|
||||||
iconAnchor: [25, 50], // Ankerpunkt
|
|
||||||
popupAnchor: [-3, -76] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var redMarkerBox = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-lr-critical.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 1 - Eis
|
|
||||||
var systemMarker1 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-ac-unit.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker1 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-ac-unit.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker1 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-ac-unit.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker1 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-ac-unit.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 2 - Luft
|
|
||||||
var systemMarker2 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-air.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker2 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-air.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker2 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-air.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker2 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-air.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 3 - Antenne
|
|
||||||
var systemMarker3 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker3 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker3 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker3 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
// 4 - Baugruppenträger
|
|
||||||
var systemMarker4 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-bgt2.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker4 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-bgt2.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker4 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-bgt2.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker4 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-bgt2.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 5 - PC Client
|
|
||||||
var systemMarker5 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-desktop-windows.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker5 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-desktop-windows.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker5 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-desktop-windows.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker5 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-desktop-windows.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 6 - Gerät
|
|
||||||
var systemMarker6 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-devices.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker6 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-devices.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker6 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-devices.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker6 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-devices.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 7 - KFZ
|
|
||||||
var systemMarker7 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker7 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker7 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker7 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// 8 - Person
|
|
||||||
var systemMarker8 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker8 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker8 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker8 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 9 - DNS
|
|
||||||
var systemMarker9 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker9 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker9 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker9 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 10 - Monitor Tabelle
|
|
||||||
var systemMarker10 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker10 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker10 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker10 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 11 - Techniker
|
|
||||||
var systemMarker11 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker11 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker11 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker11 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 12 - Blitz
|
|
||||||
var systemMarker12 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker12 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker12 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker12 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 13 - Haus
|
|
||||||
var systemMarker13 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker13 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker13 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker13 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 14 - LAN
|
|
||||||
var systemMarker14 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker14 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker14 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker14 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 15 - Management
|
|
||||||
var systemMarker15 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker15 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker15 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker15 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 16 - Tür
|
|
||||||
var systemMarker16 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker16 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker16 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker16 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 17 - Speicher
|
|
||||||
var systemMarker17 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker17 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker17 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker17 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 18 - Alarmglocke
|
|
||||||
var systemMarker18 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker18 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker18 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker18 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 19 - Telefon
|
|
||||||
var redMarkerTelefonBox = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-phone-talk.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var spaceStationMarker = L.icon({
|
|
||||||
iconUrl: 'img/space-station.png',
|
|
||||||
iconSize: [50, 50], // Größe
|
|
||||||
iconAnchor: [25, 50], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -60] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 20 - Router
|
|
||||||
var systemMarker20 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker20 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker20 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker20 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 21 - Sicherheit
|
|
||||||
var systemMarker21 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker21 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker21 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker21 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 22 - Einstellungen
|
|
||||||
var systemMarker22 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker22 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker22 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker22 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 23 - Messwerk
|
|
||||||
var systemMarker23 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker23 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker23 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker23 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 24 - Lager
|
|
||||||
var systemMarker24 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker24 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker24 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker24 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 25 - Thermometer
|
|
||||||
var systemMarker25 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker25 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker25 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker25 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 26 - Gewitter
|
|
||||||
var systemMarker26 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker26 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker26 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker26 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 27 - Kamera
|
|
||||||
var systemMarker27 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker27 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker27 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker27 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 28 - Schlüssel
|
|
||||||
var systemMarker28 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker28 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker28 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker28 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 29 - Warnung
|
|
||||||
var systemMarker29 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker29 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker29 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker29 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
// 30 - Wasser
|
|
||||||
var systemMarker30 = L.icon({
|
|
||||||
iconUrl: 'img/icons/system-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarker30 = L.icon({
|
|
||||||
iconUrl: 'img/icons/marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarker30 = L.icon({
|
|
||||||
iconUrl: 'img/icons/major-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarker30 = L.icon({
|
|
||||||
iconUrl: 'img/icons/minor-marker-icon-car.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
//Markergrafiken
|
|
||||||
var greenMarker = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-green.png',
|
|
||||||
iconSize: [18, 30], // Größe
|
|
||||||
iconAnchor: [9, 30], // Ankerpunkt
|
|
||||||
popupAnchor: [4, -25] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var redMarker = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-red.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var yellowMarker = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-yellow.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [-3, -76] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var greenMarkerBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-green-box.png',
|
|
||||||
iconSize: [18, 30], // Größe
|
|
||||||
iconAnchor: [9, 30], // Ankerpunkt
|
|
||||||
popupAnchor: [4, -25] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var redMarkerBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-red-box.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var yellowMarkerBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-yellow-box.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [-3, -76] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var redMarkerBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-lr-critical.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var systemMarkerModemBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/system-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var criticalMarkerModemBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var majorMarkerModemBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/major-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var minorMarkerModemBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/minor-marker-icon-antenna.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var redMarkerTelefonBox = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/marker-icon-phone-talk.png',
|
|
||||||
iconSize: [26, 41], // Größe
|
|
||||||
iconAnchor: [13, 41], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -36] // PopUp Anker
|
|
||||||
});
|
|
||||||
|
|
||||||
var spaceStationMarker = L.icon({
|
|
||||||
iconUrl: '../tilemap/css/images/space-station.png',
|
|
||||||
iconSize: [50, 50], // Größe
|
|
||||||
iconAnchor: [25, 50], // Ankerpunkt
|
|
||||||
popupAnchor: [0, -60] // PopUp Anker
|
|
||||||
});
|
|
||||||
4
public/js/js/jquery.min.js
vendored
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 618 B |
@@ -1,18 +0,0 @@
|
|||||||
|
|
||||||
var test = ["hase","ente","ente","igel","hase","ente","ente","igel"];
|
|
||||||
|
|
||||||
// doppelte Löschen
|
|
||||||
function doublesDelete(listing) {
|
|
||||||
let temp = [];
|
|
||||||
listing.forEach((c) => {
|
|
||||||
if (!temp.includes(c)) {
|
|
||||||
temp.push(c);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
var testreturn = doublesDelete(test);
|
|
||||||
console.log(testreturn)
|
|
||||||
|
|
||||||
// html Liste erstellen
|
|
||||||
869
public/js/js/vendor/bundle.js
vendored
@@ -1,869 +0,0 @@
|
|||||||
(function (L) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
||||||
|
|
||||||
var L__default = /*#__PURE__*/_interopDefaultLegacy(L);
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) {
|
|
||||||
if (!(instance instanceof Constructor)) {
|
|
||||||
throw new TypeError("Cannot call a class as a function");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function _defineProperties(target, props) {
|
|
||||||
for (var i = 0; i < props.length; i++) {
|
|
||||||
var descriptor = props[i];
|
|
||||||
descriptor.enumerable = descriptor.enumerable || false;
|
|
||||||
descriptor.configurable = true;
|
|
||||||
if ("value" in descriptor) descriptor.writable = true;
|
|
||||||
Object.defineProperty(target, descriptor.key, descriptor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function _createClass(Constructor, protoProps, staticProps) {
|
|
||||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
||||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
||||||
return Constructor;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _defineProperty(obj, key, value) {
|
|
||||||
if (key in obj) {
|
|
||||||
Object.defineProperty(obj, key, {
|
|
||||||
value: value,
|
|
||||||
enumerable: true,
|
|
||||||
configurable: true,
|
|
||||||
writable: true
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
obj[key] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _slicedToArray(arr, i) {
|
|
||||||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
||||||
}
|
|
||||||
|
|
||||||
function _arrayWithHoles(arr) {
|
|
||||||
if (Array.isArray(arr)) return arr;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _iterableToArrayLimit(arr, i) {
|
|
||||||
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
||||||
var _arr = [];
|
|
||||||
var _n = true;
|
|
||||||
var _d = false;
|
|
||||||
var _e = undefined;
|
|
||||||
|
|
||||||
try {
|
|
||||||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
||||||
_arr.push(_s.value);
|
|
||||||
|
|
||||||
if (i && _arr.length === i) break;
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
_d = true;
|
|
||||||
_e = err;
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
if (!_n && _i["return"] != null) _i["return"]();
|
|
||||||
} finally {
|
|
||||||
if (_d) throw _e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return _arr;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _unsupportedIterableToArray(o, minLen) {
|
|
||||||
if (!o) return;
|
|
||||||
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
||||||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
||||||
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
||||||
if (n === "Map" || n === "Set") return Array.from(o);
|
|
||||||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
||||||
}
|
|
||||||
|
|
||||||
function _arrayLikeToArray(arr, len) {
|
|
||||||
if (len == null || len > arr.length) len = arr.length;
|
|
||||||
|
|
||||||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
||||||
|
|
||||||
return arr2;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _nonIterableRest() {
|
|
||||||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
||||||
}
|
|
||||||
|
|
||||||
function _classPrivateFieldGet(receiver, privateMap) {
|
|
||||||
var descriptor = privateMap.get(receiver);
|
|
||||||
|
|
||||||
if (!descriptor) {
|
|
||||||
throw new TypeError("attempted to get private field on non-instance");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (descriptor.get) {
|
|
||||||
return descriptor.get.call(receiver);
|
|
||||||
}
|
|
||||||
|
|
||||||
return descriptor.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _classPrivateFieldSet(receiver, privateMap, value) {
|
|
||||||
var descriptor = privateMap.get(receiver);
|
|
||||||
|
|
||||||
if (!descriptor) {
|
|
||||||
throw new TypeError("attempted to set private field on non-instance");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (descriptor.set) {
|
|
||||||
descriptor.set.call(receiver, value);
|
|
||||||
} else {
|
|
||||||
if (!descriptor.writable) {
|
|
||||||
throw new TypeError("attempted to set read only private field");
|
|
||||||
}
|
|
||||||
|
|
||||||
descriptor.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
var BouncingOptions = /*#__PURE__*/function () {
|
|
||||||
/**
|
|
||||||
* How high marker can bounce (px)
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* How much marker can contract (px)
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bouncing speed coefficient
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Contracting speed coefficient
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Shadow inclination angle(radians); null to cancel shadow movement
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Activate contract animation
|
|
||||||
* @type {boolean}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Many markers can bounce in the same time
|
|
||||||
* @type {boolean}
|
|
||||||
*/
|
|
||||||
function BouncingOptions(options) {
|
|
||||||
_classCallCheck(this, BouncingOptions);
|
|
||||||
|
|
||||||
_defineProperty(this, "bounceHeight", 15);
|
|
||||||
|
|
||||||
_defineProperty(this, "contractHeight", 12);
|
|
||||||
|
|
||||||
_defineProperty(this, "bounceSpeed", 52);
|
|
||||||
|
|
||||||
_defineProperty(this, "contractSpeed", 52);
|
|
||||||
|
|
||||||
_defineProperty(this, "shadowAngle", -Math.PI / 4);
|
|
||||||
|
|
||||||
_defineProperty(this, "elastic", true);
|
|
||||||
|
|
||||||
_defineProperty(this, "exclusive", false);
|
|
||||||
|
|
||||||
options && Object.assign(this, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
_createClass(BouncingOptions, [{
|
|
||||||
key: "override",
|
|
||||||
value: function override(options) {
|
|
||||||
return Object.assign(new BouncingOptions(this), options);
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BouncingOptions;
|
|
||||||
}();
|
|
||||||
|
|
||||||
var _bouncingMarkers = new WeakMap();
|
|
||||||
|
|
||||||
var Orchestration = /*#__PURE__*/function () {
|
|
||||||
function Orchestration() {
|
|
||||||
_classCallCheck(this, Orchestration);
|
|
||||||
|
|
||||||
_bouncingMarkers.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: []
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
_createClass(Orchestration, [{
|
|
||||||
key: "getBouncingMarkers",
|
|
||||||
value: function getBouncingMarkers() {
|
|
||||||
return _classPrivateFieldGet(this, _bouncingMarkers);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Adds the marker to the list of bouncing markers.
|
|
||||||
* If flag 'exclusive' is set to true, stops all bouncing markers before.
|
|
||||||
*
|
|
||||||
* @param marker {Marker} marker object
|
|
||||||
* @param exclusive {boolean} flag of exclusive bouncing. If set to true, stops the bouncing
|
|
||||||
* of all other markers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "addBouncingMarker",
|
|
||||||
value: function addBouncingMarker(marker, exclusive) {
|
|
||||||
if (exclusive || marker._bouncingMotion.bouncingOptions.exclusive) {
|
|
||||||
this.stopAllBouncingMarkers();
|
|
||||||
} else {
|
|
||||||
this.stopExclusiveMarkerBouncing();
|
|
||||||
}
|
|
||||||
|
|
||||||
_classPrivateFieldGet(this, _bouncingMarkers).push(marker);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Stops the bouncing of exclusive marker.
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "stopExclusiveMarkerBouncing",
|
|
||||||
value: function stopExclusiveMarkerBouncing() {
|
|
||||||
var exclusiveMarker = _classPrivateFieldGet(this, _bouncingMarkers).find(function (marker) {
|
|
||||||
return marker._bouncingMotion.bouncingOptions.exclusive;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (exclusiveMarker) {
|
|
||||||
exclusiveMarker.stopBouncing();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Removes the marker from the list of bouncing markers.
|
|
||||||
* @param marker {Marker} marker
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "removeBouncingMarker",
|
|
||||||
value: function removeBouncingMarker(marker) {
|
|
||||||
var i = _classPrivateFieldGet(this, _bouncingMarkers).indexOf(marker);
|
|
||||||
|
|
||||||
if (~i) {
|
|
||||||
_classPrivateFieldGet(this, _bouncingMarkers).splice(i, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Stops the bouncing of all currently bouncing markers. Purge the array of bouncing markers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "stopAllBouncingMarkers",
|
|
||||||
value: function stopAllBouncingMarkers() {
|
|
||||||
var marker;
|
|
||||||
|
|
||||||
while (marker = _classPrivateFieldGet(this, _bouncingMarkers).shift()) {
|
|
||||||
marker.stopBouncing();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return Orchestration;
|
|
||||||
}();
|
|
||||||
|
|
||||||
var oldSetPos = L.Marker.prototype._setPos;
|
|
||||||
var oldOnAdd = L.Marker.prototype.onAdd;
|
|
||||||
var oldSetIcon = L.Marker.prototype.setIcon;
|
|
||||||
var MarkerPrototypeExt = {
|
|
||||||
/** Bouncing options shared by all markers. */
|
|
||||||
_bouncingOptions: new BouncingOptions(),
|
|
||||||
_orchestration: new Orchestration(),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers options of bouncing animation for this marker. After registration of options for
|
|
||||||
* this marker, it will ignore changes of default options. Function automatically recalculates
|
|
||||||
* animation steps and delays.
|
|
||||||
*
|
|
||||||
* @param options {BouncingOptions|object} options object
|
|
||||||
* @return {Marker} this marker
|
|
||||||
*/
|
|
||||||
setBouncingOptions: function setBouncingOptions(options) {
|
|
||||||
this._bouncingMotion.updateBouncingOptions(options);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this marker is bouncing. If this marker is not bouncing returns false.
|
|
||||||
* @return {boolean} true if marker is bouncing, false if not
|
|
||||||
*/
|
|
||||||
isBouncing: function isBouncing() {
|
|
||||||
return this._bouncingMotion.isBouncing;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts bouncing of this marker.
|
|
||||||
* @param times {number|null} number of times the marker must to bounce
|
|
||||||
* @return {Marker} this marker
|
|
||||||
*/
|
|
||||||
bounce: function bounce() {
|
|
||||||
var times = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
||||||
|
|
||||||
this._bouncingMotion.bounce(times);
|
|
||||||
|
|
||||||
var exclusive = this._bouncingMotion.bouncingOptions.exclusive;
|
|
||||||
|
|
||||||
L.Marker.prototype._orchestration.addBouncingMarker(this, exclusive);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stops bouncing of this marker.
|
|
||||||
* Note: the bouncing not stops immediately after the call of this method.
|
|
||||||
* Instead, the animation is executed until marker returns to it's original position and takes
|
|
||||||
* it's full size.
|
|
||||||
*
|
|
||||||
* @return {Marker} this marker
|
|
||||||
*/
|
|
||||||
stopBouncing: function stopBouncing() {
|
|
||||||
this._bouncingMotion.stopBouncing();
|
|
||||||
|
|
||||||
L.Marker.prototype._orchestration.removeBouncingMarker(this);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts/stops bouncing of this marker.
|
|
||||||
* @return {Marker} marker
|
|
||||||
*/
|
|
||||||
toggleBouncing: function toggleBouncing() {
|
|
||||||
if (this._bouncingMotion.isBouncing) {
|
|
||||||
this.stopBouncing();
|
|
||||||
} else {
|
|
||||||
this.bounce();
|
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
isRealMarker: function isRealMarker() {
|
|
||||||
return this.__proto__ === L.Marker.prototype;
|
|
||||||
},
|
|
||||||
_setPos: function _setPos(position) {
|
|
||||||
oldSetPos.call(this, position);
|
|
||||||
|
|
||||||
if (this.isRealMarker()) {
|
|
||||||
this._bouncingMotion.position = position;
|
|
||||||
|
|
||||||
this._bouncingMotion.resetStyles(this);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onAdd: function onAdd(map) {
|
|
||||||
oldOnAdd.call(this, map);
|
|
||||||
|
|
||||||
if (this.isRealMarker()) {
|
|
||||||
this._bouncingMotion.resetStyles(this);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setIcon: function setIcon(icon) {
|
|
||||||
oldSetIcon.call(this, icon);
|
|
||||||
|
|
||||||
if (this.isRealMarker()) {
|
|
||||||
this._bouncingMotion.resetStyles(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculates the points to draw the continous line on the screen. Returns the array of ordered
|
|
||||||
* point coordinates. Uses Bresenham algorithm.
|
|
||||||
*
|
|
||||||
* @param x {number} x coordinate of origin
|
|
||||||
* @param y {number} y coordinate of origin
|
|
||||||
* @param angle {number} angle (radians)
|
|
||||||
* @param length {number} length of line (px)
|
|
||||||
*
|
|
||||||
* @return {[number, number][]} array of ordered point coordinates
|
|
||||||
*
|
|
||||||
* @see http://rosettacode.org/wiki/Bitmap/Bresenham's_line_algorithm#JavaScript
|
|
||||||
*/
|
|
||||||
function calculateLine(x, y, angle, length) {
|
|
||||||
// TODO: use something else than multiply length by 2 to calculate the line with defined
|
|
||||||
// length
|
|
||||||
var xD = Math.round(x + Math.cos(angle) * (length * 2)),
|
|
||||||
yD = Math.round(y + Math.sin(angle) * (length * 2)),
|
|
||||||
dx = Math.abs(xD - x),
|
|
||||||
sx = x < xD ? 1 : -1,
|
|
||||||
dy = Math.abs(yD - y),
|
|
||||||
sy = y < yD ? 1 : -1,
|
|
||||||
err = (dx > dy ? dx : -dy) / 2,
|
|
||||||
e2,
|
|
||||||
p = [],
|
|
||||||
i = 0;
|
|
||||||
|
|
||||||
while (true) {
|
|
||||||
p.push([x, y]);
|
|
||||||
i++;
|
|
||||||
if (i === length) break;
|
|
||||||
e2 = err;
|
|
||||||
|
|
||||||
if (e2 > -dx) {
|
|
||||||
err -= dy;
|
|
||||||
x += sx;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e2 < dy) {
|
|
||||||
err += dx;
|
|
||||||
y += sy;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
function styleInject(css, ref) {
|
|
||||||
if ( ref === void 0 ) ref = {};
|
|
||||||
var insertAt = ref.insertAt;
|
|
||||||
|
|
||||||
if (!css || typeof document === 'undefined') { return; }
|
|
||||||
|
|
||||||
var head = document.head || document.getElementsByTagName('head')[0];
|
|
||||||
var style = document.createElement('style');
|
|
||||||
style.type = 'text/css';
|
|
||||||
|
|
||||||
if (insertAt === 'top') {
|
|
||||||
if (head.firstChild) {
|
|
||||||
head.insertBefore(style, head.firstChild);
|
|
||||||
} else {
|
|
||||||
head.appendChild(style);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
head.appendChild(style);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (style.styleSheet) {
|
|
||||||
style.styleSheet.cssText = css;
|
|
||||||
} else {
|
|
||||||
style.appendChild(document.createTextNode(css));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var css_248z = "@keyframes l-smooth-marker-bouncing-move {\n from {\n transform: translate(var(--pos-x), var(--pos-y))\n }\n to {\n transform: translate(var(--pos-x-jump, var(--pos-x)), var(--pos-y-jump))\n }\n}\n\n@keyframes l-smooth-marker-bouncing-contract {\n from {\n transform: translate(var(--pos-x), var(--pos-y))\n }\n to {\n transform: translate(var(--pos-x), var(--pos-y-contract)) scaleY(var(--scale-contract))\n }\n}\n\n.bouncing {\n animation-name: l-smooth-marker-bouncing-move, l-smooth-marker-bouncing-move, l-smooth-marker-bouncing-contract, l-smooth-marker-bouncing-contract;\n animation-direction: normal, reverse, normal, reverse;\n animation-duration: var(--duration-jump), var(--duration-jump), var(--duration-contract), var(--duration-contract);\n animation-delay: var(--delays)\n}\n\n.bouncing.simple {\n animation-name: l-smooth-marker-bouncing-move, l-smooth-marker-bouncing-move;\n animation-direction: normal, reverse;\n animation-duration: var(--duration-jump), var(--duration-jump);\n animation-delay: var(--delays)\n}\n";
|
|
||||||
styleInject(css_248z);
|
|
||||||
|
|
||||||
/** Regex to parse style definitions. */
|
|
||||||
var regStyle = /([\w-]+): ([^;]+);/g;
|
|
||||||
|
|
||||||
var Styles = /*#__PURE__*/function () {
|
|
||||||
function Styles(styles) {
|
|
||||||
_classCallCheck(this, Styles);
|
|
||||||
|
|
||||||
styles && Object.assign(this, styles);
|
|
||||||
}
|
|
||||||
|
|
||||||
_createClass(Styles, [{
|
|
||||||
key: "findOpacity",
|
|
||||||
value: function findOpacity(options) {
|
|
||||||
this.opacity = (options === null || options === void 0 ? void 0 : options.opacityWhenUnclustered // used by cluster plugin
|
|
||||||
) || (options === null || options === void 0 ? void 0 : options.opacity) || 1;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Creates a copy of styles merged with provided 'styles'.
|
|
||||||
* @param {Object} styles object with styles to merge
|
|
||||||
* @return {Styles} copy of styles
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "withStyles",
|
|
||||||
value: function withStyles(styles) {
|
|
||||||
var copy = new Styles(this);
|
|
||||||
copy && Object.assign(copy, styles);
|
|
||||||
return copy;
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "toString",
|
|
||||||
value: function toString() {
|
|
||||||
return Object.entries(this).map(function (entry) {
|
|
||||||
return "".concat(entry[0], ": ").concat(entry[1], ";");
|
|
||||||
}).join(' ');
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Parses cssText attribute into Styles object.
|
|
||||||
* @param cssText {string} cssText string
|
|
||||||
* @return {Styles} Styles object
|
|
||||||
*/
|
|
||||||
|
|
||||||
}], [{
|
|
||||||
key: "parse",
|
|
||||||
value: function parse(cssText) {
|
|
||||||
var styles = {};
|
|
||||||
var match = regStyle.exec(cssText);
|
|
||||||
|
|
||||||
while (match) {
|
|
||||||
styles[match[1]] = match[2];
|
|
||||||
match = regStyle.exec(cssText);
|
|
||||||
}
|
|
||||||
|
|
||||||
delete styles['z-index'];
|
|
||||||
delete styles['opacity'];
|
|
||||||
styles['outline'] = 'none';
|
|
||||||
return new Styles(styles);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param marker {Marker}
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "ofMarker",
|
|
||||||
value: function ofMarker(marker) {
|
|
||||||
var styles = Styles.parse(marker._icon.style.cssText);
|
|
||||||
styles.findOpacity(marker.options);
|
|
||||||
styles['z-index'] = marker._zIndex;
|
|
||||||
return styles;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return Styles;
|
|
||||||
}();
|
|
||||||
|
|
||||||
var animationNamePrefix = 'l-smooth-marker-bouncing-';
|
|
||||||
var moveAnimationName = animationNamePrefix + 'move';
|
|
||||||
var contractAnimationName = animationNamePrefix + 'contract';
|
|
||||||
/*
|
|
||||||
* CSS3 animation runs faster than transform-based animation. We need to reduce speed in order
|
|
||||||
* to be compatible with old API.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var speedCoefficient = 0.8;
|
|
||||||
/**
|
|
||||||
* Removes and then resets required classes on the HTML element.
|
|
||||||
* Used as hack to restart CSS3 animation.
|
|
||||||
*
|
|
||||||
* @param element {HTMLElement} HTML element
|
|
||||||
* @param classes {string[]} names of classes
|
|
||||||
*/
|
|
||||||
|
|
||||||
function resetClasses(element, classes) {
|
|
||||||
classes.forEach(function (className) {
|
|
||||||
return L.DomUtil.removeClass(element, className);
|
|
||||||
});
|
|
||||||
void element.offsetWidth;
|
|
||||||
classes.forEach(function (className) {
|
|
||||||
return L.DomUtil.addClass(element, className);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var _lastAnimationName = new WeakMap();
|
|
||||||
|
|
||||||
var _classes = new WeakMap();
|
|
||||||
|
|
||||||
var _eventCounter = new WeakMap();
|
|
||||||
|
|
||||||
var _times = new WeakMap();
|
|
||||||
|
|
||||||
var _listener = new WeakMap();
|
|
||||||
|
|
||||||
var BouncingMotionCss3 = /*#__PURE__*/function () {
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*
|
|
||||||
* @param marker {Marker} marker
|
|
||||||
* @param position {Point} marker current position on the map canvas
|
|
||||||
* @param bouncingOptions {BouncingOptions} options of bouncing animation
|
|
||||||
*/
|
|
||||||
function BouncingMotionCss3(marker, position, bouncingOptions) {
|
|
||||||
var _this = this;
|
|
||||||
|
|
||||||
_classCallCheck(this, BouncingMotionCss3);
|
|
||||||
|
|
||||||
_defineProperty(this, "marker", void 0);
|
|
||||||
|
|
||||||
_defineProperty(this, "position", void 0);
|
|
||||||
|
|
||||||
_defineProperty(this, "bouncingOptions", void 0);
|
|
||||||
|
|
||||||
_defineProperty(this, "isBouncing", false);
|
|
||||||
|
|
||||||
_defineProperty(this, "iconStyles", void 0);
|
|
||||||
|
|
||||||
_defineProperty(this, "shadowStyles", void 0);
|
|
||||||
|
|
||||||
_defineProperty(this, "bouncingAnimationPlaying", false);
|
|
||||||
|
|
||||||
_lastAnimationName.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: contractAnimationName
|
|
||||||
});
|
|
||||||
|
|
||||||
_classes.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: ['bouncing']
|
|
||||||
});
|
|
||||||
|
|
||||||
_eventCounter.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: void 0
|
|
||||||
});
|
|
||||||
|
|
||||||
_times.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: void 0
|
|
||||||
});
|
|
||||||
|
|
||||||
_listener.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: function value(event) {
|
|
||||||
return _this.onAnimationEnd(event);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.marker = marker;
|
|
||||||
this.position = position;
|
|
||||||
this.updateBouncingOptions(bouncingOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
_createClass(BouncingMotionCss3, [{
|
|
||||||
key: "updateBouncingOptions",
|
|
||||||
value: function updateBouncingOptions(options) {
|
|
||||||
this.bouncingOptions = options instanceof BouncingOptions ? options : this.bouncingOptions.override(options);
|
|
||||||
|
|
||||||
if (!this.bouncingOptions.elastic) {
|
|
||||||
_classPrivateFieldSet(this, _lastAnimationName, moveAnimationName);
|
|
||||||
|
|
||||||
_classPrivateFieldGet(this, _classes).push('simple');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "onAnimationEnd",
|
|
||||||
value: function onAnimationEnd(event) {
|
|
||||||
var _this2 = this;
|
|
||||||
|
|
||||||
if (event.animationName === _classPrivateFieldGet(this, _lastAnimationName)) {
|
|
||||||
var _this$eventCounter;
|
|
||||||
|
|
||||||
_classPrivateFieldSet(this, _eventCounter, (_this$eventCounter = +_classPrivateFieldGet(this, _eventCounter)) + 1), _this$eventCounter;
|
|
||||||
|
|
||||||
_classPrivateFieldSet(this, _eventCounter, _classPrivateFieldGet(this, _eventCounter) % 2);
|
|
||||||
|
|
||||||
if (!_classPrivateFieldGet(this, _eventCounter)) {
|
|
||||||
if (this.isBouncing && (_classPrivateFieldGet(this, _times) === null || _classPrivateFieldSet(this, _times, +_classPrivateFieldGet(this, _times) - 1))) {
|
|
||||||
resetClasses(this.marker._icon, _classPrivateFieldGet(this, _classes));
|
|
||||||
|
|
||||||
if (this.marker._shadow) {
|
|
||||||
resetClasses(this.marker._shadow, _classPrivateFieldGet(this, _classes));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
_classPrivateFieldGet(this, _classes).forEach(function (className) {
|
|
||||||
L.DomUtil.removeClass(_this2.marker._icon, className);
|
|
||||||
|
|
||||||
if (_this2.marker._shadow) {
|
|
||||||
L.DomUtil.removeClass(_this2.marker._shadow, className);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.bouncingAnimationPlaying = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "resetStyles",
|
|
||||||
value: function resetStyles(marker) {
|
|
||||||
var _this$marker$getIcon, _this$marker$getIcon$, _this$marker, _this$marker$_iconObj, _this$marker$_iconObj2;
|
|
||||||
|
|
||||||
this.marker = marker;
|
|
||||||
this.iconStyles = Styles.ofMarker(marker);
|
|
||||||
|
|
||||||
if (marker._shadow) {
|
|
||||||
this.shadowStyles = Styles.parse(marker._shadow.style.cssText);
|
|
||||||
}
|
|
||||||
|
|
||||||
var iconHeight = ((_this$marker$getIcon = this.marker.getIcon()) === null || _this$marker$getIcon === void 0 ? void 0 : (_this$marker$getIcon$ = _this$marker$getIcon.options) === null || _this$marker$getIcon$ === void 0 ? void 0 : _this$marker$getIcon$.iconSize[1]) || ((_this$marker = this.marker) === null || _this$marker === void 0 ? void 0 : (_this$marker$_iconObj = _this$marker._iconObj) === null || _this$marker$_iconObj === void 0 ? void 0 : (_this$marker$_iconObj2 = _this$marker$_iconObj.options) === null || _this$marker$_iconObj2 === void 0 ? void 0 : _this$marker$_iconObj2.iconSize[1]);
|
|
||||||
var iconAnimationParams = BouncingMotionCss3.animationParams(this.position, this.bouncingOptions, iconHeight);
|
|
||||||
this.iconStyles = this.iconStyles.withStyles(iconAnimationParams);
|
|
||||||
this.marker._icon.style.cssText = this.iconStyles.toString();
|
|
||||||
|
|
||||||
if (this.bouncingAnimationPlaying) {
|
|
||||||
resetClasses(this.marker._icon, _classPrivateFieldGet(this, _classes));
|
|
||||||
|
|
||||||
this.marker._icon.addEventListener('animationend', _classPrivateFieldGet(this, _listener));
|
|
||||||
}
|
|
||||||
|
|
||||||
var _this$bouncingOptions = this.bouncingOptions,
|
|
||||||
bounceHeight = _this$bouncingOptions.bounceHeight,
|
|
||||||
contractHeight = _this$bouncingOptions.contractHeight,
|
|
||||||
shadowAngle = _this$bouncingOptions.shadowAngle;
|
|
||||||
|
|
||||||
if (this.marker._shadow && shadowAngle) {
|
|
||||||
var _this$marker$getIcon2, _this$marker$getIcon3;
|
|
||||||
|
|
||||||
var _this$position = this.position,
|
|
||||||
x = _this$position.x,
|
|
||||||
y = _this$position.y;
|
|
||||||
var points = calculateLine(x, y, shadowAngle, bounceHeight + 1);
|
|
||||||
|
|
||||||
var _points$bounceHeight = _slicedToArray(points[bounceHeight], 2),
|
|
||||||
posXJump = _points$bounceHeight[0],
|
|
||||||
posYJump = _points$bounceHeight[1];
|
|
||||||
|
|
||||||
var shadowHeight = (_this$marker$getIcon2 = this.marker.getIcon()) === null || _this$marker$getIcon2 === void 0 ? void 0 : (_this$marker$getIcon3 = _this$marker$getIcon2.options) === null || _this$marker$getIcon3 === void 0 ? void 0 : _this$marker$getIcon3.shadowSize[1];
|
|
||||||
var shadowScaleContract = BouncingMotionCss3.contractScale(shadowHeight, contractHeight);
|
|
||||||
this.shadowStyles = this.shadowStyles.withStyles(iconAnimationParams).withStyles({
|
|
||||||
'--pos-x-jump': "".concat(posXJump, "px"),
|
|
||||||
'--pos-y-jump': "".concat(posYJump, "px"),
|
|
||||||
'--scale-contract': shadowScaleContract
|
|
||||||
});
|
|
||||||
this.marker._shadow.style.cssText = this.shadowStyles.toString();
|
|
||||||
|
|
||||||
if (this.bouncingAnimationPlaying) {
|
|
||||||
resetClasses(this.marker._shadow, _classPrivateFieldGet(this, _classes));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "bounce",
|
|
||||||
value: function bounce() {
|
|
||||||
var times = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
||||||
|
|
||||||
_classPrivateFieldSet(this, _times, times);
|
|
||||||
|
|
||||||
_classPrivateFieldSet(this, _eventCounter, 0);
|
|
||||||
|
|
||||||
this.isBouncing = true;
|
|
||||||
|
|
||||||
if (this.bouncingAnimationPlaying) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.bouncingAnimationPlaying = true;
|
|
||||||
resetClasses(this.marker._icon, _classPrivateFieldGet(this, _classes));
|
|
||||||
|
|
||||||
if (this.marker._shadow) {
|
|
||||||
resetClasses(this.marker._shadow, _classPrivateFieldGet(this, _classes));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.marker._icon.addEventListener('animationend', _classPrivateFieldGet(this, _listener));
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "stopBouncing",
|
|
||||||
value: function stopBouncing() {
|
|
||||||
this.isBouncing = false;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Calculates parameters of CSS3 animation of bouncing.
|
|
||||||
*
|
|
||||||
* @param position {Point} marker current position on the map canvas
|
|
||||||
* @param bouncingOptions {BouncingOptions} options of bouncing animation
|
|
||||||
* @param height {number} icons height
|
|
||||||
* @return {object} CSS3 animation parameters
|
|
||||||
*/
|
|
||||||
|
|
||||||
}], [{
|
|
||||||
key: "animationParams",
|
|
||||||
value: function animationParams(position, bouncingOptions, height) {
|
|
||||||
var x = position.x,
|
|
||||||
y = position.y;
|
|
||||||
var bounceHeight = bouncingOptions.bounceHeight,
|
|
||||||
contractHeight = bouncingOptions.contractHeight,
|
|
||||||
bounceSpeed = bouncingOptions.bounceSpeed,
|
|
||||||
contractSpeed = bouncingOptions.contractSpeed;
|
|
||||||
var scaleContract = BouncingMotionCss3.contractScale(height, contractHeight);
|
|
||||||
var durationJump = BouncingMotionCss3.calculateDuration(bounceHeight, bounceSpeed);
|
|
||||||
var durationContract = BouncingMotionCss3.calculateDuration(contractHeight, contractSpeed);
|
|
||||||
var delays = [0, durationJump, durationJump * 2, durationJump * 2 + durationContract];
|
|
||||||
return {
|
|
||||||
'--pos-x': "".concat(x, "px"),
|
|
||||||
'--pos-y': "".concat(y, "px"),
|
|
||||||
'--pos-y-jump': "".concat(y - bounceHeight, "px"),
|
|
||||||
'--pos-y-contract': "".concat(y + contractHeight, "px"),
|
|
||||||
'--scale-contract': scaleContract,
|
|
||||||
'--duration-jump': "".concat(durationJump, "ms"),
|
|
||||||
'--duration-contract': "".concat(durationContract, "ms"),
|
|
||||||
'--delays': "0ms, ".concat(delays[1], "ms, ").concat(delays[2], "ms, ").concat(delays[3], "ms")
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Calculates scale of contracting.
|
|
||||||
*
|
|
||||||
* @param {number} height original height
|
|
||||||
* @param {number} contractHeight how much it must contract
|
|
||||||
* @return {number} contracting scale between 0 and 1
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "contractScale",
|
|
||||||
value: function contractScale(height, contractHeight) {
|
|
||||||
return (height - contractHeight) / height;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Calculates duration of animation.
|
|
||||||
*
|
|
||||||
* @param height {number} height of movement or resizing (px)
|
|
||||||
* @param speed {number} speed coefficient
|
|
||||||
*
|
|
||||||
* @return {number} duration of animation (ms)
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "calculateDuration",
|
|
||||||
value: function calculateDuration(height, speed) {
|
|
||||||
var duration = Math.round(speed * speedCoefficient);
|
|
||||||
var i = height;
|
|
||||||
|
|
||||||
while (--i) {
|
|
||||||
duration += Math.round(speed / (height - i));
|
|
||||||
}
|
|
||||||
|
|
||||||
return duration;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BouncingMotionCss3;
|
|
||||||
}();
|
|
||||||
|
|
||||||
L__default['default'].Marker.include(MarkerPrototypeExt);
|
|
||||||
/**
|
|
||||||
* Registers default options of bouncing animation.
|
|
||||||
* @param options {BouncingOptions|object} object with options
|
|
||||||
*/
|
|
||||||
|
|
||||||
L__default['default'].Marker.setBouncingOptions = function (options) {
|
|
||||||
L.Marker.prototype._bouncingOptions = options instanceof BouncingOptions ? options : new BouncingOptions(options);
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Returns array of currently bouncing markers.
|
|
||||||
* @return {Marker[]} array of bouncing markers
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
L__default['default'].Marker.getBouncingMarkers = function () {
|
|
||||||
L.Marker.prototype._orchestration.getBouncingMarkers();
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Stops the bouncing of all currently bouncing markers. Purge the array of bouncing markers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
L__default['default'].Marker.stopAllBouncingMarkers = function () {
|
|
||||||
L.Marker.prototype._orchestration.stopAllBouncingMarkers();
|
|
||||||
};
|
|
||||||
|
|
||||||
L__default['default'].Marker.addInitHook(function () {
|
|
||||||
if (this.isRealMarker()) {
|
|
||||||
var bouncingOptions = new BouncingOptions(L.Marker.prototype._bouncingOptions);
|
|
||||||
this._bouncingMotion = new BouncingMotionCss3(this, new L.Point(0, 0), bouncingOptions);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}(L));
|
|
||||||
531
public/js/js/vendor/foundation.js
vendored
1
public/js/js/vendor/foundation.min.js
vendored
66
public/js/js/vendor/gktowgs.js
vendored
@@ -1,66 +0,0 @@
|
|||||||
const proj4 = require('proj4')
|
|
||||||
const epsg = require('epsg')
|
|
||||||
const isObject = require('lodash.isobject')
|
|
||||||
const isNumber = require('lodash.isnumber')
|
|
||||||
|
|
||||||
const epsgFromZone = (zone) => 'EPSG:'+(31464+zone) // zone 2 = 31466, zone 5 = 31469
|
|
||||||
|
|
||||||
const toWGS = (coordinates) => {
|
|
||||||
if(!isObject(coordinates) || !isNumber(coordinates.x) || !isNumber(coordinates.y)){
|
|
||||||
throw new Error('missing or invalid parameter `coordinates`')
|
|
||||||
}
|
|
||||||
if(coordinates.x < 0 || coordinates.x >= Math.pow(10, 7)){
|
|
||||||
throw new Error('`coordinates.x` out of bounds')
|
|
||||||
}
|
|
||||||
if(coordinates.y < 0 || coordinates.y >= Math.pow(10, 7)){
|
|
||||||
throw new Error('`coordinates.y` out of bounds')
|
|
||||||
}
|
|
||||||
|
|
||||||
const zone = +(coordinates.x+'')[0]
|
|
||||||
|
|
||||||
const projected = proj4.default(epsg[epsgFromZone(zone)], 'WGS84', Object.assign({}, coordinates))
|
|
||||||
return ({
|
|
||||||
longitude: projected.x,
|
|
||||||
latitude: projected.y
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const toGK = (coordinates, zone) => {
|
|
||||||
if(!isObject(coordinates) || !isNumber(coordinates.longitude) || !isNumber(coordinates.latitude)){
|
|
||||||
throw new Error('missing or invalid parameter `coordinates`')
|
|
||||||
}
|
|
||||||
if(coordinates.longitude < -180 || coordinates.longitude > 180){
|
|
||||||
throw new Error('`coordinates.longitude` out of bounds')
|
|
||||||
}
|
|
||||||
if(coordinates.latitude < -360 || coordinates.latitude > 360){
|
|
||||||
throw new Error('`coordinates.latitude` out of bounds')
|
|
||||||
}
|
|
||||||
|
|
||||||
if(zone){
|
|
||||||
if(!isNumber(zone)){
|
|
||||||
throw new Error('`zone` parameter must be a number')
|
|
||||||
}
|
|
||||||
if(![2,3,4,5].includes(zone)){
|
|
||||||
throw new Error('if set, `zone` parameter must be one of 2, 3, 4, 5')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
zone = Math.floor((+coordinates.longitude + 1.5) / 3)
|
|
||||||
if(![2,3,4,5].includes(zone)){
|
|
||||||
throw new Error('could not detect valid zone (2, 3, 4, 5) from input coordinates')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const proj4coordinates = {
|
|
||||||
x: coordinates.longitude,
|
|
||||||
y: coordinates.latitude
|
|
||||||
}
|
|
||||||
|
|
||||||
const projected = proj4('WGS84', epsg[epsgFromZone(zone)], proj4coordinates)
|
|
||||||
return ({
|
|
||||||
x: projected.x,
|
|
||||||
y: projected.y
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {toWGS, toGK}
|
|
||||||
10598
public/js/js/vendor/jquery.js
vendored
293
public/js/js/vendor/oms.min.js
vendored
@@ -1,293 +0,0 @@
|
|||||||
(function () {
|
|
||||||
/*
|
|
||||||
OverlappingMarkerSpiderfier
|
|
||||||
https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet
|
|
||||||
Copyright (c) 2011 - 2012 George MacKerron
|
|
||||||
Released under the MIT licence: http://opensource.org/licenses/mit-license
|
|
||||||
Note: The Leaflet maps API must be included *before* this code
|
|
||||||
*/
|
|
||||||
(function () {
|
|
||||||
var q = {}.hasOwnProperty,
|
|
||||||
r = [].slice;
|
|
||||||
null != this.L &&
|
|
||||||
(this.OverlappingMarkerSpiderfier = (function () {
|
|
||||||
function n(c, b) {
|
|
||||||
var a,
|
|
||||||
e,
|
|
||||||
g,
|
|
||||||
f,
|
|
||||||
d = this;
|
|
||||||
this.map = c;
|
|
||||||
null == b && (b = {});
|
|
||||||
for (a in b) q.call(b, a) && ((e = b[a]), (this[a] = e));
|
|
||||||
this.initMarkerArrays();
|
|
||||||
this.listeners = {};
|
|
||||||
f = ["click", "zoomend"];
|
|
||||||
e = 0;
|
|
||||||
for (g = f.length; e < g; e++)
|
|
||||||
(a = f[e]),
|
|
||||||
this.map.addEventListener(a, function () {
|
|
||||||
return d.unspiderfy();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var d, k;
|
|
||||||
d = n.prototype;
|
|
||||||
d.VERSION = "0.2.6";
|
|
||||||
k = 2 * Math.PI;
|
|
||||||
d.keepSpiderfied = !1;
|
|
||||||
d.nearbyDistance = 20;
|
|
||||||
d.circleSpiralSwitchover = 9;
|
|
||||||
d.circleFootSeparation = 25;
|
|
||||||
d.circleStartAngle = k / 12;
|
|
||||||
d.spiralFootSeparation = 28;
|
|
||||||
d.spiralLengthStart = 11;
|
|
||||||
d.spiralLengthFactor = 5;
|
|
||||||
d.legWeight = 1.5;
|
|
||||||
d.legColors = { usual: "#222", highlighted: "#f00" };
|
|
||||||
d.initMarkerArrays = function () {
|
|
||||||
this.markers = [];
|
|
||||||
return (this.markerListeners = []);
|
|
||||||
};
|
|
||||||
d.addMarker = function (c) {
|
|
||||||
|
|
||||||
var b,
|
|
||||||
a = this;
|
|
||||||
if (null != c._oms) return this;
|
|
||||||
c._oms = !0;
|
|
||||||
b = function () {
|
|
||||||
return a.spiderListener(c);
|
|
||||||
};
|
|
||||||
c.addEventListener("click", b);
|
|
||||||
this.markerListeners.push(b);
|
|
||||||
this.markers.push(c);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.getMarkers = function () {
|
|
||||||
return this.markers.slice(0);
|
|
||||||
};
|
|
||||||
d.removeMarker = function (c) {
|
|
||||||
var b, a;
|
|
||||||
null != c._omsData && this.unspiderfy();
|
|
||||||
b = this.arrIndexOf(this.markers, c);
|
|
||||||
if (0 > b) return this;
|
|
||||||
a = this.markerListeners.splice(b, 1)[0];
|
|
||||||
c.removeEventListener("click", a);
|
|
||||||
delete c._oms;
|
|
||||||
this.markers.splice(b, 1);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.clearMarkers = function () {
|
|
||||||
var c, b, a, e, g;
|
|
||||||
this.unspiderfy();
|
|
||||||
g = this.markers;
|
|
||||||
c = a = 0;
|
|
||||||
for (e = g.length; a < e; c = ++a)
|
|
||||||
(b = g[c]),
|
|
||||||
(c = this.markerListeners[c]),
|
|
||||||
b.removeEventListener("click", c),
|
|
||||||
delete b._oms;
|
|
||||||
this.initMarkerArrays();
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.addListener = function (c, b) {
|
|
||||||
|
|
||||||
var a, e;
|
|
||||||
(null != (e = (a = this.listeners)[c]) ? e : (a[c] = [])).push(b);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.removeListener = function (c, b) {
|
|
||||||
var a;
|
|
||||||
a = this.arrIndexOf(this.listeners[c], b);
|
|
||||||
0 > a || this.listeners[c].splice(a, 1);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.clearListeners = function (c) {
|
|
||||||
this.listeners[c] = [];
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.trigger = function () {
|
|
||||||
var c, b, a, e, g, f;
|
|
||||||
b = arguments[0];
|
|
||||||
c = 2 <= arguments.length ? r.call(arguments, 1) : [];
|
|
||||||
b = null != (a = this.listeners[b]) ? a : [];
|
|
||||||
f = [];
|
|
||||||
e = 0;
|
|
||||||
for (g = b.length; e < g; e++) (a = b[e]), f.push(a.apply(null, c));
|
|
||||||
return f;
|
|
||||||
};
|
|
||||||
d.generatePtsCircle = function (c, b) {
|
|
||||||
var a, e, g, f, d;
|
|
||||||
g = (this.circleFootSeparation * (2 + c)) / k;
|
|
||||||
e = k / c;
|
|
||||||
d = [];
|
|
||||||
for (a = f = 0; 0 <= c ? f < c : f > c; a = 0 <= c ? ++f : --f)
|
|
||||||
(a = this.circleStartAngle + a * e),
|
|
||||||
d.push(new L.Point(b.x + g * Math.cos(a), b.y + g * Math.sin(a)));
|
|
||||||
return d;
|
|
||||||
};
|
|
||||||
d.generatePtsSpiral = function (c, b) {
|
|
||||||
var a, e, g, f, d;
|
|
||||||
g = this.spiralLengthStart;
|
|
||||||
a = 0;
|
|
||||||
d = [];
|
|
||||||
for (e = f = 0; 0 <= c ? f < c : f > c; e = 0 <= c ? ++f : --f)
|
|
||||||
(a += this.spiralFootSeparation / g + 5e-4 * e),
|
|
||||||
(e = new L.Point(b.x + g * Math.cos(a), b.y + g * Math.sin(a))),
|
|
||||||
(g += (k * this.spiralLengthFactor) / a),
|
|
||||||
d.push(e);
|
|
||||||
return d;
|
|
||||||
};
|
|
||||||
// Which Icon was clicked - c Icon Data
|
|
||||||
d.spiderListener = function (c) {
|
|
||||||
var b, a, e, g, f, d, h, k, l;
|
|
||||||
((b = null != c._omsData) && this.keepSpiderfied) ||
|
|
||||||
this.unspiderfy();
|
|
||||||
if (b) return this.trigger("click", c);
|
|
||||||
g = [];
|
|
||||||
f = [];
|
|
||||||
d = this.nearbyDistance * this.nearbyDistance;
|
|
||||||
e = this.map.latLngToLayerPoint(c.getLatLng());
|
|
||||||
l = this.markers;
|
|
||||||
h = 0;
|
|
||||||
for (k = l.length; h < k; h++)
|
|
||||||
(b = l[h]),
|
|
||||||
this.map.hasLayer(b) &&
|
|
||||||
((a = this.map.latLngToLayerPoint(b.getLatLng())),
|
|
||||||
this.ptDistanceSq(a, e) < d
|
|
||||||
? g.push({ marker: b, markerPt: a })
|
|
||||||
: f.push(b));
|
|
||||||
return 1 === g.length
|
|
||||||
? this.trigger("click", c)
|
|
||||||
: this.spiderfy(g, f);
|
|
||||||
};
|
|
||||||
d.makeHighlightListeners = function (c) {
|
|
||||||
var b = this;
|
|
||||||
return {
|
|
||||||
highlight: function () {
|
|
||||||
return c._omsData.leg.setStyle({
|
|
||||||
color: b.legColors.highlighted,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
unhighlight: function () {
|
|
||||||
return c._omsData.leg.setStyle({ color: b.legColors.usual });
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
// spiderfy event
|
|
||||||
d.spiderfy = function (c, b) {
|
|
||||||
var a, e, g, d, p, h, k, l, n, m;
|
|
||||||
this.spiderfying = !0;
|
|
||||||
m = c.length;
|
|
||||||
a = this.ptAverage(
|
|
||||||
(function () {
|
|
||||||
var a, b, e;
|
|
||||||
e = [];
|
|
||||||
a = 0;
|
|
||||||
for (b = c.length; a < b; a++) (k = c[a]), e.push(k.markerPt);
|
|
||||||
return e;
|
|
||||||
})()
|
|
||||||
);
|
|
||||||
d =
|
|
||||||
m >= this.circleSpiralSwitchover
|
|
||||||
? this.generatePtsSpiral(m, a).reverse()
|
|
||||||
: this.generatePtsCircle(m, a);
|
|
||||||
a = function () {
|
|
||||||
var a,
|
|
||||||
b,
|
|
||||||
k,
|
|
||||||
m = this;
|
|
||||||
k = [];
|
|
||||||
a = 0;
|
|
||||||
for (b = d.length; a < b; a++)
|
|
||||||
(g = d[a]),
|
|
||||||
(e = this.map.layerPointToLatLng(g)),
|
|
||||||
(n = this.minExtract(c, function (a) {
|
|
||||||
return m.ptDistanceSq(a.markerPt, g);
|
|
||||||
})),
|
|
||||||
(h = n.marker),
|
|
||||||
(p = new L.Polyline([h.getLatLng(), e], {
|
|
||||||
color: this.legColors.usual,
|
|
||||||
weight: this.legWeight,
|
|
||||||
clickable: !1,
|
|
||||||
})),
|
|
||||||
this.map.addLayer(p),
|
|
||||||
(h._omsData = { usualPosition: h.getLatLng(), leg: p }),
|
|
||||||
this.legColors.highlighted !== this.legColors.usual &&
|
|
||||||
((l = this.makeHighlightListeners(h)),
|
|
||||||
(h._omsData.highlightListeners = l),
|
|
||||||
h.addEventListener("mouseover", l.highlight),
|
|
||||||
h.addEventListener("mouseout", l.unhighlight)),
|
|
||||||
h.setLatLng(e),
|
|
||||||
h.setZIndexOffset(1e6),
|
|
||||||
k.push(h);
|
|
||||||
return k;
|
|
||||||
}.call(this);
|
|
||||||
delete this.spiderfying;
|
|
||||||
this.spiderfied = !0;
|
|
||||||
return this.trigger("spiderfy", a, b);
|
|
||||||
};
|
|
||||||
d.unspiderfy = function (c) {
|
|
||||||
var b, a, e, d, f, k, h;
|
|
||||||
null == c && (c = null);
|
|
||||||
if (null == this.spiderfied) return this;
|
|
||||||
this.unspiderfying = !0;
|
|
||||||
d = [];
|
|
||||||
e = [];
|
|
||||||
h = this.markers;
|
|
||||||
f = 0;
|
|
||||||
for (k = h.length; f < k; f++)
|
|
||||||
(b = h[f]),
|
|
||||||
null != b._omsData
|
|
||||||
? (this.map.removeLayer(b._omsData.leg),
|
|
||||||
b !== c && b.setLatLng(b._omsData.usualPosition),
|
|
||||||
b.setZIndexOffset(0),
|
|
||||||
(a = b._omsData.highlightListeners),
|
|
||||||
null != a &&
|
|
||||||
(b.removeEventListener("mouseover", a.highlight),
|
|
||||||
b.removeEventListener("mouseout", a.unhighlight)),
|
|
||||||
delete b._omsData,
|
|
||||||
d.push(b))
|
|
||||||
: e.push(b);
|
|
||||||
delete this.unspiderfying;
|
|
||||||
delete this.spiderfied;
|
|
||||||
this.trigger("unspiderfy", d, e);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.ptDistanceSq = function (c, b) {
|
|
||||||
var a, e;
|
|
||||||
a = c.x - b.x;
|
|
||||||
e = c.y - b.y;
|
|
||||||
return a * a + e * e;
|
|
||||||
};
|
|
||||||
d.ptAverage = function (c) {
|
|
||||||
var b, a, e, d, f;
|
|
||||||
d = a = e = 0;
|
|
||||||
for (f = c.length; d < f; d++) (b = c[d]), (a += b.x), (e += b.y);
|
|
||||||
c = c.length;
|
|
||||||
return new L.Point(a / c, e / c);
|
|
||||||
};
|
|
||||||
d.minExtract = function (c, b) {
|
|
||||||
var a, d, g, f, k, h;
|
|
||||||
g = k = 0;
|
|
||||||
for (h = c.length; k < h; g = ++k)
|
|
||||||
if (
|
|
||||||
((f = c[g]),
|
|
||||||
(f = b(f)),
|
|
||||||
"undefined" === typeof a || null === a || f < d)
|
|
||||||
)
|
|
||||||
(d = f), (a = g);
|
|
||||||
return c.splice(a, 1)[0];
|
|
||||||
};
|
|
||||||
d.arrIndexOf = function (c, b) {
|
|
||||||
var a, d, g, f;
|
|
||||||
if (null != c.indexOf) return c.indexOf(b);
|
|
||||||
a = g = 0;
|
|
||||||
for (f = c.length; g < f; a = ++g)
|
|
||||||
if (((d = c[a]), d === b)) return a;
|
|
||||||
return -1;
|
|
||||||
};
|
|
||||||
return n;
|
|
||||||
})());
|
|
||||||
}.call(this));
|
|
||||||
}.call(this));
|
|
||||||
/* Mon 14 Oct 2013 10:54:59 BST */
|
|
||||||
494
public/js/js/vendor/what-input.js
vendored
@@ -1,494 +0,0 @@
|
|||||||
/**
|
|
||||||
* what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
|
|
||||||
* @version v5.2.3
|
|
||||||
* @link https://github.com/ten1seven/what-input
|
|
||||||
* @license MIT
|
|
||||||
*/
|
|
||||||
(function webpackUniversalModuleDefinition(root, factory) {
|
|
||||||
if(typeof exports === 'object' && typeof module === 'object')
|
|
||||||
module.exports = factory();
|
|
||||||
else if(typeof define === 'function' && define.amd)
|
|
||||||
define("whatInput", [], factory);
|
|
||||||
else if(typeof exports === 'object')
|
|
||||||
exports["whatInput"] = factory();
|
|
||||||
else
|
|
||||||
root["whatInput"] = factory();
|
|
||||||
})(this, function() {
|
|
||||||
return /******/ (function(modules) { // webpackBootstrap
|
|
||||||
/******/ // The module cache
|
|
||||||
/******/ var installedModules = {};
|
|
||||||
|
|
||||||
/******/ // The require function
|
|
||||||
/******/ function __webpack_require__(moduleId) {
|
|
||||||
|
|
||||||
/******/ // Check if module is in cache
|
|
||||||
/******/ if(installedModules[moduleId])
|
|
||||||
/******/ return installedModules[moduleId].exports;
|
|
||||||
|
|
||||||
/******/ // Create a new module (and put it into the cache)
|
|
||||||
/******/ var module = installedModules[moduleId] = {
|
|
||||||
/******/ exports: {},
|
|
||||||
/******/ id: moduleId,
|
|
||||||
/******/ loaded: false
|
|
||||||
/******/ };
|
|
||||||
|
|
||||||
/******/ // Execute the module function
|
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
||||||
|
|
||||||
/******/ // Flag the module as loaded
|
|
||||||
/******/ module.loaded = true;
|
|
||||||
|
|
||||||
/******/ // Return the exports of the module
|
|
||||||
/******/ return module.exports;
|
|
||||||
/******/ }
|
|
||||||
|
|
||||||
|
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
|
||||||
/******/ __webpack_require__.m = modules;
|
|
||||||
|
|
||||||
/******/ // expose the module cache
|
|
||||||
/******/ __webpack_require__.c = installedModules;
|
|
||||||
|
|
||||||
/******/ // __webpack_public_path__
|
|
||||||
/******/ __webpack_require__.p = "";
|
|
||||||
|
|
||||||
/******/ // Load entry module and return exports
|
|
||||||
/******/ return __webpack_require__(0);
|
|
||||||
/******/ })
|
|
||||||
/************************************************************************/
|
|
||||||
/******/ ([
|
|
||||||
/* 0 */
|
|
||||||
/***/ (function(module, exports) {
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = function () {
|
|
||||||
/*
|
|
||||||
* bail out if there is no document or window
|
|
||||||
* (i.e. in a node/non-DOM environment)
|
|
||||||
*
|
|
||||||
* Return a stubbed API instead
|
|
||||||
*/
|
|
||||||
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
|
||||||
return {
|
|
||||||
// always return "initial" because no interaction will ever be detected
|
|
||||||
ask: function ask() {
|
|
||||||
return 'initial';
|
|
||||||
},
|
|
||||||
|
|
||||||
// always return null
|
|
||||||
element: function element() {
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
|
|
||||||
// no-op
|
|
||||||
ignoreKeys: function ignoreKeys() {},
|
|
||||||
|
|
||||||
// no-op
|
|
||||||
specificKeys: function specificKeys() {},
|
|
||||||
|
|
||||||
// no-op
|
|
||||||
registerOnChange: function registerOnChange() {},
|
|
||||||
|
|
||||||
// no-op
|
|
||||||
unRegisterOnChange: function unRegisterOnChange() {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* variables
|
|
||||||
*/
|
|
||||||
|
|
||||||
// cache document.documentElement
|
|
||||||
var docElem = document.documentElement;
|
|
||||||
|
|
||||||
// currently focused dom element
|
|
||||||
var currentElement = null;
|
|
||||||
|
|
||||||
// last used input type
|
|
||||||
var currentInput = 'initial';
|
|
||||||
|
|
||||||
// last used input intent
|
|
||||||
var currentIntent = currentInput;
|
|
||||||
|
|
||||||
// UNIX timestamp of current event
|
|
||||||
var currentTimestamp = Date.now();
|
|
||||||
|
|
||||||
// check for sessionStorage support
|
|
||||||
// then check for session variables and use if available
|
|
||||||
try {
|
|
||||||
if (window.sessionStorage.getItem('what-input')) {
|
|
||||||
currentInput = window.sessionStorage.getItem('what-input');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window.sessionStorage.getItem('what-intent')) {
|
|
||||||
currentIntent = window.sessionStorage.getItem('what-intent');
|
|
||||||
}
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
// form input types
|
|
||||||
var formInputs = ['button', 'input', 'select', 'textarea'];
|
|
||||||
|
|
||||||
// empty array for holding callback functions
|
|
||||||
var functionList = [];
|
|
||||||
|
|
||||||
// list of modifier keys commonly used with the mouse and
|
|
||||||
// can be safely ignored to prevent false keyboard detection
|
|
||||||
var ignoreMap = [16, // shift
|
|
||||||
17, // control
|
|
||||||
18, // alt
|
|
||||||
91, // Windows key / left Apple cmd
|
|
||||||
93 // Windows menu / right Apple cmd
|
|
||||||
];
|
|
||||||
|
|
||||||
var specificMap = [];
|
|
||||||
|
|
||||||
// mapping of events to input types
|
|
||||||
var inputMap = {
|
|
||||||
keydown: 'keyboard',
|
|
||||||
keyup: 'keyboard',
|
|
||||||
mousedown: 'mouse',
|
|
||||||
mousemove: 'mouse',
|
|
||||||
MSPointerDown: 'pointer',
|
|
||||||
MSPointerMove: 'pointer',
|
|
||||||
pointerdown: 'pointer',
|
|
||||||
pointermove: 'pointer',
|
|
||||||
touchstart: 'touch',
|
|
||||||
touchend: 'touch'
|
|
||||||
|
|
||||||
// boolean: true if the page is being scrolled
|
|
||||||
};var isScrolling = false;
|
|
||||||
|
|
||||||
// store current mouse position
|
|
||||||
var mousePos = {
|
|
||||||
x: null,
|
|
||||||
y: null
|
|
||||||
|
|
||||||
// map of IE 10 pointer events
|
|
||||||
};var pointerMap = {
|
|
||||||
2: 'touch',
|
|
||||||
3: 'touch', // treat pen like touch
|
|
||||||
4: 'mouse'
|
|
||||||
|
|
||||||
// check support for passive event listeners
|
|
||||||
};var supportsPassive = false;
|
|
||||||
|
|
||||||
try {
|
|
||||||
var opts = Object.defineProperty({}, 'passive', {
|
|
||||||
get: function get() {
|
|
||||||
supportsPassive = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
window.addEventListener('test', null, opts);
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* set up
|
|
||||||
*/
|
|
||||||
|
|
||||||
var setUp = function setUp() {
|
|
||||||
// add correct mouse wheel event mapping to `inputMap`
|
|
||||||
inputMap[detectWheel()] = 'mouse';
|
|
||||||
|
|
||||||
addListeners();
|
|
||||||
doUpdate('input');
|
|
||||||
doUpdate('intent');
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* events
|
|
||||||
*/
|
|
||||||
|
|
||||||
var addListeners = function addListeners() {
|
|
||||||
// `pointermove`, `MSPointerMove`, `mousemove` and mouse wheel event binding
|
|
||||||
// can only demonstrate potential, but not actual, interaction
|
|
||||||
// and are treated separately
|
|
||||||
var options = supportsPassive ? { passive: true } : false;
|
|
||||||
|
|
||||||
// pointer events (mouse, pen, touch)
|
|
||||||
if (window.PointerEvent) {
|
|
||||||
window.addEventListener('pointerdown', setInput);
|
|
||||||
window.addEventListener('pointermove', setIntent);
|
|
||||||
} else if (window.MSPointerEvent) {
|
|
||||||
window.addEventListener('MSPointerDown', setInput);
|
|
||||||
window.addEventListener('MSPointerMove', setIntent);
|
|
||||||
} else {
|
|
||||||
// mouse events
|
|
||||||
window.addEventListener('mousedown', setInput);
|
|
||||||
window.addEventListener('mousemove', setIntent);
|
|
||||||
|
|
||||||
// touch events
|
|
||||||
if ('ontouchstart' in window) {
|
|
||||||
window.addEventListener('touchstart', setInput, options);
|
|
||||||
window.addEventListener('touchend', setInput);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// mouse wheel
|
|
||||||
window.addEventListener(detectWheel(), setIntent, options);
|
|
||||||
|
|
||||||
// keyboard events
|
|
||||||
window.addEventListener('keydown', setInput);
|
|
||||||
window.addEventListener('keyup', setInput);
|
|
||||||
|
|
||||||
// focus events
|
|
||||||
window.addEventListener('focusin', setElement);
|
|
||||||
window.addEventListener('focusout', clearElement);
|
|
||||||
};
|
|
||||||
|
|
||||||
// checks conditions before updating new input
|
|
||||||
var setInput = function setInput(event) {
|
|
||||||
var eventKey = event.which;
|
|
||||||
var value = inputMap[event.type];
|
|
||||||
|
|
||||||
if (value === 'pointer') {
|
|
||||||
value = pointerType(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignoreMatch = !specificMap.length && ignoreMap.indexOf(eventKey) === -1;
|
|
||||||
|
|
||||||
var specificMatch = specificMap.length && specificMap.indexOf(eventKey) !== -1;
|
|
||||||
|
|
||||||
var shouldUpdate = value === 'keyboard' && eventKey && (ignoreMatch || specificMatch) || value === 'mouse' || value === 'touch';
|
|
||||||
|
|
||||||
// prevent touch detection from being overridden by event execution order
|
|
||||||
if (validateTouch(value)) {
|
|
||||||
shouldUpdate = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldUpdate && currentInput !== value) {
|
|
||||||
currentInput = value;
|
|
||||||
|
|
||||||
try {
|
|
||||||
window.sessionStorage.setItem('what-input', currentInput);
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
doUpdate('input');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldUpdate && currentIntent !== value) {
|
|
||||||
// preserve intent for keyboard interaction with form fields
|
|
||||||
var activeElem = document.activeElement;
|
|
||||||
var notFormInput = activeElem && activeElem.nodeName && (formInputs.indexOf(activeElem.nodeName.toLowerCase()) === -1 || activeElem.nodeName.toLowerCase() === 'button' && !checkClosest(activeElem, 'form'));
|
|
||||||
|
|
||||||
if (notFormInput) {
|
|
||||||
currentIntent = value;
|
|
||||||
|
|
||||||
try {
|
|
||||||
window.sessionStorage.setItem('what-intent', currentIntent);
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
doUpdate('intent');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// updates the doc and `inputTypes` array with new input
|
|
||||||
var doUpdate = function doUpdate(which) {
|
|
||||||
docElem.setAttribute('data-what' + which, which === 'input' ? currentInput : currentIntent);
|
|
||||||
|
|
||||||
fireFunctions(which);
|
|
||||||
};
|
|
||||||
|
|
||||||
// updates input intent for `mousemove` and `pointermove`
|
|
||||||
var setIntent = function setIntent(event) {
|
|
||||||
var value = inputMap[event.type];
|
|
||||||
|
|
||||||
if (value === 'pointer') {
|
|
||||||
value = pointerType(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
// test to see if `mousemove` happened relative to the screen to detect scrolling versus mousemove
|
|
||||||
detectScrolling(event);
|
|
||||||
|
|
||||||
// only execute if scrolling isn't happening
|
|
||||||
if ((!isScrolling && !validateTouch(value) || isScrolling && event.type === 'wheel' || event.type === 'mousewheel' || event.type === 'DOMMouseScroll') && currentIntent !== value) {
|
|
||||||
currentIntent = value;
|
|
||||||
|
|
||||||
try {
|
|
||||||
window.sessionStorage.setItem('what-intent', currentIntent);
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
doUpdate('intent');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var setElement = function setElement(event) {
|
|
||||||
if (!event.target.nodeName) {
|
|
||||||
// If nodeName is undefined, clear the element
|
|
||||||
// This can happen if click inside an <svg> element.
|
|
||||||
clearElement();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
currentElement = event.target.nodeName.toLowerCase();
|
|
||||||
docElem.setAttribute('data-whatelement', currentElement);
|
|
||||||
|
|
||||||
if (event.target.classList && event.target.classList.length) {
|
|
||||||
docElem.setAttribute('data-whatclasses', event.target.classList.toString().replace(' ', ','));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var clearElement = function clearElement() {
|
|
||||||
currentElement = null;
|
|
||||||
|
|
||||||
docElem.removeAttribute('data-whatelement');
|
|
||||||
docElem.removeAttribute('data-whatclasses');
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* utilities
|
|
||||||
*/
|
|
||||||
|
|
||||||
var pointerType = function pointerType(event) {
|
|
||||||
if (typeof event.pointerType === 'number') {
|
|
||||||
return pointerMap[event.pointerType];
|
|
||||||
} else {
|
|
||||||
// treat pen like touch
|
|
||||||
return event.pointerType === 'pen' ? 'touch' : event.pointerType;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// prevent touch detection from being overridden by event execution order
|
|
||||||
var validateTouch = function validateTouch(value) {
|
|
||||||
var timestamp = Date.now();
|
|
||||||
|
|
||||||
var touchIsValid = value === 'mouse' && currentInput === 'touch' && timestamp - currentTimestamp < 200;
|
|
||||||
|
|
||||||
currentTimestamp = timestamp;
|
|
||||||
|
|
||||||
return touchIsValid;
|
|
||||||
};
|
|
||||||
|
|
||||||
// detect version of mouse wheel event to use
|
|
||||||
// via https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event
|
|
||||||
var detectWheel = function detectWheel() {
|
|
||||||
var wheelType = null;
|
|
||||||
|
|
||||||
// Modern browsers support "wheel"
|
|
||||||
if ('onwheel' in document.createElement('div')) {
|
|
||||||
wheelType = 'wheel';
|
|
||||||
} else {
|
|
||||||
// Webkit and IE support at least "mousewheel"
|
|
||||||
// or assume that remaining browsers are older Firefox
|
|
||||||
wheelType = document.onmousewheel !== undefined ? 'mousewheel' : 'DOMMouseScroll';
|
|
||||||
}
|
|
||||||
|
|
||||||
return wheelType;
|
|
||||||
};
|
|
||||||
|
|
||||||
// runs callback functions
|
|
||||||
var fireFunctions = function fireFunctions(type) {
|
|
||||||
for (var i = 0, len = functionList.length; i < len; i++) {
|
|
||||||
if (functionList[i].type === type) {
|
|
||||||
functionList[i].fn.call(undefined, type === 'input' ? currentInput : currentIntent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// finds matching element in an object
|
|
||||||
var objPos = function objPos(match) {
|
|
||||||
for (var i = 0, len = functionList.length; i < len; i++) {
|
|
||||||
if (functionList[i].fn === match) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var detectScrolling = function detectScrolling(event) {
|
|
||||||
if (mousePos['x'] !== event.screenX || mousePos['y'] !== event.screenY) {
|
|
||||||
isScrolling = false;
|
|
||||||
|
|
||||||
mousePos['x'] = event.screenX;
|
|
||||||
mousePos['y'] = event.screenY;
|
|
||||||
} else {
|
|
||||||
isScrolling = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// manual version of `closest()`
|
|
||||||
var checkClosest = function checkClosest(elem, tag) {
|
|
||||||
var ElementPrototype = window.Element.prototype;
|
|
||||||
|
|
||||||
if (!ElementPrototype.matches) {
|
|
||||||
ElementPrototype.matches = ElementPrototype.msMatchesSelector || ElementPrototype.webkitMatchesSelector;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ElementPrototype.closest) {
|
|
||||||
do {
|
|
||||||
if (elem.matches(tag)) {
|
|
||||||
return elem;
|
|
||||||
}
|
|
||||||
|
|
||||||
elem = elem.parentElement || elem.parentNode;
|
|
||||||
} while (elem !== null && elem.nodeType === 1);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
} else {
|
|
||||||
return elem.closest(tag);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* init
|
|
||||||
*/
|
|
||||||
|
|
||||||
// don't start script unless browser cuts the mustard
|
|
||||||
// (also passes if polyfills are used)
|
|
||||||
if ('addEventListener' in window && Array.prototype.indexOf) {
|
|
||||||
setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* api
|
|
||||||
*/
|
|
||||||
|
|
||||||
return {
|
|
||||||
// returns string: the current input type
|
|
||||||
// opt: 'intent'|'input'
|
|
||||||
// 'input' (default): returns the same value as the `data-whatinput` attribute
|
|
||||||
// 'intent': includes `data-whatintent` value if it's different than `data-whatinput`
|
|
||||||
ask: function ask(opt) {
|
|
||||||
return opt === 'intent' ? currentIntent : currentInput;
|
|
||||||
},
|
|
||||||
|
|
||||||
// returns string: the currently focused element or null
|
|
||||||
element: function element() {
|
|
||||||
return currentElement;
|
|
||||||
},
|
|
||||||
|
|
||||||
// overwrites ignored keys with provided array
|
|
||||||
ignoreKeys: function ignoreKeys(arr) {
|
|
||||||
ignoreMap = arr;
|
|
||||||
},
|
|
||||||
|
|
||||||
// overwrites specific char keys to update on
|
|
||||||
specificKeys: function specificKeys(arr) {
|
|
||||||
specificMap = arr;
|
|
||||||
},
|
|
||||||
|
|
||||||
// attach functions to input and intent "events"
|
|
||||||
// funct: function to fire on change
|
|
||||||
// eventType: 'input'|'intent'
|
|
||||||
registerOnChange: function registerOnChange(fn, eventType) {
|
|
||||||
functionList.push({
|
|
||||||
fn: fn,
|
|
||||||
type: eventType || 'input'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
unRegisterOnChange: function unRegisterOnChange(fn) {
|
|
||||||
var position = objPos(fn);
|
|
||||||
|
|
||||||
if (position || position === 0) {
|
|
||||||
functionList.splice(position, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
/******/ ])
|
|
||||||
});
|
|
||||||
;
|
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 618 B |
@@ -1,18 +0,0 @@
|
|||||||
|
|
||||||
var test = ["hase","ente","ente","igel","hase","ente","ente","igel"];
|
|
||||||
|
|
||||||
// doppelte Löschen
|
|
||||||
function doublesDelete(listing) {
|
|
||||||
let temp = [];
|
|
||||||
listing.forEach((c) => {
|
|
||||||
if (!temp.includes(c)) {
|
|
||||||
temp.push(c);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
var testreturn = doublesDelete(test);
|
|
||||||
console.log(testreturn)
|
|
||||||
|
|
||||||
// html Liste erstellen
|
|
||||||
1172
public/js/map.js
@@ -1,19 +0,0 @@
|
|||||||
(function(){/*
|
|
||||||
OverlappingMarkerSpiderfier
|
|
||||||
https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet
|
|
||||||
Copyright (c) 2011 - 2012 George MacKerron
|
|
||||||
Released under the MIT licence: http://opensource.org/licenses/mit-license
|
|
||||||
Note: The Leaflet maps API must be included *before* this code
|
|
||||||
*/
|
|
||||||
(function(){var q={}.hasOwnProperty,r=[].slice;null!=this.L&&(this.OverlappingMarkerSpiderfier=function(){function n(c,b){var a,e,g,f,d=this;this.map=c;null==b&&(b={});for(a in b)q.call(b,a)&&(e=b[a],this[a]=e);this.initMarkerArrays();this.listeners={};f=["click","zoomend"];e=0;for(g=f.length;e<g;e++)a=f[e],this.map.addEventListener(a,function(){return d.unspiderfy()})}var d,k;d=n.prototype;d.VERSION="0.2.6";k=2*Math.PI;d.keepSpiderfied=!1;d.nearbyDistance=20;d.circleSpiralSwitchover=9;d.circleFootSeparation=
|
|
||||||
25;d.circleStartAngle=k/12;d.spiralFootSeparation=28;d.spiralLengthStart=11;d.spiralLengthFactor=5;d.legWeight=1.5;d.legColors={usual:"#222",highlighted:"#f00"};d.initMarkerArrays=function(){this.markers=[];return this.markerListeners=[]};d.addMarker=function(c){var b,a=this;if(null!=c._oms)return this;c._oms=!0;b=function(){return a.spiderListener(c)};c.addEventListener("click",b);this.markerListeners.push(b);this.markers.push(c);return this};d.getMarkers=function(){return this.markers.slice(0)};
|
|
||||||
d.removeMarker=function(c){var b,a;null!=c._omsData&&this.unspiderfy();b=this.arrIndexOf(this.markers,c);if(0>b)return this;a=this.markerListeners.splice(b,1)[0];c.removeEventListener("click",a);delete c._oms;this.markers.splice(b,1);return this};d.clearMarkers=function(){var c,b,a,e,g;this.unspiderfy();g=this.markers;c=a=0;for(e=g.length;a<e;c=++a)b=g[c],c=this.markerListeners[c],b.removeEventListener("click",c),delete b._oms;this.initMarkerArrays();return this};d.addListener=function(c,b){var a,
|
|
||||||
e;(null!=(e=(a=this.listeners)[c])?e:a[c]=[]).push(b);return this};d.removeListener=function(c,b){var a;a=this.arrIndexOf(this.listeners[c],b);0>a||this.listeners[c].splice(a,1);return this};d.clearListeners=function(c){this.listeners[c]=[];return this};d.trigger=function(){var c,b,a,e,g,f;b=arguments[0];c=2<=arguments.length?r.call(arguments,1):[];b=null!=(a=this.listeners[b])?a:[];f=[];e=0;for(g=b.length;e<g;e++)a=b[e],f.push(a.apply(null,c));return f};d.generatePtsCircle=function(c,b){var a,e,
|
|
||||||
g,f,d;g=this.circleFootSeparation*(2+c)/k;e=k/c;d=[];for(a=f=0;0<=c?f<c:f>c;a=0<=c?++f:--f)a=this.circleStartAngle+a*e,d.push(new L.Point(b.x+g*Math.cos(a),b.y+g*Math.sin(a)));return d};d.generatePtsSpiral=function(c,b){var a,e,g,f,d;g=this.spiralLengthStart;a=0;d=[];for(e=f=0;0<=c?f<c:f>c;e=0<=c?++f:--f)a+=this.spiralFootSeparation/g+5E-4*e,e=new L.Point(b.x+g*Math.cos(a),b.y+g*Math.sin(a)),g+=k*this.spiralLengthFactor/a,d.push(e);return d};d.spiderListener=function(c){var b,a,e,g,f,d,h,k,l;(b=null!=
|
|
||||||
c._omsData)&&this.keepSpiderfied||this.unspiderfy();if(b)return this.trigger("click",c);g=[];f=[];d=this.nearbyDistance*this.nearbyDistance;e=this.map.latLngToLayerPoint(c.getLatLng());l=this.markers;h=0;for(k=l.length;h<k;h++)b=l[h],this.map.hasLayer(b)&&(a=this.map.latLngToLayerPoint(b.getLatLng()),this.ptDistanceSq(a,e)<d?g.push({marker:b,markerPt:a}):f.push(b));return 1===g.length?this.trigger("click",c):this.spiderfy(g,f)};d.makeHighlightListeners=function(c){var b=this;return{highlight:function(){return c._omsData.leg.setStyle({color:b.legColors.highlighted})},
|
|
||||||
unhighlight:function(){return c._omsData.leg.setStyle({color:b.legColors.usual})}}};d.spiderfy=function(c,b){var a,e,g,d,p,h,k,l,n,m;this.spiderfying=!0;m=c.length;a=this.ptAverage(function(){var a,b,e;e=[];a=0;for(b=c.length;a<b;a++)k=c[a],e.push(k.markerPt);return e}());d=m>=this.circleSpiralSwitchover?this.generatePtsSpiral(m,a).reverse():this.generatePtsCircle(m,a);a=function(){var a,b,k,m=this;k=[];a=0;for(b=d.length;a<b;a++)g=d[a],e=this.map.layerPointToLatLng(g),n=this.minExtract(c,function(a){return m.ptDistanceSq(a.markerPt,
|
|
||||||
g)}),h=n.marker,p=new L.Polyline([h.getLatLng(),e],{color:this.legColors.usual,weight:this.legWeight,clickable:!1}),this.map.addLayer(p),h._omsData={usualPosition:h.getLatLng(),leg:p},this.legColors.highlighted!==this.legColors.usual&&(l=this.makeHighlightListeners(h),h._omsData.highlightListeners=l,h.addEventListener("mouseover",l.highlight),h.addEventListener("mouseout",l.unhighlight)),h.setLatLng(e),h.setZIndexOffset(1E6),k.push(h);return k}.call(this);delete this.spiderfying;this.spiderfied=!0;
|
|
||||||
return this.trigger("spiderfy",a,b)};d.unspiderfy=function(c){var b,a,e,d,f,k,h;null==c&&(c=null);if(null==this.spiderfied)return this;this.unspiderfying=!0;d=[];e=[];h=this.markers;f=0;for(k=h.length;f<k;f++)b=h[f],null!=b._omsData?(this.map.removeLayer(b._omsData.leg),b!==c&&b.setLatLng(b._omsData.usualPosition),b.setZIndexOffset(0),a=b._omsData.highlightListeners,null!=a&&(b.removeEventListener("mouseover",a.highlight),b.removeEventListener("mouseout",a.unhighlight)),delete b._omsData,d.push(b)):
|
|
||||||
e.push(b);delete this.unspiderfying;delete this.spiderfied;this.trigger("unspiderfy",d,e);return this};d.ptDistanceSq=function(c,b){var a,e;a=c.x-b.x;e=c.y-b.y;return a*a+e*e};d.ptAverage=function(c){var b,a,e,d,f;d=a=e=0;for(f=c.length;d<f;d++)b=c[d],a+=b.x,e+=b.y;c=c.length;return new L.Point(a/c,e/c)};d.minExtract=function(c,b){var a,d,g,f,k,h;g=k=0;for(h=c.length;k<h;g=++k)if(f=c[g],f=b(f),"undefined"===typeof a||null===a||f<d)d=f,a=g;return c.splice(a,1)[0]};d.arrIndexOf=function(c,b){var a,
|
|
||||||
d,g,f;if(null!=c.indexOf)return c.indexOf(b);a=g=0;for(f=c.length;g<f;a=++g)if(d=c[a],d===b)return a;return-1};return n}())}).call(this);}).call(this);
|
|
||||||
/* Mon 14 Oct 2013 10:54:59 BST */
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
function getMapGeoStatic(){
|
|
||||||
var req = new XMLHttpRequest();
|
|
||||||
req.open("GET", jsonMapBorderURL, true);
|
|
||||||
|
|
||||||
req.onreadystatechange = function(){
|
|
||||||
if ( req.readyState == 4) {
|
|
||||||
if ( req.status >= 200 && req.status < 300 ||req.status == 304 ) {
|
|
||||||
var returnData = req.responseText;
|
|
||||||
console.log('Datentransfer -Geo Karte- erfolgreich');
|
|
||||||
JsonMapBorder = JSON.parse(returnData);
|
|
||||||
drawMapBorder();
|
|
||||||
|
|
||||||
} else {
|
|
||||||
console.log("Fehler; request.status = " + req.status);
|
|
||||||
}
|
|
||||||
req = null;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
req.send();
|
|
||||||
}
|
|
||||||
function getMapGeoStatic2(){
|
|
||||||
var req = new XMLHttpRequest();
|
|
||||||
req.open("GET", jsonMapBorderURL2, true);
|
|
||||||
|
|
||||||
req.onreadystatechange = function(){
|
|
||||||
if ( req.readyState == 4) {
|
|
||||||
if ( req.status >= 200 && req.status < 300 ||req.status == 304 ) {
|
|
||||||
var returnData = req.responseText;
|
|
||||||
console.log('Datentransfer -Geo Karte- erfolgreich');
|
|
||||||
JsonMapBorder2 = JSON.parse(returnData);
|
|
||||||
drawMapBorder2();
|
|
||||||
|
|
||||||
} else {
|
|
||||||
console.log("Fehler; request.status = " + req.status);
|
|
||||||
}
|
|
||||||
req = null;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
req.send();
|
|
||||||
}
|
|
||||||
|
|
||||||
function drawMapBorder() {
|
|
||||||
borderpoints = [];
|
|
||||||
countPointsMapBorder = JsonMapBorder.coordinates.length;
|
|
||||||
//console.log("Point Border Count: "+countPointsMapBorder);
|
|
||||||
|
|
||||||
//var cableLayer = new Konva.Layer();
|
|
||||||
// Namen schreiben
|
|
||||||
|
|
||||||
// Stationen zeichnen
|
|
||||||
for(i=0;i<countPointsMapBorder;i++) {
|
|
||||||
// console.log("Coordinates: "+JsonMapBorder.coordinates[i]);
|
|
||||||
var BorderXY = JsonMapBorder.coordinates[i].toString();
|
|
||||||
var LineParts = BorderXY.split(",");
|
|
||||||
LineParts[0] = (parseFloat(LineParts[0]))/10;
|
|
||||||
LineParts[1] = (parseFloat(LineParts[1]))/10;
|
|
||||||
|
|
||||||
// console.log("X: "+LineParts[0]+" Y: "+LineParts[1]);
|
|
||||||
|
|
||||||
var xLineTemp = Math.round(parseInt(((LineParts[0])/skalierung)-minX)/displayFactor);
|
|
||||||
var yLineTemp = Math.round(parseInt((maxY-(LineParts[1])/skalierung))/displayFactor);
|
|
||||||
|
|
||||||
// console.log("X: "+parseInt(xLineTemp)+" Y: "+parseInt(yLineTemp));
|
|
||||||
|
|
||||||
borderpoints.push(parseInt(xLineTemp));
|
|
||||||
borderpoints.push(parseInt(yLineTemp));
|
|
||||||
}
|
|
||||||
|
|
||||||
//console.log(borderpoints);
|
|
||||||
var border = new Konva.Line({
|
|
||||||
points: borderpoints,
|
|
||||||
stroke: 'grey',
|
|
||||||
strokeWidth: 1,
|
|
||||||
lineJoin: 'square',
|
|
||||||
tension: 0,
|
|
||||||
lineCap: 'square',
|
|
||||||
closed: true,
|
|
||||||
fill: '#fbf5e0',
|
|
||||||
});
|
|
||||||
layer.add(border);
|
|
||||||
|
|
||||||
stage.add(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
function drawMapBorder2() {
|
|
||||||
borderpoints2 = [];
|
|
||||||
countPointsMapBorder = JsonMapBorder2.coordinates.length;
|
|
||||||
//console.log("Point Border Count: "+countPointsMapBorder);
|
|
||||||
|
|
||||||
//var cableLayer = new Konva.Layer();
|
|
||||||
// Namen schreiben
|
|
||||||
|
|
||||||
// Stationen zeichnen
|
|
||||||
for(i=0;i<countPointsMapBorder;i++) {
|
|
||||||
// console.log("Coordinates: "+JsonMapBorder.coordinates[i]);
|
|
||||||
var BorderXY2 = JsonMapBorder2.coordinates[i].toString();
|
|
||||||
var LineParts2 = BorderXY2.split(",");
|
|
||||||
LineParts2[0] = (parseFloat(LineParts2[0]))/10;
|
|
||||||
LineParts2[1] = (parseFloat(LineParts2[1]))/10;
|
|
||||||
|
|
||||||
// console.log("X: "+LineParts[0]+" Y: "+LineParts[1]);
|
|
||||||
|
|
||||||
var xLineTemp2 = Math.round(parseInt(((LineParts2[0])/skalierung)-minX)/displayFactor);
|
|
||||||
var yLineTemp2 = Math.round(parseInt((maxY-(LineParts2[1])/skalierung))/displayFactor);
|
|
||||||
|
|
||||||
// console.log("X: "+parseInt(xLineTemp)+" Y: "+parseInt(yLineTemp));
|
|
||||||
|
|
||||||
borderpoints2.push(parseInt(xLineTemp2));
|
|
||||||
borderpoints2.push(parseInt(yLineTemp2));
|
|
||||||
}
|
|
||||||
|
|
||||||
//console.log(borderpoints);
|
|
||||||
var border2 = new Konva.Line({
|
|
||||||
points: borderpoints2,
|
|
||||||
//stroke: 'grey',
|
|
||||||
//strokeWidth: 1,
|
|
||||||
lineJoin: 'square',
|
|
||||||
tension: 0,
|
|
||||||
lineCap: 'square',
|
|
||||||
closed: true,
|
|
||||||
fill: '#f3f0dd',
|
|
||||||
offsetX: 20,
|
|
||||||
});
|
|
||||||
layer.add(border2);
|
|
||||||
|
|
||||||
stage.add(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
getMapGeoStatic2();
|
|
||||||
getMapGeoStatic()
|
|
||||||
869
public/js/vendor/bundle.js
vendored
@@ -1,869 +0,0 @@
|
|||||||
(function (L) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
||||||
|
|
||||||
var L__default = /*#__PURE__*/_interopDefaultLegacy(L);
|
|
||||||
|
|
||||||
function _classCallCheck(instance, Constructor) {
|
|
||||||
if (!(instance instanceof Constructor)) {
|
|
||||||
throw new TypeError("Cannot call a class as a function");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function _defineProperties(target, props) {
|
|
||||||
for (var i = 0; i < props.length; i++) {
|
|
||||||
var descriptor = props[i];
|
|
||||||
descriptor.enumerable = descriptor.enumerable || false;
|
|
||||||
descriptor.configurable = true;
|
|
||||||
if ("value" in descriptor) descriptor.writable = true;
|
|
||||||
Object.defineProperty(target, descriptor.key, descriptor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function _createClass(Constructor, protoProps, staticProps) {
|
|
||||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
||||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
||||||
return Constructor;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _defineProperty(obj, key, value) {
|
|
||||||
if (key in obj) {
|
|
||||||
Object.defineProperty(obj, key, {
|
|
||||||
value: value,
|
|
||||||
enumerable: true,
|
|
||||||
configurable: true,
|
|
||||||
writable: true
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
obj[key] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _slicedToArray(arr, i) {
|
|
||||||
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
||||||
}
|
|
||||||
|
|
||||||
function _arrayWithHoles(arr) {
|
|
||||||
if (Array.isArray(arr)) return arr;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _iterableToArrayLimit(arr, i) {
|
|
||||||
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
||||||
var _arr = [];
|
|
||||||
var _n = true;
|
|
||||||
var _d = false;
|
|
||||||
var _e = undefined;
|
|
||||||
|
|
||||||
try {
|
|
||||||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
||||||
_arr.push(_s.value);
|
|
||||||
|
|
||||||
if (i && _arr.length === i) break;
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
_d = true;
|
|
||||||
_e = err;
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
if (!_n && _i["return"] != null) _i["return"]();
|
|
||||||
} finally {
|
|
||||||
if (_d) throw _e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return _arr;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _unsupportedIterableToArray(o, minLen) {
|
|
||||||
if (!o) return;
|
|
||||||
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
||||||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
||||||
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
||||||
if (n === "Map" || n === "Set") return Array.from(o);
|
|
||||||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
||||||
}
|
|
||||||
|
|
||||||
function _arrayLikeToArray(arr, len) {
|
|
||||||
if (len == null || len > arr.length) len = arr.length;
|
|
||||||
|
|
||||||
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
||||||
|
|
||||||
return arr2;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _nonIterableRest() {
|
|
||||||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
||||||
}
|
|
||||||
|
|
||||||
function _classPrivateFieldGet(receiver, privateMap) {
|
|
||||||
var descriptor = privateMap.get(receiver);
|
|
||||||
|
|
||||||
if (!descriptor) {
|
|
||||||
throw new TypeError("attempted to get private field on non-instance");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (descriptor.get) {
|
|
||||||
return descriptor.get.call(receiver);
|
|
||||||
}
|
|
||||||
|
|
||||||
return descriptor.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
function _classPrivateFieldSet(receiver, privateMap, value) {
|
|
||||||
var descriptor = privateMap.get(receiver);
|
|
||||||
|
|
||||||
if (!descriptor) {
|
|
||||||
throw new TypeError("attempted to set private field on non-instance");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (descriptor.set) {
|
|
||||||
descriptor.set.call(receiver, value);
|
|
||||||
} else {
|
|
||||||
if (!descriptor.writable) {
|
|
||||||
throw new TypeError("attempted to set read only private field");
|
|
||||||
}
|
|
||||||
|
|
||||||
descriptor.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
var BouncingOptions = /*#__PURE__*/function () {
|
|
||||||
/**
|
|
||||||
* How high marker can bounce (px)
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* How much marker can contract (px)
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bouncing speed coefficient
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Contracting speed coefficient
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Shadow inclination angle(radians); null to cancel shadow movement
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Activate contract animation
|
|
||||||
* @type {boolean}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Many markers can bounce in the same time
|
|
||||||
* @type {boolean}
|
|
||||||
*/
|
|
||||||
function BouncingOptions(options) {
|
|
||||||
_classCallCheck(this, BouncingOptions);
|
|
||||||
|
|
||||||
_defineProperty(this, "bounceHeight", 15);
|
|
||||||
|
|
||||||
_defineProperty(this, "contractHeight", 12);
|
|
||||||
|
|
||||||
_defineProperty(this, "bounceSpeed", 52);
|
|
||||||
|
|
||||||
_defineProperty(this, "contractSpeed", 52);
|
|
||||||
|
|
||||||
_defineProperty(this, "shadowAngle", -Math.PI / 4);
|
|
||||||
|
|
||||||
_defineProperty(this, "elastic", true);
|
|
||||||
|
|
||||||
_defineProperty(this, "exclusive", false);
|
|
||||||
|
|
||||||
options && Object.assign(this, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
_createClass(BouncingOptions, [{
|
|
||||||
key: "override",
|
|
||||||
value: function override(options) {
|
|
||||||
return Object.assign(new BouncingOptions(this), options);
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BouncingOptions;
|
|
||||||
}();
|
|
||||||
|
|
||||||
var _bouncingMarkers = new WeakMap();
|
|
||||||
|
|
||||||
var Orchestration = /*#__PURE__*/function () {
|
|
||||||
function Orchestration() {
|
|
||||||
_classCallCheck(this, Orchestration);
|
|
||||||
|
|
||||||
_bouncingMarkers.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: []
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
_createClass(Orchestration, [{
|
|
||||||
key: "getBouncingMarkers",
|
|
||||||
value: function getBouncingMarkers() {
|
|
||||||
return _classPrivateFieldGet(this, _bouncingMarkers);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Adds the marker to the list of bouncing markers.
|
|
||||||
* If flag 'exclusive' is set to true, stops all bouncing markers before.
|
|
||||||
*
|
|
||||||
* @param marker {Marker} marker object
|
|
||||||
* @param exclusive {boolean} flag of exclusive bouncing. If set to true, stops the bouncing
|
|
||||||
* of all other markers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "addBouncingMarker",
|
|
||||||
value: function addBouncingMarker(marker, exclusive) {
|
|
||||||
if (exclusive || marker._bouncingMotion.bouncingOptions.exclusive) {
|
|
||||||
this.stopAllBouncingMarkers();
|
|
||||||
} else {
|
|
||||||
this.stopExclusiveMarkerBouncing();
|
|
||||||
}
|
|
||||||
|
|
||||||
_classPrivateFieldGet(this, _bouncingMarkers).push(marker);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Stops the bouncing of exclusive marker.
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "stopExclusiveMarkerBouncing",
|
|
||||||
value: function stopExclusiveMarkerBouncing() {
|
|
||||||
var exclusiveMarker = _classPrivateFieldGet(this, _bouncingMarkers).find(function (marker) {
|
|
||||||
return marker._bouncingMotion.bouncingOptions.exclusive;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (exclusiveMarker) {
|
|
||||||
exclusiveMarker.stopBouncing();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Removes the marker from the list of bouncing markers.
|
|
||||||
* @param marker {Marker} marker
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "removeBouncingMarker",
|
|
||||||
value: function removeBouncingMarker(marker) {
|
|
||||||
var i = _classPrivateFieldGet(this, _bouncingMarkers).indexOf(marker);
|
|
||||||
|
|
||||||
if (~i) {
|
|
||||||
_classPrivateFieldGet(this, _bouncingMarkers).splice(i, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Stops the bouncing of all currently bouncing markers. Purge the array of bouncing markers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "stopAllBouncingMarkers",
|
|
||||||
value: function stopAllBouncingMarkers() {
|
|
||||||
var marker;
|
|
||||||
|
|
||||||
while (marker = _classPrivateFieldGet(this, _bouncingMarkers).shift()) {
|
|
||||||
marker.stopBouncing();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return Orchestration;
|
|
||||||
}();
|
|
||||||
|
|
||||||
var oldSetPos = L.Marker.prototype._setPos;
|
|
||||||
var oldOnAdd = L.Marker.prototype.onAdd;
|
|
||||||
var oldSetIcon = L.Marker.prototype.setIcon;
|
|
||||||
var MarkerPrototypeExt = {
|
|
||||||
/** Bouncing options shared by all markers. */
|
|
||||||
_bouncingOptions: new BouncingOptions(),
|
|
||||||
_orchestration: new Orchestration(),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers options of bouncing animation for this marker. After registration of options for
|
|
||||||
* this marker, it will ignore changes of default options. Function automatically recalculates
|
|
||||||
* animation steps and delays.
|
|
||||||
*
|
|
||||||
* @param options {BouncingOptions|object} options object
|
|
||||||
* @return {Marker} this marker
|
|
||||||
*/
|
|
||||||
setBouncingOptions: function setBouncingOptions(options) {
|
|
||||||
this._bouncingMotion.updateBouncingOptions(options);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this marker is bouncing. If this marker is not bouncing returns false.
|
|
||||||
* @return {boolean} true if marker is bouncing, false if not
|
|
||||||
*/
|
|
||||||
isBouncing: function isBouncing() {
|
|
||||||
return this._bouncingMotion.isBouncing;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts bouncing of this marker.
|
|
||||||
* @param times {number|null} number of times the marker must to bounce
|
|
||||||
* @return {Marker} this marker
|
|
||||||
*/
|
|
||||||
bounce: function bounce() {
|
|
||||||
var times = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
||||||
|
|
||||||
this._bouncingMotion.bounce(times);
|
|
||||||
|
|
||||||
var exclusive = this._bouncingMotion.bouncingOptions.exclusive;
|
|
||||||
|
|
||||||
L.Marker.prototype._orchestration.addBouncingMarker(this, exclusive);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stops bouncing of this marker.
|
|
||||||
* Note: the bouncing not stops immediately after the call of this method.
|
|
||||||
* Instead, the animation is executed until marker returns to it's original position and takes
|
|
||||||
* it's full size.
|
|
||||||
*
|
|
||||||
* @return {Marker} this marker
|
|
||||||
*/
|
|
||||||
stopBouncing: function stopBouncing() {
|
|
||||||
this._bouncingMotion.stopBouncing();
|
|
||||||
|
|
||||||
L.Marker.prototype._orchestration.removeBouncingMarker(this);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts/stops bouncing of this marker.
|
|
||||||
* @return {Marker} marker
|
|
||||||
*/
|
|
||||||
toggleBouncing: function toggleBouncing() {
|
|
||||||
if (this._bouncingMotion.isBouncing) {
|
|
||||||
this.stopBouncing();
|
|
||||||
} else {
|
|
||||||
this.bounce();
|
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
isRealMarker: function isRealMarker() {
|
|
||||||
return this.__proto__ === L.Marker.prototype;
|
|
||||||
},
|
|
||||||
_setPos: function _setPos(position) {
|
|
||||||
oldSetPos.call(this, position);
|
|
||||||
|
|
||||||
if (this.isRealMarker()) {
|
|
||||||
this._bouncingMotion.position = position;
|
|
||||||
|
|
||||||
this._bouncingMotion.resetStyles(this);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onAdd: function onAdd(map) {
|
|
||||||
oldOnAdd.call(this, map);
|
|
||||||
|
|
||||||
if (this.isRealMarker()) {
|
|
||||||
this._bouncingMotion.resetStyles(this);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setIcon: function setIcon(icon) {
|
|
||||||
oldSetIcon.call(this, icon);
|
|
||||||
|
|
||||||
if (this.isRealMarker()) {
|
|
||||||
this._bouncingMotion.resetStyles(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculates the points to draw the continous line on the screen. Returns the array of ordered
|
|
||||||
* point coordinates. Uses Bresenham algorithm.
|
|
||||||
*
|
|
||||||
* @param x {number} x coordinate of origin
|
|
||||||
* @param y {number} y coordinate of origin
|
|
||||||
* @param angle {number} angle (radians)
|
|
||||||
* @param length {number} length of line (px)
|
|
||||||
*
|
|
||||||
* @return {[number, number][]} array of ordered point coordinates
|
|
||||||
*
|
|
||||||
* @see http://rosettacode.org/wiki/Bitmap/Bresenham's_line_algorithm#JavaScript
|
|
||||||
*/
|
|
||||||
function calculateLine(x, y, angle, length) {
|
|
||||||
// TODO: use something else than multiply length by 2 to calculate the line with defined
|
|
||||||
// length
|
|
||||||
var xD = Math.round(x + Math.cos(angle) * (length * 2)),
|
|
||||||
yD = Math.round(y + Math.sin(angle) * (length * 2)),
|
|
||||||
dx = Math.abs(xD - x),
|
|
||||||
sx = x < xD ? 1 : -1,
|
|
||||||
dy = Math.abs(yD - y),
|
|
||||||
sy = y < yD ? 1 : -1,
|
|
||||||
err = (dx > dy ? dx : -dy) / 2,
|
|
||||||
e2,
|
|
||||||
p = [],
|
|
||||||
i = 0;
|
|
||||||
|
|
||||||
while (true) {
|
|
||||||
p.push([x, y]);
|
|
||||||
i++;
|
|
||||||
if (i === length) break;
|
|
||||||
e2 = err;
|
|
||||||
|
|
||||||
if (e2 > -dx) {
|
|
||||||
err -= dy;
|
|
||||||
x += sx;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e2 < dy) {
|
|
||||||
err += dx;
|
|
||||||
y += sy;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
function styleInject(css, ref) {
|
|
||||||
if ( ref === void 0 ) ref = {};
|
|
||||||
var insertAt = ref.insertAt;
|
|
||||||
|
|
||||||
if (!css || typeof document === 'undefined') { return; }
|
|
||||||
|
|
||||||
var head = document.head || document.getElementsByTagName('head')[0];
|
|
||||||
var style = document.createElement('style');
|
|
||||||
style.type = 'text/css';
|
|
||||||
|
|
||||||
if (insertAt === 'top') {
|
|
||||||
if (head.firstChild) {
|
|
||||||
head.insertBefore(style, head.firstChild);
|
|
||||||
} else {
|
|
||||||
head.appendChild(style);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
head.appendChild(style);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (style.styleSheet) {
|
|
||||||
style.styleSheet.cssText = css;
|
|
||||||
} else {
|
|
||||||
style.appendChild(document.createTextNode(css));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var css_248z = "@keyframes l-smooth-marker-bouncing-move {\n from {\n transform: translate(var(--pos-x), var(--pos-y))\n }\n to {\n transform: translate(var(--pos-x-jump, var(--pos-x)), var(--pos-y-jump))\n }\n}\n\n@keyframes l-smooth-marker-bouncing-contract {\n from {\n transform: translate(var(--pos-x), var(--pos-y))\n }\n to {\n transform: translate(var(--pos-x), var(--pos-y-contract)) scaleY(var(--scale-contract))\n }\n}\n\n.bouncing {\n animation-name: l-smooth-marker-bouncing-move, l-smooth-marker-bouncing-move, l-smooth-marker-bouncing-contract, l-smooth-marker-bouncing-contract;\n animation-direction: normal, reverse, normal, reverse;\n animation-duration: var(--duration-jump), var(--duration-jump), var(--duration-contract), var(--duration-contract);\n animation-delay: var(--delays)\n}\n\n.bouncing.simple {\n animation-name: l-smooth-marker-bouncing-move, l-smooth-marker-bouncing-move;\n animation-direction: normal, reverse;\n animation-duration: var(--duration-jump), var(--duration-jump);\n animation-delay: var(--delays)\n}\n";
|
|
||||||
styleInject(css_248z);
|
|
||||||
|
|
||||||
/** Regex to parse style definitions. */
|
|
||||||
var regStyle = /([\w-]+): ([^;]+);/g;
|
|
||||||
|
|
||||||
var Styles = /*#__PURE__*/function () {
|
|
||||||
function Styles(styles) {
|
|
||||||
_classCallCheck(this, Styles);
|
|
||||||
|
|
||||||
styles && Object.assign(this, styles);
|
|
||||||
}
|
|
||||||
|
|
||||||
_createClass(Styles, [{
|
|
||||||
key: "findOpacity",
|
|
||||||
value: function findOpacity(options) {
|
|
||||||
this.opacity = (options === null || options === void 0 ? void 0 : options.opacityWhenUnclustered // used by cluster plugin
|
|
||||||
) || (options === null || options === void 0 ? void 0 : options.opacity) || 1;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Creates a copy of styles merged with provided 'styles'.
|
|
||||||
* @param {Object} styles object with styles to merge
|
|
||||||
* @return {Styles} copy of styles
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "withStyles",
|
|
||||||
value: function withStyles(styles) {
|
|
||||||
var copy = new Styles(this);
|
|
||||||
copy && Object.assign(copy, styles);
|
|
||||||
return copy;
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "toString",
|
|
||||||
value: function toString() {
|
|
||||||
return Object.entries(this).map(function (entry) {
|
|
||||||
return "".concat(entry[0], ": ").concat(entry[1], ";");
|
|
||||||
}).join(' ');
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Parses cssText attribute into Styles object.
|
|
||||||
* @param cssText {string} cssText string
|
|
||||||
* @return {Styles} Styles object
|
|
||||||
*/
|
|
||||||
|
|
||||||
}], [{
|
|
||||||
key: "parse",
|
|
||||||
value: function parse(cssText) {
|
|
||||||
var styles = {};
|
|
||||||
var match = regStyle.exec(cssText);
|
|
||||||
|
|
||||||
while (match) {
|
|
||||||
styles[match[1]] = match[2];
|
|
||||||
match = regStyle.exec(cssText);
|
|
||||||
}
|
|
||||||
|
|
||||||
delete styles['z-index'];
|
|
||||||
delete styles['opacity'];
|
|
||||||
styles['outline'] = 'none';
|
|
||||||
return new Styles(styles);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @param marker {Marker}
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "ofMarker",
|
|
||||||
value: function ofMarker(marker) {
|
|
||||||
var styles = Styles.parse(marker._icon.style.cssText);
|
|
||||||
styles.findOpacity(marker.options);
|
|
||||||
styles['z-index'] = marker._zIndex;
|
|
||||||
return styles;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return Styles;
|
|
||||||
}();
|
|
||||||
|
|
||||||
var animationNamePrefix = 'l-smooth-marker-bouncing-';
|
|
||||||
var moveAnimationName = animationNamePrefix + 'move';
|
|
||||||
var contractAnimationName = animationNamePrefix + 'contract';
|
|
||||||
/*
|
|
||||||
* CSS3 animation runs faster than transform-based animation. We need to reduce speed in order
|
|
||||||
* to be compatible with old API.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var speedCoefficient = 0.8;
|
|
||||||
/**
|
|
||||||
* Removes and then resets required classes on the HTML element.
|
|
||||||
* Used as hack to restart CSS3 animation.
|
|
||||||
*
|
|
||||||
* @param element {HTMLElement} HTML element
|
|
||||||
* @param classes {string[]} names of classes
|
|
||||||
*/
|
|
||||||
|
|
||||||
function resetClasses(element, classes) {
|
|
||||||
classes.forEach(function (className) {
|
|
||||||
return L.DomUtil.removeClass(element, className);
|
|
||||||
});
|
|
||||||
void element.offsetWidth;
|
|
||||||
classes.forEach(function (className) {
|
|
||||||
return L.DomUtil.addClass(element, className);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var _lastAnimationName = new WeakMap();
|
|
||||||
|
|
||||||
var _classes = new WeakMap();
|
|
||||||
|
|
||||||
var _eventCounter = new WeakMap();
|
|
||||||
|
|
||||||
var _times = new WeakMap();
|
|
||||||
|
|
||||||
var _listener = new WeakMap();
|
|
||||||
|
|
||||||
var BouncingMotionCss3 = /*#__PURE__*/function () {
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*
|
|
||||||
* @param marker {Marker} marker
|
|
||||||
* @param position {Point} marker current position on the map canvas
|
|
||||||
* @param bouncingOptions {BouncingOptions} options of bouncing animation
|
|
||||||
*/
|
|
||||||
function BouncingMotionCss3(marker, position, bouncingOptions) {
|
|
||||||
var _this = this;
|
|
||||||
|
|
||||||
_classCallCheck(this, BouncingMotionCss3);
|
|
||||||
|
|
||||||
_defineProperty(this, "marker", void 0);
|
|
||||||
|
|
||||||
_defineProperty(this, "position", void 0);
|
|
||||||
|
|
||||||
_defineProperty(this, "bouncingOptions", void 0);
|
|
||||||
|
|
||||||
_defineProperty(this, "isBouncing", false);
|
|
||||||
|
|
||||||
_defineProperty(this, "iconStyles", void 0);
|
|
||||||
|
|
||||||
_defineProperty(this, "shadowStyles", void 0);
|
|
||||||
|
|
||||||
_defineProperty(this, "bouncingAnimationPlaying", false);
|
|
||||||
|
|
||||||
_lastAnimationName.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: contractAnimationName
|
|
||||||
});
|
|
||||||
|
|
||||||
_classes.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: ['bouncing']
|
|
||||||
});
|
|
||||||
|
|
||||||
_eventCounter.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: void 0
|
|
||||||
});
|
|
||||||
|
|
||||||
_times.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: void 0
|
|
||||||
});
|
|
||||||
|
|
||||||
_listener.set(this, {
|
|
||||||
writable: true,
|
|
||||||
value: function value(event) {
|
|
||||||
return _this.onAnimationEnd(event);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.marker = marker;
|
|
||||||
this.position = position;
|
|
||||||
this.updateBouncingOptions(bouncingOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
_createClass(BouncingMotionCss3, [{
|
|
||||||
key: "updateBouncingOptions",
|
|
||||||
value: function updateBouncingOptions(options) {
|
|
||||||
this.bouncingOptions = options instanceof BouncingOptions ? options : this.bouncingOptions.override(options);
|
|
||||||
|
|
||||||
if (!this.bouncingOptions.elastic) {
|
|
||||||
_classPrivateFieldSet(this, _lastAnimationName, moveAnimationName);
|
|
||||||
|
|
||||||
_classPrivateFieldGet(this, _classes).push('simple');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "onAnimationEnd",
|
|
||||||
value: function onAnimationEnd(event) {
|
|
||||||
var _this2 = this;
|
|
||||||
|
|
||||||
if (event.animationName === _classPrivateFieldGet(this, _lastAnimationName)) {
|
|
||||||
var _this$eventCounter;
|
|
||||||
|
|
||||||
_classPrivateFieldSet(this, _eventCounter, (_this$eventCounter = +_classPrivateFieldGet(this, _eventCounter)) + 1), _this$eventCounter;
|
|
||||||
|
|
||||||
_classPrivateFieldSet(this, _eventCounter, _classPrivateFieldGet(this, _eventCounter) % 2);
|
|
||||||
|
|
||||||
if (!_classPrivateFieldGet(this, _eventCounter)) {
|
|
||||||
if (this.isBouncing && (_classPrivateFieldGet(this, _times) === null || _classPrivateFieldSet(this, _times, +_classPrivateFieldGet(this, _times) - 1))) {
|
|
||||||
resetClasses(this.marker._icon, _classPrivateFieldGet(this, _classes));
|
|
||||||
|
|
||||||
if (this.marker._shadow) {
|
|
||||||
resetClasses(this.marker._shadow, _classPrivateFieldGet(this, _classes));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
_classPrivateFieldGet(this, _classes).forEach(function (className) {
|
|
||||||
L.DomUtil.removeClass(_this2.marker._icon, className);
|
|
||||||
|
|
||||||
if (_this2.marker._shadow) {
|
|
||||||
L.DomUtil.removeClass(_this2.marker._shadow, className);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.bouncingAnimationPlaying = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "resetStyles",
|
|
||||||
value: function resetStyles(marker) {
|
|
||||||
var _this$marker$getIcon, _this$marker$getIcon$, _this$marker, _this$marker$_iconObj, _this$marker$_iconObj2;
|
|
||||||
|
|
||||||
this.marker = marker;
|
|
||||||
this.iconStyles = Styles.ofMarker(marker);
|
|
||||||
|
|
||||||
if (marker._shadow) {
|
|
||||||
this.shadowStyles = Styles.parse(marker._shadow.style.cssText);
|
|
||||||
}
|
|
||||||
|
|
||||||
var iconHeight = ((_this$marker$getIcon = this.marker.getIcon()) === null || _this$marker$getIcon === void 0 ? void 0 : (_this$marker$getIcon$ = _this$marker$getIcon.options) === null || _this$marker$getIcon$ === void 0 ? void 0 : _this$marker$getIcon$.iconSize[1]) || ((_this$marker = this.marker) === null || _this$marker === void 0 ? void 0 : (_this$marker$_iconObj = _this$marker._iconObj) === null || _this$marker$_iconObj === void 0 ? void 0 : (_this$marker$_iconObj2 = _this$marker$_iconObj.options) === null || _this$marker$_iconObj2 === void 0 ? void 0 : _this$marker$_iconObj2.iconSize[1]);
|
|
||||||
var iconAnimationParams = BouncingMotionCss3.animationParams(this.position, this.bouncingOptions, iconHeight);
|
|
||||||
this.iconStyles = this.iconStyles.withStyles(iconAnimationParams);
|
|
||||||
this.marker._icon.style.cssText = this.iconStyles.toString();
|
|
||||||
|
|
||||||
if (this.bouncingAnimationPlaying) {
|
|
||||||
resetClasses(this.marker._icon, _classPrivateFieldGet(this, _classes));
|
|
||||||
|
|
||||||
this.marker._icon.addEventListener('animationend', _classPrivateFieldGet(this, _listener));
|
|
||||||
}
|
|
||||||
|
|
||||||
var _this$bouncingOptions = this.bouncingOptions,
|
|
||||||
bounceHeight = _this$bouncingOptions.bounceHeight,
|
|
||||||
contractHeight = _this$bouncingOptions.contractHeight,
|
|
||||||
shadowAngle = _this$bouncingOptions.shadowAngle;
|
|
||||||
|
|
||||||
if (this.marker._shadow && shadowAngle) {
|
|
||||||
var _this$marker$getIcon2, _this$marker$getIcon3;
|
|
||||||
|
|
||||||
var _this$position = this.position,
|
|
||||||
x = _this$position.x,
|
|
||||||
y = _this$position.y;
|
|
||||||
var points = calculateLine(x, y, shadowAngle, bounceHeight + 1);
|
|
||||||
|
|
||||||
var _points$bounceHeight = _slicedToArray(points[bounceHeight], 2),
|
|
||||||
posXJump = _points$bounceHeight[0],
|
|
||||||
posYJump = _points$bounceHeight[1];
|
|
||||||
|
|
||||||
var shadowHeight = (_this$marker$getIcon2 = this.marker.getIcon()) === null || _this$marker$getIcon2 === void 0 ? void 0 : (_this$marker$getIcon3 = _this$marker$getIcon2.options) === null || _this$marker$getIcon3 === void 0 ? void 0 : _this$marker$getIcon3.shadowSize[1];
|
|
||||||
var shadowScaleContract = BouncingMotionCss3.contractScale(shadowHeight, contractHeight);
|
|
||||||
this.shadowStyles = this.shadowStyles.withStyles(iconAnimationParams).withStyles({
|
|
||||||
'--pos-x-jump': "".concat(posXJump, "px"),
|
|
||||||
'--pos-y-jump': "".concat(posYJump, "px"),
|
|
||||||
'--scale-contract': shadowScaleContract
|
|
||||||
});
|
|
||||||
this.marker._shadow.style.cssText = this.shadowStyles.toString();
|
|
||||||
|
|
||||||
if (this.bouncingAnimationPlaying) {
|
|
||||||
resetClasses(this.marker._shadow, _classPrivateFieldGet(this, _classes));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "bounce",
|
|
||||||
value: function bounce() {
|
|
||||||
var times = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
||||||
|
|
||||||
_classPrivateFieldSet(this, _times, times);
|
|
||||||
|
|
||||||
_classPrivateFieldSet(this, _eventCounter, 0);
|
|
||||||
|
|
||||||
this.isBouncing = true;
|
|
||||||
|
|
||||||
if (this.bouncingAnimationPlaying) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.bouncingAnimationPlaying = true;
|
|
||||||
resetClasses(this.marker._icon, _classPrivateFieldGet(this, _classes));
|
|
||||||
|
|
||||||
if (this.marker._shadow) {
|
|
||||||
resetClasses(this.marker._shadow, _classPrivateFieldGet(this, _classes));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.marker._icon.addEventListener('animationend', _classPrivateFieldGet(this, _listener));
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
key: "stopBouncing",
|
|
||||||
value: function stopBouncing() {
|
|
||||||
this.isBouncing = false;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Calculates parameters of CSS3 animation of bouncing.
|
|
||||||
*
|
|
||||||
* @param position {Point} marker current position on the map canvas
|
|
||||||
* @param bouncingOptions {BouncingOptions} options of bouncing animation
|
|
||||||
* @param height {number} icons height
|
|
||||||
* @return {object} CSS3 animation parameters
|
|
||||||
*/
|
|
||||||
|
|
||||||
}], [{
|
|
||||||
key: "animationParams",
|
|
||||||
value: function animationParams(position, bouncingOptions, height) {
|
|
||||||
var x = position.x,
|
|
||||||
y = position.y;
|
|
||||||
var bounceHeight = bouncingOptions.bounceHeight,
|
|
||||||
contractHeight = bouncingOptions.contractHeight,
|
|
||||||
bounceSpeed = bouncingOptions.bounceSpeed,
|
|
||||||
contractSpeed = bouncingOptions.contractSpeed;
|
|
||||||
var scaleContract = BouncingMotionCss3.contractScale(height, contractHeight);
|
|
||||||
var durationJump = BouncingMotionCss3.calculateDuration(bounceHeight, bounceSpeed);
|
|
||||||
var durationContract = BouncingMotionCss3.calculateDuration(contractHeight, contractSpeed);
|
|
||||||
var delays = [0, durationJump, durationJump * 2, durationJump * 2 + durationContract];
|
|
||||||
return {
|
|
||||||
'--pos-x': "".concat(x, "px"),
|
|
||||||
'--pos-y': "".concat(y, "px"),
|
|
||||||
'--pos-y-jump': "".concat(y - bounceHeight, "px"),
|
|
||||||
'--pos-y-contract': "".concat(y + contractHeight, "px"),
|
|
||||||
'--scale-contract': scaleContract,
|
|
||||||
'--duration-jump': "".concat(durationJump, "ms"),
|
|
||||||
'--duration-contract': "".concat(durationContract, "ms"),
|
|
||||||
'--delays': "0ms, ".concat(delays[1], "ms, ").concat(delays[2], "ms, ").concat(delays[3], "ms")
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Calculates scale of contracting.
|
|
||||||
*
|
|
||||||
* @param {number} height original height
|
|
||||||
* @param {number} contractHeight how much it must contract
|
|
||||||
* @return {number} contracting scale between 0 and 1
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "contractScale",
|
|
||||||
value: function contractScale(height, contractHeight) {
|
|
||||||
return (height - contractHeight) / height;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Calculates duration of animation.
|
|
||||||
*
|
|
||||||
* @param height {number} height of movement or resizing (px)
|
|
||||||
* @param speed {number} speed coefficient
|
|
||||||
*
|
|
||||||
* @return {number} duration of animation (ms)
|
|
||||||
*/
|
|
||||||
|
|
||||||
}, {
|
|
||||||
key: "calculateDuration",
|
|
||||||
value: function calculateDuration(height, speed) {
|
|
||||||
var duration = Math.round(speed * speedCoefficient);
|
|
||||||
var i = height;
|
|
||||||
|
|
||||||
while (--i) {
|
|
||||||
duration += Math.round(speed / (height - i));
|
|
||||||
}
|
|
||||||
|
|
||||||
return duration;
|
|
||||||
}
|
|
||||||
}]);
|
|
||||||
|
|
||||||
return BouncingMotionCss3;
|
|
||||||
}();
|
|
||||||
|
|
||||||
L__default['default'].Marker.include(MarkerPrototypeExt);
|
|
||||||
/**
|
|
||||||
* Registers default options of bouncing animation.
|
|
||||||
* @param options {BouncingOptions|object} object with options
|
|
||||||
*/
|
|
||||||
|
|
||||||
L__default['default'].Marker.setBouncingOptions = function (options) {
|
|
||||||
L.Marker.prototype._bouncingOptions = options instanceof BouncingOptions ? options : new BouncingOptions(options);
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Returns array of currently bouncing markers.
|
|
||||||
* @return {Marker[]} array of bouncing markers
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
L__default['default'].Marker.getBouncingMarkers = function () {
|
|
||||||
L.Marker.prototype._orchestration.getBouncingMarkers();
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Stops the bouncing of all currently bouncing markers. Purge the array of bouncing markers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
L__default['default'].Marker.stopAllBouncingMarkers = function () {
|
|
||||||
L.Marker.prototype._orchestration.stopAllBouncingMarkers();
|
|
||||||
};
|
|
||||||
|
|
||||||
L__default['default'].Marker.addInitHook(function () {
|
|
||||||
if (this.isRealMarker()) {
|
|
||||||
var bouncingOptions = new BouncingOptions(L.Marker.prototype._bouncingOptions);
|
|
||||||
this._bouncingMotion = new BouncingMotionCss3(this, new L.Point(0, 0), bouncingOptions);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}(L));
|
|
||||||
531
public/js/vendor/foundation.js
vendored
1
public/js/vendor/foundation.min.js
vendored
66
public/js/vendor/gktowgs.js
vendored
@@ -1,66 +0,0 @@
|
|||||||
const proj4 = require('proj4')
|
|
||||||
const epsg = require('epsg')
|
|
||||||
const isObject = require('lodash.isobject')
|
|
||||||
const isNumber = require('lodash.isnumber')
|
|
||||||
|
|
||||||
const epsgFromZone = (zone) => 'EPSG:'+(31464+zone) // zone 2 = 31466, zone 5 = 31469
|
|
||||||
|
|
||||||
const toWGS = (coordinates) => {
|
|
||||||
if(!isObject(coordinates) || !isNumber(coordinates.x) || !isNumber(coordinates.y)){
|
|
||||||
throw new Error('missing or invalid parameter `coordinates`')
|
|
||||||
}
|
|
||||||
if(coordinates.x < 0 || coordinates.x >= Math.pow(10, 7)){
|
|
||||||
throw new Error('`coordinates.x` out of bounds')
|
|
||||||
}
|
|
||||||
if(coordinates.y < 0 || coordinates.y >= Math.pow(10, 7)){
|
|
||||||
throw new Error('`coordinates.y` out of bounds')
|
|
||||||
}
|
|
||||||
|
|
||||||
const zone = +(coordinates.x+'')[0]
|
|
||||||
|
|
||||||
const projected = proj4.default(epsg[epsgFromZone(zone)], 'WGS84', Object.assign({}, coordinates))
|
|
||||||
return ({
|
|
||||||
longitude: projected.x,
|
|
||||||
latitude: projected.y
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const toGK = (coordinates, zone) => {
|
|
||||||
if(!isObject(coordinates) || !isNumber(coordinates.longitude) || !isNumber(coordinates.latitude)){
|
|
||||||
throw new Error('missing or invalid parameter `coordinates`')
|
|
||||||
}
|
|
||||||
if(coordinates.longitude < -180 || coordinates.longitude > 180){
|
|
||||||
throw new Error('`coordinates.longitude` out of bounds')
|
|
||||||
}
|
|
||||||
if(coordinates.latitude < -360 || coordinates.latitude > 360){
|
|
||||||
throw new Error('`coordinates.latitude` out of bounds')
|
|
||||||
}
|
|
||||||
|
|
||||||
if(zone){
|
|
||||||
if(!isNumber(zone)){
|
|
||||||
throw new Error('`zone` parameter must be a number')
|
|
||||||
}
|
|
||||||
if(![2,3,4,5].includes(zone)){
|
|
||||||
throw new Error('if set, `zone` parameter must be one of 2, 3, 4, 5')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
zone = Math.floor((+coordinates.longitude + 1.5) / 3)
|
|
||||||
if(![2,3,4,5].includes(zone)){
|
|
||||||
throw new Error('could not detect valid zone (2, 3, 4, 5) from input coordinates')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const proj4coordinates = {
|
|
||||||
x: coordinates.longitude,
|
|
||||||
y: coordinates.latitude
|
|
||||||
}
|
|
||||||
|
|
||||||
const projected = proj4('WGS84', epsg[epsgFromZone(zone)], proj4coordinates)
|
|
||||||
return ({
|
|
||||||
x: projected.x,
|
|
||||||
y: projected.y
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {toWGS, toGK}
|
|
||||||
10598
public/js/vendor/jquery.js
vendored
7
public/js/vendor/leaflet.contextmenu.min.js
vendored
293
public/js/vendor/oms.min.js
vendored
@@ -1,293 +0,0 @@
|
|||||||
(function () {
|
|
||||||
/*
|
|
||||||
OverlappingMarkerSpiderfier
|
|
||||||
https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet
|
|
||||||
Copyright (c) 2011 - 2012 George MacKerron
|
|
||||||
Released under the MIT licence: http://opensource.org/licenses/mit-license
|
|
||||||
Note: The Leaflet maps API must be included *before* this code
|
|
||||||
*/
|
|
||||||
(function () {
|
|
||||||
var q = {}.hasOwnProperty,
|
|
||||||
r = [].slice;
|
|
||||||
null != this.L &&
|
|
||||||
(this.OverlappingMarkerSpiderfier = (function () {
|
|
||||||
function n(c, b) {
|
|
||||||
var a,
|
|
||||||
e,
|
|
||||||
g,
|
|
||||||
f,
|
|
||||||
d = this;
|
|
||||||
this.map = c;
|
|
||||||
null == b && (b = {});
|
|
||||||
for (a in b) q.call(b, a) && ((e = b[a]), (this[a] = e));
|
|
||||||
this.initMarkerArrays();
|
|
||||||
this.listeners = {};
|
|
||||||
f = ["click", "zoomend"];
|
|
||||||
e = 0;
|
|
||||||
for (g = f.length; e < g; e++)
|
|
||||||
(a = f[e]),
|
|
||||||
this.map.addEventListener(a, function () {
|
|
||||||
return d.unspiderfy();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var d, k;
|
|
||||||
d = n.prototype;
|
|
||||||
d.VERSION = "0.2.6";
|
|
||||||
k = 2 * Math.PI;
|
|
||||||
d.keepSpiderfied = !1;
|
|
||||||
d.nearbyDistance = 20;
|
|
||||||
d.circleSpiralSwitchover = 9;
|
|
||||||
d.circleFootSeparation = 25;
|
|
||||||
d.circleStartAngle = k / 12;
|
|
||||||
d.spiralFootSeparation = 28;
|
|
||||||
d.spiralLengthStart = 11;
|
|
||||||
d.spiralLengthFactor = 5;
|
|
||||||
d.legWeight = 1.5;
|
|
||||||
d.legColors = { usual: "#222", highlighted: "#f00" };
|
|
||||||
d.initMarkerArrays = function () {
|
|
||||||
this.markers = [];
|
|
||||||
return (this.markerListeners = []);
|
|
||||||
};
|
|
||||||
d.addMarker = function (c) {
|
|
||||||
|
|
||||||
var b,
|
|
||||||
a = this;
|
|
||||||
if (null != c._oms) return this;
|
|
||||||
c._oms = !0;
|
|
||||||
b = function () {
|
|
||||||
return a.spiderListener(c);
|
|
||||||
};
|
|
||||||
c.addEventListener("click", b);
|
|
||||||
this.markerListeners.push(b);
|
|
||||||
this.markers.push(c);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.getMarkers = function () {
|
|
||||||
return this.markers.slice(0);
|
|
||||||
};
|
|
||||||
d.removeMarker = function (c) {
|
|
||||||
var b, a;
|
|
||||||
null != c._omsData && this.unspiderfy();
|
|
||||||
b = this.arrIndexOf(this.markers, c);
|
|
||||||
if (0 > b) return this;
|
|
||||||
a = this.markerListeners.splice(b, 1)[0];
|
|
||||||
c.removeEventListener("click", a);
|
|
||||||
delete c._oms;
|
|
||||||
this.markers.splice(b, 1);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.clearMarkers = function () {
|
|
||||||
var c, b, a, e, g;
|
|
||||||
this.unspiderfy();
|
|
||||||
g = this.markers;
|
|
||||||
c = a = 0;
|
|
||||||
for (e = g.length; a < e; c = ++a)
|
|
||||||
(b = g[c]),
|
|
||||||
(c = this.markerListeners[c]),
|
|
||||||
b.removeEventListener("click", c),
|
|
||||||
delete b._oms;
|
|
||||||
this.initMarkerArrays();
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.addListener = function (c, b) {
|
|
||||||
|
|
||||||
var a, e;
|
|
||||||
(null != (e = (a = this.listeners)[c]) ? e : (a[c] = [])).push(b);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.removeListener = function (c, b) {
|
|
||||||
var a;
|
|
||||||
a = this.arrIndexOf(this.listeners[c], b);
|
|
||||||
0 > a || this.listeners[c].splice(a, 1);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.clearListeners = function (c) {
|
|
||||||
this.listeners[c] = [];
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.trigger = function () {
|
|
||||||
var c, b, a, e, g, f;
|
|
||||||
b = arguments[0];
|
|
||||||
c = 2 <= arguments.length ? r.call(arguments, 1) : [];
|
|
||||||
b = null != (a = this.listeners[b]) ? a : [];
|
|
||||||
f = [];
|
|
||||||
e = 0;
|
|
||||||
for (g = b.length; e < g; e++) (a = b[e]), f.push(a.apply(null, c));
|
|
||||||
return f;
|
|
||||||
};
|
|
||||||
d.generatePtsCircle = function (c, b) {
|
|
||||||
var a, e, g, f, d;
|
|
||||||
g = (this.circleFootSeparation * (2 + c)) / k;
|
|
||||||
e = k / c;
|
|
||||||
d = [];
|
|
||||||
for (a = f = 0; 0 <= c ? f < c : f > c; a = 0 <= c ? ++f : --f)
|
|
||||||
(a = this.circleStartAngle + a * e),
|
|
||||||
d.push(new L.Point(b.x + g * Math.cos(a), b.y + g * Math.sin(a)));
|
|
||||||
return d;
|
|
||||||
};
|
|
||||||
d.generatePtsSpiral = function (c, b) {
|
|
||||||
var a, e, g, f, d;
|
|
||||||
g = this.spiralLengthStart;
|
|
||||||
a = 0;
|
|
||||||
d = [];
|
|
||||||
for (e = f = 0; 0 <= c ? f < c : f > c; e = 0 <= c ? ++f : --f)
|
|
||||||
(a += this.spiralFootSeparation / g + 5e-4 * e),
|
|
||||||
(e = new L.Point(b.x + g * Math.cos(a), b.y + g * Math.sin(a))),
|
|
||||||
(g += (k * this.spiralLengthFactor) / a),
|
|
||||||
d.push(e);
|
|
||||||
return d;
|
|
||||||
};
|
|
||||||
// Which Icon was clicked - c Icon Data
|
|
||||||
d.spiderListener = function (c) {
|
|
||||||
var b, a, e, g, f, d, h, k, l;
|
|
||||||
((b = null != c._omsData) && this.keepSpiderfied) ||
|
|
||||||
this.unspiderfy();
|
|
||||||
if (b) return this.trigger("click", c);
|
|
||||||
g = [];
|
|
||||||
f = [];
|
|
||||||
d = this.nearbyDistance * this.nearbyDistance;
|
|
||||||
e = this.map.latLngToLayerPoint(c.getLatLng());
|
|
||||||
l = this.markers;
|
|
||||||
h = 0;
|
|
||||||
for (k = l.length; h < k; h++)
|
|
||||||
(b = l[h]),
|
|
||||||
this.map.hasLayer(b) &&
|
|
||||||
((a = this.map.latLngToLayerPoint(b.getLatLng())),
|
|
||||||
this.ptDistanceSq(a, e) < d
|
|
||||||
? g.push({ marker: b, markerPt: a })
|
|
||||||
: f.push(b));
|
|
||||||
return 1 === g.length
|
|
||||||
? this.trigger("click", c)
|
|
||||||
: this.spiderfy(g, f);
|
|
||||||
};
|
|
||||||
d.makeHighlightListeners = function (c) {
|
|
||||||
var b = this;
|
|
||||||
return {
|
|
||||||
highlight: function () {
|
|
||||||
return c._omsData.leg.setStyle({
|
|
||||||
color: b.legColors.highlighted,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
unhighlight: function () {
|
|
||||||
return c._omsData.leg.setStyle({ color: b.legColors.usual });
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
// spiderfy event
|
|
||||||
d.spiderfy = function (c, b) {
|
|
||||||
var a, e, g, d, p, h, k, l, n, m;
|
|
||||||
this.spiderfying = !0;
|
|
||||||
m = c.length;
|
|
||||||
a = this.ptAverage(
|
|
||||||
(function () {
|
|
||||||
var a, b, e;
|
|
||||||
e = [];
|
|
||||||
a = 0;
|
|
||||||
for (b = c.length; a < b; a++) (k = c[a]), e.push(k.markerPt);
|
|
||||||
return e;
|
|
||||||
})()
|
|
||||||
);
|
|
||||||
d =
|
|
||||||
m >= this.circleSpiralSwitchover
|
|
||||||
? this.generatePtsSpiral(m, a).reverse()
|
|
||||||
: this.generatePtsCircle(m, a);
|
|
||||||
a = function () {
|
|
||||||
var a,
|
|
||||||
b,
|
|
||||||
k,
|
|
||||||
m = this;
|
|
||||||
k = [];
|
|
||||||
a = 0;
|
|
||||||
for (b = d.length; a < b; a++)
|
|
||||||
(g = d[a]),
|
|
||||||
(e = this.map.layerPointToLatLng(g)),
|
|
||||||
(n = this.minExtract(c, function (a) {
|
|
||||||
return m.ptDistanceSq(a.markerPt, g);
|
|
||||||
})),
|
|
||||||
(h = n.marker),
|
|
||||||
(p = new L.Polyline([h.getLatLng(), e], {
|
|
||||||
color: this.legColors.usual,
|
|
||||||
weight: this.legWeight,
|
|
||||||
clickable: !1,
|
|
||||||
})),
|
|
||||||
this.map.addLayer(p),
|
|
||||||
(h._omsData = { usualPosition: h.getLatLng(), leg: p }),
|
|
||||||
this.legColors.highlighted !== this.legColors.usual &&
|
|
||||||
((l = this.makeHighlightListeners(h)),
|
|
||||||
(h._omsData.highlightListeners = l),
|
|
||||||
h.addEventListener("mouseover", l.highlight),
|
|
||||||
h.addEventListener("mouseout", l.unhighlight)),
|
|
||||||
h.setLatLng(e),
|
|
||||||
h.setZIndexOffset(1e6),
|
|
||||||
k.push(h);
|
|
||||||
return k;
|
|
||||||
}.call(this);
|
|
||||||
delete this.spiderfying;
|
|
||||||
this.spiderfied = !0;
|
|
||||||
return this.trigger("spiderfy", a, b);
|
|
||||||
};
|
|
||||||
d.unspiderfy = function (c) {
|
|
||||||
var b, a, e, d, f, k, h;
|
|
||||||
null == c && (c = null);
|
|
||||||
if (null == this.spiderfied) return this;
|
|
||||||
this.unspiderfying = !0;
|
|
||||||
d = [];
|
|
||||||
e = [];
|
|
||||||
h = this.markers;
|
|
||||||
f = 0;
|
|
||||||
for (k = h.length; f < k; f++)
|
|
||||||
(b = h[f]),
|
|
||||||
null != b._omsData
|
|
||||||
? (this.map.removeLayer(b._omsData.leg),
|
|
||||||
b !== c && b.setLatLng(b._omsData.usualPosition),
|
|
||||||
b.setZIndexOffset(0),
|
|
||||||
(a = b._omsData.highlightListeners),
|
|
||||||
null != a &&
|
|
||||||
(b.removeEventListener("mouseover", a.highlight),
|
|
||||||
b.removeEventListener("mouseout", a.unhighlight)),
|
|
||||||
delete b._omsData,
|
|
||||||
d.push(b))
|
|
||||||
: e.push(b);
|
|
||||||
delete this.unspiderfying;
|
|
||||||
delete this.spiderfied;
|
|
||||||
this.trigger("unspiderfy", d, e);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
d.ptDistanceSq = function (c, b) {
|
|
||||||
var a, e;
|
|
||||||
a = c.x - b.x;
|
|
||||||
e = c.y - b.y;
|
|
||||||
return a * a + e * e;
|
|
||||||
};
|
|
||||||
d.ptAverage = function (c) {
|
|
||||||
var b, a, e, d, f;
|
|
||||||
d = a = e = 0;
|
|
||||||
for (f = c.length; d < f; d++) (b = c[d]), (a += b.x), (e += b.y);
|
|
||||||
c = c.length;
|
|
||||||
return new L.Point(a / c, e / c);
|
|
||||||
};
|
|
||||||
d.minExtract = function (c, b) {
|
|
||||||
var a, d, g, f, k, h;
|
|
||||||
g = k = 0;
|
|
||||||
for (h = c.length; k < h; g = ++k)
|
|
||||||
if (
|
|
||||||
((f = c[g]),
|
|
||||||
(f = b(f)),
|
|
||||||
"undefined" === typeof a || null === a || f < d)
|
|
||||||
)
|
|
||||||
(d = f), (a = g);
|
|
||||||
return c.splice(a, 1)[0];
|
|
||||||
};
|
|
||||||
d.arrIndexOf = function (c, b) {
|
|
||||||
var a, d, g, f;
|
|
||||||
if (null != c.indexOf) return c.indexOf(b);
|
|
||||||
a = g = 0;
|
|
||||||
for (f = c.length; g < f; a = ++g)
|
|
||||||
if (((d = c[a]), d === b)) return a;
|
|
||||||
return -1;
|
|
||||||
};
|
|
||||||
return n;
|
|
||||||
})());
|
|
||||||
}.call(this));
|
|
||||||
}.call(this));
|
|
||||||
/* Mon 14 Oct 2013 10:54:59 BST */
|
|
||||||
494
public/js/vendor/what-input.js
vendored
@@ -1,494 +0,0 @@
|
|||||||
/**
|
|
||||||
* what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
|
|
||||||
* @version v5.2.3
|
|
||||||
* @link https://github.com/ten1seven/what-input
|
|
||||||
* @license MIT
|
|
||||||
*/
|
|
||||||
(function webpackUniversalModuleDefinition(root, factory) {
|
|
||||||
if(typeof exports === 'object' && typeof module === 'object')
|
|
||||||
module.exports = factory();
|
|
||||||
else if(typeof define === 'function' && define.amd)
|
|
||||||
define("whatInput", [], factory);
|
|
||||||
else if(typeof exports === 'object')
|
|
||||||
exports["whatInput"] = factory();
|
|
||||||
else
|
|
||||||
root["whatInput"] = factory();
|
|
||||||
})(this, function() {
|
|
||||||
return /******/ (function(modules) { // webpackBootstrap
|
|
||||||
/******/ // The module cache
|
|
||||||
/******/ var installedModules = {};
|
|
||||||
|
|
||||||
/******/ // The require function
|
|
||||||
/******/ function __webpack_require__(moduleId) {
|
|
||||||
|
|
||||||
/******/ // Check if module is in cache
|
|
||||||
/******/ if(installedModules[moduleId])
|
|
||||||
/******/ return installedModules[moduleId].exports;
|
|
||||||
|
|
||||||
/******/ // Create a new module (and put it into the cache)
|
|
||||||
/******/ var module = installedModules[moduleId] = {
|
|
||||||
/******/ exports: {},
|
|
||||||
/******/ id: moduleId,
|
|
||||||
/******/ loaded: false
|
|
||||||
/******/ };
|
|
||||||
|
|
||||||
/******/ // Execute the module function
|
|
||||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
||||||
|
|
||||||
/******/ // Flag the module as loaded
|
|
||||||
/******/ module.loaded = true;
|
|
||||||
|
|
||||||
/******/ // Return the exports of the module
|
|
||||||
/******/ return module.exports;
|
|
||||||
/******/ }
|
|
||||||
|
|
||||||
|
|
||||||
/******/ // expose the modules object (__webpack_modules__)
|
|
||||||
/******/ __webpack_require__.m = modules;
|
|
||||||
|
|
||||||
/******/ // expose the module cache
|
|
||||||
/******/ __webpack_require__.c = installedModules;
|
|
||||||
|
|
||||||
/******/ // __webpack_public_path__
|
|
||||||
/******/ __webpack_require__.p = "";
|
|
||||||
|
|
||||||
/******/ // Load entry module and return exports
|
|
||||||
/******/ return __webpack_require__(0);
|
|
||||||
/******/ })
|
|
||||||
/************************************************************************/
|
|
||||||
/******/ ([
|
|
||||||
/* 0 */
|
|
||||||
/***/ (function(module, exports) {
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = function () {
|
|
||||||
/*
|
|
||||||
* bail out if there is no document or window
|
|
||||||
* (i.e. in a node/non-DOM environment)
|
|
||||||
*
|
|
||||||
* Return a stubbed API instead
|
|
||||||
*/
|
|
||||||
if (typeof document === 'undefined' || typeof window === 'undefined') {
|
|
||||||
return {
|
|
||||||
// always return "initial" because no interaction will ever be detected
|
|
||||||
ask: function ask() {
|
|
||||||
return 'initial';
|
|
||||||
},
|
|
||||||
|
|
||||||
// always return null
|
|
||||||
element: function element() {
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
|
|
||||||
// no-op
|
|
||||||
ignoreKeys: function ignoreKeys() {},
|
|
||||||
|
|
||||||
// no-op
|
|
||||||
specificKeys: function specificKeys() {},
|
|
||||||
|
|
||||||
// no-op
|
|
||||||
registerOnChange: function registerOnChange() {},
|
|
||||||
|
|
||||||
// no-op
|
|
||||||
unRegisterOnChange: function unRegisterOnChange() {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* variables
|
|
||||||
*/
|
|
||||||
|
|
||||||
// cache document.documentElement
|
|
||||||
var docElem = document.documentElement;
|
|
||||||
|
|
||||||
// currently focused dom element
|
|
||||||
var currentElement = null;
|
|
||||||
|
|
||||||
// last used input type
|
|
||||||
var currentInput = 'initial';
|
|
||||||
|
|
||||||
// last used input intent
|
|
||||||
var currentIntent = currentInput;
|
|
||||||
|
|
||||||
// UNIX timestamp of current event
|
|
||||||
var currentTimestamp = Date.now();
|
|
||||||
|
|
||||||
// check for sessionStorage support
|
|
||||||
// then check for session variables and use if available
|
|
||||||
try {
|
|
||||||
if (window.sessionStorage.getItem('what-input')) {
|
|
||||||
currentInput = window.sessionStorage.getItem('what-input');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window.sessionStorage.getItem('what-intent')) {
|
|
||||||
currentIntent = window.sessionStorage.getItem('what-intent');
|
|
||||||
}
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
// form input types
|
|
||||||
var formInputs = ['button', 'input', 'select', 'textarea'];
|
|
||||||
|
|
||||||
// empty array for holding callback functions
|
|
||||||
var functionList = [];
|
|
||||||
|
|
||||||
// list of modifier keys commonly used with the mouse and
|
|
||||||
// can be safely ignored to prevent false keyboard detection
|
|
||||||
var ignoreMap = [16, // shift
|
|
||||||
17, // control
|
|
||||||
18, // alt
|
|
||||||
91, // Windows key / left Apple cmd
|
|
||||||
93 // Windows menu / right Apple cmd
|
|
||||||
];
|
|
||||||
|
|
||||||
var specificMap = [];
|
|
||||||
|
|
||||||
// mapping of events to input types
|
|
||||||
var inputMap = {
|
|
||||||
keydown: 'keyboard',
|
|
||||||
keyup: 'keyboard',
|
|
||||||
mousedown: 'mouse',
|
|
||||||
mousemove: 'mouse',
|
|
||||||
MSPointerDown: 'pointer',
|
|
||||||
MSPointerMove: 'pointer',
|
|
||||||
pointerdown: 'pointer',
|
|
||||||
pointermove: 'pointer',
|
|
||||||
touchstart: 'touch',
|
|
||||||
touchend: 'touch'
|
|
||||||
|
|
||||||
// boolean: true if the page is being scrolled
|
|
||||||
};var isScrolling = false;
|
|
||||||
|
|
||||||
// store current mouse position
|
|
||||||
var mousePos = {
|
|
||||||
x: null,
|
|
||||||
y: null
|
|
||||||
|
|
||||||
// map of IE 10 pointer events
|
|
||||||
};var pointerMap = {
|
|
||||||
2: 'touch',
|
|
||||||
3: 'touch', // treat pen like touch
|
|
||||||
4: 'mouse'
|
|
||||||
|
|
||||||
// check support for passive event listeners
|
|
||||||
};var supportsPassive = false;
|
|
||||||
|
|
||||||
try {
|
|
||||||
var opts = Object.defineProperty({}, 'passive', {
|
|
||||||
get: function get() {
|
|
||||||
supportsPassive = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
window.addEventListener('test', null, opts);
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* set up
|
|
||||||
*/
|
|
||||||
|
|
||||||
var setUp = function setUp() {
|
|
||||||
// add correct mouse wheel event mapping to `inputMap`
|
|
||||||
inputMap[detectWheel()] = 'mouse';
|
|
||||||
|
|
||||||
addListeners();
|
|
||||||
doUpdate('input');
|
|
||||||
doUpdate('intent');
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* events
|
|
||||||
*/
|
|
||||||
|
|
||||||
var addListeners = function addListeners() {
|
|
||||||
// `pointermove`, `MSPointerMove`, `mousemove` and mouse wheel event binding
|
|
||||||
// can only demonstrate potential, but not actual, interaction
|
|
||||||
// and are treated separately
|
|
||||||
var options = supportsPassive ? { passive: true } : false;
|
|
||||||
|
|
||||||
// pointer events (mouse, pen, touch)
|
|
||||||
if (window.PointerEvent) {
|
|
||||||
window.addEventListener('pointerdown', setInput);
|
|
||||||
window.addEventListener('pointermove', setIntent);
|
|
||||||
} else if (window.MSPointerEvent) {
|
|
||||||
window.addEventListener('MSPointerDown', setInput);
|
|
||||||
window.addEventListener('MSPointerMove', setIntent);
|
|
||||||
} else {
|
|
||||||
// mouse events
|
|
||||||
window.addEventListener('mousedown', setInput);
|
|
||||||
window.addEventListener('mousemove', setIntent);
|
|
||||||
|
|
||||||
// touch events
|
|
||||||
if ('ontouchstart' in window) {
|
|
||||||
window.addEventListener('touchstart', setInput, options);
|
|
||||||
window.addEventListener('touchend', setInput);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// mouse wheel
|
|
||||||
window.addEventListener(detectWheel(), setIntent, options);
|
|
||||||
|
|
||||||
// keyboard events
|
|
||||||
window.addEventListener('keydown', setInput);
|
|
||||||
window.addEventListener('keyup', setInput);
|
|
||||||
|
|
||||||
// focus events
|
|
||||||
window.addEventListener('focusin', setElement);
|
|
||||||
window.addEventListener('focusout', clearElement);
|
|
||||||
};
|
|
||||||
|
|
||||||
// checks conditions before updating new input
|
|
||||||
var setInput = function setInput(event) {
|
|
||||||
var eventKey = event.which;
|
|
||||||
var value = inputMap[event.type];
|
|
||||||
|
|
||||||
if (value === 'pointer') {
|
|
||||||
value = pointerType(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignoreMatch = !specificMap.length && ignoreMap.indexOf(eventKey) === -1;
|
|
||||||
|
|
||||||
var specificMatch = specificMap.length && specificMap.indexOf(eventKey) !== -1;
|
|
||||||
|
|
||||||
var shouldUpdate = value === 'keyboard' && eventKey && (ignoreMatch || specificMatch) || value === 'mouse' || value === 'touch';
|
|
||||||
|
|
||||||
// prevent touch detection from being overridden by event execution order
|
|
||||||
if (validateTouch(value)) {
|
|
||||||
shouldUpdate = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldUpdate && currentInput !== value) {
|
|
||||||
currentInput = value;
|
|
||||||
|
|
||||||
try {
|
|
||||||
window.sessionStorage.setItem('what-input', currentInput);
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
doUpdate('input');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldUpdate && currentIntent !== value) {
|
|
||||||
// preserve intent for keyboard interaction with form fields
|
|
||||||
var activeElem = document.activeElement;
|
|
||||||
var notFormInput = activeElem && activeElem.nodeName && (formInputs.indexOf(activeElem.nodeName.toLowerCase()) === -1 || activeElem.nodeName.toLowerCase() === 'button' && !checkClosest(activeElem, 'form'));
|
|
||||||
|
|
||||||
if (notFormInput) {
|
|
||||||
currentIntent = value;
|
|
||||||
|
|
||||||
try {
|
|
||||||
window.sessionStorage.setItem('what-intent', currentIntent);
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
doUpdate('intent');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// updates the doc and `inputTypes` array with new input
|
|
||||||
var doUpdate = function doUpdate(which) {
|
|
||||||
docElem.setAttribute('data-what' + which, which === 'input' ? currentInput : currentIntent);
|
|
||||||
|
|
||||||
fireFunctions(which);
|
|
||||||
};
|
|
||||||
|
|
||||||
// updates input intent for `mousemove` and `pointermove`
|
|
||||||
var setIntent = function setIntent(event) {
|
|
||||||
var value = inputMap[event.type];
|
|
||||||
|
|
||||||
if (value === 'pointer') {
|
|
||||||
value = pointerType(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
// test to see if `mousemove` happened relative to the screen to detect scrolling versus mousemove
|
|
||||||
detectScrolling(event);
|
|
||||||
|
|
||||||
// only execute if scrolling isn't happening
|
|
||||||
if ((!isScrolling && !validateTouch(value) || isScrolling && event.type === 'wheel' || event.type === 'mousewheel' || event.type === 'DOMMouseScroll') && currentIntent !== value) {
|
|
||||||
currentIntent = value;
|
|
||||||
|
|
||||||
try {
|
|
||||||
window.sessionStorage.setItem('what-intent', currentIntent);
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
doUpdate('intent');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var setElement = function setElement(event) {
|
|
||||||
if (!event.target.nodeName) {
|
|
||||||
// If nodeName is undefined, clear the element
|
|
||||||
// This can happen if click inside an <svg> element.
|
|
||||||
clearElement();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
currentElement = event.target.nodeName.toLowerCase();
|
|
||||||
docElem.setAttribute('data-whatelement', currentElement);
|
|
||||||
|
|
||||||
if (event.target.classList && event.target.classList.length) {
|
|
||||||
docElem.setAttribute('data-whatclasses', event.target.classList.toString().replace(' ', ','));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var clearElement = function clearElement() {
|
|
||||||
currentElement = null;
|
|
||||||
|
|
||||||
docElem.removeAttribute('data-whatelement');
|
|
||||||
docElem.removeAttribute('data-whatclasses');
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* utilities
|
|
||||||
*/
|
|
||||||
|
|
||||||
var pointerType = function pointerType(event) {
|
|
||||||
if (typeof event.pointerType === 'number') {
|
|
||||||
return pointerMap[event.pointerType];
|
|
||||||
} else {
|
|
||||||
// treat pen like touch
|
|
||||||
return event.pointerType === 'pen' ? 'touch' : event.pointerType;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// prevent touch detection from being overridden by event execution order
|
|
||||||
var validateTouch = function validateTouch(value) {
|
|
||||||
var timestamp = Date.now();
|
|
||||||
|
|
||||||
var touchIsValid = value === 'mouse' && currentInput === 'touch' && timestamp - currentTimestamp < 200;
|
|
||||||
|
|
||||||
currentTimestamp = timestamp;
|
|
||||||
|
|
||||||
return touchIsValid;
|
|
||||||
};
|
|
||||||
|
|
||||||
// detect version of mouse wheel event to use
|
|
||||||
// via https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event
|
|
||||||
var detectWheel = function detectWheel() {
|
|
||||||
var wheelType = null;
|
|
||||||
|
|
||||||
// Modern browsers support "wheel"
|
|
||||||
if ('onwheel' in document.createElement('div')) {
|
|
||||||
wheelType = 'wheel';
|
|
||||||
} else {
|
|
||||||
// Webkit and IE support at least "mousewheel"
|
|
||||||
// or assume that remaining browsers are older Firefox
|
|
||||||
wheelType = document.onmousewheel !== undefined ? 'mousewheel' : 'DOMMouseScroll';
|
|
||||||
}
|
|
||||||
|
|
||||||
return wheelType;
|
|
||||||
};
|
|
||||||
|
|
||||||
// runs callback functions
|
|
||||||
var fireFunctions = function fireFunctions(type) {
|
|
||||||
for (var i = 0, len = functionList.length; i < len; i++) {
|
|
||||||
if (functionList[i].type === type) {
|
|
||||||
functionList[i].fn.call(undefined, type === 'input' ? currentInput : currentIntent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// finds matching element in an object
|
|
||||||
var objPos = function objPos(match) {
|
|
||||||
for (var i = 0, len = functionList.length; i < len; i++) {
|
|
||||||
if (functionList[i].fn === match) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var detectScrolling = function detectScrolling(event) {
|
|
||||||
if (mousePos['x'] !== event.screenX || mousePos['y'] !== event.screenY) {
|
|
||||||
isScrolling = false;
|
|
||||||
|
|
||||||
mousePos['x'] = event.screenX;
|
|
||||||
mousePos['y'] = event.screenY;
|
|
||||||
} else {
|
|
||||||
isScrolling = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// manual version of `closest()`
|
|
||||||
var checkClosest = function checkClosest(elem, tag) {
|
|
||||||
var ElementPrototype = window.Element.prototype;
|
|
||||||
|
|
||||||
if (!ElementPrototype.matches) {
|
|
||||||
ElementPrototype.matches = ElementPrototype.msMatchesSelector || ElementPrototype.webkitMatchesSelector;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ElementPrototype.closest) {
|
|
||||||
do {
|
|
||||||
if (elem.matches(tag)) {
|
|
||||||
return elem;
|
|
||||||
}
|
|
||||||
|
|
||||||
elem = elem.parentElement || elem.parentNode;
|
|
||||||
} while (elem !== null && elem.nodeType === 1);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
} else {
|
|
||||||
return elem.closest(tag);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* init
|
|
||||||
*/
|
|
||||||
|
|
||||||
// don't start script unless browser cuts the mustard
|
|
||||||
// (also passes if polyfills are used)
|
|
||||||
if ('addEventListener' in window && Array.prototype.indexOf) {
|
|
||||||
setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* api
|
|
||||||
*/
|
|
||||||
|
|
||||||
return {
|
|
||||||
// returns string: the current input type
|
|
||||||
// opt: 'intent'|'input'
|
|
||||||
// 'input' (default): returns the same value as the `data-whatinput` attribute
|
|
||||||
// 'intent': includes `data-whatintent` value if it's different than `data-whatinput`
|
|
||||||
ask: function ask(opt) {
|
|
||||||
return opt === 'intent' ? currentIntent : currentInput;
|
|
||||||
},
|
|
||||||
|
|
||||||
// returns string: the currently focused element or null
|
|
||||||
element: function element() {
|
|
||||||
return currentElement;
|
|
||||||
},
|
|
||||||
|
|
||||||
// overwrites ignored keys with provided array
|
|
||||||
ignoreKeys: function ignoreKeys(arr) {
|
|
||||||
ignoreMap = arr;
|
|
||||||
},
|
|
||||||
|
|
||||||
// overwrites specific char keys to update on
|
|
||||||
specificKeys: function specificKeys(arr) {
|
|
||||||
specificMap = arr;
|
|
||||||
},
|
|
||||||
|
|
||||||
// attach functions to input and intent "events"
|
|
||||||
// funct: function to fire on change
|
|
||||||
// eventType: 'input'|'intent'
|
|
||||||
registerOnChange: function registerOnChange(fn, eventType) {
|
|
||||||
functionList.push({
|
|
||||||
fn: fn,
|
|
||||||
type: eventType || 'input'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
unRegisterOnChange: function unRegisterOnChange(fn) {
|
|
||||||
var position = objPos(fn);
|
|
||||||
|
|
||||||
if (position || position === 0) {
|
|
||||||
functionList.splice(position, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
/******/ ])
|
|
||||||
});
|
|
||||||
;
|
|
||||||