1. Import

This commit is contained in:
Sven committed 2026-03-29 10:34:57 +02:00
1 parent b0e00c1259
commit a1129565af
4899 files changed
+3007593

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
{
"rules": {
"camelcase": 2,
"quotes": [2, "single", "avoid-escape"],
"indent": 2,
"space-before-function-paren": [2, "never"],
"space-in-parens": 2,
"object-curly-spacing": 2,
"space-before-blocks": 2,
"keyword-spacing": 2,
"no-lonely-if": 2,
"comma-spacing": [2, {"after": true}],
"comma-style": 2,
"no-underscore-dangle": 0,
"no-constant-condition": 0,
"no-multi-spaces": 2,
"strict": 0,
"key-spacing": 2,
"no-shadow": 0,
"no-console": 2,
"no-trailing-spaces": 2,
},
"globals": {
"L": true,
"module": true,
"define": true
},
"plugins": [
"html"
],
"settings": {
"html/report-bad-indent": 2,
"html/indent": "space"
}
}
@@ -0,0 +1 @@
node_modules
@@ -0,0 +1,5 @@
language: node_js
sudo: false
node_js:
- "stable"
@@ -0,0 +1,61 @@
.leaflet-control-layers-toggle.leaflet-layerstree-named-toggle {
margin: 2px 5px;
width: auto;
height: auto;
background-image: none;
}
.leaflet-layerstree-node {
}
.leaflet-layerstree-header input{
margin-left: 0px;
}
.leaflet-layerstree-header {
}
.leaflet-layerstree-header-pointer {
cursor: pointer;
}
.leaflet-layerstree-header label {
display: inline-block;
cursor: pointer;
}
.leaflet-layerstree-header-label {
}
.leaflet-layerstree-header-name {
}
.leaflet-layerstree-header-space {
}
.leaflet-layerstree-children {
padding-left: 10px;
}
.leaflet-layerstree-children-nopad {
padding-left: 0px;
}
.leaflet-layerstree-closed {
}
.leaflet-layerstree-opened {
}
.leaflet-layerstree-hide {
display: none;
}
.leaflet-layerstree-nevershow {
display: none;
}
.leaflet-layerstree-expand-collapse {
cursor: pointer;
}
@@ -0,0 +1,396 @@
/*
* Control like L.Control.Layers, but showing layers in a tree.
* Do not forget to include the css file.
*/
(function(L) {
if (typeof L === 'undefined') {
throw new Error('Leaflet must be included first');
}
/*
* L.Control.Layers.Tree extends L.Control.Layers because it reuses
* most of its functionality. Only the HTML creation is different.
*/
L.Control.Layers.Tree = L.Control.Layers.extend({
options: {
closedSymbol: '+',
openedSymbol: '−',
spaceSymbol: ' ',
selectorBack: false,
namedToggle: false,
collapseAll: '',
expandAll: '',
},
// Class names are error prone texts, so write them once here
_initClassesNames: function() {
this.cls = {
children: 'leaflet-layerstree-children',
childrenNopad: 'leaflet-layerstree-children-nopad',
hide: 'leaflet-layerstree-hide',
closed: 'leaflet-layerstree-closed',
opened: 'leaflet-layerstree-opened',
space: 'leaflet-layerstree-header-space',
pointer: 'leaflet-layerstree-header-pointer',
header: 'leaflet-layerstree-header',
neverShow: 'leaflet-layerstree-nevershow',
node: 'leaflet-layerstree-node',
name: 'leaflet-layerstree-header-name',
label: 'leaflet-layerstree-header-label',
};
},
initialize: function(baseTree, overlaysTree, options) {
this._scrollTop = 0;
this._initClassesNames();
this._baseTree = null;
this._overlaysTree = null;
L.Util.setOptions(this, options);
L.Control.Layers.prototype.initialize.call(this, null, null, options);
this._setTrees(baseTree, overlaysTree);
},
setBaseTree: function(tree) {
return this._setTrees(tree);
},
setOverlayTree: function(tree) {
return this._setTrees(undefined, tree);
},
addBaseLayer: function(layer, name) {
throw 'addBaseLayer is disabled';
},
addOverlay: function(layer, name) {
throw 'addOverlay is disabled';
},
removeLayer: function(layer) {
throw 'removeLayer is disabled';
},
collapse: function() {
this._scrollTop = this._sect().scrollTop;
return L.Control.Layers.prototype.collapse.call(this);
},
expand: function() {
var ret = L.Control.Layers.prototype.expand.call(this);
this._sect().scrollTop = this._scrollTop;
},
onAdd: function(map) {
function changeName(layer) {
if (layer._layersTreeName) {
toggle.innerHTML = layer._layersTreeName;
}
}
var ret = L.Control.Layers.prototype.onAdd.call(this, map);
if (this.options.namedToggle) {
var toggle = this._container.getElementsByClassName('leaflet-control-layers-toggle')[0];
L.DomUtil.addClass(toggle, 'leaflet-layerstree-named-toggle');
// Start with this value...
map.eachLayer(function(layer) {changeName(layer);});
// ... and change it whenever the baselayer is changed.
map.on('baselayerchange', function(e) {changeName(e.layer);}, this);
}
return ret;
},
// Expands the whole tree (base other overlays)
expandTree: function(overlay) {
var container = overlay ? this._overlaysList : this._baseLayersList;
if (container) {
this._applyOnTree(container, false);
}
return this._localExpand();
},
// Collapses the whole tree (base other overlays)
collapseTree: function(overlay) {
var container = overlay ? this._overlaysList : this._baseLayersList;
if (container) {
this._applyOnTree(container, true);
}
return this._localExpand();
},
// Expands the tree, only to show the selected inputs
expandSelected: function(overlay) {
function iter(el) {
// Function to iterate the whole DOM upwards
var p = el.parentElement;
if (p) {
if (L.DomUtil.hasClass(p, that.cls.children) &&
!L.DomUtil.hasClass(el, that.cls.childrenNopad)) {
L.DomUtil.removeClass(p, hide);
}
if (L.DomUtil.hasClass(p, that.cls.node)) {
var h = p.getElementsByClassName(that.cls.header)[0];
that._applyOnTree(h, false);
}
iter(p);
}
}
var that = this;
var container = overlay ? this._overlaysList : this._baseLayersList;
if (!container) return this;
var hide = this.cls.hide;
var inputs = this._layerControlInputs || container.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
// Loop over every (valid) input.
var input = inputs[i];
if (this._getLayer && !!this._getLayer(input.layerId).overlay != !!overlay) continue
if (input.checked) {
// Get out of the header,
// to not open the posible (but rare) children
iter(input.parentElement.parentElement.parentElement.parentElement);
}
}
return this._localExpand();
},
// "private" methods, not exposed in the API
_sect: function() {
// to keep compatibility after 1.3 https://github.com/Leaflet/Leaflet/pull/6380
return this._section || this._form;
},
_setTrees: function(base, overlays) {
var id = 0; // to keep unique id
function iterate(tree, output, overlays) {
if (tree && tree.layer) {
if (!overlays) {
tree.layer._layersTreeName = tree.name || tree.label;
}
output[id++] = tree.layer;
}
if (tree && tree.children && tree.children.length) {
tree.children.forEach(function(child) {
iterate(child, output, overlays);
});
}
return output;
}
// We accept arrays, but convert into an object with children
function forArrays(input) {
if (Array.isArray(input)) {
return {noShow: true, children: input};
} else {
return input
}
}
// Clean everything, and start again.
if (this._layerControlInputs) {
this._layerControlInputs = [];
}
for (var i = 0; i < this._layers.length; ++i) {
this._layers[i].layer.off('add remove', this._onLayerChange, this);
}
this._layers = [];
if (base !== undefined) this._baseTree = forArrays(base);
if (overlays !== undefined) this._overlaysTree = forArrays(overlays);
var bflat = iterate(this._baseTree, {});
for (var i in bflat) {
this._addLayer(bflat[i], i);
}
var oflat = iterate(this._overlaysTree, {}, true);
for (i in oflat) {
this._addLayer(oflat[i], i, true);
}
return (this._map) ? this._update() : this;
},
// Used to update the vertical scrollbar
_localExpand: function() {
if (this._map && L.DomUtil.hasClass(this._container, 'leaflet-control-layers-expanded')) {
var top = this._sect().scrollTop;
this.expand();
this._sect().scrollTop = top; // to keep the scroll location
this._scrollTop = top;
}
return this;
},
// collapses or expands the tree in the containter.
_applyOnTree: function(container, collapse) {
var iters = [
{cls: this.cls.children, hide: collapse},
{cls: this.cls.opened, hide: collapse},
{cls: this.cls.closed, hide: !collapse},
];
iters.forEach(function(it) {
var els = container.getElementsByClassName(it.cls);
for (var i = 0; i < els.length; i++) {
var el = els[i];
if (L.DomUtil.hasClass(el, this.cls.childrenNopad)) {
// do nothing
} else if (it.hide) {
L.DomUtil.addClass(el, this.cls.hide);
} else {
L.DomUtil.removeClass(el, this.cls.hide);
}
}
}, this);
},
// it is called in the original _update, and shouldn't do anything.
_addItem: function(obj) {
},
// overwrite _update function in Control.Layers
_update: function() {
if (!this._container) { return this; }
L.Control.Layers.prototype._update.call(this);
this._addTreeLayout(this._baseTree, false);
this._addTreeLayout(this._overlaysTree, true);
return this._localExpand();
},
// Create the DOM objects for the tree
_addTreeLayout: function(tree, overlay) {
if (!tree) return;
var container = overlay ? this._overlaysList : this._baseLayersList;
this._expandCollapseAll(overlay, this.options.collapseAll, this.collapseTree);
this._expandCollapseAll(overlay, this.options.expandAll, this.expandTree);
this._iterateTreeLayout(tree, container, overlay, tree.noShow)
if (this._checkDisabledLayers) {
// to keep compatibility
this._checkDisabledLayers();
}
},
// Create the "Collapse all" or expand, if needed.
_expandCollapseAll: function(overlay, text, fn, ctx) {
var container = overlay ? this._overlaysList : this._baseLayersList;
ctx = ctx ? ctx : this;
if (text) {
var o = document.createElement('div');
o.className = 'leaflet-layerstree-expand-collapse';
container.appendChild(o);
o.innerHTML = text;
o.tabIndex = 0;
L.DomEvent.on(o, 'click keydown', function(e) {
if (e.type !== 'keydown' || e.keyCode === 32) {
o.blur()
fn.call(ctx, overlay);
this._localExpand();
}
}, this);
}
},
// recursive funtion to create the DOM children
_iterateTreeLayout: function(tree, container, overlay, noShow) {
if (!tree) return;
function creator(type, cls, append, innerHTML) {
var obj = L.DomUtil.create(type, cls, append);
if (innerHTML) obj.innerHTML = innerHTML;
return obj;
}
// create the header with it fields
var header = creator('div', this.cls.header, container);
var sel = creator('span');
var entry = creator('span');
var closed = creator('span', this.cls.closed, sel, this.options.closedSymbol);
var opened = creator('span', this.cls.opened, sel, this.options.openedSymbol);
var space = creator('span', this.cls.space, null, this.options.spaceSymbol);
if (this.options.selectorBack) {
sel.insertBefore(space, closed);
header.appendChild(entry);
header.appendChild(sel);
} else {
sel.appendChild(space);
header.appendChild(sel);
header.appendChild(entry);
}
var hide = this.cls.hide; // To toggle state
// create the children group, with the header event click
if (tree.children) {
var children = creator('div', this.cls.children, container);
var sensible = tree.layer ? sel : header;
L.DomUtil.addClass(sensible, this.cls.pointer);
sensible.tabIndex = 0;
L.DomEvent.on(sensible, 'click keydown', function(e) {
if (e.type === 'keydown' && e.keyCode !== 32) {
return
}
sensible.blur();
if (L.DomUtil.hasClass(opened, hide)) {
// it is not opened, so open it
L.DomUtil.addClass(closed, hide);
L.DomUtil.removeClass(opened, hide);
L.DomUtil.removeClass(children, hide);
} else {
// close it
L.DomUtil.removeClass(closed, hide);
L.DomUtil.addClass(opened, hide);
L.DomUtil.addClass(children, hide);
}
this._localExpand();
}, this);
tree.children.forEach(function(child) {
var node = creator('div', this.cls.node, children)
this._iterateTreeLayout(child, node, overlay);
}, this);
} else {
// no children, so the selector makes no sense.
L.DomUtil.addClass(sel, this.cls.neverShow);
}
// create the input and label, as in Control.Layers
var label = creator(tree.layer ? 'label' : 'span', this.cls.label, entry);
if (tree.layer) {
// now create the element like in _addItem
var checked = this._map.hasLayer(tree.layer)
var input;
var radioGroup = overlay ? tree.radioGroup : 'leaflet-base-layers_' + L.Util.stamp(this);
if (radioGroup) {
input = this._createRadioElement(radioGroup, checked);
} else {
input = this._createCheckboxElement(checked);
}
if (this._layerControlInputs) {
// to keep compatibility with 1.0.3
this._layerControlInputs.push(input);
}
input.layerId = L.Util.stamp(tree.layer);
L.DomEvent.on(input, 'click', this._onInputClick, this);
label.appendChild(input);
}
var name = creator('span', this.cls.name, label, tree.label);
L.DomUtil.addClass(closed, hide);
if (noShow) {
L.DomUtil.addClass(header, this.cls.neverShow);
L.DomUtil.addClass(children, this.cls.childrenNopad);
}
},
_createCheckboxElement: function(checked) {
var input = document.createElement('input');
input.type = 'checkbox';
input.className = 'leaflet-control-layers-selector';
input.defaultChecked = checked;
return input;
},
});
L.control.layers.tree = function(base, overlays, options) {
return new L.Control.Layers.Tree(base, overlays, options);
}
})(L);
+29
View File
@@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2017, Javier Jimenez Shaw
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+125
View File
@@ -0,0 +1,125 @@
# Leaflet.Control.Layers.Tree
[![Build Status](https://travis-ci.org/jjimenezshaw/Leaflet.Control.Layers.Tree.svg)](https://travis-ci.org/jjimenezshaw/Leaflet.Control.Layers.Tree)
[![NPM version](https://img.shields.io/npm/v/leaflet.control.layers.tree.svg)](https://www.npmjs.com/package/leaflet.control.layers.tree)
[![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg?style=flat)](LICENSE)
[![Leaflet 1.x compatible!](https://img.shields.io/badge/Leaflet%201.x-%E2%9C%93-1EB300.svg?style=flat)](http://leafletjs.com/reference.html)
A Tree Layers Control for Leaflet.
## Description
This plugin extends [`Control.Layers`](http://leafletjs.com/reference-1.4.0.html#control-layers) allowing a tree structure for the layers layout. In `Control.Layers` you can only display a flat list of layers (baselayers and overlays), that is usually enough for small sets. If you have a long list of baselayers or overlays, and you want to organize them in a tree (allowing the user collapse and expand branches), this is a good option.
[Some live examples here](https://jjimenezshaw.github.io/Leaflet.Control.Layers.Tree/examples/)
## Installation
Using npm for browserify `npm install leaflet.control.layers.tree` (and `require('leaflet.control.layers.tree')`), or just download `L.Control.Layers.Tree.js` and `L.Control.Layers.Tree.css` and add a script and link tag for it in your html.
## Compatibility
This plugin has been tested with Leaflet 1.0.3, 1.1.0, 1.2.0, 1.3.1. and 1.4.0
## Usage
1. Create your layers. Do this as usual.
2. Create your layers tree, like the one just below.
3. Create the control and add to the map: `L.control.layers.tree(baseTree, overalysTree, options).addTo(map);`
4. Voilà!
```javascript
var baseTree = {
label: 'Base Layers',
children: [
{
label: 'World &#x1f5fa;',
children: [
{ label: 'OpenStreetMap', layer: osm },
{ label: 'Esri', layer: esri },
{ label: 'Google Satellite', layer: g_s },
/* ... */
]
},
{
label: 'Europe',
children: [
{ label: 'France', layer: france },
{ label: 'Germany', layer: germany },
{ label: 'Spain', layer: spain },
/* ... */
]
},
{
label: 'USA',
children: [
{
label: 'General',
children: [
{ label: 'Nautical', layer: usa_naut },
{ label: 'Satellite', layer: usa_sat },
{ label: 'Topographical', layer: usa_topo },
]
},
{
label: 'States',
children: [
{ label: 'CA', layer: usa_ca },
{ label: 'NY', layer: usa_ny },
/* ... */
]
}
]
},
]
};
```
![small tree sample](smalltree.png)
## API
### `L.Control.Layers.Tree`
The main (and only) 'class' involved in this plugin. It exteds `L.Control.Layers`, so most of its methods are available. `addBaseLayer`, `addOverlay` and `removeLayer` are non usable in `L.Control.Layers.Tree`.
#### `L.control.layers.tree(baseTree, overlayTree, options)`
Creates the control. The arguments are:
* `baseTree`: `<Object>` or `<Array>` Tree defining the base layers (like the one above). You can also provide an `Array` of nodes, if you want to start with a flat level.
* `overlayTree`: `<Object>` or `<Array>` Similar than baseTree, but for overlays.
* `options`: `<Object>` specific options for the tree. See that it includes `L.Control.Layer` [options](http://leafletjs.com/reference-1.4.0.html#control-layers)
##### constructor options
* `closedSymbol`: `<String>` Symbol displayed on a closed node (that you can click to open). Default '+'.
* `openedSymbol`: `<String>` Symbol displayed on a opened node (that you can click to close). Default '&minus;' (`&minus;`).
* `spaceSymbol`: `<String>` Symbol between the closed or opened symbol, and the text. Default ' ' (a normal space).
* `selectorBack`: `<Boolean>` Flag to indicate if the selector (+ or &minus;) is _after_ the text. Default 'false'.
* `namedToggle`: `<Boolean>` Flag to replace the toggle image (box with the layers image) with the 'name' of the selected base layer. If the `name` field is not present in the tree for this layer, `label` is used. See that you can show a different name when control is collapsed than the one that appears in the tree when it is expanded. Your node in the tree can be `{ label: 'OSM', name: 'OpenStreetMap', layer: layer }`. Default 'false'.
* `collapseAll`: `<String>` Text for an entry in control that collapses the tree (baselayers or overlays). If empty, no entry is created. Default ''.
* `expandAll`: `<String>` Text for an entry in control that expands the tree. If empty, no entry is created. Default ''.
See that those strings can be html code, with unicode, images or whatever you want.
#### `setBaseTree(tree)`
Resets the base layers tree (like in constructor, an `<Object>` or `<Array>`). Internally removes and adds all the layers, so you may be notified if you registered those events. Returns `this`.
#### `setOverlayTree(tree)`
Resets the overlay layers tree (like in constructor, an `<Object>` or `<Array>`). Internally removes and adds all the layers, so you may be notified if you registered those events. Returns `this`.
#### `expandTree(overlays)`
This method expands the tree. When `overlays` is `true` expands the overlays tree. Otherwise expands the baselayers tree. Returns `this`.
#### `collapseTree(overlays)`
This method collapses the tree. When `overlays` is `true` collapses the overlays tree. Otherwise collapses the baselayers tree. Returns `this`.
#### `expandSelected(overlays)`
This method expands only the selected item in the tree. When `overlays` is `true` affects the overlays tree. Otherwise affects the baselayers tree. Returns `this`.
## Tricks about the tree
The layers tree is a normal `Object`s tree like in the example above. The valid elements are:
* `children`: `<Array>` Array of children nodes for this node. Nothing special.
* `label`: `<String>` Text displayed in the tree for this node. It may contain HTML code.
* `layer`: `<L.Layer>` The layer itself. You can create with `L.tileLayer`, `L.marker`, or however you want.
* `name`: `<String>` Text displayed in the toggle when control is minimized. If not present, `label` is used. It makes sense only when `namedToggle` is `true`, and with base layers.
* `radioGroup`: `<String>` Text to identify different radio button groups. It is used in the `name` attribute in the [radio button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio). It is used only in the overlays layers (ignored in the base layers), allowing you to have radio buttons instead of checkboxes. See that radio groups cannot be unselected, so create a 'fake' layer (like `L.layersGroup([])`) if you want to disable it. Deafult `''` (that means checkbox).
You can see an example of a baselayers tree (the javascript code) above. You can provide a tree, or an array of trees.
Non leaf nodes (that is, those with `children`) can also have a layer. In this case you will be able to select the layer, and only the icon will collapse or expand this branch.
You can include HTML code, not only ascii chars, in the `label` attribute. It will be included as `innerHTML`. Be carefull with unicodes, because not every browser supports them all.
A leaf node without `layer` attribute is also posible. Only with `label`. This can be used to include special commands calling a javascript function, or a separator, or whatever you like. An example of separator node is
```javascript
{label: '<div class="leaflet-control-layers-separator"></div>'}
```
@@ -0,0 +1,25 @@
{
"name": "leaflet.control.layers.tree",
"version": "0.1.1",
"description": "Control Layers in a Tree structure",
"homepage": "https://github.com/jjimenezshaw/Leaflet.Control.Layers.Tree",
"authors": [
"Javier Jimenez Shaw"
],
"main": "L.Control.Layers.Tree.js",
"style": "L.Control.Layers.Tree.css",
"keywords": [
"Leaflet",
"map",
"geo",
"tree",
"control",
"layers"
],
"license": "BSD-3-Clause",
"ignore": [
"**/.*",
"node_modules",
"test"
]
}
@@ -0,0 +1,295 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Leaflet Layers Tree Demo: Airports in Europe</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet-src.js" crossorigin=""></script>
<!--link rel="stylesheet" href="../../Leaflet/dist/leaflet.css" crossorigin=""/>
<script src="../../Leaflet/dist/leaflet-src.js" crossorigin=""></script-->
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
#map { width: 100%; height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<link rel="stylesheet" href="../L.Control.Layers.Tree.css" crossorigin=""/>
<script src="../L.Control.Layers.Tree.js"></script>
<script type="text/javascript">
var center = [40, 0];
var osm = L.tileLayer(
'//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors'}
);
var osmBw = L.tileLayer(
'http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors'}
);
var thunderAttr = {attribution: '© OpenStreetMap contributors. Tiles courtesy of Andy Allan'}
var transport = L.tileLayer(
'//{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png',
thunderAttr
);
var cycle = L.tileLayer(
'//{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png',
thunderAttr
);
var map = L.map('map', {
layers: [osm],
center: center,
zoom: 5
});
var baseTree = {
label: 'BaseLayers',
noShow: true,
children: [
{
label: 'OpenStreeMap',
layer: osm,
children: [
{label: 'B&W', layer: osmBw, name: 'OpenStreeMap B&W'},
]
},
{
label: 'Thunder',
children: [
{label: 'Cycle', layer: cycle},
{label: 'Transport', layer: transport},
]
},
]
};
var ctl = L.control.layers.tree(baseTree, null,
{
collapsed: true,
namedToggle: true,
collapseAll: 'Collapse all',
expandAll: 'Expand all',
});
ctl.addTo(map).collapseTree().expandSelected();
var airportsEurope = [
/* start aiports from http://www.partow.net/miscellaneous/airportdatabase/#Download */
{label: 'GERMANY', children: [
{label: 'AACHEN - AAH', layer: L.marker([50.823000, 6.187000])},
{label: 'ALTENBURG - AOC', layer: L.marker([50.982000, 12.506000])},
{label: 'ARNSBERG - ZCA', layer: L.marker([51.483000, 7.899000])},
{label: 'AUGSBURG - AGB', layer: L.marker([48.425000, 10.932000])},
{label: 'BADEN-BADEN - ZCC', layer: L.marker([48.791000, 8.187000])},
{label: 'BAUTZEN - BBJ', layer: L.marker([51.193000, 14.520000])},
{label: 'BAYREUTH - BYU', layer: L.marker([49.984000, 11.638000])},
{label: 'BERLIN - SXF', layer: L.marker([52.380000, 13.523000])},
{label: 'BERLIN - THF', layer: L.marker([52.473000, 13.404000])},
{label: 'BERLIN - TXL', layer: L.marker([52.559000, 13.287000])},
{label: 'BORKUM - BMK', layer: L.marker([53.595000, 6.709000])},
{label: 'BRAUNSCHWEIG - BWE', layer: L.marker([52.319000, 10.556000])},
{label: 'BREMEN - BRE', layer: L.marker([53.047000, 8.787000])},
{label: 'BREMERHAVEN - BRV', layer: L.marker([53.503000, 8.573000])},
{label: 'BRUEGGEN - BGN', layer: L.marker([51.200000, 6.132000])},
{label: 'CELLE - ZCN', layer: L.marker([52.591000, 10.022000])},
{label: 'COLOGNE - CGN', layer: L.marker([50.866000, 7.143000])},
{label: 'DONAUESCHINGEN - ZQL', layer: L.marker([47.973000, 8.522000])},
{label: 'DORTMUND - DTM', layer: L.marker([51.518000, 7.612000])},
{label: 'DRESDEN - DRS', layer: L.marker([51.133000, 13.767000])},
{label: 'DUESSELDORF - DUS', layer: L.marker([51.289000, 6.767000])},
{label: 'EMDEN - EME', layer: L.marker([53.391000, 7.227000])},
{label: 'ERFURT - ERF', layer: L.marker([50.980000, 10.958000])},
{label: 'ESSEN - ESS', layer: L.marker([51.401000, 6.936000])},
{label: 'FRANKFURT - FRA', layer: L.marker([50.026000, 8.543000])},
{label: 'FRIEDRICHSHAFEN - FDH', layer: L.marker([47.671000, 9.511000])},
{label: 'FUERSTENFELDBRUCK - FEL', layer: L.marker([48.206000, 11.267000])},
{label: 'GEILENKIRCHEN - GKE', layer: L.marker([50.961000, 6.042000])},
{label: 'GIEBELSTADT - GHF', layer: L.marker([49.648000, 9.966000])},
{label: 'GOTHA OST - GWW', layer: L.marker([35.461000, -77.965000])},
{label: 'GUETERSLOH - GUT', layer: L.marker([51.923000, 8.306000])},
{label: 'HAHN - HHN', layer: L.marker([49.950000, 7.264000])},
{label: 'HAMBURG - HAM', layer: L.marker([53.630000, 9.988000])},
{label: 'HAMBURG - XFW', layer: L.marker([53.535000, 9.835000])},
{label: 'HANAU - ZNF', layer: L.marker([50.169000, 8.961000])},
{label: 'HANNOVER - HAJ', layer: L.marker([52.461000, 9.685000])},
{label: 'HEIDELBERG - QHD', layer: L.marker([49.393000, 8.652000])},
{label: 'HOF - HOQ', layer: L.marker([50.289000, 11.855000])},
{label: 'KASSEL - KSF', layer: L.marker([51.408000, 9.378000])},
{label: 'KIEL - KEL', layer: L.marker([54.379000, 10.145000])},
{label: 'KOBLENZ - ZNV', layer: L.marker([50.325000, 7.531000])},
{label: 'LAAGE - RLG', layer: L.marker([53.918000, 12.279000])},
{label: 'LAARBRUCH - LRC', layer: L.marker([51.602000, 6.143000])},
{label: 'LEIPZIG - LEJ', layer: L.marker([51.424000, 12.236000])},
{label: 'LEMWERDER - LEM', layer: L.marker([53.143000, 8.623000])},
{label: 'LUEBECK - LBC', layer: L.marker([53.805000, 10.719000])},
{label: 'MANNHEIM - MHG', layer: L.marker([49.473000, 8.514000])},
{label: 'MOENCHENGLADBACH - MGL', layer: L.marker([51.230000, 6.504000])},
{label: 'MUENSTER/OSNABRUECK - FMO', layer: L.marker([52.134000, 7.685000])},
{label: 'MUNICH - MUC', layer: L.marker([48.354000, 11.786000])},
{label: 'NORDERNEY - NRD', layer: L.marker([53.707000, 7.230000])},
{label: 'NUERNBERG - NUE', layer: L.marker([49.499000, 11.078000])},
{label: 'OBERPFAFFENHOFEN - OBF', layer: L.marker([48.081000, 11.283000])},
{label: 'PADERBORN - PAD', layer: L.marker([51.614000, 8.616000])},
{label: 'PARCHIM - SZW', layer: L.marker([53.427000, 11.783000])},
{label: 'RAMSTEIN - RMS', layer: L.marker([49.438000, 7.601000])},
{label: 'SAARBRUECKEN - SCN', layer: L.marker([49.214000, 7.109000])},
{label: 'SPANGDAHLEM - SPM', layer: L.marker([49.973000, 6.692000])},
{label: 'SPEYER - ZQC', layer: L.marker([49.302000, 8.451000])},
{label: 'STUTTGART - STR', layer: L.marker([48.690000, 9.222000])},
{label: 'TRIER - ZQF', layer: L.marker([49.863000, 6.789000])},
{label: 'WESTERLAND - GWT', layer: L.marker([54.913000, 8.340000])},
{label: 'WILHELMSHAVEN - WVN', layer: L.marker([53.505000, 8.053000])},
]},
{label: 'SPAIN', children: [
{label: 'ALICANTE - ALC', layer: L.marker([38.282000, -0.558000])},
{label: 'ALMERIA - LEI', layer: L.marker([36.844000, -2.370000])},
{label: 'AVILES - OVD', layer: L.marker([43.563000, -6.034000])},
{label: 'BADAJOZ - BJZ', layer: L.marker([38.891000, -6.821000])},
{label: 'BARCELONA - BCN', layer: L.marker([41.297000, 2.078000])},
{label: 'BILBAO - BIO', layer: L.marker([43.301000, -2.911000])},
{label: 'CORDOBA - ODB', layer: L.marker([37.842000, -4.849000])},
{label: 'GERONA - GRO', layer: L.marker([41.901000, 2.760000])},
{label: 'GRANADA - GRX', layer: L.marker([37.133000, -3.636000])},
{label: 'GRANADA - GRX', layer: L.marker([37.189000, -3.777000])},
{label: 'IBIZA - IBZ', layer: L.marker([38.873000, 1.373000])},
{label: 'JEREZ - XRY', layer: L.marker([36.744000, -6.060000])},
{label: 'LA CORUNA - LCG', layer: L.marker([43.302000, -8.377000])},
{label: 'MADRID - MAD', layer: L.marker([40.472000, -3.561000])},
{label: 'MADRID - TOJ', layer: L.marker([40.487000, -3.458000])},
{label: 'MALAGA - AGP', layer: L.marker([36.674000, -4.499000])},
{label: 'MENORCA - MAH', layer: L.marker([39.863000, 4.219000])},
{label: 'MURCIA - MJV', layer: L.marker([37.775000, -0.812000])},
{label: 'PALMA DE MALLORCA - PMI', layer: L.marker([39.550000, 2.733000])},
{label: 'PAMPLONA - PNA', layer: L.marker([42.770000, -1.646000])},
{label: 'REUS - REU', layer: L.marker([41.147000, 1.167000])},
{label: 'SALAMANCA - SLM', layer: L.marker([40.952000, -5.502000])},
{label: 'SAN SEBASTIAN - EAS', layer: L.marker([43.356000, -1.791000])},
{label: 'SANTA CRUZ DE LA PALMA - SPC', layer: L.marker([28.626000, -17.756000])},
{label: 'SANTANDER - SDR', layer: L.marker([43.427000, -3.820000])},
{label: 'SANTIAGO - SCQ', layer: L.marker([42.896000, -8.415000])},
{label: 'SEO DE URGEL - LEU', layer: L.marker([42.339000, 1.409000])},
{label: 'SEVILLA - OZP', layer: L.marker([37.175000, -5.616000])},
{label: 'SEVILLA - SVQ', layer: L.marker([37.418000, -5.893000])},
{label: 'VALENCIA - VLC', layer: L.marker([39.489000, -0.481000])},
{label: 'VALLADOLID - VLL', layer: L.marker([41.706000, -4.852000])},
{label: 'VIGO - VGO', layer: L.marker([42.232000, -8.627000])},
{label: 'VITORIA - VIT', layer: L.marker([42.883000, -2.724000])},
{label: 'ZARAGOZA - ZAZ', layer: L.marker([41.666000, -1.041000])},
]},
{label: 'FRANCE', children: [
{label: 'AGEN - AGF', layer: L.marker([44.175000, 0.591000])},
{label: 'AIX-LES-MILLES - QXB', layer: L.marker([43.505000, 5.368000])},
{label: 'ALBI - LBI', layer: L.marker([43.914000, 2.113000])},
{label: 'ANGOULEME - ANG', layer: L.marker([45.729000, 0.221000])},
{label: 'ANNECY - NCY', layer: L.marker([45.929000, 6.099000])},
{label: 'ANNEMASSE - QNJ', layer: L.marker([46.192000, 6.268000])},
{label: 'ARCACHON - XAC', layer: L.marker([44.596000, -1.111000])},
{label: 'AUBENAS-VALS-LANAS - OBS', layer: L.marker([44.544000, 4.372000])},
{label: 'AURILLAC - AUR', layer: L.marker([44.891000, 2.422000])},
{label: 'AUXERRE - AUF', layer: L.marker([47.850000, 3.497000])},
{label: 'AVIGNON - AVN', layer: L.marker([43.907000, 4.902000])},
{label: 'BEAUVAIS - BVA', layer: L.marker([49.454000, 2.113000])},
{label: 'BERGERAC - EGC', layer: L.marker([44.825000, 0.519000])},
{label: 'BEZIERS - BZR', layer: L.marker([43.324000, 3.356000])},
{label: 'BIARRITZ-BAYONNE - BIQ', layer: L.marker([43.468000, -1.523000])},
{label: 'BORDEAUX - BOD', layer: L.marker([44.828000, -0.716000])},
{label: 'BOURG - XBK', layer: L.marker([46.201000, 5.292000])},
{label: 'BOURGES - BOU', layer: L.marker([47.058000, 2.370000])},
{label: 'BREST - BES', layer: L.marker([48.448000, -4.418000])},
{label: 'BRIVE - BVE', layer: L.marker([45.151000, 1.469000])},
{label: 'CAEN - CFR', layer: L.marker([49.173000, -0.450000])},
{label: 'CALAIS - CQF', layer: L.marker([50.962000, 1.955000])},
{label: 'CANNES - CEQ', layer: L.marker([43.542000, 6.953000])},
{label: 'CARCASSONNE - CCF', layer: L.marker([43.216000, 2.306000])},
{label: 'CASTRES - DCM', layer: L.marker([43.556000, 2.289000])},
{label: 'CHALON - XCD', layer: L.marker([46.826000, 4.817000])},
{label: 'CHAMBERY - CMF', layer: L.marker([45.638000, 5.880000])},
{label: 'CHATEAUROUX - CHR', layer: L.marker([46.862000, 1.731000])},
{label: 'CHERBOURG - CER', layer: L.marker([49.650000, -1.470000])},
{label: 'CHOLET - CET', layer: L.marker([47.082000, -0.877000])},
{label: 'CLERMONT FERRAND - CFE', layer: L.marker([45.786000, 3.169000])},
{label: 'COGNAC - CNG', layer: L.marker([45.658000, -0.318000])},
{label: 'COLMAR - CMR', layer: L.marker([48.110000, 7.359000])},
{label: 'CREIL - CSF', layer: L.marker([49.253000, 2.519000])},
{label: 'DEAUVILLE - DOL', layer: L.marker([49.365000, 0.154000])},
{label: 'DIJON - DIJ', layer: L.marker([47.269000, 5.090000])},
{label: 'DINARD - DNR', layer: L.marker([48.588000, -2.080000])},
{label: 'DOLE - DLE', layer: L.marker([47.039000, 5.427000])},
{label: 'EPINAL - EPL', layer: L.marker([48.325000, 6.070000])},
{label: 'GRENOBLE - GNB', layer: L.marker([45.363000, 5.329000])},
{label: 'HYERES - TLN', layer: L.marker([43.097000, 6.146000])},
{label: 'LA ROCHE-SUR-YON - EDM', layer: L.marker([46.702000, -1.379000])},
{label: 'LA ROCHELLE - LRH', layer: L.marker([43.449000, 1.263000])},
{label: 'LANNION - LAI', layer: L.marker([48.754000, -3.471000])},
{label: 'LAVAL - LVA', layer: L.marker([48.031000, -0.743000])},
{label: 'LE CASTELLET - CTT', layer: L.marker([43.252000, 5.785000])},
{label: 'LE HAVRE - LEH', layer: L.marker([49.534000, 0.088000])},
{label: 'LE MANS - LME', layer: L.marker([47.949000, 0.202000])},
{label: 'LE PUY - LPY', layer: L.marker([45.079000, 3.765000])},
{label: 'LE TOURQUET - LTQ', layer: L.marker([50.515000, 1.627000])},
{label: 'LILLE - LIL', layer: L.marker([50.562000, 3.089000])},
{label: 'LIMOGES - LIG', layer: L.marker([45.863000, 1.179000])},
{label: 'LORIENT - LRT', layer: L.marker([47.761000, -3.440000])},
{label: 'LYON - LYN', layer: L.marker([45.728000, 4.945000])},
{label: 'LYON - LYS', layer: L.marker([45.726000, 5.091000])},
{label: 'MACON - QNX', layer: L.marker([46.295000, 4.796000])},
{label: 'MARSEILLE - MRS', layer: L.marker([43.436000, 5.214000])},
{label: 'MENDE - MEN', layer: L.marker([44.502000, 3.533000])},
{label: 'METZ - ETZ', layer: L.marker([48.982000, 6.254000])},
{label: 'METZ - MZM', layer: L.marker([49.072000, 6.132000])},
{label: 'MONTLUCON-GUERET - MCU', layer: L.marker([46.224000, 2.363000])},
{label: 'MONTLUCON - MCU', layer: L.marker([46.352000, 2.570000])},
{label: 'MONTPELLIER - MPL', layer: L.marker([43.576000, 3.963000])},
{label: 'MORLAIX - MXN', layer: L.marker([48.603000, -3.816000])},
{label: 'MOULINS - XMU', layer: L.marker([46.534000, 3.424000])},
{label: 'MULHOUSE - MLH', layer: L.marker([47.589000, 7.530000])},
{label: 'NANCY - ENC', layer: L.marker([48.692000, 6.230000])},
{label: 'NANTES - NTE', layer: L.marker([47.153000, -1.611000])},
{label: 'NEVERS - NVS', layer: L.marker([47.001000, 3.114000])},
{label: 'NICE - NCE', layer: L.marker([43.661000, 7.218000])},
{label: 'NIMES - FNI', layer: L.marker([43.757000, 4.416000])},
{label: 'NIORT - NIT', layer: L.marker([46.311000, -0.401000])},
{label: 'ORLEANS - ORE', layer: L.marker([47.988000, 1.761000])},
{label: 'PARIS - CDG', layer: L.marker([49.013000, 2.550000])},
{label: 'PARIS - LBG', layer: L.marker([48.969000, 2.441000])},
{label: 'PARIS - ORY', layer: L.marker([48.725000, 2.359000])},
{label: 'PAU - PUF', layer: L.marker([43.380000, -0.419000])},
{label: 'PERIGUEUX - PGX', layer: L.marker([45.198000, 0.816000])},
{label: 'PERPIGNAN - PGF', layer: L.marker([42.740000, 2.871000])},
{label: 'POITIERS - PIS', layer: L.marker([46.588000, 0.307000])},
{label: 'PONTOISE - POX', layer: L.marker([49.096000, 2.041000])},
{label: 'QUIMPER - UIP', layer: L.marker([47.975000, -4.168000])},
{label: 'REIMS - RHE', layer: L.marker([49.310000, 4.050000])},
{label: 'RENNES - RNS', layer: L.marker([48.069000, -1.735000])},
{label: 'ROANNE - RNE', layer: L.marker([46.058000, 4.001000])},
{label: 'ROCHEFORT - RCO', layer: L.marker([45.888000, -0.983000])},
{label: 'RODEZ - RDZ', layer: L.marker([44.408000, 2.482000])},
{label: 'ROUEN - URO', layer: L.marker([49.384000, 1.175000])},
{label: 'ROYAN - RYN', layer: L.marker([45.628000, -0.973000])},
{label: 'ST.-BRIEUC ARMOR - SBK', layer: L.marker([48.538000, -2.854000])},
{label: 'ST.-ETIENNE - EBU', layer: L.marker([45.540000, 4.296000])},
{label: 'ST.-NAZAIRE - SNR', layer: L.marker([47.312000, -2.149000])},
{label: 'STRASSBOURG - SXB', layer: L.marker([48.538000, 7.628000])},
{label: 'TARBES - LDE', layer: L.marker([43.179000, -0.006000])},
{label: 'TOULOUSE - TLS', layer: L.marker([43.629000, 1.364000])},
{label: 'TOURS - TUF', layer: L.marker([47.432000, 0.728000])},
{label: 'TOUSSOUS-LE-NOBLE - TNF', layer: L.marker([48.752000, 2.106000])},
{label: 'TROYES - QYR', layer: L.marker([48.323000, 4.018000])},
{label: 'VALENCE - VAF', layer: L.marker([44.921000, 4.970000])},
{label: 'VANNES - VNE', layer: L.marker([47.723000, -2.718000])},
{label: 'VICHY - VHY', layer: L.marker([46.169000, 3.404000])},
{label: 'VILEFRANCE - XVF', layer: L.marker([45.916000, 4.641000])},
]}
];
/* ends aiports */
ctl.setOverlayTree(airportsEurope).collapseTree(true).expandSelected(true);
</script>
</body>
</html>
@@ -0,0 +1,79 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Leaflet Layers Tree Basic Demo</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet-src.js" crossorigin=""></script>
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
#map { width: 100%; height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<link rel="stylesheet" href="../L.Control.Layers.Tree.css" crossorigin=""/>
<script src="../L.Control.Layers.Tree.js"></script>
<script type="text/javascript">
var center = [40, 0];
// Define some base layers
var osm = L.tileLayer(
'//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors'}
);
var osmBw = L.tileLayer(
'http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors'}
);
var otopomap = L.tileLayer(
'//{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors. OpenTopoMap.org'}
);
var thunderAttr = {attribution: '© OpenStreetMap contributors. Tiles courtesy of Andy Allan'}
var transport = L.tileLayer(
'//{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png',
thunderAttr
);
var cycle = L.tileLayer(
'//{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png',
thunderAttr
);
// The tree containing the layers
var baseTree = [
{
label: 'OpenStreeMap',
children: [
{label: 'OSM', layer: osm, name: 'OpenStreeMap'},
{label: 'B&W', layer: osmBw, name: 'OpenStreeMap <b>B&W</b>'},
{label: 'OpenTopoMap', layer: otopomap, name: 'Topographic - OSM'},
]
},
{
label: 'Thunder',
children: [
{label: 'Cycle', layer: cycle},
{label: 'Transport', layer: transport},
]
},
];
// The map
var map = L.map('map', {
layers: [osm],
center: center,
zoom: 5
});
L.control.layers.tree(baseTree).addTo(map);
</script>
</body>
</html>
@@ -0,0 +1,79 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Leaflet Layers Tree Basic Demo</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet-src.js" crossorigin=""></script>
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
#map { width: 100%; height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<link rel="stylesheet" href="../L.Control.Layers.Tree.css" crossorigin=""/>
<script src="../L.Control.Layers.Tree.js"></script>
<script type="text/javascript">
var center = [40, 0];
// Define some base layers
var osm = L.tileLayer(
'//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors'}
);
var osmBw = L.tileLayer(
'http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors'}
);
var otopomap = L.tileLayer(
'//{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors. OpenTopoMap.org'}
);
var thunderAttr = {attribution: '© OpenStreetMap contributors. Tiles courtesy of Andy Allan'}
var transport = L.tileLayer(
'//{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png',
thunderAttr
);
var cycle = L.tileLayer(
'//{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png',
thunderAttr
);
// The tree containing the layers
var baseTree = [
{
label: 'OpenStreeMap',
children: [
{label: 'OSM', layer: osm, name: 'OpenStreeMap'},
{label: 'B&W', layer: osmBw, name: 'OpenStreeMap <b>B&W</b>'},
{label: 'OpenTopoMap', layer: otopomap, name: 'Topographic - OSM'},
]
},
{
label: 'Thunder',
children: [
{label: 'Cycle', layer: cycle},
{label: 'Transport', layer: transport},
]
},
];
// The map
var map = L.map('map', {
layers: [osm],
center: center,
zoom: 5
});
L.control.layers.tree(baseTree).addTo(map);
</script>
</body>
</html>
@@ -0,0 +1,10 @@
<html>
<body>
<ul>
<li><a href="./basic.html">basic.html</a></li>
<li><a href="./options.html">options.html</a></li>
<li><a href="./airports.html">airports.html</a></li>
<li><a href="./basic_1.3.4.html">basic_1.3.4.html</a></li>
</ul>
</body>
</html>
@@ -0,0 +1,127 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Leaflet Layers Tree Demo</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css" crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet-src.js" crossorigin=""></script>
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
#map { width: 100%; height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<link rel="stylesheet" href="../L.Control.Layers.Tree.css" crossorigin=""/>
<script src="../L.Control.Layers.Tree.js"></script>
<script type="text/javascript">
var center = [40, 0];
var osm = L.tileLayer(
'//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors'}
);
var osmBw = L.tileLayer(
'http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors'}
);
var otopomap = L.tileLayer(
'//{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
{attribution: '© OpenStreetMap contributors. OpenTopoMap.org'}
);
var thunderAttr = {attribution: '© OpenStreetMap contributors. Tiles courtesy of Andy Allan'}
var transport = L.tileLayer(
'//{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png',
thunderAttr
);
var cycle = L.tileLayer(
'//{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png',
thunderAttr
);
var map = L.map('map', {
layers: [osm],
center: center,
zoom: 5
});
var baseTree = [
{
label: 'OpenStreeMap',
layer: osm,
children: [
{label: 'B&W', layer: osmBw, name: 'OpenStreeMap <b>B&W</b>'},
{label: 'OpenTopoMap', layer: otopomap, name: 'Topographic - OSM'},
]
},
{
label: 'Thunder',
children: [
{label: 'Cycle', layer: cycle},
{label: 'Transport', layer: transport},
]
},
];
var overlaysTree = {
label: 'Some cities',
children: [
{label: '<div id="onlysel">-Show only selected-</div>'},
{label: 'France', children: [
{label: 'Lyon', layer: L.marker([45.728, 4.945])},
{label: 'Paris', layer: L.marker([48.725, 2.359])},
{label: 'Toulouse', layer: L.marker([43.629, 1.364])},
]},
{label: 'Germany', children: [
{label: 'Berlin', layer: L.marker([52.559, 13.287])},
{label: 'Cologne', layer: L.marker([50.866, 7.143])},
{label: 'Hamburg', layer: L.marker([53.630, 9.988])},
{label: 'Munich', layer: L.marker([48.354, 11.786])},
]},
{label: 'Spain', children: [
{label: 'Madrid', layer: L.marker([40.472, -3.561])},
{label: 'Andalucia', children: [
{label: 'Granada', layer: L.marker([37.133, -3.636])},
{label: 'Málaga', layer: L.marker([36.674, -4.499])},
{label: 'Sevilla', layer: L.marker([37.418, -5.893])},
]},
{label: 'Bask Country', children: [
{label: '---', layer: L.layerGroup([]), radioGroup: 'bc'},
{label: 'Bilbao', layer: L.marker([43.301, -2.911]), radioGroup: 'bc'},
{label: 'San Sebastian', layer: L.marker([43.356, -1.791]), radioGroup: 'bc'},
{label: 'Vitoria', layer: L.marker([42.883, -2.724]), radioGroup: 'bc'},
]},
{label: 'Catalonia', children: [
{label: 'Barcelona', layer: L.marker([41.297, 2.078])},
{label: 'Gerona', layer: L.marker([41.901, 2.760])},
]},
]},
]
}
var lay = L.control.layers.tree(baseTree, overlaysTree,
{
namedToggle: true,
selectorBack: false,
closedSymbol: '&#8862; &#x1f5c0;',
openedSymbol: '&#8863; &#x1f5c1;',
collapseAll: 'Collapse all',
expandAll: 'Expand all',
});
lay.addTo(map).collapseTree().expandSelected().collapseTree(true);
L.DomEvent.on(L.DomUtil.get('onlysel'), 'click', function() {
lay.collapseTree(true).expandSelected(true);
});
</script>
</body>
</html>
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,46 @@
{
"name": "leaflet.control.layers.tree",
"version": "0.1.1",
"description": "Control Layers in a Tree structure",
"main": "L.Control.Layers.Tree.js",
"style": "L.Control.Layers.Tree.css",
"directories": {
"test": "test"
},
"license": "BSD-3-Clause",
"scripts": {
"lint": "eslint L.*.js test/* examples/*",
"lintfix": "eslint L.*.js test/* examples/* --fix",
"spec": "phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index.html",
"test": "npm run lint && npm run spec"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jjimenezshaw/Leaflet.Control.Layers.Tree.git"
},
"keywords": [
"Leaflet",
"map",
"geo",
"tree",
"control",
"layers"
],
"devDependencies": {
"blanket": "^1.2.3",
"chai": "~4.1.2",
"chai-leaflet": "^0.0.13",
"eslint": "^4.19.1",
"eslint-plugin-html": "^4.0.6",
"happen": "^0.3.2",
"leaflet": "^1.4.0",
"mocha": "^5.2.0",
"mocha-phantomjs-core": "^2.1.2",
"phantomjs-prebuilt": "^2.1.16"
},
"peerDependencies": {
"leaflet": "^1.1.0"
},
"author": "Javier Jimenez Shaw",
"readmeFilename": "README.md"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

@@ -0,0 +1,53 @@
<html>
<head>
<meta charset="utf-8">
<title>Leaflet.Control.Layers.Tree Tests</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
<link rel="stylesheet" href="../node_modules/leaflet/dist/leaflet.css" />
<link rel="stylesheet" href="../L.Control.Layers.Tree.css" />
<style>
.map, .label {
width: 400px;
height: 400px;
float: left;
}
.label {
width: 40px;
text-align: left;
font-size: 40px;
padding: 20px 30px;
}
#mocha {
clear: both;
}
</style>
</head>
<body>
<div id="maps">
<div id="mapA" class="map"></div>
</div>
<div id="mocha"></div>
<script src="../node_modules/leaflet/dist/leaflet.js"></script>
<script src="../L.Control.Layers.Tree.js" data-cover></script>
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/happen/happen.js"></script>
<script src="../node_modules/chai-leaflet/chai-leaflet.js"></script>
<!--script src="../node_modules/blanket/dist/mocha/blanket_mocha.js"></script-->
<script>
mocha.setup('bdd');
</script>
<script src="spec.js"></script>
<script>
mocha.globals(['L']);
(window.mochaPhantomJS || mocha).run();
</script>
</body>
</html>
@@ -0,0 +1,574 @@
'use strict';
var layerA = L.tileLayer('');
var layerB = L.tileLayer('');
function baseArray1() {
return [
{label: 'Leaf one', name: 'Name Leaf one', layer: L.tileLayer('')},
{label: 'Leaf two', name: 'Name Leaf two', layer: L.tileLayer('', {idx: 'two'})},
{
label: 'Node 1',
children: [
{label: 'Leaf 11', name: 'Name Leaf 11', layer: layerA},
{label: 'Leaf 12', layer: L.tileLayer('')}
]
},
{label: 'Leaf three', name: 'Name Leaf three', layer: layerB}
];
}
function baseArray2() {
return [
{label: 'Leaf one', name: 'Name Leaf one', layer: layerA},
{label: 'Leaf two', name: 'Name Leaf two', layer: layerB},
];
}
function baseTree1() {
return {
noShow: false,
label: 'Root node',
children: baseArray1()
};
}
var markerO = L.marker([0, 0]);
var markerA = L.marker([40, 0]);
var markerB = L.marker([0, 30]);
function overlaysArray1() {
return [
{label: 'Over one', name: 'Name Over one', layer: markerO},
{label: 'Over two', name: 'Name Over two', layer: L.layerGroup([])},
{
label: 'O Node 1',
children: [
{label: 'Over 11', name: 'Name Over 11', layer: markerA},
{label: 'Over 12', layer: L.layerGroup([])}
]
},
{label: 'Over three', name: 'Name Over three', layer: markerB}
]
}
function overlaysTree1() {
return {
noShow: false,
label: 'Root O node',
children: overlaysArray1()
};
}
function overlaysArray2() {
return [
{label: 'Over A', name: 'Name Over A', layer: markerA},
{label: 'Over B', name: 'Name Over B', layer: markerB},
];
}
function isHidden(el) {
// https://stackoverflow.com/questions/19669786/check-if-element-is-visible-in-dom
return (el.offsetParent === null)
}
function checkHidden(list, value, first) {
first = first || 0;
if (!Array.isArray(value)) {
var v = value;
value = [];
for (var i = 0; i < list.length; i++) value.push(v);
}
for (var i = first; i < list.length; i++) {
isHidden(list[i]).should.be.equal(!!value[i], 'position ' + i);
}
}
describe('L.Control.Layers.Tree', function() {
chai.should();
this.timeout(5000);
var map;
beforeEach(function() {
map && map.remove();
//map = L.map(document.createElement('div'));
map = L.map('mapA');
document.body.appendChild(map._container);
});
afterEach(function() {
//map.remove();
});
describe('Functions in place', function() {
beforeEach(function() {
map.setView([0, 0], 14);
});
it('L.Control.Layers.Tree has correct func', function() {
L.control.layers.tree.should.be.a('function');
});
it('L.control.layers.tree object creation', function() {
var t = L.control.layers.tree();
t.should.be.a('object');
});
});
describe('Disabled functions', function() {
var t = L.control.layers.tree();
var methods = [t.addBaseLayer, t.addOverlay, t.removeLayer];
methods.forEach(function(method) {
(function() {
method();
}).should.throw(method.name + ' is disabled');
});
});
describe('Simple base tests', function() {
beforeEach(function() {
map.setView([0, 0], 14);
});
it('they are there', function() {
var ctl = L.control.layers.tree(baseTree1(), null,
{collapsed: false}).addTo(map);
var inputs = map._container.querySelectorAll('.leaflet-control-layers-base input');
inputs.length.should.be.equal(5);
var headers = map._container.querySelectorAll('.leaflet-control-layers-base .leaflet-layerstree-header');
headers.length.should.be.equal(7);
checkHidden(headers, false, 0);
ctl.collapseTree();
checkHidden(headers, true, 1);
});
it('they are accesible on mouseover', function() {
var ctrl = L.control.layers.tree(baseTree1()).addTo(map);
var inputs = map._container.querySelectorAll('.leaflet-control-layers-base input');
inputs.length.should.be.equal(5);
var headers = map._container.querySelectorAll('.leaflet-control-layers-base .leaflet-layerstree-header');
headers.length.should.be.equal(7);
// Nothing visible because the contrl is collapsed
checkHidden(inputs, true, 0);
checkHidden(headers, true, 0);
// mouse over the control to show it.
happen.once(ctrl._container, {type: 'mouseover'});
checkHidden(inputs, false, 0);
checkHidden(headers, false, 0);
// Hi, let it as you found it.
happen.once(ctrl._container, {type: 'mouseout'});
});
});
describe('Simple base tests with array', function() {
beforeEach(function() {
map.setView([0, 0], 14);
});
it('they are accesible on mouseover', function() {
var ctrl = L.control.layers.tree(baseArray1()).addTo(map);
var inputs = map._container.querySelectorAll('.leaflet-control-layers-base input');
inputs.length.should.be.equal(5);
var headers = map._container.querySelectorAll('.leaflet-control-layers-base .leaflet-layerstree-header');
headers.length.should.be.equal(7); // The root is hidden, but it is there
// Nothing visible because the contrl is collapsed
checkHidden(inputs, true, 0);
checkHidden(headers, true, 0);
// mouse over the control to show it.
happen.once(ctrl._container, {type: 'mouseover'});
checkHidden(inputs, false, 0);
checkHidden(headers, false, 1);
checkHidden(headers, [1, 0, 0, 0, 0, 0, 0], 0); // see, root is hidden!
// Hi, let it as you found it.
happen.once(ctrl._container, {type: 'mouseout'});
});
});
describe('Simple overlays tests', function() {
beforeEach(function() {
map.setView([0, 0], 1);
});
it('they are there', function() {
var ctl = L.control.layers.tree(null, overlaysTree1(),
{collapsed: false}).addTo(map);
var inputs = map._container.querySelectorAll('.leaflet-control-layers-overlays input');
inputs.length.should.be.equal(5);
var headers = map._container.querySelectorAll('.leaflet-control-layers-overlays .leaflet-layerstree-header');
headers.length.should.be.equal(7);
checkHidden(headers, false, 0);
ctl.collapseTree(true);
checkHidden(headers, true, 1);
});
it('they are accesible on mouseover', function() {
var ctrl = L.control.layers.tree(null, overlaysTree1()).addTo(map);
var inputs = map._container.querySelectorAll('.leaflet-control-layers-overlays input');
inputs.length.should.be.equal(5);
var headers = map._container.querySelectorAll('.leaflet-control-layers-overlays .leaflet-layerstree-header');
headers.length.should.be.equal(7);
// Nothing visible because the contrl is collapsed
checkHidden(inputs, true, 0);
checkHidden(headers, true, 0);
// mouse over the control to show it.
happen.once(ctrl._container, {type: 'mouseover'});
checkHidden(inputs, false, 0);
checkHidden(headers, false, 0);
// Hi, let it as you found it.
happen.once(ctrl._container, {type: 'mouseout'});
});
});
describe('Simple overlays array tests', function() {
beforeEach(function() {
map.setView([0, 0], 1);
});
it('they are accesible on mouseover', function() {
var ctrl = L.control.layers.tree(null, overlaysArray1()).addTo(map);
var inputs = map._container.querySelectorAll('.leaflet-control-layers-overlays input');
inputs.length.should.be.equal(5);
var headers = map._container.querySelectorAll('.leaflet-control-layers-overlays .leaflet-layerstree-header');
headers.length.should.be.equal(7);
// Nothing visible because the contrl is collapsed
checkHidden(inputs, true, 0);
checkHidden(headers, true, 0);
// mouse over the control to show it.
happen.once(ctrl._container, {type: 'mouseover'});
checkHidden(inputs, false, 0);
checkHidden(headers, false, 1);
checkHidden(headers, [1, 0, 0, 0, 0, 0, 0], 0);
// Hi, let it as you found it.
happen.once(ctrl._container, {type: 'mouseout'});
});
});
describe('Select', function() {
beforeEach(function() {
map.setView([0, 0], 14);
});
it('sel layer B and A', function() {
var ctl = L.control.layers.tree(baseTree1(), null, {collapsed: false}).addTo(map);
var headers = map._container.querySelectorAll('.leaflet-control-layers-base .leaflet-layerstree-header');
headers.length.should.be.equal(7);
happen.click(headers[6].querySelector('label'));
map._layers[L.Util.stamp(layerB)].should.be.equal(layerB);
happen.click(headers[4].querySelector('label'));
map._layers[L.Util.stamp(layerA)].should.be.equal(layerA);
});
});
describe('Labels', function() {
beforeEach(function() {
map.setView([0, 0], 1);
});
it('labels base', function() {
var ctl = L.control.layers.tree(baseTree1(), null, {collapsed: false}).addTo(map);
var headers = map._container.querySelectorAll('.leaflet-control-layers-base .leaflet-layerstree-header');
headers[3].querySelector('.leaflet-layerstree-header-name').outerText.should.be.equal('Node 1');
headers[4].querySelector('.leaflet-layerstree-header-name').outerText.should.be.equal('Leaf 11');
headers[6].querySelector('.leaflet-layerstree-header-name').outerText.should.be.equal('Leaf three');
});
});
describe('Expand and collapse', function() {
beforeEach(function() {
map.setView([0, 0], 1);
});
it('Show only selected', function() {
var ctrl = L.control.layers.tree(baseTree1(), null, {collapsed: false}).addTo(map);
map.addLayer(layerB);
var headers = map._container.querySelectorAll('.leaflet-control-layers-base .leaflet-layerstree-header');
headers.length.should.be.equal(7);
checkHidden(headers, false, 0);
ctrl.collapseTree().expandSelected(false);
checkHidden(headers, [0, 0, 0, 0, 1, 1, 0], 0);
});
it('Collapse', function() {
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false}).addTo(map);
map.addLayer(layerB);
var headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(14);
checkHidden(headers, false, 0);
ctrl.collapseTree();
checkHidden(headers, [0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], 0);
ctrl.collapseTree(true);
checkHidden(headers, [0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1], 0);
});
it('Expand', function() {
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false}).addTo(map);
map.addLayer(layerB);
var headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(14);
checkHidden(headers, false, 0);
ctrl.collapseTree().collapseTree(true);
ctrl.expandTree();
checkHidden(headers, [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 0);
ctrl.expandTree(true);
checkHidden(headers, 0, 0);
});
});
describe('Names', function() {
beforeEach(function() {
map.setView([0, 0], 1);
});
it('Named Toogle', function() {
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {namedToggle: true}).addTo(map);
map.addLayer(layerB);
var toggle = map._container.querySelector('.leaflet-control-layers-toggle');
toggle.innerHTML.should.be.equal('Name Leaf three');
var inputs = map._container.querySelectorAll('.leaflet-control-layers-list input');
happen.click(inputs[0]);
toggle.innerHTML.should.be.equal('Name Leaf one');
happen.click(inputs[2]);
toggle.innerHTML.should.be.equal('Name Leaf 11');
happen.click(inputs[8]);
toggle.innerHTML.should.be.equal('Name Leaf 11');
});
});
describe('Symbols', function() {
beforeEach(function() {
map.setView([0, 0], 1);
});
it('Defaults', function() {
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false}).addTo(map);
var items = map._container.querySelectorAll('.leaflet-layerstree-closed');
items.length.should.be.equal(14);
for (var i = 0; i < items.length; i++) {
items[i].innerHTML.should.be.equal('+');
}
items = map._container.querySelectorAll('.leaflet-layerstree-opened');
items.length.should.be.equal(14);
for (var i = 0; i < items.length; i++) {
items[i].innerHTML.should.be.equal('−');
}
items = map._container.querySelectorAll('.leaflet-layerstree-header-space');
items.length.should.be.equal(14);
for (var i = 0; i < items.length; i++) {
items[i].innerHTML.should.be.equal(' ');
}
});
it('Closed', function() {
var symbol = '^';
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false, closedSymbol: symbol}).addTo(map);
map.addLayer(layerB);
var items = map._container.querySelectorAll('.leaflet-layerstree-closed');
items.length.should.be.equal(14);
for (var i = 0; i < items.length; i++) {
items[i].innerHTML.should.be.equal(symbol);
}
});
it('Opened', function() {
var symbol = 'v';
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false, openedSymbol: symbol}).addTo(map);
var items = map._container.querySelectorAll('.leaflet-layerstree-opened');
items.length.should.be.equal(14);
for (var i = 0; i < items.length; i++) {
items[i].innerHTML.should.be.equal(symbol);
}
});
it('Space', function() {
var symbol = '_*_';
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false, spaceSymbol: symbol}).addTo(map);
var items = map._container.querySelectorAll('.leaflet-layerstree-header-space');
items.length.should.be.equal(14);
for (var i = 0; i < items.length; i++) {
items[i].innerHTML.should.be.equal(symbol);
}
});
});
describe('Selector back', function() {
beforeEach(function() {
map.setView([0, 0], 1);
});
it('Default', function() {
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false}).addTo(map);
var headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(14);
for (var h = 0; h < headers.length; h++) {
var things = [];
var keys = ['closed', 'opened', 'space', 'label']
var items = headers[h].querySelectorAll('span, label, div');
for (var i = 0; i < items.length; i++) {
keys.forEach(function(key) {
if (items[i].className.indexOf(key) > 0) {
things.push(key);
}
});
}
things[2].should.be.equal('space');
things[3].should.be.equal('label');
}
});
it('Back', function() {
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false, selectorBack: true}).addTo(map);
var headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(14);
for (var h = 0; h < headers.length; h++) {
var things = [];
var keys = ['closed', 'opened', 'space', 'label']
var items = headers[h].querySelectorAll('span, label, div');
for (var i = 0; i < items.length; i++) {
keys.forEach(function(key) {
if (items[i].className.indexOf(key) > 0) {
things.push(key);
}
});
}
things[1].should.be.equal('space');
things[0].should.be.equal('label');
}
});
});
describe('Expand and collapse all', function() {
beforeEach(function() {
map.setView([0, 0], 1);
});
it('expandAll', function() {
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false, expandAll: 'exp'}).addTo(map);
ctrl.collapseTree().collapseTree(true);
var headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(14);
checkHidden(headers, [0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1], 0);
var ct = map._container.querySelectorAll('.leaflet-layerstree-expand-collapse');
ct.length.should.be.equal(2);
happen.click(ct[0]);
checkHidden(headers, [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], 0);
happen.click(ct[1]);
checkHidden(headers, false, 0);
});
it('collapseAll', function() {
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false, collapseAll: 'col'}).addTo(map);
ctrl.expandTree().expandTree(true);
var headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(14);
checkHidden(headers, false, 0);
var ct = map._container.querySelectorAll('.leaflet-layerstree-expand-collapse');
ct.length.should.be.equal(2);
happen.click(ct[0]);
checkHidden(headers, [0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], 0);
happen.click(ct[1]);
checkHidden(headers, [0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1], 0);
});
it('Empties', function() {
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false, collapseAll: '', expandAll: ''}).addTo(map);
var ct = map._container.querySelectorAll('.leaflet-layerstree-expand-collapse');
ct.length.should.be.equal(0);
});
it('All', function() {
var ctrl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false, collapseAll: 'col', expandAll: 'exp'}).addTo(map);
var ct = map._container.querySelectorAll('.leaflet-layerstree-expand-collapse');
ct.length.should.be.equal(4);
});
it('Arrays', function() {
var ctrl = L.control.layers.tree(baseArray1(), overlaysArray1(), {collapsed: false, collapseAll: 'col'}).addTo(map);
var ct = map._container.querySelectorAll('.leaflet-layerstree-expand-collapse');
var headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(14);
checkHidden(headers, [1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], 0);
var ct = map._container.querySelectorAll('.leaflet-layerstree-expand-collapse');
ct.length.should.be.equal(2);
happen.click(ct[0]);
checkHidden(headers, [1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0], 0);
happen.click(ct[1]);
checkHidden(headers, [1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0], 0);
});
});
describe('Reset trees', function() {
beforeEach(function() {
map.setView([0, 0], 1);
});
it('case 1', function() {
var ctl = L.control.layers.tree(baseArray2(), null, {collapsed: false}).addTo(map);
map.addLayer(layerB);
map._layers[L.Util.stamp(layerB)].should.be.equal(layerB);
var headers = map._container.querySelectorAll('.leaflet-control-layers-base .leaflet-layerstree-header');
headers.length.should.be.equal(3); // including the hidden root
ctl.setBaseTree(baseTree1());
map._layers[L.Util.stamp(layerB)].should.be.equal(layerB);
headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(7)
happen.click(headers[4].querySelector('label'));
map._layers[L.Util.stamp(layerA)].should.be.equal(layerA);
});
it('case 2', function() {
var ctl = L.control.layers.tree(baseArray2(), overlaysTree1(), {collapsed: false}).addTo(map);
map.addLayer(layerB);
map._layers[L.Util.stamp(layerB)].should.be.equal(layerB);
var headers = map._container.querySelectorAll('.leaflet-control-layers-base .leaflet-layerstree-header');
headers.length.should.be.equal(3); // including the hidden root
ctl.setBaseTree(baseTree1());
map._layers[L.Util.stamp(layerB)].should.be.equal(layerB);
headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(14)
});
it('case 3', function() {
var ctl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false}).addTo(map);
map.addLayer(layerB);
map.addLayer(markerA);
map._layers[L.Util.stamp(layerB)].should.be.equal(layerB);
map._layers[L.Util.stamp(markerA)].should.be.equal(markerA);
var headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(14);
var inputs = map._container.querySelectorAll('.leaflet-layerstree-header input');
inputs.length.should.be.equal(10);
inputs[4].checked.should.be.true;
inputs[7].checked.should.be.true;
ctl.setBaseTree(baseArray2());
map._layers[L.Util.stamp(layerB)].should.be.equal(layerB);
map._layers[L.Util.stamp(markerA)].should.be.equal(markerA);
headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(10)
inputs = map._container.querySelectorAll('.leaflet-layerstree-header input');
inputs.length.should.be.equal(7);
inputs[1].checked.should.be.true;
inputs[4].checked.should.be.true;
ctl.setOverlayTree(overlaysArray2());
map._layers[L.Util.stamp(layerB)].should.be.equal(layerB);
map._layers[L.Util.stamp(markerA)].should.be.equal(markerA);
headers = map._container.querySelectorAll('.leaflet-layerstree-header');
headers.length.should.be.equal(6)
inputs = map._container.querySelectorAll('.leaflet-layerstree-header input');
inputs.length.should.be.equal(4);
inputs[1].checked.should.be.true;
inputs[2].checked.should.be.true;
});
it('case 4', function() {
var ctl = L.control.layers.tree(baseTree1(), overlaysTree1(), {collapsed: false}).addTo(map);
map.addLayer(layerB);
map.addLayer(markerO);
map._layers[L.Util.stamp(layerB)].should.be.equal(layerB);
map._layers[L.Util.stamp(markerO)].should.be.equal(markerO);
ctl.setOverlayTree(overlaysArray2());
map._layers[L.Util.stamp(layerB)].should.be.equal(layerB);
map._layers[L.Util.stamp(markerO)].should.be.equal(markerO);
var inputs = map._container.querySelectorAll('.leaflet-layerstree-header input');
inputs.length.should.be.equal(7);
inputs[5].checked.should.be.false;
inputs[6].checked.should.be.false;
});
});
});
+112
View File
@@ -0,0 +1,112 @@
<?php
define ("GEO_EARTH_RADIUS" , 6371.0); // in km
define ("DIST_LAT_KM", acos(sin(deg2rad(0)) * sin(deg2rad(1)) + cos(deg2rad(0)) * cos(deg2rad(1)) * cos(deg2rad(0) - deg2rad(0))) * GEO_EARTH_RADIUS); // 111.19492664455 km
function getDirection($loc_long, $loc_lat, $prev_loc_long, $prev_loc_lat)
{
global $diff_str, $distLongKm;
// http://www.stern.de/noch-fragen/wie-gross-ist-der-abstand-zwischen-zwei-breitengraden-1000307782.html
// "Der Abstand zwischen zwei Breitengraden ist immer gleich und entspricht 111,32 km. Der Abstand zwischen zwei Breitengradminuten ist eine Seemeile = 1,85 km.
// Der Abstand zwischen zwei Längengraden ist am Äquator auch 111,32 km, nimmt aber umso weiter man nach Norden oder Süden kommt immer weiter ab. In Europa könnte man für grobe Berechnungen mit 70 km rechnen."
// Anmerkung: 111,32 km als Abstand zwischen zwei Breitengraden stimmt natürlich nicht ganz, da durch die Abplattung an den Polen der Abstand dort minimal kürzer ist.
// D.h. der Erdradius nimmt zu den Polen hin leicht ab. Für die Berechnung des ortsabhängigen Abstandes zwischen den Längen- und Breitengraden wird mit GEO_EARTH_RADIUS
// aus Vereinfachungsgründen der durschnittliche Erdradius genommen. Da der Abstand zwischen zwei Breitengraden nur vom Erdradius abhängig ist und daher durch GEO_EARTH_RADIUS in diesem Skript immer gleich ist,
// wird er nur einmal berechnet und fortan als Konstante verwendet
$distLongKm = acos(sin(deg2rad($loc_lat)) * sin(deg2rad($loc_lat)) + cos(deg2rad($loc_lat)) * cos(deg2rad($loc_lat)) * cos(deg2rad(0) - deg2rad(1))) * GEO_EARTH_RADIUS;
//echo "$loc_long: " . DIST_LAT_KM . ", $loc_lat: $distLongKm<br>\n";
// --- Richtungsbestimmung ---
// Achtung: Punkte liegen in zeitlich absteigender Reihenfolge vor
// Betrag in km und Richtungsbestimmung der Bewegung in der Länge: Osten oder Westen
$diff_long = ($loc_long - $prev_loc_long) * $distLongKm;
$move_long = "o";
$diff_rel_start = 0;
if ($diff_long >= 0) {
$move_long = "w";
$diff_rel_start = -360;
}
// Betrag in km und Richtungsbestimmung der Bewegung in der Breite: Norden oder Süden
$diff_lat = ($loc_lat - $prev_loc_lat) * DIST_LAT_KM;
$move_lat = "n";
if ($diff_lat >= 0) {
$move_lat = "s";
$diff_rel_start = -180;
if ($move_long == "w")
$diff_rel_start = 180;
}
$diff_str = "(" . str_replace(".", ",", sprintf("%01.3f", abs($diff_long))) . " km nach " . strtoupper($move_long) . ",<br>" . str_replace(".", ",", sprintf("%01.3f", abs($diff_lat))) . " km nach " . strtoupper($move_lat) . ")<br>";
// Bestimmung der Hauptrichtung der Bewegung in Länge oder Breite
if (abs($diff_lat) > abs($diff_long)) {
// Betrag der Bewegung in der Breite (nach Norden/Süden) ist größer als die in der Länge (nach Osten/Westen)
$direction = $move_lat;
$diff_rel = abs($diff_long) / abs($diff_lat);
if ($diff_rel >= 0.25 && $diff_rel < 0.75)
$direction .= $move_lat . $move_long;
if ($diff_rel >= 0.75)
$direction .= $move_long;
} else {
// Betrag der Bewegung in der Länge (nach Osten/Westen) ist größer als die in der Breite (nach Norden/Süden)
$direction = $move_long;
$diff_rel = abs($diff_lat) / abs($diff_long);
if ($diff_rel >= 0.25 && $diff_rel < 0.75)
$direction .= $move_lat . $move_long;
if ($diff_rel >= 0.75)
$direction = $move_lat . $direction;
$diff_rel_start = -90;
if ($diff_long >= 0) {
$diff_rel_start = 270;
}
if ($diff_lat >= 0) {
$diff_rel_start = 90;
if ($move_long == "w")
$diff_rel_start = -270;
}
}
// die Werte in $diff_rel_start sind größtenteils falsch, müssen noch korrigiert werden, bevor die Grad-Angabe ausgegeben werden kann
$diff_str = "Richtung: " /* . "<br>" . $diff_rel_start . " + " . sprintf("%01.0f", $diff_rel * 45) */ . "" . sprintf("%01.0f", abs(($diff_rel_start + $diff_rel * 45) * 10) / 10) . "° " . strtoupper($direction) . "<br>" . $diff_str;
// --- ---
// return "../images/arrow_" . $direction . ".png";
return $direction;
}
function getVelocity($loc_long, $loc_lat, $loc_time, $prev_loc_long, $prev_loc_lat, $prev_loc_time)
{
if ($loc_time == "1970-01-01 01:00:00" || $prev_loc_time == "1970-01-01 01:00:00")
return "?";
$distKm = acos(sin(deg2rad($loc_lat)) * sin(deg2rad($prev_loc_lat)) + cos(deg2rad($loc_lat)) * cos(deg2rad($prev_loc_lat)) * cos(deg2rad($prev_loc_long) - deg2rad($loc_long))) * GEO_EARTH_RADIUS;
//echo "$loc_long, $loc_lat, $loc_time, $prev_loc_long, $prev_loc_lat, $prev_loc_time, $distKm , " . (strtotime($prev_loc_time) - strtotime($loc_time)) . ", " . (($distKm / (strtotime($prev_loc_time) - strtotime($loc_time))) * 3600) . "<br>";
return round(($distKm / (strtotime($prev_loc_time) - strtotime($loc_time))) * 3600);
}
function getLocatingType($cr_gps_type) {
$cr_gps_type_text = "";
if ($cr_gps_type == 0) {
$cr_gps_type_text = "unbestimmt";
} elseif ($cr_gps_type == 1) {
$cr_gps_type_text = "LBS";
} elseif ($cr_gps_type == 2) {
$cr_gps_type_text = "GPS";
} elseif ($cr_gps_type == 3) {
$cr_gps_type_text = "Network";
} elseif ($cr_gps_type == 9) {
$cr_gps_type_text = "Ortung aus";
}
return $cr_gps_type_text;
}
function formDateTime($sqlDate) {
global $today;
return substr($sqlDate, 8, 2) . "." . substr($sqlDate, 5, 2) . "." . substr($sqlDate, 0, 4) . ", " . substr($sqlDate, 11, 8);
}
?>
@@ -0,0 +1,44 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [3.3.0] - 2018-03-14
- ADDED: `options.style` to use [custom map styles](https://msdn.microsoft.com/en-us/library/mt823632.aspx)
- ADDED: `AerialWithLabelsOnDemand` imagery set
- ADDED: `minNativeZoom` and `maxNativeZoom` options
- FIXED: imageryProviders error [#25](https://github.com/digidem/leaflet-bing-layer/pull/25)
## [v3.2.0] - 2017-08-09
- CHANGED: Use `https` requests
- ADDED: Additional imagery sets (`RoadOnDemand`, `CanvasLight`, `CanvasDark`, `CanvasGray`, `OrdnanceSurvey`)
## [v3.1.0] - 2016-04-29
- ADDED: Use `https` for Bing API requests.
## [v3.0.1] - 2015-12-13
- FIXED: options.BingMapsKey backwards compatability
- FIXED: options.bingMapsKey was not working for getMetaData
- FIXED: catch errors (and log to console) for jsonp
## [v3.0.0] - 2015-12-08
- FIXED: **[BREAKING]** Export factory function on `L.tileLayer.bing` not `L.TileLayer.bing`
- CHANGED: BingMapsKey is now passed on `options.bingMapsKey` (`options.BingMapsKey` will still work, but for convention this should start with a lowercase character)
- IMPROVED: Package with browserify and require dependencies
- IMPROVED: Throws error if invalid imagerySet is passed as option
- ADDED: `getMetaData` method
## v2.0.2 - 2015-12-03
Initial release
[Unreleased]: https://github.com/digidem/leaflet-bing-layer/compare/v3.2.0...HEAD
[v3.2.0]: https://github.com/digidem/leaflet-bing-layer/compare/v3.1.0...v3.2.0
[v3.1.0]: https://github.com/digidem/leaflet-bing-layer/compare/v3.0.1...v3.1.0
[v3.0.1]: https://github.com/digidem/leaflet-bing-layer/compare/v3.0.0...v3.0.1
[v3.0.0]: https://github.com/digidem/leaflet-bing-layer/compare/v2.0.2...v3.0.0
@@ -0,0 +1,43 @@
# leaflet-bing-layer
Bing Maps Layer for Leaflet v1.0.0
### L.TileLayer.Bing(options|BingMapsKey)
Create a new Bing Maps Layer. Depends on [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which needs a polyfill for [older browsers](http://caniuse.com/#feat=promises) by adding this script to your html `<head>`:
```html
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script>
```
### Parameters
| parameter | type | description |
| ----------------------------- | -------------- | ----------------------------------------------------------------------------------------------------- |
| `options` | string\|object | A valid [Bing Maps Key](https://msdn.microsoft.com/en-us/library/ff428642.aspx) or an `options` object. `options` inherits from [L.TileLayer options](http://mourner.github.io/Leaflet/reference.html#tilelayer-options) (e.g. you can use `minZoom` and `opacity` and etc) |
| `options.bingMapsKey` | string | A valid Bing Maps Key [_required_] |
| `[options.imagerySet]` | string | _optional:_ [Imagery Type](https://msdn.microsoft.com/en-us/library/ff701716.aspx) [_default=Aerial_]<br>- `Aerial` - Aerial imagery<br>- `AerialWithLabels` - Aerial imagery with a road overlay<br>- `AerialWithLabelsOnDemand` - Aerial imagery with on-demand road overlay.<br>- `CanvasDark` - A dark version of the road maps.<br>- `CanvasLight` - A lighter version of the road maps which also has some of the details such as hill shading disabled.<br>- `CanvasGray` - A grayscale version of the road maps.<br>- `Road` - Roads without additional imagery. Uses the legacy static tile service.<br>- `RoadOnDemand` - Roads without additional imagery. Uses the dynamic tile service.<br>- `OrdnanceSurvey` - Ordnance Survey imagery. This imagery is visible only for the London area.<br>**[Not supported](https://social.msdn.microsoft.com/Forums/en-US/3d80d4a6-f4c9-4926-a336-e0d545b1ef3c/is-it-possible-to-retrieve-birdseye-map-tiles-using-rest-services?forum=bingmapsservices)**: `Birdseye` and `BirdseyeWithLabels` |
| `[options.culture]` | string | _optional:_ Language for labels, [see options](https://msdn.microsoft.com/en-us/library/hh441729.aspx) [_default=en_US_] |
| `[options.style]` | string | _optional:_ Use a [custom map style](https://msdn.microsoft.com/en-us/library/mt823632.aspx) - only works with the `AerialWithLabelsOnDemand` and `RoadOnDemand` imagerySet options. |
Other options are passed through to a [Leaflet TileLayer](http://leafletjs.com/reference-1.3.0.html#tilelayer-l-tilelayer)
### Methods
| Method | Returns | Description |
| ---------- | -------------- | ------------- |
| `getMetaData(<LatLng> latlng, <Number> zoom)` | `Promise` | Get the [Bing Imagery metadata](https://msdn.microsoft.com/en-us/library/ff701712.aspx) for a specific [`LatLng`](http://leafletjs.com/reference.html#latlng) and zoom level. `latLng` or `zoom` are optional *if* the layer is attached to a map, they default to current map center and zoom. Returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that resolves to the metadata JSON from Bing |
### Example
```js
var map = L.map('map').setView([51.505, -0.09], 13)
L.tileLayer.bing(MyBingMapsKey).addTo(map)
```
[Live Example](http://digidem.github.io/leaflet-bing-layer/) see [index.html](index.html)
### License
MIT
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui' />
<title>Leaflet Bing Maps Layer</title>
<script src='http://cdn.leafletjs.com/leaflet/v1.0.0-rc.1/leaflet.js'></script>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script>
<script src="leaflet-bing-layer.js"></script>
<link href='http://cdn.leafletjs.com/leaflet/v1.0.0-rc.1/leaflet.css' rel='stylesheet' />
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id='map'></div>
<script>
var BING_KEY = 'AuhiCJHlGzhg93IqUH_oCpl_-ZUrIE6SPftlyGYUvr9Amx5nzA-WqGcPquyFZl4L'
var map = L.map('map').setView([51.505, -0.09], 13)
var bingLayer = L.tileLayer.bing(BING_KEY).addTo(map)
</script>
</body>
</html>
@@ -0,0 +1,276 @@
var L = require('leaflet')
var fetchJsonp = require('fetch-jsonp')
var bboxIntersect = require('bbox-intersect')
/**
* Converts tile xyz coordinates to Quadkey
* @param {Number} x
* @param {Number} y
* @param {Number} z
* @return {Number} Quadkey
*/
function toQuadKey (x, y, z) {
var index = ''
for (var i = z; i > 0; i--) {
var b = 0
var mask = 1 << (i - 1)
if ((x & mask) !== 0) b++
if ((y & mask) !== 0) b += 2
index += b.toString()
}
return index
}
/**
* Converts Leaflet BBoxString to Bing BBox
* @param {String} bboxString 'southwest_lng,southwest_lat,northeast_lng,northeast_lat'
* @return {Array} [south_lat, west_lng, north_lat, east_lng]
*/
function toBingBBox (bboxString) {
var bbox = bboxString.split(',')
return [bbox[1], bbox[0], bbox[3], bbox[2]]
}
var VALID_IMAGERY_SETS = [
'Aerial',
'AerialWithLabels',
'AerialWithLabelsOnDemand',
'Road',
'RoadOnDemand',
'CanvasLight',
'CanvasDark',
'CanvasGray',
'OrdnanceSurvey'
]
var DYNAMIC_IMAGERY_SETS = [
'AerialWithLabelsOnDemand',
'RoadOnDemand'
]
/**
* Create a new Bing Maps layer.
* @param {string|object} options Either a [Bing Maps Key](https://msdn.microsoft.com/en-us/library/ff428642.aspx) or an options object
* @param {string} options.BingMapsKey A valid Bing Maps Key (required)
* @param {string} [options.imagerySet=Aerial] Type of imagery, see https://msdn.microsoft.com/en-us/library/ff701716.aspx
* @param {string} [options.culture='en-US'] Language for labels, see https://msdn.microsoft.com/en-us/library/hh441729.aspx
* @return {L.TileLayer} A Leaflet TileLayer to add to your map
*
* Create a basic map
* @example
* var map = L.map('map').setView([51.505, -0.09], 13)
* L.TileLayer.Bing(MyBingMapsKey).addTo(map)
*/
L.TileLayer.Bing = L.TileLayer.extend({
options: {
bingMapsKey: null, // Required
imagerySet: 'Aerial',
culture: 'en-US',
minZoom: 1,
minNativeZoom: 1,
maxNativeZoom: 19
},
statics: {
METADATA_URL: 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}?key={bingMapsKey}&include=ImageryProviders&uriScheme=https&c={culture}',
POINT_METADATA_URL: 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}/{lat},{lng}?zl={z}&key={bingMapsKey}&uriScheme=https&c={culture}'
},
initialize: function (options) {
if (typeof options === 'string') {
options = { bingMapsKey: options }
}
if (options && options.BingMapsKey) {
options.bingMapsKey = options.BingMapsKey
console.warn('use options.bingMapsKey instead of options.BingMapsKey')
}
if (!options || !options.bingMapsKey) {
throw new Error('Must supply options.BingMapsKey')
}
options = L.setOptions(this, options)
if (VALID_IMAGERY_SETS.indexOf(options.imagerySet) < 0) {
throw new Error("'" + options.imagerySet + "' is an invalid imagerySet, see https://github.com/digidem/leaflet-bing-layer#parameters")
}
if (options && options.style && DYNAMIC_IMAGERY_SETS.indexOf(options.imagerySet) < 0) {
console.warn('Dynamic styles will only work with these imagerySet choices: ' + DYNAMIC_IMAGERY_SETS.join(', '))
}
var metaDataUrl = L.Util.template(L.TileLayer.Bing.METADATA_URL, {
bingMapsKey: this.options.bingMapsKey,
imagerySet: this.options.imagerySet,
culture: this.options.culture
})
this._imageryProviders = []
this._attributions = []
// Keep a reference to the promise so we can use it later
this._fetch = fetchJsonp(metaDataUrl, {jsonpCallback: 'jsonp'})
.then(function (response) {
return response.json()
})
.then(this._metaDataOnLoad.bind(this))
.catch(console.error.bind(console))
// for https://github.com/Leaflet/Leaflet/issues/137
if (!L.Browser.android) {
this.on('tileunload', this._onTileRemove)
}
},
createTile: function (coords, done) {
var tile = document.createElement('img')
L.DomEvent.on(tile, 'load', L.bind(this._tileOnLoad, this, done, tile))
L.DomEvent.on(tile, 'error', L.bind(this._tileOnError, this, done, tile))
if (this.options.crossOrigin) {
tile.crossOrigin = ''
}
/*
Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons
http://www.w3.org/TR/WCAG20-TECHS/H67
*/
tile.alt = ''
// Don't create closure if we don't have to
if (this._url) {
tile.src = this.getTileUrl(coords)
} else {
this._fetch.then(function () {
tile.src = this.getTileUrl(coords)
}.bind(this)).catch(function (e) {
console.error(e)
done(e)
})
}
return tile
},
getTileUrl: function (coords) {
var quadkey = toQuadKey(coords.x, coords.y, coords.z)
var url = L.Util.template(this._url, {
quadkey: quadkey,
subdomain: this._getSubdomain(coords),
culture: this.options.culture
})
if (typeof this.options.style === 'string') {
url += '&st=' + this.options.style
}
return url
},
// Update the attribution control every time the map is moved
onAdd: function (map) {
map.on('moveend', this._updateAttribution, this)
L.TileLayer.prototype.onAdd.call(this, map)
this._attributions.forEach(function (attribution) {
map.attributionControl.addAttribution(attribution)
})
},
// Clean up events and remove attributions from attribution control
onRemove: function (map) {
map.off('moveend', this._updateAttribution, this)
this._attributions.forEach(function (attribution) {
map.attributionControl.removeAttribution(attribution)
})
L.TileLayer.prototype.onRemove.call(this, map)
},
/**
* Get the [Bing Imagery metadata](https://msdn.microsoft.com/en-us/library/ff701712.aspx)
* for a specific [`LatLng`](http://leafletjs.com/reference.html#latlng)
* and zoom level. If either `latlng` or `zoom` is omitted and the layer is attached
* to a map, the map center and current map zoom are used.
* @param {L.LatLng} latlng
* @param {Number} zoom
* @return {Promise} Resolves to the JSON metadata
*/
getMetaData: function (latlng, zoom) {
if (!this._map && (!latlng || !zoom)) {
return Promise.reject(new Error('If layer is not attached to map, you must provide LatLng and zoom'))
}
latlng = latlng || this._map.getCenter()
zoom = zoom || this._map.getZoom()
var PointMetaDataUrl = L.Util.template(L.TileLayer.Bing.POINT_METADATA_URL, {
bingMapsKey: this.options.bingMapsKey,
imagerySet: this.options.imagerySet,
z: zoom,
lat: latlng.lat,
lng: latlng.lng
})
return fetchJsonp(PointMetaDataUrl, {jsonpCallback: 'jsonp'})
.then(function (response) {
return response.json()
})
.catch(console.error.bind(console))
},
_metaDataOnLoad: function (metaData) {
if (metaData.statusCode !== 200) {
throw new Error('Bing Imagery Metadata error: \n' + JSON.stringify(metaData, null, ' '))
}
var resource = metaData.resourceSets[0].resources[0]
this._url = resource.imageUrl
this._imageryProviders = resource.imageryProviders || []
this.options.subdomains = resource.imageUrlSubdomains
this._updateAttribution()
return Promise.resolve()
},
/**
* Update the attribution control of the map with the provider attributions
* within the current map bounds
*/
_updateAttribution: function () {
var map = this._map
if (!map || !map.attributionControl) return
var zoom = map.getZoom()
var bbox = toBingBBox(map.getBounds().toBBoxString())
this._fetch.then(function () {
var newAttributions = this._getAttributions(bbox, zoom)
var prevAttributions = this._attributions
// Add any new provider attributions in the current area to the attribution control
newAttributions.forEach(function (attr) {
if (prevAttributions.indexOf(attr) > -1) return
map.attributionControl.addAttribution(attr)
})
// Remove any attributions that are no longer in the current area from the attribution control
prevAttributions.filter(function (attr) {
if (newAttributions.indexOf(attr) > -1) return
map.attributionControl.removeAttribution(attr)
})
this._attributions = newAttributions
}.bind(this))
},
/**
* Returns an array of attributions for given bbox and zoom
* @private
* @param {Array} bbox [west, south, east, north]
* @param {Number} zoom
* @return {Array} Array of attribution strings for each provider
*/
_getAttributions: function (bbox, zoom) {
return this._imageryProviders.reduce(function (attributions, provider) {
for (var i = 0; i < provider.coverageAreas.length; i++) {
if (bboxIntersect(bbox, provider.coverageAreas[i].bbox) &&
zoom >= provider.coverageAreas[i].zoomMin &&
zoom <= provider.coverageAreas[i].zoomMax) {
attributions.push(provider.attribution)
return attributions
}
}
return attributions
}, [])
}
})
L.tileLayer.bing = function (options) {
return new L.TileLayer.Bing(options)
}
module.exports = L.TileLayer.Bing
@@ -0,0 +1,399 @@
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (global){
var L = (typeof window !== "undefined" ? window['L'] : typeof global !== "undefined" ? global['L'] : null)
var fetchJsonp = require('fetch-jsonp')
var bboxIntersect = require('bbox-intersect')
/**
* Converts tile xyz coordinates to Quadkey
* @param {Number} x
* @param {Number} y
* @param {Number} z
* @return {Number} Quadkey
*/
function toQuadKey (x, y, z) {
var index = ''
for (var i = z; i > 0; i--) {
var b = 0
var mask = 1 << (i - 1)
if ((x & mask) !== 0) b++
if ((y & mask) !== 0) b += 2
index += b.toString()
}
return index
}
/**
* Converts Leaflet BBoxString to Bing BBox
* @param {String} bboxString 'southwest_lng,southwest_lat,northeast_lng,northeast_lat'
* @return {Array} [south_lat, west_lng, north_lat, east_lng]
*/
function toBingBBox (bboxString) {
var bbox = bboxString.split(',')
return [bbox[1], bbox[0], bbox[3], bbox[2]]
}
var VALID_IMAGERY_SETS = [
'Aerial',
'AerialWithLabels',
'AerialWithLabelsOnDemand',
'Road',
'RoadOnDemand',
'CanvasLight',
'CanvasDark',
'CanvasGray',
'OrdnanceSurvey'
]
var DYNAMIC_IMAGERY_SETS = [
'AerialWithLabelsOnDemand',
'RoadOnDemand'
]
/**
* Create a new Bing Maps layer.
* @param {string|object} options Either a [Bing Maps Key](https://msdn.microsoft.com/en-us/library/ff428642.aspx) or an options object
* @param {string} options.BingMapsKey A valid Bing Maps Key (required)
* @param {string} [options.imagerySet=Aerial] Type of imagery, see https://msdn.microsoft.com/en-us/library/ff701716.aspx
* @param {string} [options.culture='en-US'] Language for labels, see https://msdn.microsoft.com/en-us/library/hh441729.aspx
* @return {L.TileLayer} A Leaflet TileLayer to add to your map
*
* Create a basic map
* @example
* var map = L.map('map').setView([51.505, -0.09], 13)
* L.TileLayer.Bing(MyBingMapsKey).addTo(map)
*/
L.TileLayer.Bing = L.TileLayer.extend({
options: {
bingMapsKey: null, // Required
imagerySet: 'Aerial',
culture: 'en-US',
minZoom: 1,
minNativeZoom: 1,
maxNativeZoom: 19
},
statics: {
METADATA_URL: 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}?key={bingMapsKey}&include=ImageryProviders&uriScheme=https',
POINT_METADATA_URL: 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}/{lat},{lng}?zl={z}&key={bingMapsKey}&uriScheme=https'
},
initialize: function (options) {
if (typeof options === 'string') {
options = { bingMapsKey: options }
}
if (options && options.BingMapsKey) {
options.bingMapsKey = options.BingMapsKey
console.warn('use options.bingMapsKey instead of options.BingMapsKey')
}
if (!options || !options.bingMapsKey) {
throw new Error('Must supply options.BingMapsKey')
}
options = L.setOptions(this, options)
if (VALID_IMAGERY_SETS.indexOf(options.imagerySet) < 0) {
throw new Error("'" + options.imagerySet + "' is an invalid imagerySet, see https://github.com/digidem/leaflet-bing-layer#parameters")
}
if (options && options.style && DYNAMIC_IMAGERY_SETS.indexOf(options.imagerySet) < 0) {
console.warn('Dynamic styles will only work with these imagerySet choices: ' + DYNAMIC_IMAGERY_SETS.join(', '))
}
var metaDataUrl = L.Util.template(L.TileLayer.Bing.METADATA_URL, {
bingMapsKey: this.options.bingMapsKey,
imagerySet: this.options.imagerySet
})
this._imageryProviders = []
this._attributions = []
// Keep a reference to the promise so we can use it later
this._fetch = fetchJsonp(metaDataUrl, {jsonpCallback: 'jsonp'})
.then(function (response) {
return response.json()
})
.then(this._metaDataOnLoad.bind(this))
.catch(console.error.bind(console))
// for https://github.com/Leaflet/Leaflet/issues/137
if (!L.Browser.android) {
this.on('tileunload', this._onTileRemove)
}
},
createTile: function (coords, done) {
var tile = document.createElement('img')
L.DomEvent.on(tile, 'load', L.bind(this._tileOnLoad, this, done, tile))
L.DomEvent.on(tile, 'error', L.bind(this._tileOnError, this, done, tile))
if (this.options.crossOrigin) {
tile.crossOrigin = ''
}
/*
Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons
http://www.w3.org/TR/WCAG20-TECHS/H67
*/
tile.alt = ''
// Don't create closure if we don't have to
if (this._url) {
tile.src = this.getTileUrl(coords)
} else {
this._fetch.then(function () {
tile.src = this.getTileUrl(coords)
}.bind(this)).catch(function (e) {
console.error(e)
done(e)
})
}
return tile
},
getTileUrl: function (coords) {
var quadkey = toQuadKey(coords.x, coords.y, coords.z)
var url = L.Util.template(this._url, {
quadkey: quadkey,
subdomain: this._getSubdomain(coords),
culture: this.options.culture
})
if (typeof this.options.style === 'string') {
url += '&st=' + this.options.style
}
return url
},
// Update the attribution control every time the map is moved
onAdd: function (map) {
map.on('moveend', this._updateAttribution, this)
L.TileLayer.prototype.onAdd.call(this, map)
this._attributions.forEach(function (attribution) {
map.attributionControl.addAttribution(attribution)
})
},
// Clean up events and remove attributions from attribution control
onRemove: function (map) {
map.off('moveend', this._updateAttribution, this)
this._attributions.forEach(function (attribution) {
map.attributionControl.removeAttribution(attribution)
})
L.TileLayer.prototype.onRemove.call(this, map)
},
/**
* Get the [Bing Imagery metadata](https://msdn.microsoft.com/en-us/library/ff701712.aspx)
* for a specific [`LatLng`](http://leafletjs.com/reference.html#latlng)
* and zoom level. If either `latlng` or `zoom` is omitted and the layer is attached
* to a map, the map center and current map zoom are used.
* @param {L.LatLng} latlng
* @param {Number} zoom
* @return {Promise} Resolves to the JSON metadata
*/
getMetaData: function (latlng, zoom) {
if (!this._map && (!latlng || !zoom)) {
return Promise.reject(new Error('If layer is not attached to map, you must provide LatLng and zoom'))
}
latlng = latlng || this._map.getCenter()
zoom = zoom || this._map.getZoom()
var PointMetaDataUrl = L.Util.template(L.TileLayer.Bing.POINT_METADATA_URL, {
bingMapsKey: this.options.bingMapsKey,
imagerySet: this.options.imagerySet,
z: zoom,
lat: latlng.lat,
lng: latlng.lng
})
return fetchJsonp(PointMetaDataUrl, {jsonpCallback: 'jsonp'})
.then(function (response) {
return response.json()
})
.catch(console.error.bind(console))
},
_metaDataOnLoad: function (metaData) {
if (metaData.statusCode !== 200) {
throw new Error('Bing Imagery Metadata error: \n' + JSON.stringify(metaData, null, ' '))
}
var resource = metaData.resourceSets[0].resources[0]
this._url = resource.imageUrl
this._imageryProviders = resource.imageryProviders || []
this.options.subdomains = resource.imageUrlSubdomains
this._updateAttribution()
return Promise.resolve()
},
/**
* Update the attribution control of the map with the provider attributions
* within the current map bounds
*/
_updateAttribution: function () {
var map = this._map
if (!map || !map.attributionControl) return
var zoom = map.getZoom()
var bbox = toBingBBox(map.getBounds().toBBoxString())
this._fetch.then(function () {
var newAttributions = this._getAttributions(bbox, zoom)
var prevAttributions = this._attributions
// Add any new provider attributions in the current area to the attribution control
newAttributions.forEach(function (attr) {
if (prevAttributions.indexOf(attr) > -1) return
map.attributionControl.addAttribution(attr)
})
// Remove any attributions that are no longer in the current area from the attribution control
prevAttributions.filter(function (attr) {
if (newAttributions.indexOf(attr) > -1) return
map.attributionControl.removeAttribution(attr)
})
this._attributions = newAttributions
}.bind(this))
},
/**
* Returns an array of attributions for given bbox and zoom
* @private
* @param {Array} bbox [west, south, east, north]
* @param {Number} zoom
* @return {Array} Array of attribution strings for each provider
*/
_getAttributions: function (bbox, zoom) {
return this._imageryProviders.reduce(function (attributions, provider) {
for (var i = 0; i < provider.coverageAreas.length; i++) {
if (bboxIntersect(bbox, provider.coverageAreas[i].bbox) &&
zoom >= provider.coverageAreas[i].zoomMin &&
zoom <= provider.coverageAreas[i].zoomMax) {
attributions.push(provider.attribution)
return attributions
}
}
return attributions
}, [])
}
})
L.tileLayer.bing = function (options) {
return new L.TileLayer.Bing(options)
}
module.exports = L.TileLayer.Bing
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"bbox-intersect":2,"fetch-jsonp":3}],2:[function(require,module,exports){
module.exports = function(bbox1, bbox2){
if(!(
bbox1[0] > bbox2[2] ||
bbox1[2] < bbox2[0] ||
bbox1[3] < bbox2[1] ||
bbox1[1] > bbox2[3]
)){
return true;
} else {
return false;
}
}
},{}],3:[function(require,module,exports){
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['exports', 'module'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module);
} else {
var mod = {
exports: {}
};
factory(mod.exports, mod);
global.fetchJsonp = mod.exports;
}
})(this, function (exports, module) {
'use strict';
var defaultOptions = {
timeout: 5000,
jsonpCallback: 'callback',
jsonpCallbackFunction: null
};
function generateCallbackFunction() {
return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);
}
// Known issue: Will throw 'Uncaught ReferenceError: callback_*** is not defined' error if request timeout
function clearFunction(functionName) {
// IE8 throws an exception when you try to delete a property on window
// http://stackoverflow.com/a/1824228/751089
try {
delete window[functionName];
} catch (e) {
window[functionName] = undefined;
}
}
function removeScript(scriptId) {
var script = document.getElementById(scriptId);
document.getElementsByTagName('head')[0].removeChild(script);
}
var fetchJsonp = function fetchJsonp(url) {
var options = arguments[1] === undefined ? {} : arguments[1];
var timeout = options.timeout != null ? options.timeout : defaultOptions.timeout;
var jsonpCallback = options.jsonpCallback != null ? options.jsonpCallback : defaultOptions.jsonpCallback;
var timeoutId = undefined;
return new Promise(function (resolve, reject) {
var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();
window[callbackFunction] = function (response) {
resolve({
ok: true,
// keep consistent with fetch API
json: function json() {
return Promise.resolve(response);
}
});
if (timeoutId) clearTimeout(timeoutId);
removeScript(jsonpCallback + '_' + callbackFunction);
clearFunction(callbackFunction);
};
// Check if the user set their own params, and if not add a ? to start a list of params
url += url.indexOf('?') === -1 ? '?' : '&';
var jsonpScript = document.createElement('script');
jsonpScript.setAttribute('src', url + jsonpCallback + '=' + callbackFunction);
jsonpScript.id = jsonpCallback + '_' + callbackFunction;
document.getElementsByTagName('head')[0].appendChild(jsonpScript);
timeoutId = setTimeout(function () {
reject(new Error('JSONP request to ' + url + ' timed out'));
clearFunction(callbackFunction);
removeScript(jsonpCallback + '_' + callbackFunction);
}, timeout);
});
};
// export as global function
/*
let local;
if (typeof global !== 'undefined') {
local = global;
} else if (typeof self !== 'undefined') {
local = self;
} else {
try {
local = Function('return this')();
} catch (e) {
throw new Error('polyfill failed because global object is unavailable in this environment');
}
}
local.fetchJsonp = fetchJsonp;
*/
module.exports = fetchJsonp;
});
},{}]},{},[1]);
@@ -0,0 +1 @@
!function t(e,n,i){function o(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return o(n?n:t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,n){(function(n){function i(t,e,n){for(var i="",o=n;o>0;o--){var r=0,a=1<<o-1;0!==(t&a)&&r++,0!==(e&a)&&(r+=2),i+=r.toString()}return i}function o(t){var e=t.split(",");return[e[1],e[0],e[3],e[2]]}var r="undefined"!=typeof window?window.L:"undefined"!=typeof n?n.L:null,a=t("fetch-jsonp"),s=t("bbox-intersect"),u=["Aerial","AerialWithLabels","AerialWithLabelsOnDemand","Road","RoadOnDemand","CanvasLight","CanvasDark","CanvasGray","OrdnanceSurvey"],l=["AerialWithLabelsOnDemand","RoadOnDemand"];r.TileLayer.Bing=r.TileLayer.extend({options:{bingMapsKey:null,imagerySet:"Aerial",culture:"en-US",minZoom:1,minNativeZoom:1,maxNativeZoom:19},statics:{METADATA_URL:"https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}?key={bingMapsKey}&include=ImageryProviders&uriScheme=https",POINT_METADATA_URL:"https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{imagerySet}/{lat},{lng}?zl={z}&key={bingMapsKey}&uriScheme=https"},initialize:function(t){if("string"==typeof t&&(t={bingMapsKey:t}),t&&t.BingMapsKey&&(t.bingMapsKey=t.BingMapsKey,console.warn("use options.bingMapsKey instead of options.BingMapsKey")),!t||!t.bingMapsKey)throw new Error("Must supply options.BingMapsKey");if(t=r.setOptions(this,t),u.indexOf(t.imagerySet)<0)throw new Error("'"+t.imagerySet+"' is an invalid imagerySet, see https://github.com/digidem/leaflet-bing-layer#parameters");t&&t.style&&l.indexOf(t.imagerySet)<0&&console.warn("Dynamic styles will only work with these imagerySet choices: "+l.join(", "));var e=r.Util.template(r.TileLayer.Bing.METADATA_URL,{bingMapsKey:this.options.bingMapsKey,imagerySet:this.options.imagerySet});this._imageryProviders=[],this._attributions=[],this._fetch=a(e,{jsonpCallback:"jsonp"}).then(function(t){return t.json()}).then(this._metaDataOnLoad.bind(this))["catch"](console.error.bind(console)),r.Browser.android||this.on("tileunload",this._onTileRemove)},createTile:function(t,e){var n=document.createElement("img");return r.DomEvent.on(n,"load",r.bind(this._tileOnLoad,this,e,n)),r.DomEvent.on(n,"error",r.bind(this._tileOnError,this,e,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",this._url?n.src=this.getTileUrl(t):this._fetch.then(function(){n.src=this.getTileUrl(t)}.bind(this))["catch"](function(t){console.error(t),e(t)}),n},getTileUrl:function(t){var e=i(t.x,t.y,t.z),n=r.Util.template(this._url,{quadkey:e,subdomain:this._getSubdomain(t),culture:this.options.culture});return"string"==typeof this.options.style&&(n+="&st="+this.options.style),n},onAdd:function(t){t.on("moveend",this._updateAttribution,this),r.TileLayer.prototype.onAdd.call(this,t),this._attributions.forEach(function(e){t.attributionControl.addAttribution(e)})},onRemove:function(t){t.off("moveend",this._updateAttribution,this),this._attributions.forEach(function(e){t.attributionControl.removeAttribution(e)}),r.TileLayer.prototype.onRemove.call(this,t)},getMetaData:function(t,e){if(!(this._map||t&&e))return Promise.reject(new Error("If layer is not attached to map, you must provide LatLng and zoom"));t=t||this._map.getCenter(),e=e||this._map.getZoom();var n=r.Util.template(r.TileLayer.Bing.POINT_METADATA_URL,{bingMapsKey:this.options.bingMapsKey,imagerySet:this.options.imagerySet,z:e,lat:t.lat,lng:t.lng});return a(n,{jsonpCallback:"jsonp"}).then(function(t){return t.json()})["catch"](console.error.bind(console))},_metaDataOnLoad:function(t){if(200!==t.statusCode)throw new Error("Bing Imagery Metadata error: \n"+JSON.stringify(t,null," "));var e=t.resourceSets[0].resources[0];return this._url=e.imageUrl,this._imageryProviders=e.imageryProviders||[],this.options.subdomains=e.imageUrlSubdomains,this._updateAttribution(),Promise.resolve()},_updateAttribution:function(){var t=this._map;if(t&&t.attributionControl){var e=t.getZoom(),n=o(t.getBounds().toBBoxString());this._fetch.then(function(){var i=this._getAttributions(n,e),o=this._attributions;i.forEach(function(e){o.indexOf(e)>-1||t.attributionControl.addAttribution(e)}),o.filter(function(e){i.indexOf(e)>-1||t.attributionControl.removeAttribution(e)}),this._attributions=i}.bind(this))}},_getAttributions:function(t,e){return this._imageryProviders.reduce(function(n,i){for(var o=0;o<i.coverageAreas.length;o++)if(s(t,i.coverageAreas[o].bbox)&&e>=i.coverageAreas[o].zoomMin&&e<=i.coverageAreas[o].zoomMax)return n.push(i.attribution),n;return n},[])}}),r.tileLayer.bing=function(t){return new r.TileLayer.Bing(t)},e.exports=r.TileLayer.Bing}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},Line truncated
@@ -0,0 +1,47 @@
{
"name": "leaflet-bing-layer",
"version": "3.3.0",
"description": "Bing Maps Layer for Leaflet v1.0.0",
"main": "index.js",
"browserify": {
"transform": [
"browserify-shim"
]
},
"browserify-shim": {
"leaflet": "global:L"
},
"scripts": {
"build": "browserify index.js > leaflet-bing-layer.js",
"postbuild": "uglifyjs leaflet-bing-layer.js -cm -o leaflet-bing-layer.min.js",
"preversion": "npm test && npm run build",
"lint": "standard index.js",
"start": "budo index.js:leaflet-bing-layer.js --live",
"test": "npm run lint"
},
"keywords": [
"leaflet",
"bing"
],
"author": "Gregor MacLennan",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/gmaclennan/leaflet-bing-layer.git"
},
"bugs": {
"url": "https://github.com/gmaclennan/leaflet-bing-layer/issues"
},
"homepage": "https://github.com/gmaclennan/leaflet-bing-layer",
"dependencies": {
"bbox-intersect": "^0.1.1",
"browserify-shim": "^3.8.11",
"fetch-jsonp": "^1.0.0",
"leaflet": "^1.0.0-beta.2"
},
"devDependencies": {
"browserify": "^12.0.1",
"budo": "^7.0.2",
"standard": "^5.4.1"
}
}
@@ -0,0 +1,31 @@
.leaflet-control-coordinates {
background-color:#D8D8D8;
background-color:rgba(255, 255, 255, 0.8);
cursor:pointer;
}
.leaflet-control-coordinates,
.leaflet-control-coordinates .uiElement input {
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
}
.leaflet-control-coordinates .uiElement {
margin:4px;
}
.leaflet-control-coordinates .uiElement .labelFirst {
margin-right:4px;
}
.leaflet-control-coordinates .uiHidden{
display:none;
}
.leaflet-control-coordinates .uiElement.label {
color:inherit;
font-weight: inherit;
font-size: inherit;
padding: 0;
display: inherit;
}
@@ -0,0 +1,326 @@
/*
* L.Control.Coordinates is used for displaying current mouse coordinates on the map.
*/
L.Control.Coordinates = L.Control.extend({
options: {
position: 'bottomright',
//decimals used if not using DMS or labelFormatter functions
decimals: 4,
//decimalseperator used if not using DMS or labelFormatter functions
decimalSeperator: ".",
//label templates for usage if no labelFormatter function is defined
labelTemplateLat: "Lat: {y}",
labelTemplateLng: "Lng: {x}",
//label formatter functions
labelFormatterLat: undefined,
labelFormatterLng: undefined,
//switch on/off input fields on click
enableUserInput: true,
//use Degree-Minute-Second
useDMS: false,
//if true lat-lng instead of lng-lat label ordering is used
useLatLngOrder: false
},
onAdd: function(map) {
this._map = map;
var className = 'leaflet-control-coordinates',
container = this._container = L.DomUtil.create('div', className),
options = this.options;
//label containers
this._labelcontainer = L.DomUtil.create("div", "uiElement label", container);
this._label = L.DomUtil.create("span", "labelFirst", this._labelcontainer);
//input containers
this._inputcontainer = L.DomUtil.create("div", "uiElement input uiHidden", container);
var xSpan, ySpan;
if (options.useLatLngOrder) {
ySpan = L.DomUtil.create("span", "", this._inputcontainer);
this._inputY = this._createInput("inputY", this._inputcontainer);
xSpan = L.DomUtil.create("span", "", this._inputcontainer);
this._inputX = this._createInput("inputX", this._inputcontainer);
} else {
xSpan = L.DomUtil.create("span", "", this._inputcontainer);
this._inputX = this._createInput("inputX", this._inputcontainer);
ySpan = L.DomUtil.create("span", "", this._inputcontainer);
this._inputY = this._createInput("inputY", this._inputcontainer);
}
xSpan.innerHTML = options.labelTemplateLng.replace("{x}", "");
ySpan.innerHTML = options.labelTemplateLat.replace("{y}", "");
L.DomEvent.on(this._inputX, 'keyup', this._handleKeypress, this);
L.DomEvent.on(this._inputY, 'keyup', this._handleKeypress, this);
//connect to mouseevents
map.on("mousemove", this._update, this);
map.on('dragstart', this.collapse, this);
map.whenReady(this._update, this);
this._showsCoordinates = true;
//wether or not to show inputs on click
if (options.enableUserInput) {
L.DomEvent.addListener(this._container, "click", this._switchUI, this);
}
return container;
},
/**
* Creates an input HTML element in given container with given classname
*/
_createInput: function(classname, container) {
var input = L.DomUtil.create("input", classname, container);
input.type = "text";
L.DomEvent.disableClickPropagation(input);
return input;
},
_clearMarker: function() {
this._map.removeLayer(this._marker);
},
/**
* Called onkeyup of input fields
*/
_handleKeypress: function(e) {
switch (e.keyCode) {
case 27: //Esc
this.collapse();
break;
case 13: //Enter
this._handleSubmit();
this.collapse();
break;
default: //All keys
this._handleSubmit();
break;
}
},
/**
* Called on each keyup except ESC
*/
_handleSubmit: function() {
var x = L.NumberFormatter.createValidNumber(this._inputX.value, this.options.decimalSeperator);
var y = L.NumberFormatter.createValidNumber(this._inputY.value, this.options.decimalSeperator);
if (x !== undefined && y !== undefined) {
var marker = this._marker;
if (!marker) {
marker = this._marker = L.marker();
marker.on("click", this._clearMarker, this);
}
marker.setLatLng(new L.LatLng(y, x));
marker.addTo(this._map);
}
},
/**
* Shows inputs fields
*/
expand: function() {
this._showsCoordinates = false;
this._map.off("mousemove", this._update, this);
L.DomEvent.addListener(this._container, "mousemove", L.DomEvent.stop);
L.DomEvent.removeListener(this._container, "click", this._switchUI, this);
L.DomUtil.addClass(this._labelcontainer, "uiHidden");
L.DomUtil.removeClass(this._inputcontainer, "uiHidden");
},
/**
* Creates the label according to given options and formatters
*/
_createCoordinateLabel: function(ll) {
var opts = this.options,
x, y;
if (opts.labelFormatterLng) {
x = opts.labelFormatterLng(ll.lng);
} else {
x = L.Util.template(opts.labelTemplateLng, {
x: this._getNumber(ll.lng, opts)
});
}
if (opts.labelFormatterLat) {
y = opts.labelFormatterLat(ll.lat);
} else {
y = L.Util.template(opts.labelTemplateLat, {
y: this._getNumber(ll.lat, opts)
});
}
if (opts.useLatLngOrder) {
return y + " " + x;
}
return x + " " + y;
},
/**
* Returns a Number according to options (DMS or decimal)
*/
_getNumber: function(n, opts) {
var res;
if (opts.useDMS) {
res = L.NumberFormatter.toDMS(n);
} else {
res = L.NumberFormatter.round(n, opts.decimals, opts.decimalSeperator);
}
return res;
},
/**
* Shows coordinate labels after user input has ended. Also
* displays a marker with popup at the last input position.
*/
collapse: function() {
if (!this._showsCoordinates) {
this._map.on("mousemove", this._update, this);
this._showsCoordinates = true;
var opts = this.options;
L.DomEvent.addListener(this._container, "click", this._switchUI, this);
L.DomEvent.removeListener(this._container, "mousemove", L.DomEvent.stop);
L.DomUtil.addClass(this._inputcontainer, "uiHidden");
L.DomUtil.removeClass(this._labelcontainer, "uiHidden");
if (this._marker) {
var m = L.marker(),
ll = this._marker.getLatLng();
m.setLatLng(ll);
var container = L.DomUtil.create("div", "");
var label = L.DomUtil.create("div", "", container);
label.innerHTML = this._createCoordinateLabel(ll);
var close = L.DomUtil.create("a", "", container);
close.innerHTML = "Remove";
close.href = "#";
var stop = L.DomEvent.stopPropagation;
L.DomEvent
.on(close, 'click', stop)
.on(close, 'mousedown', stop)
.on(close, 'dblclick', stop)
.on(close, 'click', L.DomEvent.preventDefault)
.on(close, 'click', function() {
this._map.removeLayer(m);
}, this);
m.bindPopup(container);
m.addTo(this._map);
this._map.removeLayer(this._marker);
this._marker = null;
}
}
},
/**
* Click callback for UI
*/
_switchUI: function(evt) {
L.DomEvent.stop(evt);
L.DomEvent.stopPropagation(evt);
L.DomEvent.preventDefault(evt);
if (this._showsCoordinates) {
//show textfields
this.expand();
} else {
//show coordinates
this.collapse();
}
},
onRemove: function(map) {
map.off("mousemove", this._update, this);
},
/**
* Mousemove callback function updating labels and input elements
*/
_update: function(evt) {
var pos = evt.latlng,
opts = this.options;
if (pos) {
pos = pos.wrap();
this._currentPos = pos;
this._inputY.value = L.NumberFormatter.round(pos.lat, opts.decimals, opts.decimalSeperator);
this._inputX.value = L.NumberFormatter.round(pos.lng, opts.decimals, opts.decimalSeperator);
this._label.innerHTML = this._createCoordinateLabel(pos);
}
}
});
//construcotr registration
L.control.coordinates = function(options) {
return new L.Control.Coordinates(options);
};
//map init hook
L.Map.mergeOptions({
coordinateControl: false
});
L.Map.addInitHook(function() {
if (this.options.coordinateControl) {
this.coordinateControl = new L.Control.Coordinates();
this.addControl(this.coordinateControl);
}
});L.NumberFormatter = {
round: function (num,dec,sep) {
var res = L.Util.formatNum(num,dec)+"",
numbers=res.split(".");
if (numbers[1]) {
var d = dec-numbers[1].length;
for (; d > 0; d--) {
numbers[1]+="0";
}
res = numbers.join(sep||".");
}
return res;
},
toDMS : function (deg) {
var d = Math.floor (deg);
var minfloat = (deg-d)*60;
var m = Math.floor(minfloat);
var secfloat = (minfloat-m)*60;
var s = Math.round(secfloat);
if (s==60) {
m++;
s="00";
}
if (m==60) {
d++;
m="00";
}
if(s<10) {
s="0"+s;
}
if(m<10){
m="0"+m;
}
return ("" + d + "&deg; " + m + "' " + s + "''");
},
createValidNumber:function(num,sep){
if (num&&num.length>0){
var numbers = num.split(sep||".");
try{
var numRes=Number(numbers.join("."));
if(isNaN(numRes)){
return undefined;
}
return numRes;
}catch(e){
return undefined;
}
}
return undefined;
}
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

+13170
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["src/Leaflet.js","src/core/Util.js","src/core/Class.js","src/core/Events.js","src/core/Browser.js","src/geometry/Point.js","src/geometry/Bounds.js","src/geometry/Transformation.js","src/dom/DomUtil.js","src/geo/LatLng.js","src/geo/LatLngBounds.js","src/geo/projection/Projection.LonLat.js","src/geo/projection/Projection.SphericalMercator.js","src/geo/crs/CRS.js","src/geo/crs/CRS.Simple.js","src/geo/crs/CRS.Earth.js","src/geo/crs/CRS.EPSG3857.js","src/geo/crs/CRS.EPSG4326.js","src/map/Map.js","src/layer/Layer.js","src/dom/DomEvent.js","src/dom/PosAnimation.js","src/geo/projection/Projection.Mercator.js","src/geo/crs/CRS.EPSG3395.js","src/layer/tile/GridLayer.js","src/layer/tile/TileLayer.js","src/layer/tile/TileLayer.WMS.js","src/layer/ImageOverlay.js","src/layer/marker/Icon.js","src/layer/marker/Icon.Default.js","src/layer/marker/Marker.js","src/layer/marker/DivIcon.js","src/layer/DivOverlay.js","src/layer/Popup.js","src/layer/Tooltip.js","src/layer/LayerGroup.js","src/layer/FeatureGroup.js","src/layer/vector/Renderer.js","src/layer/vector/Path.js","src/geometry/LineUtil.js","src/layer/vector/Polyline.js","src/geometry/PolyUtil.js","src/layer/vector/Polygon.js","src/layer/vector/Rectangle.js","src/layer/vector/CircleMarker.js","src/layer/vector/Circle.js","src/layer/vector/SVG.js","src/layer/vector/SVG.VML.js","src/layer/vector/Canvas.js","src/layer/GeoJSON.js","src/dom/Draggable.js","src/core/Handler.js","src/map/handler/Map.Drag.js","src/map/handler/Map.DoubleClickZoom.js","src/map/handler/Map.ScrollWheelZoom.js","src/dom/DomEvent.DoubleTap.js","src/dom/DomEvent.Pointer.js","src/map/handler/Map.TouchZoom.js","src/map/handler/Map.Tap.js","src/map/handler/Map.BoxZoom.js","src/map/handler/Map.Keyboard.js","src/layer/marker/Marker.Drag.js","src/control/Control.js","src/control/Control.Zoom.js","src/control/Control.Attribution.js","src/control/Control.Scale.js","src/control/Control.Layers.js"],"names":[],"mappings":";;;;yCAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;Line truncated
+624
View File
@@ -0,0 +1,624 @@
/* required styles */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
position: absolute;
left: 0;
top: 0;
}
.leaflet-container {
overflow: hidden;
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-user-drag: none;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
image-rendering: -webkit-optimize-contrast;
}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
width: 1600px;
height: 1600px;
-webkit-transform-origin: 0 0;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
display: block;
}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg,
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer {
max-width: none !important;
}
.leaflet-container.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y;
}
.leaflet-container.leaflet-touch-drag {
-ms-touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-drag {
-ms-touch-action: none;
touch-action: none;
}
.leaflet-tile {
filter: inherit;
visibility: hidden;
}
.leaflet-tile-loaded {
visibility: inherit;
}
.leaflet-zoom-box {
width: 0;
height: 0;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 800;
}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
-moz-user-select: none;
}
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-vml-shape {
width: 1px;
height: 1px;
}
.lvml {
behavior: url(#default#VML);
display: inline-block;
position: absolute;
}
/* control positioning */
.leaflet-control {
position: relative;
z-index: 800;
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
.leaflet-top,
.leaflet-bottom {
position: absolute;
z-index: 1000;
pointer-events: none;
}
.leaflet-top {
top: 0;
}
.leaflet-right {
right: 0;
}
.leaflet-bottom {
bottom: 0;
}
.leaflet-left {
left: 0;
}
.leaflet-control {
float: left;
clear: both;
}
.leaflet-right .leaflet-control {
float: right;
}
.leaflet-top .leaflet-control {
margin-top: 10px;
}
.leaflet-bottom .leaflet-control {
margin-bottom: 10px;
}
.leaflet-left .leaflet-control {
margin-left: 10px;
}
.leaflet-right .leaflet-control {
margin-right: 10px;
}
/* zoom and fade animations */
.leaflet-fade-anim .leaflet-tile {
will-change: opacity;
}
.leaflet-fade-anim .leaflet-popup {
opacity: 0;
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
-o-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
opacity: 1;
}
.leaflet-zoom-animated {
-webkit-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
will-change: transform;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
}
.leaflet-zoom-anim .leaflet-zoom-hide {
visibility: hidden;
}
/* cursors */
.leaflet-interactive {
cursor: pointer;
}
.leaflet-grab {
cursor: -webkit-grab;
cursor: -moz-grab;
}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
cursor: crosshair;
}
.leaflet-popup-pane,
.leaflet-control {
cursor: auto;
}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
}
/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
pointer-events: none;
}
.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive {
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
/* visual tweaks */
.leaflet-container {
background: #ddd;
outline: 0;
}
.leaflet-container a {
color: #0078A8;
}
.leaflet-container a.leaflet-active {
outline: 2px solid orange;
}
.leaflet-zoom-box {
border: 2px dotted #38f;
background: rgba(255,255,255,0.5);
}
/* general typography */
.leaflet-container {
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
}
/* general toolbar styles */
.leaflet-bar {
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px;
}
.leaflet-bar a,
.leaflet-bar a:hover {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 26px;
height: 26px;
line-height: 26px;
display: block;
text-align: center;
text-decoration: none;
color: black;
}
.leaflet-bar a,
.leaflet-control-layers-toggle {
background-position: 50% 50%;
background-repeat: no-repeat;
display: block;
}
.leaflet-bar a:hover {
background-color: #f4f4f4;
}
.leaflet-bar a:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.leaflet-bar a:last-child {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom: none;
}
.leaflet-bar a.leaflet-disabled {
cursor: default;
background-color: #f4f4f4;
color: #bbb;
}
.leaflet-touch .leaflet-bar a {
width: 30px;
height: 30px;
line-height: 30px;
}
/* zoom control */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
font: bold 18px 'Lucida Console', Monaco, monospace;
text-indent: 1px;
}
.leaflet-control-zoom-out {
font-size: 20px;
}
.leaflet-touch .leaflet-control-zoom-in {
font-size: 22px;
}
.leaflet-touch .leaflet-control-zoom-out {
font-size: 24px;
}
/* layers control */
.leaflet-control-layers {
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
background: #fff;
border-radius: 5px;
}
.leaflet-control-layers-toggle {
background-image: url(images/layers.png);
width: 36px;
height: 36px;
}
.leaflet-retina .leaflet-control-layers-toggle {
background-image: url(images/layers-2x.png);
background-size: 26px 26px;
}
.leaflet-touch .leaflet-control-layers-toggle {
width: 44px;
height: 44px;
}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
display: none;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
display: block;
position: relative;
}
.leaflet-control-layers-expanded {
padding: 6px 10px 6px 6px;
color: #333;
background: #fff;
}
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
padding-right: 5px;
}
.leaflet-control-layers-selector {
margin-top: 2px;
position: relative;
top: 1px;
}
.leaflet-control-layers label {
display: block;
}
.leaflet-control-layers-separator {
height: 0;
border-top: 1px solid #ddd;
margin: 5px -10px 5px -6px;
}
/* Default icon URLs */
.leaflet-default-icon-path {
background-image: url(images/marker-icon.png);
}
/* attribution and scale controls */
.leaflet-container .leaflet-control-attribution {
background: #fff;
background: rgba(255, 255, 255, 0.7);
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale-line {
padding: 0 5px;
color: #333;
}
.leaflet-control-attribution a {
text-decoration: none;
}
.leaflet-control-attribution a:hover {
text-decoration: underline;
}
.leaflet-container .leaflet-control-attribution,
.leaflet-container .leaflet-control-scale {
font-size: 11px;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
}
.leaflet-bottom .leaflet-control-scale {
margin-bottom: 5px;
}
.leaflet-control-scale-line {
border: 2px solid #777;
border-top: none;
line-height: 1.1;
padding: 2px 5px 1px;
font-size: 11px;
white-space: nowrap;
overflow: hidden;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
background: rgba(255, 255, 255, 0.5);
}
.leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777;
border-bottom: none;
margin-top: -2px;
}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
border-bottom: 2px solid #777;
}
.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
box-shadow: none;
}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
border: 2px solid rgba(0,0,0,0.2);
background-clip: padding-box;
}
/* popup */
.leaflet-popup {
position: absolute;
text-align: center;
margin-bottom: 20px;
}
.leaflet-popup-content-wrapper {
padding: 1px;
text-align: left;
border-radius: 12px;
}
.leaflet-popup-content {
margin: 13px 19px;
line-height: 1.4;
}
.leaflet-popup-content p {
margin: 18px 0;
}
.leaflet-popup-tip-container {
width: 40px;
height: 20px;
position: absolute;
left: 50%;
margin-left: -20px;
overflow: hidden;
pointer-events: none;
}
.leaflet-popup-tip {
width: 17px;
height: 17px;
padding: 1px;
margin: -10px auto 0;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
background: white;
color: #333;
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
.leaflet-container a.leaflet-popup-close-button {
position: absolute;
top: 0;
right: 0;
padding: 4px 4px 0 0;
border: none;
text-align: center;
width: 18px;
height: 14px;
font: 16px/14px Tahoma, Verdana, sans-serif;
color: #c3c3c3;
text-decoration: none;
font-weight: bold;
background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover {
color: #999;
}
.leaflet-popup-scrolled {
overflow: auto;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
.leaflet-oldie .leaflet-popup-content-wrapper {
zoom: 1;
}
.leaflet-oldie .leaflet-popup-tip {
width: 24px;
margin: 0 auto;
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
}
.leaflet-oldie .leaflet-popup-tip-container {
margin-top: -1px;
}
.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
border: 1px solid #999;
}
/* div icon */
.leaflet-div-icon {
background: #fff;
border: 1px solid #666;
}
/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
position: absolute;
padding: 6px;
background-color: #fff;
border: 1px solid #fff;
border-radius: 3px;
color: #222;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
pointer-events: none;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.leaflet-tooltip.leaflet-clickable {
cursor: pointer;
pointer-events: auto;
}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
position: absolute;
pointer-events: none;
border: 6px solid transparent;
background: transparent;
content: "";
}
/* Directions */
.leaflet-tooltip-bottom {
margin-top: 6px;
}
.leaflet-tooltip-top {
margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
left: 50%;
margin-left: -6px;
}
.leaflet-tooltip-top:before {
bottom: 0;
margin-bottom: -12px;
border-top-color: #fff;
}
.leaflet-tooltip-bottom:before {
top: 0;
margin-top: -12px;
margin-left: -6px;
border-bottom-color: #fff;
}
.leaflet-tooltip-left {
margin-left: -6px;
}
.leaflet-tooltip-right {
margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
top: 50%;
margin-top: -6px;
}
.leaflet-tooltip-left:before {
right: 0;
margin-right: -12px;
border-left-color: #fff;
}
.leaflet-tooltip-right:before {
left: 0;
margin-left: -12px;
border-right-color: #fff;
}
+9
View File
@@ -0,0 +1,9 @@
/*
Leaflet 1.0.2+4bbb16c, a JS library for interactive maps. http://leafletjs.com
(c) 2010-2016 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
!function(t,e,i){function n(){var e=t.L;o.noConflict=function(){return t.L=e,this},t.L=o}var o={version:"1.0.2+4bbb16c"};"object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),"undefined"!=typeof t&&n(),o.Util={extend:function(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++){o=arguments[i];for(e in o)t[e]=o[e]}return t},create:Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}(),bind:function(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}},stamp:function(t){return t._leaflet_id=t._leaflet_id||++o.Util.lastId,t._leaflet_id},lastId:0,throttle:function(t,e,i){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)}},wrapNum:function(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){t.hasOwnProperty("options")||(t.options=t.options?o.Util.create(t.options):{});for(var i in e)t.options[i]=e[i];return t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&e.indexOf("?")!==-1?"&":"?")+n.join("&")},template:function(t,e){return t.replace(o.Util.templateRe,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},indexOf:function(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){return t["webkit"+e]||t["moz"+e]||t["ms"+e]}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,r=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,r){return r&&s===i?void e.call(n):s.call(t,o.bind(e,n))},o.Util.cancelAnimFrame=function(e){e&&r.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,n=o.Util.create(i);n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);return t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),n.options&&(t.options=o.Util.extend(o.Util.create(n.options),t.options)),o.extend(n,t),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;t<e;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){return o.extend(this.prototype,t),this},o.Class.mergeOptions=function(t){return o.extend(this.prototype.options,t),this},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this},o.Evented=o.Class.extend({on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else{t=o.Util.splitWords(t);for(var s=0,r=t.length;s<r;s++)this._on(t[s],e,i)}return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=o.Util.splitWords(t);for(var s=0,r=t.length;s<r;s++)this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var o=this._events[t];o||(o=[],this._events[t]=o),n===this&&(n=i);for(var s={fn:e,ctx:n},r=o,a=0,h=r.length;a<h;a++)if(r[a].fn===e&&r[a].ctx===n)return;r.push(s),o.count++},_off:function(t,e,n){var s,r,a;if(this._events&&(s=this._events[t])){if(!e){for(r=0,a=s.length;r<a;r++)s[r].fn=o.Util.falseFn;return void delete this._events[t]}if(n===this&&(n=i),s)for(r=0,a=s.length;r<a;r++){var h=s[r];if(h.ctx===n&&h.fn===e)return h.fn=o.Util.falseFn,this._firingCount&&(this._events[t]=s=s.slice()),void s.splice(r,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=o.Util.extend({},e,{type:t,target:this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var r=0,a=s.length;r<a;r++){var h=s[r];h.fn.call(h.ctx||this,n)}this._firiLine truncated
this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),o.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){o.DomUtil.setPosition(this._mapPane,new o.Point(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,e,n){e===i&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return o.Util.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){this._targets={},this._targets[o.stamp(this._container)]=this;var i=e?"off":"on";o.DomEvent[i](this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&o.DomEvent[i](t,"resize",this._onResize,this),o.Browser.any3d&&this.options.transform3DLimit&&this[i]("moveend",this._onMoveEnd)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],s="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if(i=this._targets[o.stamp(r)],i&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(s&&!o.DomEvent._isExternalTarget(r,t))break;if(n.push(i),s)break}if(r===this._container)break;r=r.parentNode}return n.length||a||s||!o.DomEvent._isExternalTarget(r,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e="keypress"===t.type&&13===t.keyCode?"click":t.type;"mousedown"===e&&o.DomUtil.preventOutline(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_fireDOMEvent:function(t,e,i){if("click"===t.type){var n=o.Util.extend({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e)),i.length)){var s=i[0];"contextmenu"===e&&s.listens(e,!0)&&o.DomEvent.preventDefault(t);var r={originalEvent:t};if("keypress"!==t.type){var a=s instanceof o.Marker;r.containerPoint=a?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?s.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var h=0;h<i.length;h++)if(i[h].fire(e,r,!0),r.originalEvent._stopped||i[h].options.nonBubblingEvents&&o.Util.indexOf(i[h].options.nonBubblingEvents,e)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)||new o.Point(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var n=t&&e!==i?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return n.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return o.bounds([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(Line truncated
o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=o.point(n),r=o.point("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return o.Icon.Default.imagePath||(o.Icon.Default.imagePath=this._detectIconPath()),(this.options.imagePath||o.Icon.Default.imagePath)+o.Icon.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=o.DomUtil.create("div","leaflet-default-icon-path",e.body),i=o.DomUtil.getStyle(t,"background-image")||o.DomUtil.getStyle(t,"backgroundImage");return e.body.removeChild(t),0===i.indexOf("url")?i.replace(/^url\([\"\']?/,"").replace(/marker-icon\.png[\"\']?\)$/,""):""}}),o.Marker=o.Layer.extend({options:{icon:new o.Icon.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=o.latLng(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),t.alt&&(i.alt=t.alt)),o.DomUtil.addClass(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var s=t.icon.createShadow(this._shadow),r=!1;s!==this._shadow&&(this._removeShadow(),r=!0),s&&o.DomUtil.addClass(s,e),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&r&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),o.DomUtil.remove(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&o.DomUtil.remove(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(o.DomUtil.addClass(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),o.Handler.MarkerDrag)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new o.Handler.MarkerDrag(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updaLine truncated
if(n.distance===o.CRS.Earth.distance){var s=Math.PI/180,r=this._mRadius/o.CRS.Earth.R/s,a=i.project([e+r,t]),h=i.project([e-r,t]),l=a.add(h).divideBy(2),u=i.unproject(l).lat,c=Math.acos((Math.cos(r*s)-Math.sin(e*s)*Math.sin(u*s))/(Math.cos(e*s)*Math.cos(u*s)))/s;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:Math.max(Math.round(l.x-i.project([u,t-c]).x),1),this._radiusY=Math.max(Math.round(l.y-a.y),1)}else{var d=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(d).x}this._updateBounds()}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.SVG=o.Renderer.extend({getEvents:function(){var t=o.Renderer.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=o.SVG.create("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=o.SVG.create("g"),this._container.appendChild(this._rootGroup)},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){o.Renderer.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),o.DomUtil.setPosition(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=o.SVG.create("path");t.options.className&&o.DomUtil.addClass(e,t.options.className),t.options.interactive&&o.DomUtil.addClass(e,"leaflet-interactive"),this._updateStyle(t),this._layers[o.stamp(t)]=t},_addPath:function(t){this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){o.DomUtil.remove(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o.stamp(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,o.SVG.pointsToPath(t._parts,e))},_updateCircle:function(t){var e=t._point,i=t._radius,n=t._radiusY||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){o.DomUtil.toFront(t._path)},_bringToBack:function(t){o.DomUtil.toBack(t._path)}}),o.extend(o.SVG,{create:function(t){return e.createElementNS("http://www.w3.org/2000/svg",t)},pointsToPath:function(t,e){var i,n,s,r,a,h,l="";for(i=0,s=t.length;i<s;i++){for(a=t[i],n=0,r=a.length;n<r;n++)h=a[n],l+=(n?"L":"M")+h.x+" "+h.y;l+=e?o.Browser.svg?"z":"x":""}return l||"M0 0"}}),o.Browser.svg=!(!e.createElementNS||!o.SVG.create("svg").createSVGRect),o.svg=function(t){return o.Browser.svg||o.Browser.vml?new o.SVG(t):null},o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),o.SVG.include(o.Browser.vml?{_initContainer:function(){this._container=o.DomUtil.create("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(o.Renderer.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=o.SVG.create("shape");o.DomUtil.addClass(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=o.SVG.create("path"),e.appendChild(t._path),this._updateStyle(t)},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;o.DomUtil.remove(e),t.removeInteractiveTarget(e)},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=o.SVG.create("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=o.Util.isArray(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=o.SVG.create("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._Line truncated
this._moved=!1},_onMouseDown:function(t){return!(!t.shiftKey||1!==t.which&&1!==t.button)&&(this._resetState(),o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(t),void o.DomEvent.on(e,{contextmenu:o.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this))},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=o.DomUtil.create("div","leaflet-zoom-box",this._container),o.DomUtil.addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new o.Bounds(this._point,this._startPoint),i=e.getSize();o.DomUtil.setPosition(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(o.DomUtil.remove(this._box),o.DomUtil.removeClass(this._container,"leaflet-crosshair")),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,{contextmenu:o.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){setTimeout(o.bind(this._resetState,this),0);var e=new o.LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanDelta:80}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),o.DomEvent.on(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),o.DomEvent.off(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(n._panAnim&&n._panAnim._inProgress)return;e=this._panKeys[i],t.shiftKey&&(e=o.point(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i)return;n.closePopup()}o.DomEvent.stop(t)}}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),o.DomUtil.addClass(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(t){var e=this._marker,i=e._shadow,n=o.DomUtil.getPosition(e._icon),s=e._map.layerPointToLatLng(n);i&&o.DomUtil.setPosition(i,n),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.optioLine truncated
+93
View File
@@ -0,0 +1,93 @@
<?php
/*=======================================================================
*
* locating.php
*
* Autor: Marc Vollmann
*
=======================================================================*/
include_once ("../include/mcglobal.inc.php");
include_once ("../include/auth.inc.php");
include_once ("../include/ranking.inc.php");
// Check HTTP-Parameters
getSecHttpVars("1",array("f_act", "customerId", "cscIdRoot", "cscIdActual", "f_cr_sid", "useRemoteDB"));
// Check for authentication access and granted rights
$usrAccessArray["hq"] = "1";
authCheckForAccess($hq_id, $usr_id, $emp_id, "1", $customerId, $cscIdRoot, $cscIdActual);
authCheckEmployeeRights($emp_id, "4", "1");
// ******************************************************
// Very special treatment for access to remote database
include_once ("../include/bwv.inc.php");
$remoteDBisActive = false;
if (BWV2_checkEmpRemoteDBAccess($useRemoteDB, $emp_id)) :
$remoteDBisActive = BWV2_setRemoteDBAccessParameter();
endif;
// ******************************************************
// *********************************
// * Search MSISDN from courier-id *
// *********************************
// Get courier-id from the courier-sid (e.g. SIDs: 1013, 1019, etc.)
$cr_id = getFieldValueFromId("courier","cr_sid",$f_cr_sid,"cr_id");
$msisdn = getFieldValueFromId("courier","cr_id",$cr_id,"cr_mobile_pda");
// Remove blanks in MSISDN and check beginning with "49"
// (IMPORTANT: No check for other chars because checked in javascript !!!)
$msisdn = ereg_replace (" ", "", $msisdn);
$msisdn = str_replace("+", "", $msisdn);
if (!ereg("^" . COUNTRY_FON_PREFIX, $msisdn)) :
if (ereg("^0", $msisdn)) :
$msisdn = substr($msisdn, 1);
endif;
$msisdn = COUNTRY_FON_PREFIX . $msisdn;
endif;
// $locatingURL = "../locating/locating_tmobile.php"; // D1
// if (substr($msisdn, 0, 4) == "0173" || substr($msisdn, 0, 5) == "49173") :
// $locatingURL = "../locating/locating_D2.php"; // D2
// endif;
$locatingURL = "../locating/locating_D2.php"; // D2
?>
<html lang="de">
<head>
<title>ORTUNGSWRAPPER</title>
<link rel="stylesheet" type="text/css" href="../css/phoenix.css">
<script type="text/javascript">
<!--
function doSubmit() {
document.forms[0].submit();
};
-->
</script>
</head>
<body onLoad="javascript:doSubmit();">
<form action="<?php echo $locatingURL ?>" method="post">
<input type="hidden" name="f_act" value="<?php echo $f_act ?>">
<input type="hidden" name="customerId" value="<?php echo $customerId ?>">
<input type="hidden" name="cscIdRoot" value="<?php echo $cscIdRoot ?>">
<input type="hidden" name="cscIdActual" value="<?php echo $cscIdActual ?>">
<input type="hidden" name="f_cr_sid" value="<?php echo $f_cr_sid ?>">
<input type="hidden" name="useRemoteDB" value="<?php echo $useRemoteDB ?>">
</form>
</body>
</html>
+659
View File
@@ -0,0 +1,659 @@
<?php
/*=======================================================================
*
* locating_D2.php
*
* Autor: Marc Vollmann
*
=======================================================================*/
include_once ("../include/mcglobal.inc.php");
include_once ("../include/auth.inc.php");
include_once ("../include/ranking.inc.php");
// Check HTTP-Parameters
getSecHttpVars("1",array("f_act", "customerId", "cscIdRoot", "cscIdActual", "f_cr_sid", "useRemoteDB"));
$locatingURL = "../locating/locating_D2.php";
// Check for authentication access and granted rights
$usrAccessArray["hq"] = "1";
authCheckForAccess($hq_id, $usr_id, $emp_id, "1", $customerId, $cscIdRoot, $cscIdActual);
authCheckEmployeeRights($emp_id, "4", "1");
// ******************************************************
// Very special treatment for access to remote database
include_once ("../include/bwv.inc.php");
echo $useRemoteDB . "<br>";
$remoteDBisActive = false;
if (BWV2_checkEmpRemoteDBAccess($useRemoteDB, $emp_id)) :
$remoteDBisActive = BWV2_setRemoteDBAccessParameter();
endif;
// ******************************************************
/*
FLOW:
- General definitions
- Get courier-id from http-request
- Search MSISDN from courier-id
- Generate request
- Send request
- Parse response
- Search x,y-coordinates in cells to be valid
- Compute longitude and latitude (transformation)
- Get zipcode from coordinates
- Update zipcode of the courier
- Write to log-file|log-db (employee, datetime, courier-id, msisdn, [zipcode, x_y_of_cell])
- Output zipcode
*/
// ***********************
// * General definitions *
// ***********************
// Proxy und Port fuer HTTPS
$proxy = "";
// $port = ":9883"; // D2 LBS-Testsystem
$port = ":705"; // D2 LBS-Live
$constPort = getParameterValue("0", "LOCATING_LBS_PORT", "0");
if ($constPort != "") : $port = $constPort; endif;
// $server = "213.148.156.83"; // D2 LBS-Testsystem
$server = "139.7.25.166"; // D2 LBS-Live
$constServer = getParameterValue("0", "LOCATING_LBS_SERVER", "0");
if ($constServer != "") : $server = $constServer; endif;
// Access to a special remote file
// $file = "ats/receiver"; // D2 LBS-Testsystem
$file = "LocationQueryService"; // D2 LBS-Live
// Request id
// $requestID = "1";
$requestID = rand(1,30000);
// User and password
$vaspID = "mi2ju GmbH"; // D2 Live
$constVaspID = getParameterValue("0", "LOCATING_LBS_VASP_ID", "0");
if ($constVaspID != "") : $vaspID = $constVaspID; endif;
$password = "mi2ju03#"; // D2 Live
$constPassword = getParameterValue("0", "LOCATING_LBS_PASSWORD", "0");
if ($constPassword != "") : $password = $constPassword; endif;
// Service ID
// $serviceId = "mi2juTest"; // D2 Testsystem
$serviceId = "mi2ju"; // D2 Live
$constServiceId = getParameterValue("0", "LOCATING_LBS_SERVICE_ID", "0");
if ($constServiceId != "") : $serviceId = $constServiceId; endif;
// Maximum of age of locating info
$maxAgeOfLocatingInfoInSeconds = "300";
// Minimum of the granularity
$minOfGranularityInMeter = "99999";
// Client Certificate and Private Key
$clientcertkey = '-cert cacert.pem -key privkey.pem';
// Path to openssl
$openssl = 'openssl';
// Port of openssl
$opensslPort = "9213";
// Only for output
$status_message = "";
// Logging enabled
$loggingEnabled = TRUE;
$logFile = "../log/COM_LOG";
// Echo enabled
$echoEnabled = FALSE;
// *************
// * Functions *
// *************
function writeLocatingLog($file, $value) {
global $loggingEnabled;
if ($loggingEnabled) :
writeToFile($file, $value);
endif;
}
function connectD2($completeReq) {
global $server, $port;
$response = "";
$errno = "";
$errstr = "";
$fp = fsockopen ($server, substr($port, 1), $errno, $errstr, 10);
if (!$fp) {
$response = "$errstr ($errno)<br>\n";
} else {
fputs ($fp, $completeReq);
if (fflush($fp)) :
// Read header
$httpHeader = "";
$httpBodyLength = 0;
if (!feof($fp)) :
$line = trim(fgets ($fp,1024));
$httpHeader .= trim($line);
while (!feof($fp) && $line != "") {
$line = trim(fgets ($fp,1024));
$httpHeader .= $line;
if (!(strpos($line, "Content-Length: ") === FALSE)) :
$httpBodyLength = trim(substr($line, 16));
endif;
}
endif;
// writeLocatingLog($logFile, "::: " . $httpHeader . "\r\n");
// writeLocatingLog($logFile, "::: " . $httpBodyLength . "\r\n");
/*
// while (!feof($fp) && $line != "</SLIA>") {
while (!feof($fp) && strlen($response) < ($httpBodyLength - 7)) {
$line = trim(fgets ($fp,1024));
$response .= $line;
}
*/
$count = 0;
while (!feof($fp) && $count < $httpBodyLength) {
$line = trim(fgets ($fp,2));
$response .= $line;
$count++;
}
// writeLocatingLog($logFile, ":# Loops: " . $count . "\r\n");
else :
$response = "ERR: " . $errno . " " . $errstr;
endif;
fclose ($fp);
}
return $response;
}
// *********************************
// * Search MSISDN from courier-id *
// *********************************
// Get courier-id from the courier-sid (e.g. SIDs: 1013, 1019, etc.)
$cr_id = getFieldValueFromId("courier","cr_sid",$f_cr_sid,"cr_id");
$msisdn = getFieldValueFromId("courier","cr_id",$cr_id,"cr_mobile_pda");
$imei = getFieldValueFromId("courier","cr_id",$cr_id,"cr_imei");
$serialno = getFieldValueFromId("courier","cr_id",$cr_id,"cr_serialno");
// Remove blanks in MSISDN and check beginning with "49"
// (IMPORTANT: No check for other chars because checked in javascript !!!)
$msisdn = ereg_replace (" ", "", $msisdn);
$msisdn = str_replace("+", "", $msisdn);
if (!ereg("^" . COUNTRY_FON_PREFIX, $msisdn)) :
if (ereg("^0", $msisdn)) :
$msisdn = substr($msisdn, 1);
endif;
$msisdn = COUNTRY_FON_PREFIX . $msisdn;
endif;
// Check necessity of new locating process
$locatingStateArray = checkLocatingState($cr_id);
//echo $locatingStateArray[0] . "\n";
// ********************************************************
// * Generate request if broker service will be contacted *
// ********************************************************
/*
if ($locatingStateArray[0] == "1") :
writeLocatingLog($logFile, json_encode($locatingStateArray) . "\r\n");
// Define header request
$requestheaderOrg = "POST /" . $file . " HTTP/1.1\r\n" .
"Host: $server$port\r\n" .
"Content-Type: application/x-www-form-urlencoded\r\n" .
"Content-Length: LENGTH\r\n\r\n";
// Connection request
$requestContext = "<?xml version='1.0'?><!DOCTYPE HDR SYSTEM 'MLEP_HDR.DTD'><HDR ver='1.0'><CLIENT><ID>$vaspID</ID><PWD>$password</PWD><SERVICEID>$serviceId</SERVICEID><SERVICE_TYPE service_type_type='PASSIVE'/></CLIENT></HDR>";
$requestMethod = "SLIR";
$requestBody = "<?xml version='1.0'?><!DOCTYPE SLIR SYSTEM 'MLEP_SLIR.DTD'><SLIR ver='1.0'><MSIDS><MSID>" . $msisdn . "</MSID></MSIDS></SLIR>";
$requestContext = urlencode($requestContext);
$requestBody = urlencode($requestBody);
// Merge "Context", "Method" and "Body"
$requestContext = "Context=" . $requestContext . "&Method=" . $requestMethod . "&Body=" . $requestBody;
$laenge = strlen($requestContext);
$requestheader = $requestheaderOrg;
$requestheader = str_replace ("LENGTH", $laenge, $requestheader);
if ($echoEnabled) : echo $requestheader . $requestContext . "\n\n\n"; endif;
writeLocatingLog($logFile, $requestheader . $requestContext . "\r\n");
$currentTime = getDateTime("0");
writeLocatingLog($logFile, "Time begin: " . $currentTime . "\r\n");
// $response = connectD2($requestheader.$requestContext."\r\n");
$response = "dummy";
$currentTime = getDateTime("0");
writeLocatingLog($logFile, "Time end: " . $currentTime . "\r\n");
if ($echoEnabled) : echo $response . "\n\n\n"; endif;
writeLocatingLog($logFile, $response . "\r\n");
else :
*/
$longitude = $locatingStateArray[1];
$latitude = $locatingStateArray[2];
$gpsTime = $locatingStateArray[4];
// Generate a faked response to be parsed correctly
$response = "";
$response .= "<POINT>";
$response .= " <LL_POINT>";
$response .= " <LAT>" . $locatingStateArray[2] . "</LAT>";
$response .= " <LONG>" . $locatingStateArray[1] . "</LONG>";
$response .= " </LL_POINT>";
$response .= "</POINT>";
$response .= "<RAD>XXXX</RAD>";
//endif;
// Evaluation of the response
if ($response == "") :
// Error occurred, response is empty ...
$status_message = "Es wurde keine Antwort geliefert!";
else :
if ((FALSE && !(strpos($response, "<POSERR>") === FALSE)) || ($longitude == 0 && $latitude == 0)) :
// Error occurred, ...
$status_message = "Die Nummer konnte nicht geortet werden!";
else :
if ((strpos($response, "<POINT>") === FALSE)) :
$status_message = "Die Lokalisierung war nicht möglich!";
else :
// GET LOCATING INFOS OF THE RESPONSE
// Get latitude
/*
$beginPos = strpos($response, "<LAT>") + 5;
$endPos = strpos($response, "</LAT>");
$latitude = substr($response, $beginPos, $endPos - $beginPos);
$latitude = substr($latitude, 0, -4) . "." . substr($latitude, -4); // Insert char "."
*/
// Get longitude
/*
$beginPos = strpos($response, "<LONG>") + 6;
$endPos = strpos($response, "</LONG>");
$longitude = substr($response, $beginPos, $endPos - $beginPos);
$longitude = substr($longitude, 0, -4) . "." . substr($longitude, -4); // Insert char "."
*/
/*
<SLIA ver="1.0">
<POS>
<MSID>491736281211</MSID>
<PD>
<TIME>
<LOCAL_TIME>20070424163805</LOCAL_TIME>
<GMT_OFF>+0200</GMT_OFF>
</TIME><SHAPE>
<CIRCLE>
<POINT>
<LL_POINT>
<LAT>523011.999</LAT>
<LONG>132424.001</LONG>
</LL_POINT>
</POINT>
<RAD>293</RAD>
</CIRCLE>
</SHAPE>
</PD>
</POS>
<GMT_OFF>+0200</GMT_OFF>
<RESULT resid="0">OK</RESULT>
<SESSIONID>AAADswAAARIkPfYcZByzGh+MVoO8Dt2Uevwx</SESSIONID>
</SLIA>
*/
/*
// GET LOCATING INFOS OF THE RESPONSE
// If no request has to be send to the server the current longitude and latitude are defined
if ($locatingStateArray[0] == "1") :
// Get latitude from connection request
$beginPos = strpos($response, "<LAT>") + 5;
$endPos = strpos($response, "</LAT>");
$latitudeRaw = substr($response, $beginPos, $endPos - $beginPos);
if ($echoEnabled) : echo "CoordPair: " . $coordPair . "<br>"; endif;
// Get longitude from connection request
$beginPos = strpos($response, "<LONG>") + 6;
$endPos = strpos($response, "</LONG>");
$longitudeRaw = substr($response, $beginPos, $endPos - $beginPos);
if ($echoEnabled) : echo "CoordPair: " . $coordPair . "<br>"; endif;
// Get radius from connection request
$beginPos = strpos($response, "<RAD>") + 5;
$endPos = strpos($response, "</RAD>");
$radius = substr($response, $beginPos, $endPos - $beginPos);
if ($echoEnabled) : echo "CoordPair: " . $coordPair . "<br>"; endif;
// Transform data
// Example: $coordPair = "555555,133333"
// $coordPairArray[0] = "555555" | $coordPairArray[0] = "133333"
// $x_coord_array[0] = "55" (Stellen 0 und 1) | $x_coord_array[1] = "55" (Stellen 2 und 3) | $x_coord_array[2] = "55" (Stellen 4 und 5)
// $y_coord_array[0] = "13" (Stellen 0 und 1) | $y_coord_array[1] = "33" (Stellen 2 und 3) | $y_coord_array[2] = "33" (Stellen 4 und 5)
$latitudeRawArray = array();
$tmpPos = strpos($latitudeRaw, ".");
if (!($tmpPos === FALSE)) :
$latitudeRawArray[0] = substr($latitudeRaw, 0, $tmpPos);
$latitudeRawArray[1] = substr($latitudeRaw, $tmpPos);
else :
$latitudeRawArray[0] = $latitudeRaw;
$latitudeRawArray[1] = "0";
endif;
$longitudeRawArray = array();
$tmpPos = strpos($longitudeRaw, ".");
if (!($tmpPos === FALSE)) :
$longitudeRawArray[0] = substr($longitudeRaw, 0, $tmpPos);
$longitudeRawArray[1] = substr($longitudeRaw, $tmpPos);
else :
$longitudeRawArray[0] = $longitudeRaw;
$longitudeRawArray[1] = "0";
endif;
$latitudeRawArray[0] = pad($latitudeRawArray[0], 6, "0"); // if less than 6 chars
$longitudeRawArray[0] = pad($longitudeRawArray[0], 6, "0"); // if less than 6 chars
if ($latitudeRawArray[1] == "") : $latitudeRawArray[1] = "0"; endif;
if ($longitudeRawArray[1] == "") : $longitudeRawArray[1] = "0"; endif;
$x_coord_array[0] = substr($latitudeRawArray[0], 0, 2);
$x_coord_array[1] = substr($latitudeRawArray[0], 2, 2);
$x_coord_array[2] = substr($latitudeRawArray[0], 4);
$y_coord_array[0] = substr($longitudeRawArray[0], 0, 2);
$y_coord_array[1] = substr($longitudeRawArray[0], 2, 2);
$y_coord_array[2] = substr($longitudeRawArray[0], 4);
// ***************************************************
// * Compute longitude and latitude (transformation) *
// ***************************************************
$longitude = $y_coord_array[0] + $y_coord_array[1] / 60 + ($y_coord_array[2] + $longitudeRawArray[1]) / 3600;
$latitude = $x_coord_array[0] + $x_coord_array[1] / 60 + ($x_coord_array[2] + $latitudeRawArray[1]) / 3600;
writeLocatingLog($logFile, "-->" . $latitude . " " . $longitude . "<-- \r\n");
endif;
*/
// ********************************
// * Get zipcode from coordinates *
// ********************************
$constLocatingMode = LOCATING_MODE;
if ($constLocatingMode == "0") :
$zipcode = findZipcodeArea($longitude, $latitude);
if (trim($zipcode) == "") :
$constLocatingMode = "1";
endif;
endif;
if ($constLocatingMode == "1") :
// Get nearest coordinates
$sqlquery = "SELECT srvp.srvp_id, srvp.srvp_plz, srvp.srvp_latitude, srvp.srvp_longitude, "
. "SQRT(POW(ABS(srvp.srvp_latitude - $latitude),2) + POW(ABS(srvp.srvp_longitude - $longitude),2)) AS nb"
. " FROM serviceplz AS srvp"
. " ORDER BY nb"
. " LIMIT 0,1";
$result = $db->query($sqlquery);
if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage());
// all defined db-fields an titles shall become content of the following arrays
while ($row = $result->fetch_assoc()):
$f_srvp_plz = $row["srvp_plz"]; // Zipcode to be displayed
endwhile;
$result->free();
$zipcode = $f_srvp_plz;
endif;
$status_message = "<b>Letzte erfolgreiche Ortung: " . $zipcode . "</b></br></br>"
. "(" . $longitude . " / " . $latitude . " um " . formatOutput($gpsTime,"datetime","4") . " " . formatOutput($gpsTime,"datetime","10") . ")</br></br>"
. "<a href=\"../locating/map_courier.php?cr_sid=" . $f_cr_sid . "\" target=\"_blank\">[Kartendarstellung]</a><br><br></br>";
// *********************************
// * Update zipcode of the courier *
// *********************************
$updateRankingTime = TRUE;
// Get current zipcode of the courier out of the table "courier" (cr_locationzipcode) to compare with locating zipcode
$crLocationZipcode = getFieldValueFromId("courier","cr_id",$cr_id,"cr_locationzipcode");
$status_message .= "<b>(Freimeldung des Kuriers: " . $crLocationZipcode . ")</b><br><br>";
if ($zipcode != "" && $crLocationZipcode != "" && is_numeric($crLocationZipcode)) :
// Check current zipcode with locating zipcode
if ($zipcode == $crLocationZipcode) :
$updateRankingTime = FALSE;
else :
// Check locating zipcode is in neighbourhood
// If true then ok => do not update ranking time
// Get the general mediation mode for the headquarter
$mediationMode = MODE_INTERMEDIATION;
if ($mediationMode == "") :
$mediationMode = getFieldValueFromId("headquarters", "hq_id", "$hq_id", "hq_invmode");
endif;
// Get all neighbours for the current zipcode(area)
if ($mediationMode == "1") :
$zicodeArray = getCourierByRanking($crLocationZipcode, "0000010000", "", "");
$zicodeArray = $zicodeArray[5];
else :
$areaIdArray = getCourierByRanking($crLocationZipcode, "0000010000", "", "");
$areaIdArray = $areaIdArray[5];
// Add ID of the main mediation area
$srvpIdZipcode = getFieldValueFromId("serviceplz","srvp_plz",$crLocationZipcode,"srvp_id");
// $srvpaIdMain = getFieldValueFromId("serviceplzareamapping","srvp_id",$srvpIdZipcode,"srvpa_id");
$srvpaIdMain = $db->getOne("SELECT srvpam.srvpa_id FROM serviceplzarea AS srvpa, serviceplzareamapping AS srvpam" .
" WHERE srvpam.srvp_id = '" . $srvpIdZipcode . "' AND srvpa.srvpa_id = srvpam.srvpa_id AND srvpa.hq_id = '" . $hq_id . "'");
if ($areaIdArray == "") : $areaIdArray = array(); endif;
array_push($areaIdArray, $srvpaIdMain);
$areaIdArrayLen = count($areaIdArray);
$outputOfAllValidMainZipcodes = "<b>GÜLTIGE BEREICHE:</b><br>";
$outputOfAllValidMainZipcodes .= "_________________ <br><br>";
$outputOfAllValidMainZipcodes .= "<b>Hauptbereich:</b><br>";
$outputOfAllValidNeighbourZipcodes = "";
$zicodeArray = array();
for ($i = 0; $i < $areaIdArrayLen; $i++) :
if ($i < $areaIdArrayLen - 1) :
$outputOfAllValidNeighbourZipcodes .= "<b>Nachbarbereich " . ($i + 1) . "</b><br>";
endif;
$sqlquery = "SELECT srvp.srvp_plz"
. " FROM serviceplzareamapping AS srvpam, serviceplz AS srvp"
. " WHERE srvpam.srvp_id = srvp.srvp_id AND srvpam.srvpa_id = '" . $areaIdArray[$i] . "'";
$result = $db->query($sqlquery);
if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage());
while ($row = $result->fetch_assoc()):
$zicodeArray[] = $row[srvp_plz];
if ($i < $areaIdArrayLen - 1) :
$outputOfAllValidNeighbourZipcodes .= $row[srvp_plz] . "<br>";
else :
$outputOfAllValidMainZipcodes .= $row[srvp_plz] . "<br>";
endif;
endwhile;
$result->free();
if ($i < $areaIdArrayLen - 1) :
$outputOfAllValidNeighbourZipcodes .= "----------------- <br><br>";
else :
$outputOfAllValidMainZipcodes .= "----------------- <br><br>";
endif;
endfor;
$outputOfAllValidZipcodes = $outputOfAllValidMainZipcodes . $outputOfAllValidNeighbourZipcodes;
endif;
$zicodeArrayLen = count($zicodeArray);
for ($i = 0; $i < $zicodeArrayLen; $i++) :
if ($zipcode == $zicodeArray[$i]) :
$updateRankingTime = FALSE;
endif;
endfor;
endif;
$currentTime = getDateTime("0");
if ($updateRankingTime) :
if (locatingIsPlausible($cr_id, $locatingStateArray[1], $locatingStateArray[2], $locatingStateArray[3], $locatingStateArray[4], $locatingStateArray[5]) && $locatingStateArray[0] == "0") :
updateStmt("courier", "cr_id", $cr_id, array("cr_locationzipcode", $zipcode, "cr_availabletime", $currentTime));
$status_message .= "Die Rankingposition ging verloren! <br><br>";
else:
$status_message .= "Die Rankingposition bleibt erhalten! <br><br>";
$updateRankingTime = false; // wg. Logging s.u.
endif;
else :
// updateStmt("courier", "cr_id", $cr_id, array("cr_locationzipcode", $zipcode));
$status_message .= "Die Rankingposition bleibt erhalten! <br><br>";
endif;
if ($locatingStateArray[0] == "1"):
$status_message .= "<span style=\"color:red\"><b>Diese Positionsangabe ist veraltet, es sind keine aktuellen Ortungsdaten verf&uuml;gbar.<b></span><br><br>";
endif;
else :
$currentTime = getDateTime("0");
// 07.06.2024 CA: Kein Update wenn $locatingStateArray[0] != "0"
if ($zipcode != "" && $locatingStateArray[0] == "0") :
updateStmt("courier", "cr_id", $cr_id, array("cr_locationzipcode", $zipcode, "cr_availabletime", $currentTime));
endif;
endif;
// Update current position to courier with timestamp
/*
if ($longitude != "" && $latitude != "" &&
substr($longitude , 0, 1) != "0" && substr($latitude , 0, 1) != "0" &&
is_numeric($longitude) && is_numeric($latitude)) :
// updateStmt("courier", "cr_id", $cr_id, array("cr_gps_long", $longitude, "cr_gps_lat", $latitude, "cr_gps_time", $currentTime));
// Changed because of "cr_modify" has not to be changed by update and "cr_gps_type" has to be set!
if ($locatingStateArray[0] == "1") :
$sqlStmt = "UPDATE courier SET cr_gps_long = '" . $longitude . "', cr_gps_lat = '" . $latitude . "', cr_gps_time = '" . $currentTime . "', cr_gps_type = '1', cr_modify = cr_modify WHERE cr_id = '" . $cr_id . "'";
$res = $db->query($sqlStmt);
if (DB::isError($res)) die ("$PHP_SELF: <br>$sqlStmt<br>" . $res->getMessage());
endif;
endif;
*/
// ***********
// * LOGGING *
// ***********
// Get usr_id of the current employee (session)
$currentSessionUsrId = getFieldValueFromId("employee", "emp_id", $emp_id, "usr_id");
// Loose Ranking yes/no
$looseRanking = "NO";
// 07.06.2024 CA: Kein "Ranking verloren" wen alte PLZ leer war!"
if ($updateRankingTime && $crLocationZipcode != "" && is_numeric($crLocationZipcode)) : $looseRanking = "YES"; endif;
// Write logdata into log database
writeToLogDB("27",$hq_id,"0",$currentSessionUsrId,$cr_id,$f_cr_sid,"","LONG=".$longitude."|LAT=".$latitude."|ZIP_REAL=".$zipcode."|ZIP_FREE=".$crLocationZipcode."|NO=".$msisdn."|LRANK=".$looseRanking."|LMODE=".$constLocatingMode."|LOCOLD=".($locatingStateArray[0] == "0" ? "NO" : "YES"));
// ********************
// * Close connection *
// ********************
$requestID++;
$requestConnectionRelease = "<MESSAGE_TYPE=3><REQUEST_ID=" . $requestID . "><SESSION_HANDLE=" . $sessionHandle . ">";
$laenge = strlen($requestConnectionRelease);
$requestheader = $requestheaderOrg;
$requestheader = str_replace ("LENGTH", $laenge, $requestheader);
if ($echoEnabled) : echo $requestheader.$requestConnectionRelease . "<br><br><br>"; endif;
// Connect Release
// $response = connectD2($requestheader.$requestConnectionRelease."\r\n");
endif;
endif;
endif;
?>
<html lang="de">
<head>
<title>ORTUNG</title>
<link rel="stylesheet" type="text/css" href="../css/phoenix.css">
</head>
<body onLoad="this.moveTo((screen.width * 0.5)-(document.body.offsetWidth * 0.5),(screen.height * 0.5)-(document.body.offsetHeight * 0.5));">
<form action="<?php echo $locatingURL ?>" method="post">
<input type="hidden" name="f_cr_sid" value="<?php echo $f_cr_sid ?>">
<input type="hidden" name="useRemoteDB" value="<?php echo $useRemoteDB ?>">
<div valign="center" align="center">
<table cellspacing="0" cellpadding="0" vspace="0" hspace="0">
<tr>
<td align="center" valign="center">
<br><h2><b>Kurier: <?php echo $f_cr_sid?></b></h2><br>
<?php echo $status_message ?>
<br><br>
<?php echo ($outputOfAllValidZipcodes != "" ? $outputOfAllValidZipcodes . "<br><br>" : "") ?>
<input type="submit" value="Wiederholen">
<!-- <br><br>
<input type="button" value="Schließen" onClick="javascript:window.close();"> -->
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
+538
View File
@@ -0,0 +1,538 @@
<?php
/*=======================================================================
*
* locating_tmobile.php
*
* Autor: Marc Vollmann
*
=======================================================================*/
include_once ("../include/mcglobal.inc.php");
include_once ("../include/auth.inc.php");
include_once ("../include/ranking.inc.php");
include_once ("../include/pnpoly.inc.php");
// Check HTTP-Parameters
getSecHttpVars("1",array("f_act", "customerId", "cscIdRoot", "cscIdActual", "f_cr_sid", "useRemoteDB"));
// Check for authentication access and granted rights
$usrAccessArray["hq"] = "1";
authCheckForAccess($hq_id, $usr_id, $emp_id, "1", $customerId, $cscIdRoot, $cscIdActual);
authCheckEmployeeRights($emp_id, "4", "1");
// ******************************************************
// Very special treatment for access to remote database
include_once ("../include/bwv.inc.php");
$remoteDBisActive = false;
if (BWV2_checkEmpRemoteDBAccess($useRemoteDB, $emp_id)) :
$remoteDBisActive = BWV2_setRemoteDBAccessParameter();
endif;
// ******************************************************
/*
FLOW:
- General definitions
- Get courier-id from http-request
- Search MSISDN from courier-id
- Generate request
- Send request
- Parse response
- Search x,y-coordinates in cells to be valid
- Compute longitude and latitude (transformation)
- Get zipcode from coordinates
- Update zipcode of the courier
- Write to log-file|log-db (employee, datetime, courier-id, msisdn, [zipcode, x_y_of_cell])
- Output zipcode
*/
// ***********************
// * General definitions *
// ***********************
// Proxy und Port fuer HTTPS
$proxy = "";
$port = ":443"; // Remember ":" in HTTP-Header ... $server:$port
// Server innerhalb der Nachricht
// $server = '10.10.1.244'; // E-Plus
// $server = "193.254.134.115"; // D1 - develop
$server = "193.254.161.68"; // D1 - live (https://crisp.t-mobile.de/cgi-bin/vasp.sh)
// Access to a special remote file
$file = "cgi-bin/vasp.sh";
// Request id
// $requestID = "1";
$requestID = rand(1,30000);
// User and password
// $vaspID = "600";
// $password = "mi6t890";
$vaspID = "65";
$password = "Alpha_2405";
// Service ID
$serviceId = "160";
// Maximum of age of locating info
$maxAgeOfLocatingInfoInSeconds = "300";
// Minimum of the granularity
$minOfGranularityInMeter = "99999";
// Client Certificate and Private Key
// $clientcertkey = '-cert ./client-cert-tc/cert.pem -key ./client-cert-tc/key.pem';
$clientcertkey = '-cert cacert.pem -key privkey.pem';
// Path to openssl
// $openssl = 'F:/Install/Security/OpenSSL/openssl';
$openssl = 'openssl';
// Port of openssl
$opensslPort = "9213";
// Only for output
$status_message = "";
// Logging enabled
$loggingEnabled = FALSE;
// Echo enabled
$echoEnabled = FALSE;
// *************
// * Functions *
// *************
function writeLocatingLog($value) {
global $loggingEnabled;
if ($loggingEnabled) :
writeToFile($value);
endif;
}
function openSSL_connect($opensslPort, $completeReq) {
$response = "";
$fp = fsockopen ("127.0.0.1", $opensslPort, $errno, $errstr, 10);
if (!$fp) {
$response = "$errstr ($errno)<br>\n";
} else {
fputs ($fp, $completeReq);
fflush($fp);
// Read header
$httpHeader = "";
$httpBodyLength = 0;
if (!feof($fp)) :
$line = trim(fgets ($fp,1024));
$httpHeader .= trim(fgets ($fp,1024));
while (!feof($fp) && $line != "") {
$line = trim(fgets ($fp,1024));
$httpHeader .= $line;
if (!(strpos($line, "Content-length: ") === FALSE)) :
$httpBodyLength = trim(substr($line, 16));
endif;
}
endif;
if ($httpBodyLength > 0) :
$response .= fgets ($fp, $httpBodyLength + 1);
endif;
// while (!feof($fp)) {
// $response .= fgets ($fp,1024);
// }
fclose ($fp);
}
return $response;
}
// *********************************
// * Search MSISDN from courier-id *
// *********************************
// Get courier-id from the courier-sid (e.g. SIDs: 1013, 1019, etc.)
$cr_id = getFieldValueFromId("courier","cr_sid",$f_cr_sid,"cr_id");
$msisdn = getFieldValueFromId("courier","cr_id",$cr_id,"cr_mobile_pda");
// Remove blanks in MSISDN and check beginning with "49"
// (IMPORTANT: No check for other chars because checked in javascript !!!)
$msisdn = ereg_replace (" ", "", $msisdn);
$msisdn = str_replace("+", "", $msisdn);
if (!ereg("^" . COUNTRY_FON_PREFIX, $msisdn)) :
if (ereg("^0", $msisdn)) :
$msisdn = substr($msisdn, 1);
endif;
$msisdn = COUNTRY_FON_PREFIX . $msisdn;
endif;
// Test-MSISDN D1:
// $msisdn = "491703900198";
// ********************
// * Generate request *
// ********************
/*
TEMPLATES:
Connection Setup
request:
<MESSAGE_TYPE=1><REQUEST_ID=1><VASP_ID=500><PASSWORD=testtest>
response:
<MESSAGE_TYPE=2><REQUEST_ID=1><SESSION_HANDLE=2876><STATUS=0><GMT_DIFFERENCE=2>
Location (n-mal)
request:
<MESSAGE_TYPE=10><REQUEST_ID=1><SESSION_HANDLE=2876><SERVICE_ID=160><MAX_INFO_AGE=6000><MIN_GRANULARITY=2000><MOBILE_ID_TYPE=0><MOBILE_ID=4917112345467><TEXT=48656C6C6F><REQUEST_TIME=20010719102200><GMT_DIFFERENCE=2>
response:
<MESSAGE_TYPE=11><REQUEST_ID=1><SESSION_HANDLE=2876><TIMESTAMP=20010719102321><GEO_REF_SYSTEM=0><POSITION_FORMAT=2><MOBILE_ID_TYPE=0><<MOBILE_ID=491711234567><MOBILE_POSITION=<POSITION_FORMAT=CIRCLE;CENTER=555555,133333;RADIUS=646>><MOBILE_AGE_OF_INFO=-2744><MOBILE_STATUS=0>>
Connection Release
request:
<MESSAGE_TYPE=3><REQUEST_ID=1><SESSION_HANDLE=2876>
response:
<MESSAGE_TYPE=4><REQUEST_ID=1><SESSION_HANDLE=2876><STATUS=0>
error response:
<MESSAGE_TYPE=13><REQUEST_ID=1><SESSION_HANDLE=2876><STATUS=40>
*/
// Define header request
$requestheaderOrg = "POST /" . $file . " HTTP/1.1\r\n" .
"Host: $server$port\r\n" .
"Content-Type: text/plain\r\n" .
"Content-length: LENGTH\r\n\r\n";
// Connection request
$requestConnectionSetup = "<MESSAGE_TYPE=1><REQUEST_ID=" . $requestID . "><VASP_ID=" . $vaspID . "><PASSWORD=" . $password . ">";
$laenge = strlen($requestConnectionSetup);
$requestheader = $requestheaderOrg;
$requestheader = str_replace ("LENGTH", $laenge, $requestheader);
if ($echoEnabled) : echo $requestheader . $requestConnectionSetup . "\n\n\n"; endif;
$response = openSSL_connect($opensslPort, $requestheader.$requestConnectionSetup."\r\n");
if ($echoEnabled) : echo $response . "\n\n\n"; endif;
if (!(strpos($response, "<MESSAGE_TYPE=13>") === FALSE)) :
// Error occurred, no connection ...
$status_message = "Die Verbindung konnte nicht hergestellt werden!";
else :
if ((strpos($response, "<MESSAGE_TYPE=2>") === FALSE)) :
// Error occurred, no session handle delivered ...
$status_message = "Es wurde kein Sessionhandle zurückgeliefert!";
else :
// Get session handle from connection request
$beginPos = strpos($response, "<SESSION_HANDLE=") + 16;
$endPos = strpos($response, "><STATUS");
$sessionHandle = substr($response, $beginPos, $endPos - $beginPos);
if ($echoEnabled) : echo $sessionHandle . "\n\n\n"; endif;
// Define locating request
$requestID++;
$requestLocating = "<MESSAGE_TYPE=10><REQUEST_ID=" . $requestID . ">" .
"<SESSION_HANDLE=" . $sessionHandle . ">" .
"<SERVICE_ID=" . $serviceId . ">" .
"<MAX_INFO_AGE=" . $maxAgeOfLocatingInfoInSeconds . ">" .
"<MIN_GRANULARITY=" . $minOfGranularityInMeter . ">" .
"<MOBILE_ID_TYPE=0>" .
"<MOBILE_ID=" . $msisdn . ">" .
"<REQUEST_TIME=" . getDateTime("year") . getDateTime("month") . getDateTime("day") . getDateTime("hour") . getDateTime("minute") . getDateTime("second") . ">" .
"<GMT_DIFFERENCE=2>";
$laenge = strlen($requestLocating);
$requestheader = $requestheaderOrg;
$requestheader = str_replace ("LENGTH", $laenge, $requestheader);
if ($echoEnabled) : echo $requestheader.$requestLocating . "\n\n\n"; endif;
// Locating request
$response = openSSL_connect($opensslPort, $requestheader.$requestLocating."\r\n");
if ($echoEnabled) : echo $response . "\n\n\n"; endif;
if (!(strpos($response, "<MESSAGE_TYPE=13>") === FALSE)) :
$status_message = "Bei der Lokalisierung trat ein Fehler auf!";
else :
if ((strpos($response, "<MESSAGE_TYPE=11>") === FALSE)) :
$status_message = "Die Lokalisierung war nicht möglich!";
else :
// GET LOCATING INFOS OF THE RESPONSE
// Get session handle from connection request
$beginPos = strpos($response, "<POSITION_FORMAT=CIRCLE;CENTER=") + 31;
$endPos = strpos($response, ";RADIUS");
$coordPair = substr($response, $beginPos, $endPos - $beginPos);
if ($echoEnabled) : echo "CoordPair: " . $coordPair . "<br>"; endif;
$beginPos = strpos($response, "RADIUS=") + 7;
$endPos = strpos($response, ";>><MOBILE_AGE");
$radius = substr($response, $beginPos, $endPos - $beginPos);
if ($echoEnabled) : echo "Radius: " . $radius . "<br>"; endif;
$coordPairArray = spliti(",",$coordPair);
// Transform data
// Example: $coordPair = "555555,133333"
// $coordPairArray[0] = "555555" | $coordPairArray[0] = "133333"
// $x_coord_array[0] = "55" (Stellen 0 und 1) | $x_coord_array[1] = "55" (Stellen 2 und 3) | $x_coord_array[2] = "55" (Stellen 4 und 5)
// $y_coord_array[0] = "13" (Stellen 0 und 1) | $y_coord_array[1] = "33" (Stellen 2 und 3) | $y_coord_array[2] = "33" (Stellen 4 und 5)
$x_coord_array = array();
$x_coord_array[0] = substr($coordPairArray[0], 0, 2);
$x_coord_array[1] = substr($coordPairArray[0], 2, 2);
$x_coord_array[2] = substr($coordPairArray[0], 4);
$y_coord_array = array();
$y_coord_array[0] = substr($coordPairArray[1], 0, 2);
$y_coord_array[1] = substr($coordPairArray[1], 2, 2);
$y_coord_array[2] = substr($coordPairArray[1], 4);
// ***************************************************
// * Compute longitude and latitude (transformation) *
// ***************************************************
$longitude = $y_coord_array[ 0 ] + $y_coord_array[ 1 ] /60 + $y_coord_array[ 2 ] / 3600;
$latitude = $x_coord_array[ 0 ] + $x_coord_array[ 1 ] / 60 + $x_coord_array[ 2 ] / 3600;
// ********************************
// * Get zipcode from coordinates *
// ********************************
if (LOCATING_MODE == "0") :
$zipcode = findZipcodeArea($longitude, $latitude);
else :
// Get nearest coordinates
$sqlquery = "SELECT srvp.srvp_id, srvp.srvp_plz, srvp.srvp_latitude, srvp.srvp_longitude, "
. "SQRT(POW(ABS(srvp.srvp_latitude - $latitude),2) + POW(ABS(srvp.srvp_longitude - $longitude),2)) AS nb"
. " FROM serviceplz AS srvp"
. " ORDER BY nb"
. " LIMIT 0,1";
$result = $db->query($sqlquery);
if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage());
// all defined db-fields an titles shall become content of the following arrays
while ($row = $result->fetch_assoc()):
$f_srvp_plz = $row["srvp_plz"]; // Zipcode to be displayed
endwhile;
$result->free();
$zipcode = $f_srvp_plz;
endif;
$status_message = "<b>REALER Standort-PLZ des Kuriers: " . $zipcode . "</b>" . " (" . $longitude . " / " . $latitude . ")<br><br>";
// *********************************
// * Update zipcode of the courier *
// *********************************
$updateRankingTime = TRUE;
// Get current zipcode of the courier out of the table "courier" (cr_locationzipcode) to compare with locating zipcode
$crLocationZipcode = getFieldValueFromId("courier","cr_id",$cr_id,"cr_locationzipcode");
$status_message .= "<b>(Freimeldung des Kuriers: " . $crLocationZipcode . ")</b><br><br>";
if ($zipcode != "" && $crLocationZipcode != "" && is_numeric($crLocationZipcode)) :
// Check current zipcode with locating zipcode
if ($zipcode == $crLocationZipcode) :
$updateRankingTime = FALSE;
else :
// Check locating zipcode is in neighbourhood
// If true then ok => do not update ranking time
// Get the general mediation mode for the headquarter
$mediationMode = MODE_INTERMEDIATION;
if ($mediationMode == "") :
$mediationMode = getFieldValueFromId("headquarters", "hq_id", "$hq_id", "hq_invmode");
endif;
// Get all neighbours for the current zipcode(area)
if ($mediationMode == "1") :
$zicodeArray = getCourierByRanking($crLocationZipcode, "0000010000", "", "");
$zicodeArray = $zicodeArray[5];
else :
$areaIdArray = getCourierByRanking($crLocationZipcode, "0000010000", "", "");
$areaIdArray = $areaIdArray[5];
// Add ID of the main mediation area
$srvpIdZipcode = getFieldValueFromId("serviceplz","srvp_plz",$crLocationZipcode,"srvp_id");
// $srvpaIdMain = getFieldValueFromId("serviceplzareamapping","srvp_id",$srvpIdZipcode,"srvpa_id");
$srvpaIdMain = $db->getOne("SELECT srvpam.srvpa_id FROM serviceplzarea AS srvpa, serviceplzareamapping AS srvpam" .
" WHERE srvpam.srvp_id = '" . $srvpIdZipcode . "' AND srvpa.srvpa_id = srvpam.srvpa_id AND srvpa.hq_id = '" . $hq_id . "'");
if ($areaIdArray == "") : $areaIdArray = array(); endif;
array_push($areaIdArray, $srvpaIdMain);
$areaIdArrayLen = count($areaIdArray);
$outputOfAllValidMainZipcodes = "<b>GÜLTIGE BEREICHE:</b><br>";
$outputOfAllValidMainZipcodes .= "_________________ <br><br>";
$outputOfAllValidMainZipcodes .= "<b>Hauptbereich:</b><br>";
$outputOfAllValidNeighbourZipcodes = "";
$zicodeArray = array();
for ($i = 0; $i < $areaIdArrayLen; $i++) :
if ($i < $areaIdArrayLen - 1) :
$outputOfAllValidNeighbourZipcodes .= "<b>Nachbarbereich " . ($i + 1) . "</b><br>";
endif;
$sqlquery = "SELECT srvp.srvp_plz"
. " FROM serviceplzareamapping AS srvpam, serviceplz AS srvp"
. " WHERE srvpam.srvp_id = srvp.srvp_id AND srvpam.srvpa_id = '" . $areaIdArray[$i] . "'";
$result = $db->query($sqlquery);
if (DB::isError($result)) die ("$PHP_SELF: " . $result->getMessage());
while ($row = $result->fetch_assoc()):
$zicodeArray[] = $row[srvp_plz];
if ($i < $areaIdArrayLen - 1) :
$outputOfAllValidNeighbourZipcodes .= $row[srvp_plz] . "<br>";
else :
$outputOfAllValidMainZipcodes .= $row[srvp_plz] . "<br>";
endif;
endwhile;
$result->free();
if ($i < $areaIdArrayLen - 1) :
$outputOfAllValidNeighbourZipcodes .= "----------------- <br><br>";
else :
$outputOfAllValidMainZipcodes .= "----------------- <br><br>";
endif;
endfor;
$outputOfAllValidZipcodes = $outputOfAllValidMainZipcodes . $outputOfAllValidNeighbourZipcodes;
endif;
$zicodeArrayLen = count($zicodeArray);
for ($i = 0; $i < $zicodeArrayLen; $i++) :
if ($zipcode == $zicodeArray[$i]) :
$updateRankingTime = FALSE;
endif;
endfor;
endif;
$currentTime = getDateTime("0");
if ($updateRankingTime) :
updateStmt("courier", "cr_id", $cr_id, array("cr_locationzipcode", $zipcode, "cr_availabletime", $currentTime));
$status_message .= "Die Rankingposition ging verloren! <br><br>";
else :
// updateStmt("courier", "cr_id", $cr_id, array("cr_locationzipcode", $zipcode));
$status_message .= "Die Rankingposition bleibt erhalten! <br><br>";
endif;
else :
$currentTime = getDateTime("0");
endif;
// Update current position to courier with timestamp
if ($longitude != "" && $latitude != "" &&
substr($longitude , 0, 1) != "0" && substr($latitude , 0, 1) != "0" &&
is_numeric($longitude) && is_numeric($latitude)) :
updateStmt("courier", "cr_id", $cr_id, array("cr_gps_long", $longitude, "cr_gps_lat", $latitude, "cr_gps_time", $currentTime));
endif;
// ***********
// * LOGGING *
// ***********
// Get usr_id of the current employee (session)
$currentSessionUsrId = getFieldValueFromId("employee", "emp_id", $emp_id, "usr_id");
// Loose Ranking yes/no
$looseRanking = "NO";
if ($updateRankingTime) : $looseRanking = "YES"; endif;
// Write logdata into log database
writeToLogDB("27",$hq_id,"0",$currentSessionUsrId,$cr_id,$f_cr_sid,"","LONG=".$longitude."|LAT=".$latitude."|ZIP_REAL=".$zipcode."|ZIP_FREE=".$crLocationZipcode."|NO=".$msisdn."|LRANK=".$looseRanking);
// ********************
// * Close connection *
// ********************
$requestID++;
$requestConnectionRelease = "<MESSAGE_TYPE=3><REQUEST_ID=" . $requestID . "><SESSION_HANDLE=" . $sessionHandle . ">";
$laenge = strlen($requestConnectionRelease);
$requestheader = $requestheaderOrg;
$requestheader = str_replace ("LENGTH", $laenge, $requestheader);
if ($echoEnabled) : echo $requestheader.$requestConnectionRelease . "<br><br><br>"; endif;
// Connect Release
$response = openSSL_connect($opensslPort, $requestheader.$requestConnectionRelease."\r\n");
endif;
endif;
endif;
endif;
?>
<html lang="de">
<head>
<title>ORTUNG</title>
<link rel="stylesheet" type="text/css" href="../css/phoenix.css">
</head>
<body onLoad="this.moveTo((screen.width * 0.5)-(document.body.offsetWidth * 0.5),(screen.height * 0.5)-(document.body.offsetHeight * 0.5));">
<form action="../locating/locating_tmobile.php" method="post">
<input type="hidden" name="f_cr_sid" value="<?php echo $f_cr_sid ?>">
<input type="hidden" name="useRemoteDB" value="<?php echo $useRemoteDB ?>">
<div valign="center" align="center">
<table cellspacing="0" cellpadding="0" vspace="0" hspace="0">
<tr>
<td align="center" valign="center">
<b>Kurier-SID: <?php echo $f_cr_sid?></b><br><br>
MSISDN: <?php echo $msisdn?><br><br>
<br><br><br>
<input type="submit" value="Wiederholen">
<br><br>
<input type="button" value="Schließen" onClick="javascript:window.close();">
<br><br><br><br><br>
<?php echo $status_message ?>
<br><br><br><br><br>
<?php echo $outputOfAllValidZipcodes ?>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
+125
View File
@@ -0,0 +1,125 @@
<?php
include_once ("../include/dbglobal.inc.php");
include_once ("../include/ranking.inc.php"); // Checks ranking to be lost or not
$today = getdate();
$start_time = date("Y-m-d H:i:s", mktime(0, 0, 0, $today['mon'], $today['mday'], $today['year']));
//list ($zipcode, $jb_id, $hq_id_string) = getHttpVars(array("zipcode", "jb_id", "hq_id_string"));
$zipcode = getFieldValueFromId("address", "ad_id", getFieldValueFromClause("tour", "ad_id", "jb_id = '" . $jb_id . "' AND tr_sort = '1'"), "ad_zipcode");
$hq_id_string = $hq_id;
include("../jobs/job_courier.inc.php");
$vht_id_str_js = str_replace("var vht_id_str=new Array();\n", "", $vht_id_str_js);
//$js_args = "";
//if (isset($jb_id) && $jb_id != "")
// $js_args = $jb_id . ", '" . $zipcode . "'" . ", '" . $hq_id_string . "'";
$companyIds = array();
$sqlquery =
"SELECT cmp.cmp_id, cr.cr_sid"
. " FROM company AS cmp, courier AS cr"
. " WHERE "
. " cmp.cmp_id = cr.cmp_id AND"
. " cr.hq_id = '" . $hq_id . "' AND"
. " cr.cr_sid != '' AND NOT (cr.cr_sid IS NULL)";
$res = $db->query($sqlquery);
if (DB::isError($res)) reportDie ("$PHP_SELF: '$sqlquery'" . $res->getMessage());
while ($row = $res->fetch_assoc()):
$companyIds[$row["cr_sid"]] = "companyId=" . ec($row["cmp_id"]);
endwhile;
$res->free();
$vhtIds = array();
$sqlquery =
"SELECT mt_sort, mt_value FROM `metatype` WHERE mt_type = 'vehicletype'";
$res = $db->query($sqlquery);
if (DB::isError($res)) reportDie ("$PHP_SELF: '$sqlquery'" . $res->getMessage());
while ($row = $res->fetch_assoc()):
$vhtIds[$row["mt_sort"]] = $row["mt_value"];
endwhile;
$res->free();
//$current_jobs = array();
//$sqlQuery = "SELECT jb_id, jb_ordertime, cr_sid FROM job WHERE jb_status = 1 ORDER BY jb_ordertime ASC";
//$res = $db->query($sqlQuery);
//if (DB::isError($res)) reportDie ("$PHP_SELF: '$sqlQuery': " . $res->getMessage());
//while ($row = $res->fetch_assoc()):
// $current_jobs[$row["cr_sid"]][] = array($row["jb_id"], $row["jb_ordertime"]);
//endwhile;
//$res->free();
function formDate($sqlDate) {
global $today;
if ($today['mon'] == substr($sqlDate, 5, 2)
&& $today['mday'] == substr($sqlDate, 8, 2)
&& $today['year'] == substr($sqlDate, 0, 4)) {
return substr($sqlDate, 11, 5) . " Uhr";
}
return substr($sqlDate, 11, 5) . " Uhr, " . substr($sqlDate, 8, 2) . "." . substr($sqlDate, 5, 2) . ".";
}
function mk_text($cr_locationzipcode, $cr_availabletime, $cr_gps_time, $cr_gps_type, $cr_available, $cr_sid, $vht_id, $cr_mobile_pda, $usr_phone, $usr_phone2, $jb_id) {
global $db, $companyIds, $current_jobs, $customer_special, $courier_special, $vhtIds, $cs_id, $usr_id;
$vhtType = $vhtIds[$vht_id];
$cr_gps_type_text = "";
if ($cr_gps_type == 0) {
$cr_gps_type_text = "unbestimmt";
} elseif ($cr_gps_type == 1) {
$cr_gps_type_text = "LBS";
} elseif ($cr_gps_type == 2) {
$cr_gps_type_text = "GPS";
} elseif ($cr_gps_type == 3) {
$cr_gps_type_text = "Network";
} elseif ($cr_gps_type == 9) {
$cr_gps_type_text = "Ortung aus";
}
$detailLink = "";
if (isset($current_jobs[$cr_sid]))
foreach ($current_jobs[$cr_sid] AS $jobA) {
$detailLink .= ($customer_special
? ""
: "<a href=\"javascript:popupWindow(\'../admin/jb_detail.php?job_id=" . $jobA[0] . "\',\'Auftrag\',\'\');\">" . $jobA[0] . " (" . formDate($jobA[1]) . ")</a><br>\\n");
$jb_tourdataA = explode("|", $jobA[4]);
$plzA = explode(";", $jb_tourdataA[0]);
$pickedUp1 = "";
$pickedUp2 = "";
if ($jobA[5] == 1):
$pickedUp1 = "<span style=\"color:red\">(</span>";
$pickedUp2 = "<span style=\"color:red\">)</span>";
endif;
$detailLink .= $pickedUp1 . $plzA[0] . $pickedUp2 . "&nbsp;-&gt;&nbsp;" . ((count($plzA) > 2) ? "...&nbsp;-&gt;&nbsp;" : "") . $plzA[count($plzA) - 1] . "<br>\\n";
}
if ($detailLink != "")
$detailLink .= "<br>";
$cr_sid_link = "";
if ($jb_id != "") {
$jb_offer = $db->getOne("SELECT jb_offer FROM job WHERE jb_id = " . $jb_id);
if ($jb_offer == 0) {
$cr_sid_link = ($customer_special ? "" : "<center><b><a href=\"javascript:setCourier(\'" . $jb_id . "\',\'" . $cr_sid . "\');\">" . "[Auftrag zuweisen]" . "</a></b></center>");
} else {
$cr_sid_link = ($customer_special ? "" : "<center><b>" . "[Auftrag ist ein Angebot]" . "</b></center>");
}
}
return
"'" .
"<center><b>" .
($customer_special ? "" : "<a href=\"../admin/courier_special.php?" . $companyIds[$cr_sid] . "\" target=\"_blank\">") .
ereg_replace("[^[:digit:]+]", "", $cr_sid) . " ($vhtType)<\/a></b>" .
"<br>" . ($customer_special ? "Tel.: " . (trim($usr_phone) != "" ? $usr_phone : $usr_phone2) : $cr_mobile_pda) .
"<br>" . $cr_sid_link .
"<br>" . $detailLink . "\\n" .
($customer_special ? "" : "<i>Freimeldung:</i> " . $cr_locationzipcode . "<br>" . formDate($cr_availabletime) . "<br>\\n" ) .
"<i>Letzte Ortung:</i> " . formDate($cr_gps_time) . " (" . $cr_gps_type_text . ")" .
($customer_special ? "" : "<br>" .
($cr_available == 1
? "<a href=\"../locating/locating.php?f_cr_sid=" . $cr_sid . "\" target=\"_blank\">(Neue Ortung)</a></center>"
: "<span style=\"color:red\">(nicht online)</span>")) .
"'";
}
?>
+52
View File
@@ -0,0 +1,52 @@
// Examples taken from:
// http://leafletjs.com/examples/quick-start/
// http://openwebcc.github.io/lv/examples/index.html
// https://meggsimum.de/?p=86
// http://stackoverflow.com/questions/9394190/leaflet-map-api-with-google-satellite-layer
var baseMaps = {
osm_de : L.tileLayer("https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png", {
attribution : '<a href="http://www.openstreetmap.org/">Karte hergestellt aus OpenStreetMap-Daten</a> | Lizenz: <a rel="license" href="http://opendatacommons.org/licenses/odbl/">Open Database License (ODbL)</a>'
}),
osm : L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap contributors</a>'
}),
osm_bw : L.tileLayer('https://tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap contributors</a>'
})
// oepnv : L.tileLayer("http://tile.xn--pnvkarte-m4a.de/tilegen/{z}/{x}/{y}.png", {
// attribution: 'Map data &copy; <a href="http://www.openstreetmap.org/">OpenStreetMap</a> and contributors <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
// }),
};
var map = L.map('map', {
center: homeCoords,
zoom: homeZoom,
layers : [baseMaps.osm_de].concat(defaultLayers)
});
var layerControl = L.control.layers({
"OSM Mapnik german style" : baseMaps.osm_de,
"OSM Mapnik" : baseMaps.osm,
"OSM Mapnik B&W" : baseMaps.osm_bw
// "&Ouml;PNV Karte" : baseMaps.oepnv,
},
overlayMaps
).addTo(map);
L.control.scale({
'imperial': false
}).addTo(map);
L.control.coordinates().addTo(map);
map.on('popupopen', onPopupOpen);
//// http://www.liedman.net/leaflet-routing-machine/tutorials/basic-usage/
//L.Routing.control({
// waypoints: [
// L.latLng(53.626, 9.838),
// L.latLng(53.80777, 10.14576)
// ],
// routeWhileDragging: false
//}).addTo(map);
+643
View File
@@ -0,0 +1,643 @@
<?php
include_once("../include/global.inc.php");
include_once("../include/auth.inc.php");
$usr_type = getFieldValueFromId("user", "usr_id", $usr_id, "usr_type");
if ($usr_type != "1"):
$die_text = "Keine Berechtigung";
if ($usr_type == "2"):
$csc_id = getFieldValueFromId("employee", "usr_id", $usr_id, "csc_id");
$cs_id = getFieldValueFromId("costcenter", "csc_id", $csc_id, "cs_id");
if (getParameterValue("0", "MASK_JB_MAP_VIEW_ENABLED_" . $cs_id, "0") != "1"):
die($die_text);
endif;
else:
die($die_text);
endif;
endif;
include_once ("../include/image.inc.php");
include_once ("../locating/xServer.inc.php");
$standalone = "1"; // has to be set before including "ranking.inc.php"
include_once ("../include/ranking.inc.php");
$hq_id = $_SESSION['hq_id'];
if ($hq_id == "") : $hq_id = $HTTP_SESSION_VARS['hq_id']; endif;
list ($jb_id) = getHttpVars(array("jb_id"));
if ($jb_id != ""):
$hq_id = getFieldValueFromId("job", "jb_id", $jb_id, "hq_id");
endif;
include_once ("../locating/map.inc.php");
$allCoords = array();
$today = getdate();
function getCoordsOffset($x, $y) {
global $allCoords;
$xx = round($x, 5);
$yy = round($y, 5);
foreach ($allCoords as $coords) {
if ($coords[0] == $xx && $coords[1] == $yy):
return $coords[2]++;
endif;
}
$allCoords[] = array($xx, $yy, 1);
return 0;
}
// Makes an image more transparent
function getTransparency2 ($im, $scalingFactorPercent = "0", $imVhtSizeX = "200", $imVhtSizeY = "200") {
if ($im) :
// Get size of the original image
$imSizeX = imagesx($im);
$imSizeY = imagesy($im);
// Create a new white temporary image for merging with original image
// $imTmp = @imagecreate ($imSizeX, $imSizeY) or die ("Cannot Initialize new GD image stream");
$imTmp = @imagecreate ($imVhtSizeX, $imVhtSizeY) or die ("Cannot Initialize new GD image stream");
imagecolorallocate ($imTmp, 237, 237, 237);
// int ImageCopy ( int dst_im, int src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h);
imagecopymerge ( $im, $imTmp, 0, 0, 0, 0, $imSizeX, $imSizeY, $scalingFactorPercent);
// $index = imagecolorexact($im, 255, 255, 255);
// imagecolortransparent($im, $index);
// $transpCol = imagecolorallocate ($im, 255, 255, 255);
// imagecolortransparent($im, $transpCol);
endif;
return $im;
}
// Display courier image with vehicle icon
function generateVehicleImage ($jb_id, $crSid, $vhtID = "2", $crGpsTime = "00-00-00 00:00:00", $cr_occupied, $cr_locationzipcode) {
global $hqMnemonic, $searchCrSid, $cancel_man;
//echo $crSid."<br>\n". $vhtID ."<br>\n". $crGpsTime ."<br>\n". $cr_occupied;
$availCol = "red";
if ($cr_occupied != 1):
$availCol = "green";
if (in_array($crSid, $cancel_man))
$availCol = "pink";
for ($i = 0; $i <= 4; $i++):
if (!is_numeric(substr($cr_locationzipcode, $i, 1))):
$availCol = "orange";
break;
endif;
endfor;
endif;
//echo "$crSid, $cr_locationzipcode, $availCol \n";
$vhtFileName = "";
if ($vhtID == "2") : $vhtFileName = "pkw_" . $availCol . ".png" ; endif;
if ($vhtID == "3") : $vhtFileName = "kombi_" . $availCol . ".png" ; endif;
if ($vhtID == "4") : $vhtFileName = "kasten_" . $availCol . ".png" ; endif;
if ($vhtID == "5") : $vhtFileName = "bus_" . $availCol . ".png" ; endif;
if ($vhtID == "6") : $vhtFileName = "grbus_" . $availCol . ".png" ; endif;
if ($vhtID == "7") : $vhtFileName = "lkw_" . $availCol . ".png" ; endif;
if ($vhtID > "7") : $vhtFileName = "lkw_" . $availCol . ".png" ; endif;
if ($vhtFileName != "") :
$imVht = @ImageCreateFromPNG ("../images/" . $vhtFileName);
$imVhtSizeX = imagesx($imVht);
$imVhtSizeY = imagesy($imVht);
// Set transparency of the vehicle icon
$currSeconds = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y"));
$crGpsTimeSeconds = mktime(substr($crGpsTime,11,2), substr($crGpsTime,14,2), substr($crGpsTime,17,2), substr($crGpsTime,5,2), substr($crGpsTime,8,2), substr($crGpsTime,0,4));
$diffMinutes = (($currSeconds - $crGpsTimeSeconds) / 60);
$transparencyScaleVehicleIcon = min((floor($diffMinutes / 15) * 10) - 10, 80);
// $boxPointsArray = imagettftext ($im, 10, 0, 300, 500, $lineColBlack, $textFontPath, $transparencyScaleVehicleIcon);
// setTextBox ($im, $boxPointsArray, "2", $lineColBlack);
if ($transparencyScaleVehicleIcon > 0) :
$imVht = getTransparency2($imVht, $transparencyScaleVehicleIcon, $imVhtSizeX, $imVhtSizeY);
endif;
// Search for a special vehicle
if ($searchCrSid != "" && strtolower($crSid) == strtolower($searchCrSid)) :
// Zuppel the box ... :-)
$boxPointsArray[0] += 2; $boxPointsArray[5] += 2; $boxPointsArray[6] += 2; $boxPointsArray[7] += 2;
$lineColRed = imagecolorallocate ($imVht, 255, 0, 0);
setTextBox ($imVht, $boxPointsArray, "2", $lineColRed);
endif;
$imMark = @ImageCreateFromPNG ("../images/marker_white_big.png");
imagealphablending($imMark, true);
imagesavealpha($imMark, true);
$lineCol = imagecolorallocate ($imMark, 0, 0, 0);
$crSidNo = ereg_replace("[^[:digit:]+]","",$crSid);
imagettftext ($imMark, 8, 0, 10, 12, $lineCol, "../include/arial.ttf", $crSidNo);
$posx = (imagesy($imMark) - $imVhtSizeX) / 2 + 2;
$posy = (imagesx($imMark) - $imVhtSizeY) / 2 + 2;
imagecopy($imMark, $imVht, $posx, $posy, 0, 0, $imVhtSizeX, $imVhtSizeY);
imagepng($imMark, "../temp/captchas/" . $jb_id . $crSid . ".png");
return array($imVhtSizeX, $imVhtSizeY);
endif;
}
function generateStationImage ($jb_id, $tr_sort, $tr_status) {
$imgFilename = "../temp/captchas/" . $jb_id . "-" . $tr_sort . ".png";
$imMark = ($tr_status == 1 ? @ImageCreateFromPNG ("../images/marker_green.png") : @ImageCreateFromPNG ("../images/marker_red.png"));
imagealphablending($imMark, true);
imagesavealpha($imMark, true);
$lineCol = imagecolorallocate ($imMark, 0, 0, 0);
$x = 11;
if ($tr_sort > 9)
$x = 8;
imagettftext ($imMark, 8, 0, $x, 14, $lineCol, "../include/arial.ttf", $tr_sort);
imagepng($imMark, $imgFilename);
return $imgFilename;
}
$errorMsg = "";
$hq_marker = "../images/marker_sb.png";
if ($hq_id >= 100)
$hq_marker = "../images/marker_ht.png";
$lat = 0;
$long = 0;
// Zentrale
$sqlquery = "SELECT hq_gps_long, hq_gps_lat FROM headquarters WHERE hq_id = '$hq_id'";
$markers_javascript = "";
$res = $db->query($sqlquery);
if (DB::isError($res))
die ("$PHP_SELF: '$sqlquery' : " . $res->getMessage());
if ($row = $res->fetch_assoc()):
$lat = $row["hq_gps_lat"];
$long = $row["hq_gps_long"];
$markers_javascript .= "setMarker($long, $lat, '$hq_marker', size1, offset1, popupSize1, '&nbsp;Zentrale', 'central');\n";
endif;
$res->free();
// Wenn ein Auftrag angegeben und dieser bereits einen Fahrer hat, dann nur diesen in die Liste der Fahrer übernehmen
$cr_sid = "";
$customer_special = false;
if ($usr_type == 2 || $usr_id == 10041): //HTM18156 || admin_m
$cr_sid = getParameterValue("0", "MASK_JB_MAP_VIEW_COURIERS_" . $cs_id, "0");
if ($usr_id == 10041)
$cr_sid = "M047','M048','M072','M099";
$customer_special = true;
endif;
$cancel_man = array();
if ($jb_id != ""):
$jb_status_clause = " AND NOT (jb_status IN (8,9))";
if ($usr_type == 2)
$jb_status_clause = " AND jb_status = 1";
$sqlquery = "SELECT cr_id, cr_sid, hq_id FROM job WHERE jb_id = '$jb_id'" . $jb_status_clause;
//echo $sqlquery . "<br>\n";
$res = $db->query($sqlquery);
if (DB::isError($res))
die ("$PHP_SELF: '$sqlquery' : " . $res->getMessage());
if ($row = $res->fetch_assoc()):
$cr_id = trim($row["cr_id"]);
$cr_sid = trim($row["cr_sid"]);
$hq_id = trim($row["hq_id"]);
endif;
$res->free();
// die ablehnenden Fahrer (logo_id = 11) sollen in einer anderen Farbe aufgeführt werden
// Testaufträge: SELECT *, COUNT(*) FROM log, phoenix.job WHERE logo_id = 11 AND phoenix_log.log.hq_id = 3 AND log_createtime > "2016-11-03 00:00:00" AND phoenix_log.log.jb_id = phoenix.job.jb_id AND phoenix.job.jb_status = 9 GROUP BY phoenix.job.jb_id
$sqlquery = "SELECT cr_sid FROM phoenix_log.log WHERE jb_id = " . $jb_id . " AND logo_id = 11";
$res = $db->query($sqlquery);
if (DB::isError($res)) reportDie ("$PHP_SELF: '$sqlquery'" . $res->getMessage());
while ($row = $res->fetch_assoc()):
$cancel_man[] = $row["cr_sid"];
endwhile;
$res->free();
endif;
//$is_occupied = array();
//$sqlQuery = "SELECT DISTINCT cr_sid FROM job WHERE jb_status = 1";
//$res = $db->query($sqlQuery);
//if (DB::isError($res)) reportDie ("$PHP_SELF: '$sqlQuery': " . $res->getMessage());
//while ($row = $res->fetch_assoc()):
// $is_occupied[$row["cr_sid"]] = 1;
//endwhile;
//$res->free();
$hq_id_refresh = $hq_id;
if ($cr_sid == ""):
list ($cr_sid) = getHttpVars(array("cr_sid"));
$hq_id_refresh = 0;
endif;
$sqlquery = "SELECT cr_sid, vht_id, cr_locationzipcode, cr_available, cr_availabletime, cr_gps_long, cr_gps_lat, cr_gps_time, cr_gps_type, cr_mobile_pda, usr_phone, usr_phone2 FROM courier, user WHERE courier.hq_id = '$hq_id' AND (cr_sid != '' AND NOT(cr_sid IS NULL)) AND cr_gps_time > '" . $start_time . "' AND courier.usr_id = user.usr_id"; //AND cr_available = 1 ORDER BY cr_gps_time, cr_sid";
$show_couriers = 1;
if (trim($cr_sid) != "" || $usr_type == "2"):
$sqlquery = "SELECT cr_sid, vht_id, cr_locationzipcode, cr_availabletime, cr_gps_long, cr_gps_lat, cr_gps_time, cr_gps_type, cr_mobile_pda, usr_phone, usr_phone2 FROM courier, user WHERE cr_sid IN ('$cr_sid') AND cr_gps_time > '" . $start_time . "' AND courier.usr_id = user.usr_id";
if ($jb_id != ""):
$locatingStateArray = checkLocatingState($cr_id);
if ($locatingStateArray[0] == "1")
$show_couriers = 0;
endif;
endif;
//echo $sqlquery . "<br>\n";
$res = $db->query($sqlquery);
if (DB::isError($res)) die ("$PHP_SELF: '$sqlquery' : " . $res->getMessage());
$i = 1;
$cr_sid_list = "";
while ($row = $res->fetch_assoc()):
$imgSize = generateVehicleImage($jb_id, $row["cr_sid"], $row["vht_id"], $row["cr_gps_time"], $is_occupied[$row["cr_sid"]], $row["cr_locationzipcode"]);
$markers_javascript .=
($jb_id != "" && $usr_type == "1"
? "if (typeof vht_id_str['" . $row["cr_sid"] . "'] != 'undefined' && !cr_sid_is_blocked('" . $row["cr_sid"] . "'))\n"
: "") .
" setMarker(". $row["cr_gps_long"] . ", " . $row["cr_gps_lat"] . ", '../temp/captchas/" . $jb_id . $row["cr_sid"] . ".png', size2.clone(), offset2.clone(), popupSize2.clone(),\n" .
mk_text($row["cr_locationzipcode"], $row["cr_availabletime"], $row["cr_gps_time"], $row["cr_gps_type"], $row["cr_available"], $row["cr_sid"], $row["vht_id"], $row["cr_mobile_pda"], $row["usr_phone"], $row["usr_phone2"], $jb_id) .
", 'couriers');\n";
$cr_sid_list .= ($cr_sid_list == "" ? "\'" : ",\'") . $row["cr_sid"] . "\'";
if (trim($cr_sid) != ""):
$lat = $row["cr_gps_lat"];
$long = $row["cr_gps_long"];
endif;
endwhile;
$res->free();
// Stationen eines Auftrages
if ($jb_id != ""):
$sqlquery = "SELECT ad_street, ad_zipcode, ad_city, ad_country, tr_sort, tr_comp, tr_comp2, tr_hsno, tr_remark, tr_person, tr_phone, tr_status, tr_sign, tr_signname, tr_ware_from_to, " .
"tr_finishtime, tr_commission_no, tr_status, tr_finishtime FROM tour, address WHERE jb_id = $jb_id AND tour.ad_id = address.ad_id ORDER BY tr_sort";
$res = $db->query($sqlquery);
if (DB::isError($res)) die ("$PHP_SELF: '$sqlquery' : " . $res->getMessage());
while ($row = $res->fetch_assoc()):
$imgFilename = generateStationImage($jb_id, $row["tr_sort"], $row["tr_status"]);
$coords = XSfindAddress($row["ad_country"], $row["ad_zipcode"], $row["ad_city"], $row["ad_street"], $row["tr_hsno"]);
if ($coords[0][0] != 100):
// $errorMsg .= "&nbsp;Fehlerhafte Adresse in Station [" . $row["tr_sort"] . "]: [" .
// $row["ad_zipcode"] . " " . $row["ad_city"] . " " . $row["ad_street"] . " " . $row["tr_hsno"] . "]\n";
else:
$finishMsg = "<br>\\nNoch nicht erledigt";
if ($row["tr_status"] == 1):
$finishMsg = "<br>\\nErledigt um " . formDate($row["tr_finishtime"]);
endif;
$offsetAdd = getCoordsOffset($coords[0][1], $coords[0][2]) * 13;
$markers_javascript .= "var specialOffset" . $row["tr_sort"] . " = new OpenLayers.Pixel(" . (-9 + $offsetAdd) . ", " . (-28 + ($offsetAdd * -1)) . ");\n";
$markers_javascript .= "setMarker(". $coords[0][1] . ", " . $coords[0][2] . ", '$imgFilename', size3.clone(), specialOffset" . $row["tr_sort"] . ", popupSize3.clone(),\n" .
" '<center>" . str_replace("'", "\'", $row["tr_comp"]) . " " . str_replace("'", "\'", $row["tr_comp2"]) . "<br>\\n" . str_replace("'", "\'", $row["ad_street"]) . " " . str_replace("'", "\'", $row["tr_hsno"]) . "<br>\\n" . str_replace("'", "\'", $row["ad_zipcode"]) . " " . str_replace("'", "\'", $row["ad_city"]) . "<br>\\n" . $finishMsg . "</center>', 'stations');\n";
endif;
endwhile;
$res->free();
endif;
$sqlquery = "SELECT ad_street, ad_zipcode, ad_city, ad_country, stk_name, stk_hsno FROM stock, address WHERE stock.ad_id > 0 AND stock.ad_id = address.ad_id";
$res = $db->query($sqlquery);
if (DB::isError($res)) die ("$PHP_SELF: '$sqlquery' : " . $res->getMessage());
while ($row = $res->fetch_assoc()):
$imgFilename = "../images/marker_stock.png";
$coords = XSfindAddress($row["ad_country"], $row["ad_zipcode"], $row["ad_city"], $row["ad_street"], $row["stk_hsno"]);
if ($coords[0][0] != 100):
// $errorMsg .= "&nbsp;Fehlerhafte Adresse in Lager [" . $row["stk_name"] . "]: [" .
// $row["ad_zipcode"] . " " . $row["ad_city"] . " " . $row["ad_street"] . " " . $row["stk_hsno"] . "]\n";
else:
$markers_javascript .= "setMarker(". $coords[0][1] . ", " . $coords[0][2] . ", '$imgFilename', size3.clone(), offset3.clone(), popupSize3.clone(),\n" .
" '<center>" . $row["stk_name"] . "<br>\\n" . $row["ad_street"] . " " . $row["stk_hsno"] . "<br>\\n" . $row["ad_zipcode"] . " " . $row["ad_city"] . "<br>\\n</center>', 'stocks');\n";
endif;
endwhile;
$res->free();
//echo $_SERVER['HTTP_USER_AGENT'];
//$heightCorr = 0;
//$widthCorr = 0;
$heightCorr = 120;
$widthCorr = 4;
if(stristr($_SERVER['HTTP_USER_AGENT'], 'Firefox/4')):
$heightCorr = 139;
$widthCorr = 4;
endif;
if(stristr($_SERVER['HTTP_USER_AGENT'], 'Firefox/3')):
$heightCorr = 140;
$widthCorr = 5;
endif;
if(stristr($_SERVER['HTTP_USER_AGENT'], 'Firefox/2')):
$heightCorr = 116;
$widthCorr = 4;
endif;
if(stristr($_SERVER['HTTP_USER_AGENT'], 'Firefox/20')):
$heightCorr = 120;
$widthCorr = 4;
endif;
//echo $heightCorr;
//echo $widthCorr;
?>
<html>
<head>
<title>KARTENDARSTELLUNG
<?php
if ($jb_id != ""):
echo " Auftrag Nr. " . $jb_id;
endif;
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="votian"> <meta name="keywords" content="votian"><link rel="stylesheet" type="text/css" href="../css/phoenix.css">
<script src="../js/jquery.js"></script>
<!--
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
-->
<script src="../include/openlayers/OpenLayers.js"></script>
<!--
<script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA3HdfrnxFAPWyY-aiJUxmqRTJQa0g3IQ9GZqIMmInSLzwtGDKaBQ0KYLwBEKSM7F9gCevcsIf6WPuIQ'></script>
<script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script>
-->
<?php
if ($jb_id != "")
echo
"<script src=\"../include/lib_courier.js\" type=\"text/javascript\"></script>" .
"<script type=\"text/javascript\">\n" .
"<!--\n" .
"var vht_id_str = new Array();\n" .
$vht_id_str_js .
$cr_id_order_list_blocked_js .
"function setCourier(jb_id,cr_sid)\n" .
"{\n" .
" addmsg = vht_id_str[cr_sid];\n" .
// " var penalty = 0;" .
// " if (this.document.reset_cr_availabletime_form.reset_cr_availabletime.checked) {" .
// " addmsg = \"\n(Freimeldezeit von \" + this.document.reset_cr_availabletime_form.cur_cr_sid.value + \" wird aktualisiert)\" + addmsg;" .
// " penalty = 1;" .
// " }" .
" if (confirm(\"Auftrag \" + jb_id + \" dem Transporteur \" + cr_sid + \" zuweisen?\" + addmsg)) {\n" .
// " this.opener.setCourier(jb_id,cr_sid,penalty);" .
// " alert ('../include/ajaxReqMap.php' + '&cr_sid=' + cr_sid + '&hq_id=' + hq_id + '&customer_special=$customer_special' + '&jb_id=$jb_id' + '&f_act=setCourier');\n" .
" ajaxRequestGet('../include/ajaxReqMap.php', 'cr_sid=' + cr_sid + '&hq_id=' + hq_id + '&customer_special=$customer_special' + '&jb_id=$jb_id' + '&f_act=setCourier');\n" .
" self.close();\n" .
" };\n" .
"};\n" .
"function cr_sid_is_blocked(cr_sid)\n" .
"{\n" .
" for (var i = 0; i < cr_id_order_list_blocked.length; i++)\n" .
" if (cr_id_order_list_blocked[i] == cr_sid)\n" .
" return true;\n" .
" return false;\n" .
"}\n" .
"-->\n\n" .
"</script>\n";
?>
<noscript>
<center>
<b><br>JavaScript ist nicht verf&uuml;gbar. Bitte aktivieren Sie JavaScript<br><br>
in Ihrem Browser, damit diese Seite ordnungsgem&auml;&szlig; funktioniert!</b><br><br>
</center>
</noscript>
</head>
<body>
<div style="display: table; height: 100%; #position: relative; overflow: hidden; margin:auto;">
<div style=" #position: absolute; #top: 50%;display: table-cell; vertical-align: middle;">
<div style=" #position: relative; #top: -50%; border: 2px solid black;">
<div id="map" style="width:1007px; height:675px; vertical-align:middle;">
<script type="text/javascript">
// JQuery.Request (GET)
function ajaxRequestGet(url, data) {
$.ajax({
type: "GET",
url: url,
data: data,
async: false,
cache: false,
success: function(msg){eval(msg);}
});
}
function popupWindow(url,title,config) {
var widthPopupWin = screen.width - 80;
var heightPopupWin = screen.height - 180;
var leftPopupWin = (screen.width / 2) - (widthPopupWin / 2);
var topPopupWin = (screen.height / 2) - (heightPopupWin / 2);
var popup;
popup = window.open(url,title,
"dependent=yes,width=" + widthPopupWin + ",height=" +
heightPopupWin +",left=" + leftPopupWin + ",top=" + topPopupWin +
",scrollbars=yes");
}
/********************************************************************************/
// Quelle für event-handling: http://forum.openstreetmap.org/viewtopic.php?id=5537
function setMarker(lon, lat, markerFile, iconSize, offset, popupSize, txt, layerName){
var icon = new OpenLayers.Icon(markerFile, iconSize, offset);
var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
var popup = new OpenLayers.Popup.AnchoredBubble("chicken", lonLat, popupSize, txt, icon, true);
var feature = new OpenLayers.Feature(layerName, lonLat.clone(), popup);
feature.closeBox = true;
// feature.popupClass = OpenLayers.Class(OpenLayers.Popup.AnchoredBubble);
// feature.data.size = new OpenLayers.Size(100, 80);
// feature.data.popupContentHTML = txt;
// feature.data.overflow = "hidden";
var marker = new OpenLayers.Marker(lonLat.clone(), icon.clone());
marker.feature = feature;
var markerClick = function(evt) {
if (this.popup == null) {
this.popup = this.createPopup(this.closeBox);
map.addPopup(this.popup);
this.popup.setSize(popupSize.clone());
this.popup.setContentHTML(txt);
this.popup.show();
} else {
this.popup.toggle();
}
OpenLayers.Event.stop(evt);
};
marker.events.register("mousedown", feature, markerClick);
if (layerName == 'central')
central.addMarker(marker);
if (layerName == 'couriers')
couriers.addMarker(marker);
if (layerName == 'stations')
stations.addMarker(marker);
if (layerName == 'stocks')
stocks.addMarker(marker);
}
var crSidList = <?php echo "'" . $cr_sid_list . "'"; ?>;
var hq_id = <?php echo "'" . $hq_id_refresh . "'"; ?>;
var prevRetValue = new Array();
function updateLayer(layerName) {
var tmpMarker;
var tmpUrl;
var tmpArr;
var crSid;
//alert ('../include/ajaxReqMap.php?cr_sid=' + crSidList + '&hq_id=' + hq_id + '&customer_special=<?php echo $customer_special; ?>' + '&jb_id=<?php echo $jb_id; ?>' + '&f_act=');
ajaxRequestGet('../include/ajaxReqMap.php', 'cr_sid=' + crSidList + '&hq_id=' + hq_id + '&customer_special=<?php echo $customer_special; ?>' + '&jb_id=<?php echo $jb_id; ?>' + '&f_act=');
//console.log(couriers.markers.length);
for (var i = 0; i < couriers.markers.length; i++) {
//console.log(i);
tmpMarker = couriers.markers[i];
tmpUrl = tmpMarker.icon.url;
//console.log(tmpUrl);
tmpArr = tmpUrl.split("/");
//console.log(tmpArr[tmpArr.length - 1]);
if (tmpArr[tmpArr.length - 1].length > 12)
crSid = tmpArr[tmpArr.length - 1].substr(8, tmpArr[tmpArr.length - 1].length - 12);
else
crSid = tmpArr[tmpArr.length - 1].substr(0, tmpArr[tmpArr.length - 1].length - 4);
//console.log(crSid);
if (typeof prevRetValue[crSid] == "undefined") {
prevRetValue[crSid] = new Array(0);
}
if (prevRetValue[crSid][0] != retValue[crSid][0]) {
couriers.removeMarker(tmpMarker);
tmpMarker.feature.destroy();
tmpMarker.destroy();
setMarker(retValue[crSid][2], retValue[crSid][1], tmpUrl, size2.clone(), offset2.clone(), popupSize2.clone(), retValue[crSid][3], 'couriers');
prevRetValue[crSid][0] = retValue[crSid][0];
}
}
//console.log("setTimeout");
self.setTimeout("updateLayer('couriers')", 10000);
}
/********************************************************************************/
document.getElementById('map').setAttribute('style', 'width:' + (screen.availWidth - <?php echo $widthCorr; ?>) + '; height:' + (screen.availHeight - <?php echo $heightCorr; ?>) + '; vertical-align:middle;');
var lon = <?php echo $long; ?>;
var lat = <?php echo $lat; ?>;
var zoom = 11;
var map = new OpenLayers.Map('map',
{ controls:
[ new OpenLayers.Control.KeyboardDefaults(),
new OpenLayers.Control.MouseDefaults(),
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.ScaleLine(),
new OpenLayers.Control.MousePosition(),
new OpenLayers.Control.Attribution()
],
maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
restrictedExtent: new OpenLayers.Bounds(-1337508.34, 4037508.34, 4837508.34, 9037508.34),
maxResolution: 156543.0399,
// minScale: 100000,
// maxScale: 10000000,
// numZoomLevels: 13,
units: 'm',
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
});
//var mapnik_layer = new OpenLayers.Layer.OSM.Mapnik("OSM Mapnik");
//var tah_layer = new OpenLayers.Layer.OSM.Osmarender("OSM Tiles@Home");
//var google_layer = new OpenLayers.Layer.Google("Google Streets", {'sphericalMercator': true});
// add Bing layer
//var yahoo_layer = new OpenLayers.Layer.Yahoo("Yahoo Street", {'sphericalMercator': true});
//map.addLayers([yahoo_layer, mapnik_layer, tah_layer]);
//map.addLayers([mapnik_layer, yahoo_layer]);
map.addLayers([
new OpenLayers.Layer.OSM("Google Streets",
["https://mt0.google.com/vt/lyrs=m&x=${x}&y=${y}&z=${z}", "https://mt1.google.com/vt/lyrs=m&x=${x}&y=${y}&z=${z}", "https://mt2.google.com/vt/lyrs=m&x=${x}&y=${y}&z=${z}", "https://mt3.google.com/vt/lyrs=m&x=${x}&y=${y}&z=${z}"],
{ attribution: '' } )
]);
map.addLayers([
new OpenLayers.Layer.OSM("Google Hybrid",
["https://mt0.google.com/vt/lyrs=s,h&x=${x}&y=${y}&z=${z}", "https://mt1.google.com/vt/lyrs=s,h&x=${x}&y=${y}&z=${z}", "https://mt2.google.com/vt/lyrs=s,h&x=${x}&y=${y}&z=${z}", "https://mt3.google.com/vt/lyrs=s,h&x=${x}&y=${y}&z=${z}"],
{ attribution: '' } )
]);
map.addLayers([
new OpenLayers.Layer.OSM("OSM Mapnik",
["https://a.tile.openstreetmap.org/${z}/${x}/${y}.png", "https://b.tile.openstreetmap.org/${z}/${x}/${y}.png", "https://c.tile.openstreetmap.org/${z}/${x}/${y}.png"],
{ attribution: "&copy; <a href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors" } )
]);
map.addLayers([
new OpenLayers.Layer.OSM("OSM Mapnik german style",
["https://a.tile.openstreetmap.de/tiles/osmde/${z}/${x}/${y}.png", "https://b.tile.openstreetmap.de/tiles/osmde/${z}/${x}/${y}.png", "https://c.tile.openstreetmap.de/tiles/osmde/${z}/${x}/${y}.png"],
{ attribution: '<a href="http://www.openstreetmap.org/">Karte hergestellt aus OpenStreetMap-Daten</a> | Lizenz: <a rel="license" href="http://opendatacommons.org/licenses/odbl/">Open Database License (ODbL)</a>' } )
]);
map.setCenter (new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()), zoom);
//var newll = new OpenLayers.Layer.Text( "PLZs", { location:"zipcode.txt", projection: new OpenLayers.Projection("EPSG:4326") } );
//map.addLayer(newll);
//OpenLayers.Lang.setCode("de");
//alert (OpenLayers.Lang.getCode());
var central = new OpenLayers.Layer.Markers("Zentrale");
map.addLayer(central);
var couriers = new OpenLayers.Layer.Markers("Transporteure");
map.addLayer(couriers);
<?php
if ($jb_id != ""):
echo "var stations = new OpenLayers.Layer.Markers(\"Stationen\");";
echo "map.addLayer(stations);";
endif;
?>
var stocks = new OpenLayers.Layer.Markers("Läger");
map.addLayer(stocks);
var size1 = new OpenLayers.Size(28,28);
var popupSize1 = new OpenLayers.Size(60,20);
var offset1 = new OpenLayers.Pixel(-9, -28);
var size2 = new OpenLayers.Size(42,39);
var popupSize2 = new OpenLayers.Size(165,130);
var offset2 = new OpenLayers.Pixel(-6, -38);
var size3 = new OpenLayers.Size(28,28);
var popupSize3 = new OpenLayers.Size(140,118);
var offset3 = new OpenLayers.Pixel(-9, -28);
<?php echo $markers_javascript; ?>
central.setVisibility(false);
<?php
if ($jb_id != "" && $show_couriers == 0):
echo "couriers.setVisibility(false);";
endif;
?>
stocks.setVisibility(false);
<?php
if ($jb_id != ""):
echo "map.zoomToExtent(stations.getDataExtent());";
else:
echo "map.zoomToExtent(couriers.getDataExtent());";
endif;
?>
self.setTimeout("updateLayer('couriers')", 10000);
</script>
<script type="text/javascript">
function clearSearchCrSid() {
document.forms[0].searchCrSid.value='';
};
</script>
</div>
</div>
<!--
<form action="../locating/map_courier.php" method="post">
-->
<div>
<center>
&nbsp; <?php echo $errorMsg ?>
<!--
<input type="submit" value="Aktualisieren">
-->
<center>
</div>
<!--
</form>
-->
</div>
</div>
</body>
</html>
+166
View File
@@ -0,0 +1,166 @@
<?php
include_once("../include/global.inc.php");
include_once ("../include/auth.inc.php");
// $hq_id = $HTTP_SESSION_VARS['hq_id'];
$hq_id = $_SESSION['hq_id'];
if ($hq_id == "") : $hq_id = $HTTP_SESSION_VARS['hq_id']; endif;
$hq_marker = "../images/marker_sb.png";
if ($hq_id >= 100)
$hq_marker = "../images/marker_ht.png";
$today = getdate();
//$start_time = date("YmdHis", mktime($today['hours'] - 24, $today['minutes'], $today['seconds'], $today['mon'], $today['mday'], $today['year']));
$start_time = date("Y-m-d H:i:s", mktime(0, 0, 0, $today['mon'], $today['mday'], $today['year']));
$lat = 0;
$long = 0;
list ($cr_sid) =
getHttpVars(array("cr_sid"));
//$markers_text = "point title description icon iconSize iconOffset\x0A";
$sqlquery = "SELECT hq_gps_long, hq_gps_lat FROM headquarters WHERE hq_id = '$hq_id'";
$markers_javascript = "";
$res = $db->query($sqlquery);
if (DB::isError($res))
die ("$PHP_SELF: '$sqlquery' : " . $res->getMessage());
if ($row = $res->fetch_assoc()):
$markers_javascript .= "var hq_icon = new OpenLayers.Icon('$hq_marker', size, offset);\n";
$markers_javascript .= "marker = new OpenLayers.Marker(new OpenLayers.LonLat(". $row["hq_gps_long"] . ", " . $row["hq_gps_lat"] . ").transform(new OpenLayers.Projection(\"EPSG:4326\"), map.getProjectionObject()), hq_icon);\n";
$markers_javascript .= "marker.events.register('mousedown', marker, function(evt) { alert('Zentrale'); OpenLayers.Event.stop(evt); });";
$markers_javascript .= "markers.addMarker(marker);\n";
// $markers_text .= $row["hq_gps_lat"] . "," . $row["hq_gps_long"] . " Zentrale honk $hq_marker 28,28 -10,-28\x0A";
$lat = $row["hq_gps_lat"];
$long = $row["hq_gps_long"];
endif;
$res->free();
$sqlquery = "SELECT cr_sid, cr_locationzipcode, cr_available, cr_availabletime, cr_gps_long, cr_gps_lat, cr_gps_time FROM courier WHERE hq_id = '$hq_id' AND cr_gps_time > '" . $start_time . "'"; //AND cr_available = 1 ORDER BY cr_gps_time, cr_sid";
if (trim($cr_sid) != "")
$sqlquery = "SELECT cr_sid, cr_locationzipcode, cr_availabletime, cr_gps_long, cr_gps_lat, cr_gps_time FROM courier WHERE cr_sid = '$cr_sid'";
$res = $db->query($sqlquery);
if (DB::isError($res))
die ("$PHP_SELF: '$sqlquery' : " . $res->getMessage());
$i = 1;
while ($row = $res->fetch_assoc()):
// $markers_text .= $row["cr_gps_lat"] . "," . $row["cr_gps_long"] . " " . $row["cr_sid"] . "honk " . $row["cr_gps_time"] . " ../images/marker_white.png 28,28 -10,-28\x0A";
$markers_javascript .= "var icon$i = new OpenLayers.Icon('../images/marker_white.png', size.clone(), offset.clone());\n";
$markers_javascript .= "marker = new OpenLayers.Marker(new OpenLayers.LonLat(". $row["cr_gps_long"] . ", " . $row["cr_gps_lat"] . ").transform(new OpenLayers.Projection(\"EPSG:4326\"), map.getProjectionObject()), icon" . $i++ . ");\n";
$markers_javascript .= "marker.events.register('mousedown', marker, function(evt) { alert('" . $row["cr_sid"] . "\\nFreimeldung: " . $row["cr_locationzipcode"] . " (" . $row["cr_availabletime"] . ")\\n" . "Ortungszeit: " . $row["cr_gps_time"] . "'); OpenLayers.Event.stop(evt); });";
$markers_javascript .= "markers.addMarker(marker);\n";
if (trim($cr_sid) != ""):
$lat = $row["cr_gps_lat"];
$long = $row["cr_gps_long"];
endif;
endwhile;
$res->free();
//$fname = "../temp/osm_text/" . $usr_id . $start_time . ".txt";
//if (!$handle = fopen($fname, "w"))
// die("Fehler beim schreibenden Zugriff auf '$fname'");
//if (!fwrite($handle, $markers_text))
// die ("Fehler beim Schreiben in '$fname'");
//fclose($handle);
?>
<html>
<head>
<title>KARTENDARSTELLUNG</title>
<link rel="stylesheet" type="text/css" href="../css/phoenix.css">
<!--
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
-->
<script src="../include/openlayers/OpenLayers.js"></script>
<script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
<!--
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA3HdfrnxFAPWyY-aiJUxmqRTJQa0g3IQ9GZqIMmInSLzwtGDKaBQ0KYLwBEKSM7F9gCevcsIf6WPuIQ'></script>
<script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script>
-->
<noscript>
<center>
<b><br>JavaScript ist nicht verf&uuml;gbar. Bitte aktivieren Sie JavaScript<br><br>
in Ihrem Browser, damit diese Seite ordnungsgem&auml;&szlig; funktioniert!</b><br><br>
</center>
</noscript>
</head>
<body>
<div style="display: table; height: 100%; #position: relative; overflow: hidden; margin:auto;">
<div style=" #position: absolute; #top: 50%;display: table-cell; vertical-align: middle;">
<div style=" #position: relative; #top: -50%; border: 2px solid black;">
<div id="map" style="width:1007px; height:675px; vertical-align:middle;">
<script type="text/javascript">
var lon = <?php echo $long; ?>;
var lat = <?php echo $lat; ?>;
var zoom = 12;
var map = new OpenLayers.Map('map',
{ controls:
[ new OpenLayers.Control.KeyboardDefaults(),
new OpenLayers.Control.MouseDefaults(),
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.ScaleLine(),
new OpenLayers.Control.MousePosition(),
new OpenLayers.Control.Attribution()
],
maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
restrictedExtent: new OpenLayers.Bounds(-1337508.34, 4037508.34, 4837508.34, 9037508.34),
maxResolution: 156543.0399,
// minScale: 100000,
// maxScale: 10000000,
// numZoomLevels: 13,
units: 'm',
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
});
var mapnik_layer = new OpenLayers.Layer.OSM.Mapnik("OSM Mapnik");
//var tah_layer = new OpenLayers.Layer.OSM.Osmarender("OSM Tiles@Home");
//var google_layer = new OpenLayers.Layer.Google("Google Streets", {'sphericalMercator': true});
//var yahoo_layer = new OpenLayers.Layer.Yahoo("Yahoo Street", {'sphericalMercator': true});
//map.addLayers([yahoo_layer, mapnik_layer, tah_layer]);
//map.addLayers([mapnik_layer, yahoo_layer]);
map.addLayers([mapnik_layer]);
map.setCenter (new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()), zoom);
//var newl = new OpenLayers.Layer.Text( "Fahrzeuge", { location:"<?php echo "$fname"; ?>", projection: new OpenLayers.Projection("EPSG:4326") } );
//map.addLayer(newl);
//var newll = new OpenLayers.Layer.Text( "PLZs", { location:"zipcode.txt", projection: new OpenLayers.Projection("EPSG:4326") } );
//map.addLayer(newll);
//OpenLayers.Lang.setCode("de");
//alert (OpenLayers.Lang.getCode());
var markers = new OpenLayers.Layer.Markers("Marker");
map.addLayer(markers);
//var size = new OpenLayers.Size(10,17);
//var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
//var icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png', size, offset);
var size = new OpenLayers.Size(28,28);
var offset = new OpenLayers.Pixel(-10, -28);
<?php echo $markers_javascript; ?>
//10,20 my orange title my orange description
//2,4 my aqua title my aqua description
//42,-71 my purple title my purple description<br/>is great. http://www.openlayers.org/api/img/zoom-world-mini.png
</script>
</div>
</div>
</div>
</div>
</body>
</html>
+447
View File
@@ -0,0 +1,447 @@
<?php
include_once("../include/global.inc.php");
include_once("../include/auth.inc.php");
include_once ("../locating/xServer.inc.php");
$db_geo = get_db_geo();
list ($poliline, $eapPoliline, $edcPoliline, $stations, $jb_id) = getHttpVars(array("p", "p1", "p2", "s", "jb_id"));
$polylines = "";
if ($poliline != "" || $eapPoliline != "" || $edcPoliline != "") {
$sqlquery = "SELECT di_id, di_polyline FROM distance WHERE di_id IN (" . $poliline . ($poliline != "" && $eapPoliline != "" ? "," : "") . $eapPoliline . ($poliline != "" && $edcPoliline != "" ? "," : "") . $edcPoliline . ")";
$res = $db_geo->query($sqlquery);
if (DB::isError($res)) reportDie ("$PHP_SELF: '$sqlquery' : " . $res->getMessage());
$i = 0;
while ($row =($phpVersion >= "8.0" ? $res->fetch_assoc() : $res->fetchRow())):
$polylines .= "var latlngs" . $i . " = " . decodePolyline(str_replace(".", "\\", $row['di_polyline'])) . ";\n";
if (strpos($poliline, $row['di_id']) !== false)
$polylines .=
"var polyline" . $i . " = L.polyline(latlngs" . $i . ", {color: '#ff00ff', weight : 5});\n";
elseif (strpos($eapPoliline, $row['di_id']) !== false)
$polylines .=
"var polyline" . $i . " = L.polyline(latlngs" . $i . ", {color: 'black', weight : 3});\n";
else
$polylines .=
"var polyline" . $i . " = L.polyline(latlngs" . $i . ", {color: 'red', weight : 3});\n";
$polylines .=
"polylinesFG.addLayer(polyline" . $i++ . ");\n";
endwhile;
$res->free();
}
if ($jb_id != "") {
$sqlquery = "SELECT ro_polyline, ro_type FROM phoenix_log.route WHERE jb_id = " . $jb_id;
$res = $db->query($sqlquery);
if (DB::isError($res)) reportDie ("$PHP_SELF: '$sqlquery' : " . $res->getMessage());
$i = 0;
while ($row =($phpVersion >= "8.0" ? $res->fetch_assoc() : $res->fetchRow())):
$polylines .= "var latlngs" . $i . " = " . decodePolyline(str_replace(".", "\\", $row['ro_polyline'])) . ";\n";
if ($row['ro_type'] == 0)
$polylines .=
"var polyline" . $i . " = L.polyline(latlngs" . $i . ", {color: '#ff00ff', weight : 5});\n";
elseif ($row['ro_type'] == 1)
$polylines .=
"var polyline" . $i . " = L.polyline(latlngs" . $i . ", {color: 'black', weight : 3});\n";
else
$polylines .=
"var polyline" . $i . " = L.polyline(latlngs" . $i . ", {color: 'red', weight : 3});\n";
$polylines .=
"polylinesFG.addLayer(polyline" . $i++ . ");\n";
endwhile;
$res->free();
}
if ($polylines != "")
$polylines =
"var polylinesFG = new L.FeatureGroup();\n" .
$polylines .
"polylinesFG.addTo(map);\n" .
"map.fitBounds(polylinesFG.getBounds());\n";
////$poliline = "{tpeIub}~@QaBASQW[_@DmBCQFq@L}@l@uC\\uBPsBjEig@jC{ZrBcUbAiHrB}JrDuPjAeF`AgEZgAz@wCRkAtEePpDeLfFsNdDeIdDoHbBkDnBoDtD{G^y@t@oAnAyBlDwFnCmEfK}O|@oAf@k@pBiB|E}DbSkPnc@g^fCkBnGgFNUnEsDbBwAzL}J~TyQhr@wj@pDuC\\Sx@o@nCyBjCuBhAcAf@g@~DeDhMeKlLmJxJ}H\\U`Aa@hAYn@Ix@CxCJ`Lz@bAVx@f@d@f@hDdF|ErHpSr[rAlBdBjBvIvHp@v@xA`ChCrEnB~C`BhBfH`IfGtGtBlBxAhAbC`BrAv@fElBzE~AlCr@`KnChHlBvI|B`J|BlATnBPvAD|BIrC_@rIaBtNmCnj@qKpaBi[`Dm@PCd@?vAU`B]|@WNKpDq@`HsAzFgAfB]Cm@B_AFg@n@_BrA}CbB_EbDoI~AsEZ^x@dAv@ZdCLCzBB{BnA@`DAlBE|@AMhFOdIAz@Cf@CAEBCDCNDVLFCfIFhD\\hQVhId@vFl@|IV`IBfBBzEIbGW~EQ~EW~Fa@|Dc@fDg@zCo@pD[jCs@rJO`CAjAInIItB_@dD]fB]jAc@jAgAvBiCjD}AbBg@p@mBzBwBtCaDvEa@l@e@fAgAfDaCzHo@pB}@bCWh@cEtHcAjBe@x@{@fAqB`BgCrBaAz@wBtBiAhAuApBs@xBeBnH]zBKpAo@nNk@fL[dEg@fCg@tBkEbPqB~GoA`FoH`X{FrSgCrIiB`Gm@`Do@jEmAxIYbCk@lG_@jDu@hG[pAu@xBeBfEuDzIq@zAs@zBuA`F}CdLeAlDc@rBo@~B_@pAWzAc@xDwAxM_BrOa@~BsAnEmAfD_BlD_AnAi@d@o@^iAh@e@PsAf@YD}@NqDh@e@LwBfAu@f@sAjAeBjBeGpG}CrDiAbBcEhIoFvKEHcApBWXo@h@y@h@gBr@uFvBuHvCeFnBoDzA_@XYTO@_@d@eAzAs@tA}@tCu@bCEXiAjDs@pCg@xDEz@OxBUlEe@`IYxC_A`EeA|D[vAGh@sBlIS~@e@zCWpCy@nQg@pJc@vGUlBm@nDmAxGmEhUgHr_@cI~b@mDtRo@dDg@zBi@~A_@z@sApB}BfCeBhBmAxA}AfB_ApAmAnAgCvBSF}@~@[h@Yr@Oz@ORO`CGtIGvQMnIi@jJqAfT~@Sn@E^B\\Ll@`@ZTrAz@xFnD";
//// {tpeIub}~@QaBASQW[_@DmBCQFq@L}@l@uCuBPsBjEig@jC{ZrBcUbAiHrB}JrDuPjAeF`AgEZgAz@wCRkAtEePpDeLfFsNdDeIdDoHbBkDnBoDtD{G^y@t@oAnAyBlDwFnCmEfK}O|@oAf@k@pBiB|E}DbSkPnc@g^fCkBnGgFNUnEsDbBwAzL}J~TyQhr@wj@pDuCSx@o@nCyBjCuBhAcAf@g@~DeDhMeKlLmJxJ}HU`Aa@hAYn@Ix@CxCJ`Lz@bAVx@f@d@f@hDdF|ErHpSr[rAlBdBjBvIvHp@v@xA`ChCrEnB~C`BhBfH`IfGtGtBlBxAhAbC`BrAv@fElBzE~AlCr@`KnChHlBvI|B`J|BlATnBPvAD|BIrC_@rIaBtNmCnj@qKpaBi[`Dm@PCd@?vAU`B]|@WNKpDq@`HsAzFgAfB]Cm@B_AFg@n@_BrA}CbB_EbDoI~AsEZ^x@dAv@ZdCLCzBB{BnA@`DAlBE|@AMhFOdIAz@Cf@CAEBCDCNDVLFCfIFhDhQVhId@vFl@|IV`IBfBBzEIbGW~EQ~EW~Fa@|Dc@fDg@zCo@pD[jCs@rJO`CAjAInIItB_@dD]fB]jAc@jAgAvBiCjD}AbBg@p@mBzBwBtCaDvEa@l@e@fAgAfDaCzHo@pB}@bCWh@cEtHcAjBe@x@{@fAqB`BgCrBaAz@wBtBiAhAuApBs@xBeBnH]zBKpAo@nNk@fL[dEg@fCg@tBkEbPqB~GoA`FoH`X{FrSgCrIiB`Gm@`Do@jEmAxIYbCk@lG_@jDu@hG[pAu@xBeBfEuDzIq@zAs@zBuA`F}CdLeAlDc@rBo@~B_@pAWzAc@xDwAxM_BrOa@~BsAnEmAfD_BlD_AnAi@d@o@^iAh@e@PsAf@YD}@NqDh@e@LwBfAu@f@sAjAeBjBeGpG}CrDiAbBcEhIoFvKEHcApBWXo@h@y@h@gBr@uFvBuHvCeFnBoDzA_@XYTO@_@d@eAzAs@tA}@tCu@bCEXiAjDs@pCg@xDEz@OxBUlEe@`IYxC_A`EeA|D[vAGh@sBlIS~@e@zCWpCy@nQg@pJc@vGUlBm@nDmAxGmEhUgHr_@cI~b@mDtRo@dDg@zBi@~A_@z@sApB}BfCeBhBmAxA}AfB_ApAmAnAgCvBSF}@~@[h@Yr@Oz@ORO`CGtIGvQMnIi@jJqAfT~@Sn@E^BLl@`@ZTrAz@xFnD
//// {tpeIub}~@QaBASQW[_@DmBCQFq@L}@l@uCuBPsBjEig@jC{ZrBcUbAiHrB}JrDuPjAeF`AgEZgAz@wCRkAtEePpDeLfFsNdDeIdDoHbBkDnBoDtD{G^y@t@oAnAyBlDwFnCmEfK}O|@oAf@k@pBiB|E}DbSkPnc@g^fCkBnGgFNUnEsDbBwAzL}J~TyQhr@wj@pDuCSx@o@nCyBjCuBhAcAf@g@~DeDhMeKlLmJxJ}HU`Aa@hAYn@Ix@CxCJ`Lz@bAVx@f@d@f@hDdF|ErHpSr[rAlBdBjBvIvHp@v@xA`ChCrEnB~C`BhBfH`IfGtGtBlBxAhAbC`BrAv@fElBzE~AlCr@`KnChHlBvI|B`J|BlATnBPvAD|BIrC_@rIaBtNmCnj@qKpaBi[`Dm@PCd@?vAU`B]|@WNKpDq@`HsAzFgAfB]Cm@B_AFg@n@_BrA}CbB_EbDoI~AsEZ^x@dAv@ZdCLCzBB{BnA@`DAlBE|@AMhFOdIAz@Cf@CAEBCDCNDVLFCfIFhDhQVhId@vFl@|IV`IBfBBzEIbGW~EQ~EW~Fa@|Dc@fDg@zCo@pD[jCs@rJO`CAjAInIItB_@dD]fB]jAc@jAgAvBiCjD}AbBg@p@mBzBwBtCaDvEa@l@e@fAgAfDaCzHo@pB}@bCWh@cEtHcAjBe@x@{@fAqB`BgCrBaAz@wBtBiAhAuApBs@xBeBnH]zBKpAo@nNk@fL[dEg@fCg@tBkEbPqB~GoA`FoH`X{FrSgCrIiB`Gm@`Do@jEmAxIYbCk@lG_@jDu@hG[pAu@xBeBfEuDzIq@zAs@zBuA`F}CdLeAlDc@rBo@~B_@pAWzAc@xDwAxM_BrOa@~BsAnEmAfD_BlD_AnAi@d@o@^iAh@e@PsAf@YD}@NqDh@e@LwBfAu@f@sAjAeBjBeGpG}CrDiAbBcEhIoFvKEHcApBWXo@h@y@h@gBr@uFvBuHvCeFnBoDzA_@XYTO@_@d@eAzAs@tA}@tCu@bCEXiAjDs@pCg@xDEz@OxBUlEe@`IYxC_A`EeA|D[vAGh@sBlIS~@e@zCWpCy@nQg@pJc@vGUlBm@nDmAxGmEhUgHr_@cI~b@mDtRo@dDg@zBi@~A_@z@sApB}BfCeBhBmAxA}AfB_ApAmAnAgCvBSF}@~@[h@Yr@Oz@ORO`CGtIGvQMnIi@jJqAfT~@Sn@E^BLl@`@ZTrAz@xFnD
////%7BtpeIub%7D~%40QaBASQW%5B_%40DmBCQFq%40L%7D%40l%40uC%5CuBPsBjEig%40jC%7BZrBcUbAiHrB%7DJrDuPjAeF%60AgEZgAz%40wCRkAtEePpDeLfFsNdDeIdDoHbBkDnBoDtD%7BG%5Ey%40t%40oAnAyBlDwFnCmEfK%7DO%7C%40oAf%40k%40pBiB%7CE%7DDbSkPnc%40g%5EfCkBnGgFNUnEsDbBwAzL%7DJ~TyQhr%40wj%40pDuC%5CSx%40o%40nCyBjCuBhAcAf%40g%40~DeDhMeKlLmJxJ%7DH%5CU%60Aa%40hAYn%40Ix%40CxCJ%60Lz%40bAVx%40f%40d%40f%40hDdF%7CErHpSr%5BrAlBdBjBvIvHp%40v%40xA%60ChCrEnB~C%60BhBfH%60IfGtGtBlBxAhAbC%60BrAv%40fElBzE~AlCr%40%60KnChHlBvI%7CB%60J%7CBlATnBPvAD%7CBIrC_%40rIaBtNmCnj%40qKpaBi%5B%60Dm%40PCd%40%3FvAU%60B%5D%7C%40WNKpDq%40%60HsAzFgAfB%5DCm%40B_AFg%40n%40_BrA%7DCbB_EbDoI~AsEZ%5Ex%40dAv%40ZdCLCzBB%7BBnA%40%60DAlBE%7C%40AMhFOdIAz%40Cf%40CAEBCDCNDVLFCfIFhD%5ChQVhId%40vFl%40%7CIV%60IBfBBzEIbGW~EQ~EW~Fa%40%7CDc%40fDg%40zCo%40pD%5BjCs%40rJO%60CAjAInIItB_%40dD%5DfB%5DjAc%40jAgAvBiCjD%7DAbBg%40p%40mBzBwBtCaDvEa%40l%40e%40fAgAfDaCzHo%40pB%7D%40bCWh%40cEtHcAjBe%40x%40%7B%40fAqB%60BgCrBaAz%40wBtBiAhAuApBs%40xBeBnH%5DzBKpAo%40nNk%40fL%5BdEg%40fCg%40tBkEbPqB~GoA%60FoH%60X%7BFrSgCrIiB%60Gm%40%60Do%40jEmAxIYbCk%40lG_%40jDu%40hG%5BpAu%40xBeBfEuDzIq%40zAs%40zBuA%60F%7DCdLeAlDc%40rBo%40~B_%40pAWzAc%40xDwAxM_BrOa%40~BsAnEmAfD_BlD_AnAi%40d%40o%40%5EiAh%40e%40PsAf%40YD%7D%40NqDh%40e%40LwBfAu%40f%40sAjAeBjBeGpG%7DCrDiAbBcEhIoFvKEHcApBWXo%40h%40y%40h%40gBr%40uFvBuHvCeFnBoDzA_%40XYTO%40_%40d%40eAzAs%40tA%7D%40tCu%40bCEXiAjDs%40pCg%40xDEz%40OxBUlEe%40%60IYxC_A%60EeA%7CD%5BvAGh%40sBlIS~%40e%40zCWpCy%40nQg%40pJc%40vGUlBm%40nDmAxGmEhUgHr_%40cI~b%40mDtRo%40dDg%40zBi%40~A_%40z%40sApB%7DBfCeBhBmAxA%7DAfB_ApAmAnAgCvBSF%7D%40~%40%5Bh%40Yr%40Oz%40ORO%60CGtIGvQMnIi%40jJqAfT~%40Sn%40E%5EB%5CLl%40%60%40ZTrAz%40xFnD
////{tpeIub}~%40QaBASQW[_%40DmBCQFq%40L}%40l%40uC\uBPsBjEig%40jC{ZrBcUbAiHrB}JrDuPjAeF`AgEZgAz%40wCRkAtEePpDeLfFsNdDeIdDoHbBkDnBoDtD{G^y%40t%40oAnAyBlDwFnCmEfK}O|%40oAf%40k%40pBiB|E}DbSkPnc%40g^fCkBnGgFNUnEsDbBwAzL}J~TyQhr%40wj%40pDuC\Sx%40o%40nCyBjCuBhAcAf%40g%40~DeDhMeKlLmJxJ}H\U`Aa%40hAYn%40Ix%40CxCJ`Lz%40bAVx%40f%40d%40f%40hDdF|ErHpSr[rAlBdBjBvIvHp%40v%40xA`ChCrEnB~C`BhBfH`IfGtGtBlBxAhAbC`BrAv%40fElBzE~AlCr%40`KnChHlBvI|B`J|BlATnBPvAD|BIrC_%40rIaBtNmCnj%40qKpaBi[`Dm%40PCd%40%3FvAU`B]|%40WNKpDq%40`HsAzFgAfB]Cm%40B_AFg%40n%40_BrA}CbB_EbDoI~AsEZ^x%40dAv%40ZdCLCzBB{BnA%40`DAlBE|%40AMhFOdIAz%40Cf%40CAEBCDCNDVLFCfIFhD\hQVhId%40vFl%40|IV`IBfBBzEIbGW~EQ~EW~Fa%40|Dc%40fDg%40zCo%40pD[jCs%40rJO`CAjAInIItB_%40dD]fB]jAc%40jAgAvBiCjD}AbBg%40p%40mBzBwBtCaDvEa%40l%40e%40fAgAfDaCzHo%40pB}%40bCWh%40cEtHcAjBe%40x%40{%40fAqB`BgCrBaAz%40wBtBiAhAuApBs%40xBeBnH]zBKpAo%40nNk%40fL[dEg%40fCg%40tBkEbPqB~GoA`FoH`X{FrSgCrIiB`Gm%40`Do%40jEmAxIYbCk%40lG_%40jDu%40hG[pAu%40xBeBfEuDzIq%40zAs%40zBuA`F}CdLeAlDc%40rBo%40~B_%40pAWzAc%40xDwAxM_BrOa%40~BsAnEmAfD_BlD_AnAi%40d%40o%40^iAh%40e%40PsAf%40YD}%40NqDh%40e%40LwBfAu%40f%40sAjAeBjBeGpG}CrDiAbBcEhIoFvKEHcApBWXo%40h%40y%40h%40gBr%40uFvBuHvCeFnBoDzA_%40XYTO%40_%40d%40eAzAs%40tA}%40tCu%40bCEXiAjDs%40pCg%40xDEz%40OxBUlEe%40`IYxC_A`EeA|D[vAGh%40sBlIS~%40e%40zCWpCy%40nQg%40pJc%40vGUlBm%40nDmAxGmEhUgHr_%40cI~b%40mDtRo%40dDg%40zBi%40~A_%40z%40sApB}BfCeBhBmAxA}AfB_ApAmAnAgCvBSF}%40~%40[h%40Yr%40Oz%40ORO`CGtIGvQMnIi%40jJqAfT~%40Sn%40E^B\Ll%40`%40ZTrAz%40xFnD
////{tpeIub}~%40QaBASQW[_%40DmBCQFq%40L}%40l%40uC\uBPsBjEig%40jC{ZrBcUbAiHrB}JrDuPjAeF`AgEZgAz%40wCRkAtEePpDeLfFsNdDeIdDoHbBkDnBoDtD{G^y%40t%40oAnAyBlDwFnCmEfK}O|%40oAf%40k%40pBiB|E}DbSkPnc%40g^fCkBnGgFNUnEsDbBwAzL}J~TyQhr%40wj%40pDuC\Sx%40o%40nCyBjCuBhAcAf%40g%40~DeDhMeKlLmJxJ}H\U`Aa%40hAYn%40Ix%40CxCJ`Lz%40bAVx%40f%40d%40f%40hDdF|ErHpSr[rAlBdBjBvIvHp%40v%40xA`ChCrEnB~C`BhBfH`IfGtGtBlBxAhAbC`BrAv%40fElBzE~AlCr%40`KnChHlBvI|B`J|BlATnBPvAD|BIrC_%40rIaBtNmCnj%40qKpaBi[`Dm%40PCd%40%3FvAU`B]|%40WNKpDq%40`HsAzFgAfB]Cm%40B_AFg%40n%40_BrA}CbB_EbDoI~AsEZ^x%40dAv%40ZdCLCzBB{BnA%40`DAlBE|%40AMhFOdIAz%40Cf%40CAEBCDCNDVLFCfIFhD\hQVhId%40vFl%40|IV`IBfBBzEIbGW~EQ~EW~Fa%40|Dc%40fDg%40zCo%40pD[jCs%40rJO`CAjAInIItB_%40dD]fB]jAc%40jAgAvBiCjD}AbBg%40p%40mBzBwBtCaDvEa%40l%40e%40fAgAfDaCzHo%40pB}%40bCWh%40cEtHcAjBe%40x%40{%40fAqB`BgCrBaAz%40wBtBiAhAuApBs%40xBeBnH]zBKpAo%40nNk%40fL[dEg%40fCg%40tBkEbPqB~GoA`FoH`X{FrSgCrIiB`Gm%40`Do%40jEmAxIYbCk%40lG_%40jDu%40hG[pAu%40xBeBfEuDzIq%40zAs%40zBuA`F}CdLeAlDc%40rBo%40~B_%40pAWzAc%40xDwAxM_BrOa%40~BsAnEmAfD_BlD_AnAi%40d%40o%40^iAh%40e%40PsAf%40YD}%40NqDh%40e%40LwBfAu%40f%40sAjAeBjBeGpG}CrDiAbBcEhIoFvKEHcApBWXo%40h%40y%40h%40gBr%40uFvBuHvCeFnBoDzA_%40XYTO%40_%40d%40eAzAs%40tA}%40tCu%40bCEXiAjDs%40pCg%40xDEz%40OxBUlEe%40`IYxC_A`EeA|D[vAGh%40sBlIS~%40e%40zCWpCy%40nQg%40pJc%40vGUlBm%40nDmAxGmEhUgHr_%40cI~b%40mDtRo%40dDg%40zBi%40~A_%40z%40sApB}BfCeBhBmAxA}AfB_ApAmAnAgCvBSF}%40~%40[h%40Yr%40Oz%40ORO`CGtIGvQMnIi%40jJqAfT~%40Sn%40E^B\Ll%40`%40ZTrAz%40xFnD
////$poliline = "{tpeIub}~@ee@tIcVpn@mrGdsIshAjtUrbAttPc[nqFxnBf|BbhDt~Dln@ntHd`@l|DbwC|uAb}HajA`hGzwAj`GkpBxiG_yE|nEegAxnD`VppJiDx}CrnDxeAvvFzfG|_F~~G~xCboHzwCpaDtMviDz~FdvHvzQvpGbmLp_CvnEtjGxgAt_F|dAdlEanAr}MukDptJwoH~pSeaPjwIw~FflDogBb|DlQ|oCl}BnjDtgAf~H_sH|aJq`C~bGkbHrzCaqA|xAyoDfyAi}Ov{Cc{IhkCsqDlkC`c@j`HptDx|FdiB~qGxUxcGfz@zuJfaCdwCx`EjuAvoGp}C~aCpeBtuCbgAjnEt}CldBfkH|aCt}Cs@b{B~~@bkCm\\j~Af}AljA`lBrtD`@rsKfv@zeIvbGjfA`lEoArfFmf@nlFx}@zqDpz@nzDtnBjlCp~HrzMr`ClD~iDrkGpfCbVreCxmErqD|_B`fByg@ddDwk@~`EjSjsE_e@noFonA~yBnfAd}AaYpwEjkBhoBku@zjAajDtv@wmDjwBonApdB_sE|{AfT`u@ylBh}AhMjhG|bChfAneDbcBbv@xeCusFhsC{eGrqG_eHpqBuhBh}Bv_@``GdHrfEs`@~uDkdGpcFsw@jbBqq@bmBtw@jcBxuBtqBub@b`CeoCpeBeBj_Hbo@|eE}~@t}CqrGfg@yeIfnEeaBppA_iCvqCxUhcBgcAveBgyCfjFucHxhDuKbnAnu@x{Aeq@nrColBfvBgpBbr@}mEx{DsiF||DwUtrAc{@tkAfqCvoD|uCphDp~DhlFmD`zEza@leCceFvsF__ClxCmtGxgNowAjjDkkBpgEi_Hn~Fz@ryFbcApwDayD`vC_[l_CuxCz`HefF`xFnvBf_AlsBdgCpj@xcBgp@rnB~oAvjBxPd{CaqBriCuy@`vDxfCjwGwxC`vGwhDdyBfs@nrAn}C~wFdbF~iB`hBbdC}kA|hHca@~aCr~@voC}l@xhDbAp_Cr|BnmBrb@tiA_iCljF{eDnjGzPtpFn_B`_Nw~DvlAa\\dvAd`BzlBcQn{CvhDhyFneK`uFriHrqF_aCpbCmwAvhB`VpzE|yBrvFlbAfnFsb@lpH{_DhnNar@j|Duu@xiHp{BdpG_dDfnJh\\zgFksB~oDauFlcFyjEb_Cy_CpiDo}@vhCikD`gDy|@~xEurE~pDmNxlGgpExsCk^tlBafBiEanC|nB_bCnYe|EpfBcf@baEriGjuB~{AlaAihBnuB}SjfB|tAh}ClcA";
//// {tpeIub}~@ee@tIcVpn@mrGdsIshAjtUrbAttPc[nqFxnBf|BbhDt~Dln@ntHd`@l|DbwC|uAb}HajA`hGzwAj`GkpBxiG_yE|nEegAxnD`VppJiDx}CrnDxeAvvFzfG|_F~~G~xCboHzwCpaDtMviDz~FdvHvzQvpGbmLp_CvnEtjGxgAt_F|dAdlEanAr}MukDptJwoH~pSeaPjwIw~FflDogBb|DlQ|oCl}BnjDtgAf~H_sH|aJq`C~bGkbHrzCaqA|xAyoDfyAi}Ov{Cc{IhkCsqDlkC`c@j`HptDx|FdiB~qGxUxcGfz@zuJfaCdwCx`EjuAvoGp}C~aCpeBtuCbgAjnEt}CldBfkH|aCt}Cs@b{B~~@bkCm j~Af}AljA`lBrtD`@rsKfv@zeIvbGjfA`lEoArfFmf@nlFx}@zqDpz@nzDtnBjlCp~HrzMr`ClD~iDrkGpfCbVreCxmErqD|_B`fByg@ddDwk@~`EjSjsE_e@noFonA~yBnfAd}AaYpwEjkBhoBku@zjAajDtv@wmDjwBonApdB_sE|{AfT`u@ylBh}AhMjhG|bChfAneDbcBbv@xeCusFhsC{eGrqG_eHpqBuhBh}Bv_@``GdHrfEs`@~uDkdGpcFsw@jbBqq@bmBtw@jcBxuBtqBub@b`CeoCpeBeBj_Hbo@|eE}~@t}CqrGfg@yeIfnEeaBppA_iCvqCxUhcBgcAveBgyCfjFucHxhDuKbnAnu@x{Aeq@nrColBfvBgpBbr@}mEx{DsiF||DwUtrAc{@tkAfqCvoD|uCphDp~DhlFmD`zEza@leCceFvsF__ClxCmtGxgNowAjjDkkBpgEi_Hn~Fz@ryFbcApwDayD`vC_[l_CuxCz`HefF`xFnvBf_AlsBdgCpj@xcBgp@rnB~oAvjBxPd{CaqBriCuy@`vDxfCjwGwxC`vGwhDdyBfs@nrAn}C~wFdbF~iB`hBbdC}kA|hHca@~aCr~@voC}l@xhDbAp_Cr|BnmBrb@tiA_iCljF{eDnjGzPtpFn_B`_Nw~DvlAa dvAd`BzlBcQn{CvhDhyFneK`uFriHrqF_aCpbCmwAvhB`VpzE|yBrvFlbAfnFsb@lpH{_DhnNar@j|Duu@xiHp{BdpG_dDfnJh zgFksB~oDauFlcFyjEb_Cy_CpiDo}@vhCikD`gDy|@~xEurE~pDmNxlGgpExsCk^tlBafBiEanC|nB_bCnYe|EpfBcf@baEriGjuB~{AlaAihBnuB}SjfB|tAh}ClcA
//
////echo urldecode(str_replace(".", "\\", $poliline));
//$polyline = decodePolyline(urldecode(str_replace(".", "\\", $poliline)));
//$eapPolyline = decodePolyline(urldecode(str_replace(".", "\\", $eapPoliline)));
if ($stations != "") {
$stationsArr = explode("/", utf8_encode(substr(urldecode($stations), 1)));
$coordsByGPS = array();
$stations_script = "";
for ($i = 0; $i < count($stationsArr) / 2; $i++) {
$coords = explode(",", $stationsArr[$i + count($stationsArr) / 2]);
if (!isset($coordsByGPS[$coords[0] . ", " . $coords[1]])) {
$coordsByGPS[$coords[0] . ", " . $coords[1]] = 0;
} else {
$coordsByGPS[$coords[0] . ", " . $coords[1]]++;
}
$offset = $coordsByGPS[$coords[0] . ", " . $coords[1]] * 12;
// $offset = 0;
$stations_script .=
// // https://stackoverflow.com/questions/22622393/leaflet-awesome-markers-adding-numbers
// "var numberIcon" . ($i+1) . " = L.divIcon({\n" .
// " className: \"number-icon\",\n" .
// " shadowSize: [20, 30], // size of the shadow\n" .
// " iconAnchor: [20, 40], \n" .
// " shadowAnchor: [4, 30], // the same for the shadow\n" .
// " popupAnchor: [0, -30],\n" .
// " html: " . ($i+1) . "\n" .
// "});\n" .
"var numberIcon" . ($i+1) . " = L.divIcon({\n" .
" className: \"number-icon\",\n" .
" iconSize: [25, 41],\n" .
" iconAnchor: [" . (10 - $offset) . ", " . (40 + $offset) . "],\n" .
" popupAnchor: [" . (3 - $offset) . ", " . (-36 + $offset) . "],\n" .
" html: '" . ($i+1) . "'\n" .
"});\n" .
"L.marker([". $coords[0] . ", " . $coords[1] . "], { icon: numberIcon" . ($i+1) . ", title: \"(" . ($i + 1) . ") " . str_replace(",Germany", "", utf8_decode($stationsArr[$i])) . "\" }).addTo(map);\n";
}
}
if ($jb_id != "") {
$coordsByGPS = array();
$stations_script = "";
$sqlquery = "SELECT ad_street, ad_zipcode, ad_city, ad_country, tr_sort, tr_hsno FROM tour, address WHERE jb_id = $jb_id AND tour.ad_id = address.ad_id ORDER BY tr_sort";
$res = $db->query($sqlquery);
if (DB::isError($res)) die ("$PHP_SELF: '$sqlquery' : " . $res->getMessage());
while ($row =($phpVersion >= "8.0" ? $res->fetch_assoc() : $res->fetchRow())):
$coords = get_coords($row["ad_country"], $row["ad_zipcode"], $row["ad_city"], $row["ad_street"], $row["tr_hsno"]);
if ($coords[0] != 0 && $coords[1] != 0) {
if (!isset($coordsByGPS[$coords[0] . ", " . $coords[1]])) {
$coordsByGPS[$coords[0] . ", " . $coords[1]] = 0;
} else {
$coordsByGPS[$coords[0] . ", " . $coords[1]]++;
}
$offset = $coordsByGPS[$coords[0] . ", " . $coords[1]] * 12;
$stations_script .=
"var numberIcon" . $row["tr_sort"] . " = L.divIcon({\n" .
" className: \"number-icon\",\n" .
" iconSize: [25, 41],\n" .
" iconAnchor: [" . (10 - $offset) . ", " . (40 + $offset) . "],\n" .
" popupAnchor: [" . (3 - $offset) . ", " . (-36 + $offset) . "],\n" .
" html: '" . $row["tr_sort"] . "'\n" .
"});\n" .
"L.marker([". $coords[0] . ", " . $coords[1] . "], { icon: numberIcon" . $row["tr_sort"] . ", title: \"(" . $row["tr_sort"] . ") " . $row["ad_street"] . " " . $row["tr_hsno"] . ", " . $row["ad_zipcode"] . " " . $row["ad_city"] . "\" }).addTo(map);\n";
}
endwhile;
$res->free();
}
/*
TOBEDONE:
- "Strecke wird ermittelt..." mit Hilfe von setTimeout() sofort darstellen
- Kartenlayer-Auswahl (OSM, Google)
(- Adressen und deren Koordinaten übernehmen und darstellen)
(- Preiszonen darstellen)
*/
function decodePolyline($encoded) {
$length = strlen($encoded);
$index = 0;
$lat = 0;
$lng = 0;
$coordinates = [];
while ($index < $length) {
$shift = 0;
$result = 0;
do {
$b = ord($encoded[$index++]) - 63;
$result |= ($b & 0x1F) << $shift;
$shift += 5;
} while ($b >= 0x20);
$dlat = ($result & 1) ? ~($result >> 1) : ($result >> 1);
$lat += $dlat;
$shift = 0;
$result = 0;
do {
$b = ord($encoded[$index++]) - 63;
$result |= ($b & 0x1F) << $shift;
$shift += 5;
} while ($b >= 0x20);
$dlng = ($result & 1) ? ~($result >> 1) : ($result >> 1);
$lng += $dlng;
$coordinates[] = [$lat / 1e5, $lng / 1e5];
}
return json_encode($coordinates);
}
?>
<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Karte</title>
<link rel="stylesheet" href="leaflet/leaflet.css" />
<style>
body {
padding: 0;
margin: 0;
}
html, body, #map {
height: 100%;
width: 100%;
}
// .number-icon
// {
// background-image: url("leaflet/images/marker-icon.png");
// background-size: 40px 40px;
// background-repeat: no-repeat;
// margin: 0 auto;
// text-align:center;
// color:white;
// font-weight: bold;
// }
.number-icon
{
background-image: url("leaflet/images/marker-icon-1.png");
text-align: center;
// padding-top: 2px;
font-size: 1.5em;
color: white;
font-weight: bold;
}
</style>
<script src="leaflet/leaflet.js"></script>
<script type="text/javascript" src="leaflet-coordinates/Leaflet.Coordinates-0.1.3.js"></script>
<link rel="stylesheet" href="Leaflet.Control.Layers.Tree-master/L.Control.Layers.Tree.css">
<script src="Leaflet.Control.Layers.Tree-master/L.Control.Layers.Tree.js"></script>
<script src="leaflet-bing-layer-gh-pages/leaflet-bing-layer.js"></script>
<link rel="stylesheet" href="leaflet-coordinates/Leaflet.Coordinates-0.1.3.css"/>
</head>
<body>
<div id="map"></div>
<script>
var baseMaps = {
osm_de : L.tileLayer("https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png", {
attribution : '<a href="http://www.openstreetmap.org/">Karte hergestellt aus OpenStreetMap-Daten</a> | Lizenz: <a rel="license" href="http://opendatacommons.org/licenses/odbl/">Open Database License (ODbL)</a>'
}),
osm : L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap contributors</a>'
}),
googleStreets : L.tileLayer('http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}', {
maxZoom: 20,
subdomains:['mt0','mt1','mt2','mt3']
}),
googleHybrid : L.tileLayer('http://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}', {
maxZoom: 20,
subdomains:['mt0','mt1','mt2','mt3']
}),
googleSat : L.tileLayer('http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
maxZoom: 20,
subdomains:['mt0','mt1','mt2','mt3']
}),
// googleTerrain : L.tileLayer('http://{s}.google.com/vt/lyrs=p&x={x}&y={y}&z={z}', {
// maxZoom: 20,
// subdomains:['mt0','mt1','mt2','mt3']
// }),
};
var osmLayers = [
{label: "OSM Mapnik german style" , layer: baseMaps.osm_de},
{label: "OSM Mapnik" , layer: baseMaps.osm},
];
var googleLayers = [
{label: "Google Streets" , layer: baseMaps.googleStreets},
{label: "Google Hybrid" , layer: baseMaps.googleHybrid},
{label: "Google Sat" , layer: baseMaps.googleSat},
// {label: "Google Terrain" , layer: baseMaps.googleTerrain},
];
var map = L.map('map', {
layers : [baseMaps.osm_de],
});
var layerControl = L.control.layers.tree([
{
label: 'OpenStreeMap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
children: osmLayers
},
{
label: 'Google Maps',
children: googleLayers
}]
).addTo(map);
L.control.scale({
'imperial': false
}).addTo(map);
L.control.coordinates().addTo(map);
<?php echo $polylines; ?>
<?php echo $stations_script; ?>
////map.setView([53.674, 9.789], 9);
var zones =
[
// Hamburg
// {"color":"#0000FF","zone":[[53.562201812250805,9.752550764127847],[53.55776828707798,9.786081861730423],[53.550479481654605,9.79487505120548],[53.5431882811674,9.762439143841505],[53.519646528492814,9.761274216172922],[53.47403661728694,9.81943758226663],[53.439500324636214,9.841204484062615],[53.40465279152042,9.890902984216353],[53.383144452310574,10.025532803284847],[53.419271730218526,10.061555142554482],[53.444939530130114,10.089584288421406],[53.439005760637514,10.11806967489855],[53.424793302886115,10.189409420232408],[53.412922810792224,10.249629581417878],[53.40767646466608,10.31795627568107],[53.408090725920545,10.371922650154431],[53.41872271170419,10.383728636836906],[53.430417824988155,10.405744172109792],[53.44471376958947,10.409123131538166],[53.45517139127645,10.3916286964716],[53.4924404909228,10.378436069332793],[53.508816988332796,10.367823616838137],[53.52616168723608,10.337950453243366],[53.53179849828567,10.314371693469297],[53.531516291768526,10.278059774047534],[53.55202771523082,10.267165265775247],[53.60779632751124,10.252802491291703],[53.62222215559089,10.241752017215646],[53.63387593469915,10.222975211174543],[53.64637227922239,10.20032870279681],[53.660637153755374,10.180428323921745],[53.65994774898661,10.157280926415694],[53.67207385568224,10.114757125243898],[53.67796359042873,10.077938610441407],[53.6789113884368,10.029086076446731],[53.6727426846104,10.004315864989678],[53.664139029522175,9.966102613596888],[53.65536175916742,9.947804044898533],[53.654955052841075,9.864885241580083],[53.62830299716029,9.777156293248964],[53.58791291383278,9.747971915207927],[53.562201812250805,9.752550764127847],[53.562201812250805,9.752550764127847]],"name":"zone_3"},
// {"color":"#036B03","zone":[[53.54414581195476,9.906806217352397],[53.543431306315085,9.917777903604076],[53.54074938663547,9.931583721360084],[53.54083507612066,9.948165522018826],[53.54350939718111,9.963938030639923],[53.541917620673644,9.97337132886122],[53.53923833199613,9.98181945539585],[53.536140308088676,9.989702465892037],[53.53061723254419,9.999280799313851],[53.52283109465381,10.003778947093338],[53.51864423024355,10.007577452578204],[53.51453478983771,10.024891569424938],[53.50902397023199,10.034047818815566],[53.508338407894314,10.04784133656176],[53.50741591064576,10.058963846367135],[53.50280972588601,10.061777077228328],[53.50080032692128,10.067407176721105],[53.50079015136586,10.083180733825458],[53.50706886348598,10.08909979686149],[53.511505185956594,10.104027482820385],[53.51828272084944,10.121072073919152],[53.52867190653191,10.133567844449033],[53.53704150470014,10.11161803354554],[53.546573967433716,10.120499300980725],[53.55685893398541,10.120348839638297],[53.5683108703206,10.107681626836836],[53.59555785080974,10.082796850223275],[53.60833702267021,10.05543623177715],[53.61192995736289,10.01741639497098],[53.613821646473696,9.972092349564775],[53.60799175779954,9.937024862351336],[53.59858314375862,9.924260088720871],[53.59304983576459,9.901140338344732],[53.585817669055956,9.894132827791879],[53.566872046953165,9.892525271815913],[53.55175638771334,9.894797663047967],[53.54414581195476,9.906806217352397],[53.54414581195476,9.906806217352397]],"name":"zone_2"},
// {"color":"#FF0000","zone":[[53.542539060976395,9.933447442138856],[53.542789805326464,9.953082262169602],[53.54446144937171,9.963727906503607],[53.543125092221146,9.97440510876936],[53.537868603144005,9.988427663538431],[53.53753581365419,10.000597635123484],[53.53297330334996,10.027211102502292],[53.54161858988408,10.034840348617763],[53.54672666217638,10.051005676458573],[53.55735439134389,10.054473215586881],[53.568210100498106,10.045656571464207],[53.57122863365694,10.027100869944206],[53.56795553790175,10.021903688235824],[53.564963139944894,10.013757189772718],[53.56556284537953,10.00410694949312],[53.569072823445396,10.000582017251588],[53.57052513601869,9.98008897322677],[53.56597521838006,9.956949263752392],[53.55896214872368,9.941930167833505],[53.55217556219097,9.932521425429542],[53.542539060976395,9.933447442138856],[53.542539060976395,9.933447442138856]],"name":"zone_1"},
// {"color":"#0000FF","zone":[[53.593858466098965,9.971888973064097],[53.5937642325795,9.969960998433919],[53.59191990567237,9.971594106356093],[53.591516027722065,9.971548742247052],[53.59119292258248,9.971095101158],[53.59091020355848,9.967579382714717],[53.58630565605861,9.968713485437831],[53.59124677361075,9.981165933343874],[53.59369692279358,9.978013127771618],[53.59434309230872,9.978035809826594],[53.59438347757501,9.975109824799375],[53.593858466098965,9.971888973064097],[53.593858466098965,9.971888973064097]],"name":"zone_4"},
// {"color":"#036B03","zone":[[53.5554610702014,10.00005720733435],[53.55598060790763,9.999655372080156],[53.556359725991285,9.998568053157868],[53.55723028058611,9.995306096390891],[53.5574128139551,9.992824172763079],[53.55437984965738,9.99027133703251],[53.5522032829567,9.993864216949873],[53.551360710950235,9.991973227519196],[53.550209168743066,9.993273282752739],[53.55061642505632,9.99592066795529],[53.55185221332604,9.995022447975941],[53.55519427808943,10.000553592059532],[53.5554610702014,10.00005720733435],[53.5554610702014,10.00005720733435]],"name":"zone_17"},
// {"color":"#FF0000","zone":[[53.595962114111984,10.073089221637389],[53.59316055276429,10.07515375536812],[53.59270095742758,10.07574361937742],[53.593642298247886,10.08090506009836],[53.59443014915499,10.08061020535365],[53.59460521694393,10.08123725765833],[53.5968375917015,10.080428071707729],[53.59681569963061,10.079432242314851],[53.59775683712763,10.078805399271943],[53.597078347998035,10.076518810534765],[53.595962114111984,10.073089221637389],[53.595962114111984,10.073089221637389]],"name":"zone_30"},
// {"color":"#0000FF","zone":[[53.67224997343186,10.003491682722427],[53.67226077252073,10.00894223854857],[53.67336226506444,10.011567255401332],[53.6735458443552,10.011403191848984],[53.67376181896745,10.011749548239322],[53.67398859111805,10.011275586861814],[53.674355743441026,10.011968299642461],[53.67480928012833,10.012405802451724],[53.67512243356285,10.011512567550511],[53.674776884812786,10.010929230471476],[53.675252013613544,10.00989016130049],[53.674971256333265,10.009397970641942],[53.67501444988278,10.009197448521405],[53.675230416966116,10.009379741357861],[53.67569474244533,10.009088072818315],[53.675759531640324,10.008832862847015],[53.67588910973083,10.008796404278769],[53.6758999078873,10.008377130753559],[53.675705540651194,10.007866710810902],[53.67569474244533,10.007101080895382],[53.675586760232335,10.007101080895382],[53.67565154959334,10.006098470291079],[53.6758999078873,10.006134928859325],[53.67591070604058,10.005460445362786],[53.67529520687475,10.00407501980149],[53.67443133322831,10.004275541922084],[53.67445293028541,10.003345848452625],[53.67336226506444,10.003236472751041],[53.67302750076922,10.003509912006535],[53.67224997343186,10.003491682722427],[53.67224997343186,10.003491682722427]],"name":"zone_7"},
// {"color":"#036B03","zone":[[53.677397087512446,10.030062183301908],[53.676330927393536,10.028970126059761],[53.673252430920684,10.027595118834228],[53.672689330979665,10.031699926161366],[53.67628259059242,10.033094676497626],[53.677397087512446,10.030062183301908],[53.677397087512446,10.030062183301908]],"name":"zone_6"},
// {"color":"#FF0000","zone":[[53.578494973795586,10.049086107631524],[53.5783417351073,10.049454866208038],[53.57790383051238,10.049565498259057],[53.57788200038158,10.050155484281532],[53.57709398776123,10.050192202437216],[53.576108924047986,10.050339583660076],[53.57613086992359,10.050818905816726],[53.57613073084292,10.053215844952717],[53.57630562252223,10.055686886890498],[53.57766331864076,10.055907652737886],[53.57943667696628,10.054616958618823],[53.57869221683595,10.050450360021046],[53.578494973795586,10.049086107631524],[53.578494973795586,10.049086107631524]],"name":"zone_29"},
// {"color":"#0000FF","zone":[[53.56174200229901,9.98963601378253],[53.56220960902073,9.989761839075186],[53.56282160054991,9.989561209245096],[53.56362073438845,9.9893832090238],[53.563648515357016,9.98869837517853],[53.56358012951961,9.98833748314263],[53.56386021426931,9.987905601368652],[53.56376146783137,9.987344529267801],[53.563731196185614,9.98606140233565],[53.563810543580246,9.985726586801746],[53.563915720415,9.985557237769513],[53.56398519021164,9.985534341010862],[53.564100937677125,9.985655454733632],[53.5642246450206,9.985734850803823],[53.56443514293309,9.985957379377368],[53.56475780969427,9.986545077948819],[53.564732513429306,9.986434672748544],[53.564652923415935,9.986152371198642],[53.5646804649605,9.985992144199827],[53.56481512383212,9.985953740397036],[53.56486910525635,9.986070144097965],[53.56488711359822,9.986305578142748],[53.56506513581638,9.986009231432774],[53.56528722860975,9.985579847657448],[53.56544206030151,9.985464440950892],[53.56550030483368,9.985573747528406],[53.56536286534896,9.985827448327996],[53.565225213926055,9.98605339460832],[53.56505894909105,9.986287050289604],[53.56501120037217,9.986482795068923],[53.565253220030996,9.986511112746683],[53.56573721915851,9.986456530331935],[53.5661279619427,9.986453097294003],[53.5661669480032,9.986201409463291],[53.56642618610249,9.986173475671308],[53.566714786676215,9.986165622989603],[53.566739305426864,9.98657634297038],[53.56729767620334,9.986596598359625],[53.56731137550946,9.986316896815822],[53.56760089767229,9.986281187403762],[53.567553990323944,9.984589047317257],[53.56770522829146,9.984424456436386],[53.56777067868384,9.985118426058136],[53.567989799939284,9.985077111282777],[53.56838842545528,9.985107170625469],[53.56852024051605,9.984663899301552],[53.56830305975174,9.984190110494524],[53.56812204221356,9.983832231258532],[53.56805271229538,9.983161340034457],[53.56763122891252,9.983048735387143],[53.56733578571411,9.982904402265405],[53.5669203545111,9.98251311072687],[53.56670504112631,9.981733421168002],[53.56635217557576,9.982135166166415],[53.56638719843656,9.982694836373526],[53.565451493574784,9.983590920457459],[53.56541640423973,9.983974956493057],[53.56527604660832,9.983797709091647],[53.564907605610244,9.984280215906324],[53.56477894291831,9.984201439283197],[53.564322799640166,9.98476276904222],[53.563960198765415,9.985196040467457],[53.563714564148114,9.986003500850615],[53.56314567492524,9.986987149820749],[53.56174200229901,9.98963601378253],[53.56174200229901,9.98963601378253]],"name":"zone_24"},
// {"color":"#036B03","zone":[[53.554837641532515,9.898309730336365],[53.55359758944874,9.898626004944845],[53.55357880050141,9.900428770215683],[53.55333454342548,9.902105025643635],[53.55310907410424,9.903148731853292],[53.55397336664544,9.903591516305994],[53.554273985999686,9.904824987279909],[53.5551570430012,9.904888242202645],[53.55572068677054,9.903907790914445],[53.55613402076267,9.90058690751988],[53.554837641532515,9.898309730336365],[53.554837641532515,9.898309730336365]],"name":"zone_14"},
// {"color":"#FF0000","zone":[[53.5601437821619,10.014927222463427],[53.55789104348764,10.018746836648887],[53.55890479073574,10.02034511492434],[53.55922661017928,10.021266156642014],[53.56099657335804,10.01812377901544],[53.56090003182126,10.017663258156063],[53.561077024470165,10.016958932136731],[53.56160799797354,10.016173337729185],[53.561254016378484,10.015523190634212],[53.56085176097062,10.01536065386017],[53.5601437821619,10.014927222463427],[53.5601437821619,10.014927222463427]],"name":"zone_11"},
// {"color":"#0000FF","zone":[[53.60751463603992,10.034265566639704],[53.605077848696425,10.03474873899674],[53.60552091139871,10.039207102112442],[53.60685007161746,10.03843841881627],[53.606797948475304,10.03793328407886],[53.60750160546522,10.037647773140492],[53.60750160546522,10.037406186962045],[53.608035855720374,10.037208525543406],[53.60751463603992,10.034265566639704],[53.60751463603992,10.034265566639704]],"name":"zone_5"},
// {"color":"#036B03","zone":[[53.56885514309016,10.091177681075777],[53.56880520211493,10.091598161114689],[53.5710774567965,10.090378769000125],[53.570103648311886,10.085248912519518],[53.5690549064025,10.085795536570373],[53.56885514309016,10.091177681075777],[53.56885514309016,10.091177681075777]],"name":"zone_10"},
// {"color":"#FF0000","zone":[[53.554732451057504,10.020452476574178],[53.55429584377535,10.020990250513734],[53.55472180214966,10.022935199606223],[53.55394974943266,10.023356455859556],[53.553987021266664,10.02357156543593],[53.554354413303145,10.023338530061977],[53.55438636028603,10.023499862244279],[53.554034942148036,10.023759786315253],[53.55407221390698,10.023903192698583],[53.55484426438946,10.023320604263006],[53.55498269953813,10.023248901071355],[53.55519035141188,10.024172079669029],[53.556271189580514,10.023311641364955],[53.55655869853271,10.023939044295105],[53.55674284770308,10.024433044751646],[53.5570782708848,10.024092454589464],[53.557397719061754,10.024890152599966],[53.55814841278354,10.023482977456837],[53.55812711669145,10.02311549859769],[53.55794609947472,10.022425355373912],[53.55761600726211,10.022532910162113],[53.55734447786651,10.022792834233087],[53.557227347000975,10.022694242344414],[53.55696646345331,10.022004099120636],[53.55679076546335,10.022138542605859],[53.5565511761198,10.021618694463882],[53.556503258088156,10.02147528808058],[53.55636482791448,10.021636620261404],[53.55627431563306,10.021699360555061],[53.5561997759614,10.021582842867303],[53.55608796620794,10.021233289807185],[53.55603472336449,10.021161586615506],[53.55581642700545,10.021412547787008],[53.55564604857693,10.02154699127226],[53.555454372024855,10.021735212151611],[53.555385155278714,10.021654546060404],[53.555028421021774,10.021009217331283],[53.554732451057504,10.020452476574178],[53.554732451057504,10.020452476574178]],"name":"zone_26"},
// {"color":"#0000FF","zone":[[53.568397664485644,9.975542676451823],[53.56671950230333,9.978282596011809],[53.566789040731436,9.978360656390919],[53.56695593249327,9.97861825563922],[53.56717381796875,9.979242738668006],[53.567405609795514,9.979547174144727],[53.56764667194747,9.979515949992873],[53.56781819610379,9.980163851135245],[53.56810097765319,9.980023342453677],[53.568059255904075,9.979914057923963],[53.567938726202044,9.979383247076498],[53.5678413750166,9.979110035751603],[53.56785991811705,9.978868048577397],[53.56802216989692,9.979110035751603],[53.5682724999933,9.979843803310132],[53.56900957445026,9.979336410849271],[53.56976054276069,9.97886024254035],[53.569292348033855,9.97711949609851],[53.568397664485644,9.975542676451823],[53.568397664485644,9.975542676451823]],"name":"zone_28"},
// {"color":"#036B03","zone":[[53.56797008697691,9.971648633262191],[53.567288624479346,9.973069332150772],[53.567423063528565,9.97376406952037],[53.56767803296529,9.974224625754005],[53.567385976936805,9.974778854442008],[53.56642635007182,9.9762932257849],[53.56701974509855,9.977432907312817],[53.568109159607076,9.97573119105985],[53.56807670936777,9.975481397848597],[53.5684151177833,9.974880332933424],[53.56857273173762,9.974825690669235],[53.569110469042585,9.974076311034139],[53.56797008697691,9.971648633262191],[53.56797008697691,9.971648633262191]],"name":"zone_27"},
// {"color":"#FF0000","zone":[[53.641822118106774,10.14925419837624],[53.64090948341925,10.149208585502265],[53.63973316958291,10.151135729426187],[53.64070667302934,10.152812002542674],[53.64180183755002,10.152732180013487],[53.641822118106774,10.14925419837624],[53.641822118106774,10.14925419837624]],"name":"zone_8"},
// {"color":"#0000FF","zone":[[53.55890960428718,10.028657406546387],[53.55837028450432,10.028861694425643],[53.55793882372831,10.028271529442435],[53.557682641810516,10.028657406546387],[53.5598533973627,10.03408238466588],[53.56035225091142,10.033514918335271],[53.55942195171224,10.031176957054186],[53.55890960428718,10.028657406546387],[53.55890960428718,10.028657406546387]],"name":"zone_12"},
// {"color":"#036B03","zone":[[53.55081311464747,9.995973877791073],[53.55043421560961,9.9961701105874],[53.55165833873852,10.005613813914692],[53.55202265426081,10.005491168417109],[53.55081311464747,9.995973877791073],[53.55081311464747,9.995973877791073]],"name":"zone_18"},
// {"color":"#FF0000","zone":[[53.5596819953839,9.982402546508382],[53.558395040495355,9.983320186046882],[53.5586883370224,9.983954304973764],[53.55908155181825,9.984275794604656],[53.559597368477625,9.984684845466347],[53.55975450726001,9.984943401149735],[53.559823704024154,9.985877198417342],[53.55995468537586,9.986118516478854],[53.56026347906982,9.986298947127011],[53.560476682156235,9.985992668124453],[53.560554993180546,9.985856141074407],[53.5606522216533,9.985712803299094],[53.56057503837687,9.985232884685729],[53.5604196838824,9.98487729442715],[53.560202709777485,9.984006077123752],[53.55996413600161,9.983164057695035],[53.55978923497352,9.98260274870347],[53.55979402276009,9.982310442291748],[53.5596819953839,9.982402546508382],[53.5596819953839,9.982402546508382]],"name":"zone_25"},
// {"color":"#0000FF","zone":[[53.55145559570488,9.914218343166624],[53.552958760555896,9.91399695093969],[53.553033917396846,9.912257440590281],[53.552094447290926,9.912004420903202],[53.55186897136193,9.91181465613758],[53.551230116371414,9.911846283598948],[53.55145559570488,9.914218343166624],[53.55145559570488,9.914218343166624]],"name":"zone_13"},
// {"color":"#036B03","zone":[[53.55175821284766,9.936777502554776],[53.5514449954041,9.936612747992257],[53.551363427980675,9.936969716210768],[53.551768000855446,9.941445548487735],[53.55184630483612,9.941467515762128],[53.55188545677211,9.940220872907588],[53.5520910038413,9.938507425459761],[53.55170927277484,9.938457999091014],[53.55175821284766,9.936777502554776],[53.55175821284766,9.936777502554776]],"name":"zone_22"},
// {"color":"#FF0000","zone":[[53.5579742061941,9.989588961462772],[53.55487693482249,9.99063811814267],[53.5550657993243,9.990876562841663],[53.557936435957885,9.990002265609036],[53.5579742061941,9.989588961462772],[53.5579742061941,9.989588961462772]],"name":"zone_19"},
// {"color":"#0000FF","zone":[[53.57245191732696,9.966709471403448],[53.57140629365708,9.965124694622574],[53.571162311080315,9.965579584254414],[53.572207940783215,9.96713501331783],[53.57245191732696,9.966709471403448],[53.57245191732696,9.966709471403448]],"name":"zone_16"},
// {"color":"#036B03","zone":[[53.60319354916362,10.15490250329188],[53.60443777820575,10.15525033069207],[53.60435522385933,10.155846606235343],[53.604420088002286,10.155886357937987],[53.60449674549696,10.155319896171932],[53.60515717353485,10.155558406388764],[53.60516307016758,10.155379523726339],[53.60432574012543,10.154147220936267],[53.60421959851192,10.154286351896843],[53.60485644419103,10.155240392765762],[53.60330559024729,10.154534800039869],[53.60319354916362,10.15490250329188],[53.60319354916362,10.15490250329188]],"name":"zone_21"},
// {"color":"#FF0000","zone":[[53.56993495473162,9.967292304997585],[53.56954397090678,9.966838239518978],[53.56911253628476,9.967587447558259],[53.56957093542496,9.968245842502398],[53.56993495473162,9.967292304997585],[53.56993495473162,9.967292304997585]],"name":"zone_15"},
// {"color":"#0000FF","zone":[[53.57002830808915,10.085416973347805],[53.57102944974565,10.09009534073283],[53.57042876759638,10.08613348006449],[53.57007836573493,10.086091332610522],[53.57002830808915,10.085416973347805],[53.57002830808915,10.085416973347805]],"name":"zone_9"},
// {"color":"#036B03","zone":[[53.55229536924472,9.93363973735427],[53.55220569355831,9.932142851889068],[53.552104808184225,9.932218325104913],[53.55204876065014,9.933614579615977],[53.55229536924472,9.93363973735427],[53.55229536924472,9.93363973735427]],"name":"zone_23"},
// {"color":"#FF0000","zone":[[53.554851669867304,9.988269632975431],[53.55474954262456,9.988275561108651],[53.554957318479666,9.98895136825655],[53.55472489118398,9.989135140375396],[53.55445724604979,9.989253703032716],[53.55424242438849,9.989265559298161],[53.55398534129455,9.989170709172697],[53.55392195070249,9.98924777490052],[53.55418255586238,9.98940190635517],[53.55438681283846,9.989378193823313],[53.55468263153875,9.989271487431381],[53.55492210230486,9.989129212242148],[53.55500309946311,9.989075859046181],[53.5550840964666,9.989324840627319],[53.55511226930082,9.989218134235443],[53.554851669867304,9.988269632975431],[53.554851669867304,9.988269632975431]],"name":"zone_20"},
// Bremen
{"color":"#0000FF","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[53.03611443996305,8.792241353424126],[53.0357327,8.7930086],[53.0353993,8.793951],[53.0341577,8.7981914],[53.0325629,8.8039145],[53.031606,8.807049],[53.0310036,8.8088529],[53.0308679,8.809117],[53.0306101,8.8094456],[53.0303892,8.8097006],[53.0301182,8.8099286],[53.0297862,8.8100985],[53.0294433,8.8101115],[53.0290763,8.8102065],[53.0288053,8.8104535],[53.0279015,8.8122832],[53.0265396,8.8154038],[53.0263566,8.8156667],[53.0248688,8.8171825],[53.0244269,8.8173175],[53.0237993,8.817401],[53.0235726,8.8174291],[53.0234684,8.8175447],[53.0229769,8.8175423],[53.0227088,8.817619],[53.0224727,8.8177491],[53.0219281,8.8190022],[53.0208541,8.8220631],[53.0205583,8.8237691],[53.0205231,8.8242361],[53.0206043,8.8245924],[53.0209623,8.827361],[53.0212643,8.8293996],[53.0212913,8.8302575],[53.0212143,8.8308904],[53.0211153,8.8314463],[53.0210203,8.8317603],[53.0207493,8.8323892],[53.019976,8.8332299],[53.0196055,8.8340554],[53.0182156,8.8376934],[53.0181266,8.8381621],[53.0196215,8.8397945],[53.0198075,8.8400294],[53.0200476,8.8404553],[53.0201143,8.8404952],[53.0206539,8.8405241],[53.0207412,8.8406131],[53.0212137,8.841608],[53.0214663,8.8427576],[53.0216343,8.8431205],[53.0221516,8.8436167],[53.0225158,8.8442126],[53.0229837,8.8442816],[53.0231082,8.8443287],[53.0232421,8.8444165],[53.0233893,8.8445702],[53.023627,8.8446486],[53.0237291,8.8448014],[53.0237613,8.845185],[53.0242774,8.8456524],[53.024451,8.8468255],[53.024098,8.8491936],[53.023915,8.8495955],[53.023705,8.8497405],[53.0235181,8.8498265],[53.0233581,8.8498145],[53.0230859,8.8498641],[53.0227098,8.8498452],[53.0216805,8.849454],[53.0208509,8.8488011],[53.0203796,8.8487206],[53.0196698,8.8486838],[53.0189751,8.8481686],[53.0178901,8.8478114],[53.0178077,8.8472769],[53.0175979,8.8474385],[53.0165436,8.8479651],[53.0166033,8.8508108],[53.0177046,8.8514869],[53.0181233,8.8513252],[53.018882,8.8514522],[53.0194993,8.85178],[53.0197093,8.8520355],[53.0204495,8.8527976],[53.0205288,8.8534193],[53.0206723,8.8536534],[53.0207261,8.8541218],[53.0206031,8.8542623],[53.0206082,8.8544624],[53.0207389,8.8545305],[53.0209489,8.8545561],[53.0210926,8.8548913],[53.0215944,8.8570581],[53.0216886,8.85785],[53.021568,8.859503],[53.0215046,8.8611041],[53.0215375,8.8619524],[53.0216933,8.8629158],[53.0219313,8.8637843],[53.0219733,8.8641003],[53.0217816,8.8667778],[53.0236056,8.8683899],[53.0247451,8.8691345],[53.0253689,8.8679576],[53.0257159,8.8672148],[53.0260668,8.8667878],[53.0263418,8.8665559],[53.0266928,8.8659559],[53.0277209,8.8649858],[53.0280383,8.8648066],[53.0286495,8.8646011],[53.02924621683056,8.864499255929275],[53.03100961706727,8.869534417433215],[53.0299804,8.8714461],[53.0288625,8.8739917],[53.0278407,8.8764783],[53.0274817,8.8771802],[53.0260209,8.8795408],[53.024674,8.8820935],[53.0235342,8.8839772],[53.0220503,8.8860299],[53.0208975,8.8872527],[53.0189637,8.8886035],[53.0181588,8.8892514],[53.0174299,8.8896444],[53.0157671,8.8908152],[53.0152291,8.8913981],[53.0141842,8.8929809],[53.0136193,8.8940707],[53.0131504,8.8956355],[53.0130904,8.8959982],[53.0129134,8.8970503],[53.0127344,8.898998],[53.0126545,8.9031793],[53.0123755,8.905353],[53.0119525,8.9080156],[53.0110367,8.9158254],[53.0133525,8.9176498],[53.0123115,8.9212367],[53.0122265,8.9212661],[53.0122177,8.9214119],[53.0123984,8.9214168],[53.0149411,8.9217905],[53.0140824,8.9237648],[53.0136304,8.9253489],[53.0129248,8.9285832],[53.0140421,8.9288398],[53.0135338,8.935912],[53.0240665,8.9382706],[53.0247879,8.938248],[53.0248414,8.9388875],[53.0248343,8.9392152],[53.0246031,8.9401459],[53.0244927,8.9409371],[53.0245311,8.9417088],[53.0244145,8.9426886],[53.0244081,8.9433055],[53.0244625,8.9445031],[53.0245103,8.9447788],[53.0246702,8.9454177],[53.0248747,8.9457592],[53.0253002,8.9461416],[53.025616,8.9463099],[53.0259061,8.9463435],[53.03030584116328,8.963789636970773],[53.03906195299061,8.981544466025383],[53.0413715177917,8.988406017642689],[53.0467959,8.9803461],[53.0515073,8.9765506],[53.0511943,8.9734821],[53.0528839,8.9725809],[53.0537704,8.972052],[53.0539596,8.9718788],[53.0537102,8.9714855],[53.054228,8.9712512],[53.0543288,8.9717183],[53.0546771,8.9715593],[53.0549544,8.9713769],[53.0552575,8.9712482],[53.0557298,8.9705125],[53.0561458,8.9704385],[53.05626787072512,8.97087638554865],[53.05805484242106,8.972094361836497],[53.06019468441525,8.969195591281704],[53.0671315,8.9653512],[53.0686773,8.9646403],[53.0690543,8.9645313],[53.0694703,8.9643184],[53.0701642,8.9638394],[53.0703062,8.9637754],[53.0704391,8.9637714],[53.0705691,8.9638464],[53.0712981,8.9647883],[53.071435,8.9644683],[53.071473,8.9637944],[53.071565,8.9635355],[53.0723619,8.9634875],[53.0728269,8.9644193],[53.0737388,8.9641523],[53.0743457,8.9640314],[53.0747117,8.9640583],[53.0752156,8.9641393],[53.0755706,8.9642653],[53.0760735,8.9643863],[53.0766115,8.9647612],[53.0775723,8.9645502],[53.0788312,8.9641523],[53.0792851,8.9642943],[53.0798421,8.9642753Line truncated
{"color":"#036B03","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[53.1773658,8.6589576],[53.1781661,8.6587078],[53.178552,8.6585088],[53.1796699,8.6584238],[53.1811607,8.6583628],[53.1817147,8.6580618],[53.1817597,8.6578219],[53.1820996,8.6575899],[53.1821946,8.656735],[53.1824006,8.6563301],[53.1830305,8.6545804],[53.1832855,8.6542724],[53.1832215,8.6538405],[53.1839534,8.6534725],[53.1839234,8.6531176],[53.1841024,8.6530516],[53.1843994,8.6531966],[53.1846403,8.6524947],[53.1849833,8.6525437],[53.1856202,8.6531056],[53.1858222,8.6529196],[53.1860252,8.6529116],[53.1862152,8.6531206],[53.1863181,8.6534725],[53.1864941,8.6554262],[53.1867651,8.6552762],[53.1869751,8.6550903],[53.1871621,8.6547043],[53.18744,8.6543174],[53.187646,8.6538545],[53.18778,8.6533915],[53.1880469,8.6529266],[53.1884509,8.6520967],[53.1884889,8.6518847],[53.1885809,8.6511599],[53.1887189,8.649184],[53.188756,8.6490394],[53.1887184,8.6489206],[53.1885581,8.6488914],[53.1885993,8.6488138],[53.1879277,8.6476425],[53.1893903,8.6429513],[53.1896579,8.6420783],[53.1901104,8.6425418],[53.1909186,8.6401276],[53.1917855,8.6377279],[53.1929754,8.6388977],[53.1932447,8.638258],[53.1940151,8.6366691],[53.1946967,8.637312],[53.1950162,8.6376641],[53.1957004,8.6361519],[53.1955535,8.635904],[53.19613,8.6343394],[53.196199,8.6342174],[53.195611,8.6339065],[53.195562,8.6337705],[53.1954511,8.6321342],[53.1959458,8.6311318],[53.1964681,8.6302254],[53.1967505,8.6296172],[53.1971219,8.6293202],[53.1976336,8.6295295],[53.1978599,8.6293261],[53.1980931,8.6288914],[53.198289,8.627948],[53.1978898,8.6272214],[53.1974933,8.6268799],[53.1973413,8.6265992],[53.1970543,8.6257063],[53.1971328,8.624076],[53.1971408,8.6217284],[53.1952428,8.6222122],[53.1950508,8.6213225],[53.1947414,8.619001],[53.1945256,8.6163329],[53.1945057,8.6156956],[53.1945662,8.615495],[53.1944654,8.6153446],[53.1931691,8.6085547],[53.1917702,8.6089405],[53.1895417,8.6091514],[53.1893247,8.6089034],[53.1888207,8.6091244],[53.1886458,8.6089924],[53.1884508,8.6078506],[53.1883368,8.6074396],[53.1878708,8.6070437],[53.1876499,8.6067568],[53.1871809,8.6041202],[53.186719,8.6041122],[53.186658,8.6033423],[53.1868559,8.6032953],[53.186673,8.6018765],[53.186536,8.5998828],[53.18628,8.5998538],[53.18601,8.599152],[53.185998,8.599015],[53.1854995,8.5990658],[53.1853997,8.5977289],[53.1853537,8.597502],[53.1847697,8.5976487],[53.1848882,8.5961461],[53.1848855,8.5952676],[53.1848047,8.5948397],[53.1844456,8.5940331],[53.1842081,8.5933778],[53.1846632,8.5927889],[53.1845446,8.5920028],[53.1850751,8.5919401],[53.186738,8.5915481],[53.1866283,8.5908741],[53.1867494,8.5907021],[53.1872124,8.5922676],[53.1875645,8.5927798],[53.1876264,8.5927382],[53.1879493,8.590817],[53.1879802,8.5908167],[53.1879745,8.5907405],[53.1881126,8.5904894],[53.1882181,8.5903661],[53.1884635,8.5902485],[53.1886444,8.5902691],[53.1888715,8.5903465],[53.1893214,8.5897748],[53.1897038,8.5890263],[53.1898723,8.5888293],[53.1897176,8.5886326],[53.1892216,8.5887545],[53.1895266,8.5840463],[53.1897286,8.5839493],[53.1904045,8.5842972],[53.1905415,8.5834973],[53.1904885,8.5831834],[53.1905685,8.5830204],[53.1906745,8.5829174],[53.1906635,8.5821845],[53.1904955,8.5820926],[53.1903315,8.5814077],[53.1901025,8.5812977],[53.1899615,8.5812747],[53.1900035,8.5811837],[53.1900415,8.5803898],[53.1907624,8.5802798],[53.1909764,8.5801699],[53.1912354,8.5806548],[53.1914304,8.5809237],[53.1914414,8.5810427],[53.1917433,8.5813057],[53.1923383,8.5813197],[53.1926582,8.5810877],[53.1931162,8.5801618],[53.194261,8.5813436],[53.194394,8.5818676],[53.195127,8.5829094],[53.1955659,8.5830234],[53.1958859,8.5833963],[53.1959389,8.5835593],[53.1959929,8.5840052],[53.1959159,8.5843212],[53.1959929,8.5845421],[53.1960419,8.5849251],[53.1961258,8.5850581],[53.1963088,8.5848991],[53.1963508,8.5846001],[53.1967058,8.5843912],[53.1968738,8.5842482],[53.1970837,8.5834503],[53.1973277,8.5830214],[53.1977667,8.5820695],[53.1979536,8.5817646],[53.1981746,8.5815366],[53.1983046,8.5814336],[53.1984686,8.5813866],[53.1987435,8.5814526],[53.1994485,8.5815016],[53.1995445,8.5816156],[53.2000934,8.5816916],[53.2003984,8.5821945],[53.2004863,8.5824664],[53.2007383,8.5826934],[53.2007913,8.5829284],[53.2007953,8.5833063],[53.2011733,8.5838532],[53.2012723,8.5842062],[53.2015312,8.5846921],[53.2016192,8.585024],[53.2016382,8.585359],[53.2017602,8.5857499],[53.2019822,8.5861568],[53.2020312,8.5863338],[53.2020662,8.5868267],[53.2021762,8.5870597],[53.2021912,8.5872577],[53.2021572,8.5873976],[53.2022332,8.5877116],[53.2025311,8.5881485],[53.2027791,8.5881775],[53.2030541,8.5881055],[53.2032831,8.5884325],[53.203302,8.5887494],[53.203424,8.5890014],[53.203542,8.5889964],[53.203771,8.5891834],[53.203859,8.5893583],[53.203889,8.5897953],[53.203939,8.5900492],[53.20411,8.5902592],[53.2043999,8.5904852],[53.2046749,8.591326],[53.2050529,8.5920029],[53.2051289,8.5922179],[53.2053728,8.5925828],[53.2054108,8.5929278],[53.2054148,8.5939576],[53.2076921,8.5969808],[53.208327Line truncated
{"color":"#FF0000","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[53.522646443930114,8.557278720883488],[53.53613585108562,8.576384369467405],[53.53145412966086,8.555922950556436],[53.522646443930114,8.557278720883488],[53.522646443930114,8.557278720883488]],"name":"zone_faehre_brhv-blexen"},
{"color":"#0000FF","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[53.360072726513835,8.497236197466094],[53.36417797325001,8.505911975220613],[53.36577289873361,8.504466012262185],[53.362870612753596,8.495132978616567],[53.360072726513835,8.497236197466094],[53.360072726513835,8.497236197466094]],"name":"zone_faehre_brake-sandstedt"},
{"color":"#036B03","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[53.18242653539636,8.557815807958008],[53.18118080235428,8.555433450587998],[53.17957109371926,8.558773422194633],[53.180998838319454,8.562557166253072],[53.18242653539636,8.557815807958008],[53.18242653539636,8.557815807958008]],"name":"zone_faehre_motzen-blumenthal"},
{"color":"#FF0000","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[53.196023665750005,8.516157849001559],[53.197252845427045,8.519830844220309],[53.19873995396955,8.5175763850865],[53.19738941877125,8.514182030884399],[53.196023665750005,8.516157849001559],[53.196023665750005,8.516157849001559]],"name":"zone_faehre_berne-farge"},
{"color":"#0000FF","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[53.16884281778513,8.620626645538977],[53.167523945151174,8.61694095922698],[53.16630021264061,8.618857516109358],[53.16802022672354,8.623064868791943],[53.16884281778513,8.620626645538977],[53.16884281778513,8.620626645538977]],"name":"zone_faehre_lemwerder-vegesack"},
// {"color":"#0000FF","zone":[[53.03611443996305,8.792241353424126],[53.0357327,8.7930086],[53.0353993,8.793951],[53.0341577,8.7981914],[53.0325629,8.8039145],[53.031606,8.807049],[53.0310036,8.8088529],[53.0308679,8.809117],[53.0306101,8.8094456],[53.0303892,8.8097006],[53.0301182,8.8099286],[53.0297862,8.8100985],[53.0294433,8.8101115],[53.0290763,8.8102065],[53.0288053,8.8104535],[53.0279015,8.8122832],[53.0265396,8.8154038],[53.0263566,8.8156667],[53.0248688,8.8171825],[53.0244269,8.8173175],[53.0237993,8.817401],[53.0235726,8.8174291],[53.0234684,8.8175447],[53.0229769,8.8175423],[53.0227088,8.817619],[53.0224727,8.8177491],[53.0219281,8.8190022],[53.0208541,8.8220631],[53.0205583,8.8237691],[53.0205231,8.8242361],[53.0206043,8.8245924],[53.0209623,8.827361],[53.0212643,8.8293996],[53.0212913,8.8302575],[53.0212143,8.8308904],[53.0211153,8.8314463],[53.0210203,8.8317603],[53.0207493,8.8323892],[53.019976,8.8332299],[53.0196055,8.8340554],[53.0182156,8.8376934],[53.0181266,8.8381621],[53.0196215,8.8397945],[53.0198075,8.8400294],[53.0200476,8.8404553],[53.0201143,8.8404952],[53.0206539,8.8405241],[53.0207412,8.8406131],[53.0212137,8.841608],[53.0214663,8.8427576],[53.0216343,8.8431205],[53.0221516,8.8436167],[53.0225158,8.8442126],[53.0229837,8.8442816],[53.0231082,8.8443287],[53.0232421,8.8444165],[53.0233893,8.8445702],[53.023627,8.8446486],[53.0237291,8.8448014],[53.0237613,8.845185],[53.0242774,8.8456524],[53.024451,8.8468255],[53.024098,8.8491936],[53.023915,8.8495955],[53.023705,8.8497405],[53.0235181,8.8498265],[53.0233581,8.8498145],[53.0230859,8.8498641],[53.0227098,8.8498452],[53.0216805,8.849454],[53.0208509,8.8488011],[53.0203796,8.8487206],[53.0196698,8.8486838],[53.0189751,8.8481686],[53.0178901,8.8478114],[53.0178077,8.8472769],[53.0175979,8.8474385],[53.0165436,8.8479651],[53.0166033,8.8508108],[53.0177046,8.8514869],[53.0181233,8.8513252],[53.018882,8.8514522],[53.0194993,8.85178],[53.0197093,8.8520355],[53.0204495,8.8527976],[53.0205288,8.8534193],[53.0206723,8.8536534],[53.0207261,8.8541218],[53.0206031,8.8542623],[53.0206082,8.8544624],[53.0207389,8.8545305],[53.0209489,8.8545561],[53.0210926,8.8548913],[53.0215944,8.8570581],[53.0216886,8.85785],[53.021568,8.859503],[53.0215046,8.8611041],[53.0215375,8.8619524],[53.0216933,8.8629158],[53.0219313,8.8637843],[53.0219733,8.8641003],[53.0217816,8.8667778],[53.0236056,8.8683899],[53.0247451,8.8691345],[53.0253689,8.8679576],[53.0257159,8.8672148],[53.0260668,8.8667878],[53.0263418,8.8665559],[53.0266928,8.8659559],[53.0277209,8.8649858],[53.0280383,8.8648066],[53.0286495,8.8646011],[53.02924621683056,8.864499255929275],[53.03100961706727,8.869534417433215],[53.0299804,8.8714461],[53.0288625,8.8739917],[53.0278407,8.8764783],[53.0274817,8.8771802],[53.0260209,8.8795408],[53.024674,8.8820935],[53.0235342,8.8839772],[53.0220503,8.8860299],[53.0208975,8.8872527],[53.0189637,8.8886035],[53.0181588,8.8892514],[53.0174299,8.8896444],[53.0157671,8.8908152],[53.0152291,8.8913981],[53.0141842,8.8929809],[53.0136193,8.8940707],[53.0131504,8.8956355],[53.0130904,8.8959982],[53.0129134,8.8970503],[53.0127344,8.898998],[53.0126545,8.9031793],[53.0123755,8.905353],[53.0119525,8.9080156],[53.0110367,8.9158254],[53.0133525,8.9176498],[53.0123115,8.9212367],[53.0122265,8.9212661],[53.0122177,8.9214119],[53.0123984,8.9214168],[53.0149411,8.9217905],[53.0140824,8.9237648],[53.0136304,8.9253489],[53.0129248,8.9285832],[53.0140421,8.9288398],[53.0135338,8.935912],[53.0240665,8.9382706],[53.0247879,8.938248],[53.0248414,8.9388875],[53.0248343,8.9392152],[53.0246031,8.9401459],[53.0244927,8.9409371],[53.0245311,8.9417088],[53.0244145,8.9426886],[53.0244081,8.9433055],[53.0244625,8.9445031],[53.0245103,8.9447788],[53.0246702,8.9454177],[53.0248747,8.9457592],[53.0253002,8.9461416],[53.025616,8.9463099],[53.0259061,8.9463435],[53.03030584116328,8.963789636970773],[53.03906195299061,8.981544466025383],[53.0413715177917,8.988406017642689],[53.0467959,8.9803461],[53.0515073,8.9765506],[53.0511943,8.9734821],[53.0528839,8.9725809],[53.0537704,8.972052],[53.0539596,8.9718788],[53.0537102,8.9714855],[53.054228,8.9712512],[53.0543288,8.9717183],[53.0546771,8.9715593],[53.0549544,8.9713769],[53.0552575,8.9712482],[53.0557298,8.9705125],[53.0561458,8.9704385],[53.05626787072512,8.97087638554865],[53.05805484242106,8.972094361836497],[53.06019468441525,8.969195591281704],[53.0671315,8.9653512],[53.0686773,8.9646403],[53.0690543,8.9645313],[53.0694703,8.9643184],[53.0701642,8.9638394],[53.0703062,8.9637754],[53.0704391,8.9637714],[53.0705691,8.9638464],[53.0712981,8.9647883],[53.071435,8.9644683],[53.071473,8.9637944],[53.071565,8.9635355],[53.0723619,8.9634875],[53.0728269,8.9644193],[53.0737388,8.9641523],[53.0743457,8.9640314],[53.0747117,8.9640583],[53.0752156,8.9641393],[53.0755706,8.9642653],[53.0760735,8.9643863],[53.0766115,8.9647612],[53.0775723,8.9645502],[53.0788312,8.9641523],[53.0792851,8.9642943],[53.0798421,8.9642753],[53.080281,8.9641613],[53.080556,8.9643 Line truncated
// {"color":"#036B03","zone":[[53.1773658,8.6589576],[53.1781661,8.6587078],[53.178552,8.6585088],[53.1796699,8.6584238],[53.1811607,8.6583628],[53.1817147,8.6580618],[53.1817597,8.6578219],[53.1820996,8.6575899],[53.1821946,8.656735],[53.1824006,8.6563301],[53.1830305,8.6545804],[53.1832855,8.6542724],[53.1832215,8.6538405],[53.1839534,8.6534725],[53.1839234,8.6531176],[53.1841024,8.6530516],[53.1843994,8.6531966],[53.1846403,8.6524947],[53.1849833,8.6525437],[53.1856202,8.6531056],[53.1858222,8.6529196],[53.1860252,8.6529116],[53.1862152,8.6531206],[53.1863181,8.6534725],[53.1864941,8.6554262],[53.1867651,8.6552762],[53.1869751,8.6550903],[53.1871621,8.6547043],[53.18744,8.6543174],[53.187646,8.6538545],[53.18778,8.6533915],[53.1880469,8.6529266],[53.1884509,8.6520967],[53.1884889,8.6518847],[53.1885809,8.6511599],[53.1887189,8.649184],[53.188756,8.6490394],[53.1887184,8.6489206],[53.1885581,8.6488914],[53.1885993,8.6488138],[53.1879277,8.6476425],[53.1893903,8.6429513],[53.1896579,8.6420783],[53.1901104,8.6425418],[53.1909186,8.6401276],[53.1917855,8.6377279],[53.1929754,8.6388977],[53.1932447,8.638258],[53.1940151,8.6366691],[53.1946967,8.637312],[53.1950162,8.6376641],[53.1957004,8.6361519],[53.1955535,8.635904],[53.19613,8.6343394],[53.196199,8.6342174],[53.195611,8.6339065],[53.195562,8.6337705],[53.1954511,8.6321342],[53.1959458,8.6311318],[53.1964681,8.6302254],[53.1967505,8.6296172],[53.1971219,8.6293202],[53.1976336,8.6295295],[53.1978599,8.6293261],[53.1980931,8.6288914],[53.198289,8.627948],[53.1978898,8.6272214],[53.1974933,8.6268799],[53.1973413,8.6265992],[53.1970543,8.6257063],[53.1971328,8.624076],[53.1971408,8.6217284],[53.1952428,8.6222122],[53.1950508,8.6213225],[53.1947414,8.619001],[53.1945256,8.6163329],[53.1945057,8.6156956],[53.1945662,8.615495],[53.1944654,8.6153446],[53.1931691,8.6085547],[53.1917702,8.6089405],[53.1895417,8.6091514],[53.1893247,8.6089034],[53.1888207,8.6091244],[53.1886458,8.6089924],[53.1884508,8.6078506],[53.1883368,8.6074396],[53.1878708,8.6070437],[53.1876499,8.6067568],[53.1871809,8.6041202],[53.186719,8.6041122],[53.186658,8.6033423],[53.1868559,8.6032953],[53.186673,8.6018765],[53.186536,8.5998828],[53.18628,8.5998538],[53.18601,8.599152],[53.185998,8.599015],[53.1854995,8.5990658],[53.1853997,8.5977289],[53.1853537,8.597502],[53.1847697,8.5976487],[53.1848882,8.5961461],[53.1848855,8.5952676],[53.1848047,8.5948397],[53.1844456,8.5940331],[53.1842081,8.5933778],[53.1846632,8.5927889],[53.1845446,8.5920028],[53.1850751,8.5919401],[53.186738,8.5915481],[53.1866283,8.5908741],[53.1867494,8.5907021],[53.1872124,8.5922676],[53.1875645,8.5927798],[53.1876264,8.5927382],[53.1879493,8.590817],[53.1879802,8.5908167],[53.1879745,8.5907405],[53.1881126,8.5904894],[53.1882181,8.5903661],[53.1884635,8.5902485],[53.1886444,8.5902691],[53.1888715,8.5903465],[53.1893214,8.5897748],[53.1897038,8.5890263],[53.1898723,8.5888293],[53.1897176,8.5886326],[53.1892216,8.5887545],[53.1895266,8.5840463],[53.1897286,8.5839493],[53.1904045,8.5842972],[53.1905415,8.5834973],[53.1904885,8.5831834],[53.1905685,8.5830204],[53.1906745,8.5829174],[53.1906635,8.5821845],[53.1904955,8.5820926],[53.1903315,8.5814077],[53.1901025,8.5812977],[53.1899615,8.5812747],[53.1900035,8.5811837],[53.1900415,8.5803898],[53.1907624,8.5802798],[53.1909764,8.5801699],[53.1912354,8.5806548],[53.1914304,8.5809237],[53.1914414,8.5810427],[53.1917433,8.5813057],[53.1923383,8.5813197],[53.1926582,8.5810877],[53.1931162,8.5801618],[53.194261,8.5813436],[53.194394,8.5818676],[53.195127,8.5829094],[53.1955659,8.5830234],[53.1958859,8.5833963],[53.1959389,8.5835593],[53.1959929,8.5840052],[53.1959159,8.5843212],[53.1959929,8.5845421],[53.1960419,8.5849251],[53.1961258,8.5850581],[53.1963088,8.5848991],[53.1963508,8.5846001],[53.1967058,8.5843912],[53.1968738,8.5842482],[53.1970837,8.5834503],[53.1973277,8.5830214],[53.1977667,8.5820695],[53.1979536,8.5817646],[53.1981746,8.5815366],[53.1983046,8.5814336],[53.1984686,8.5813866],[53.1987435,8.5814526],[53.1994485,8.5815016],[53.1995445,8.5816156],[53.2000934,8.5816916],[53.2003984,8.5821945],[53.2004863,8.5824664],[53.2007383,8.5826934],[53.2007913,8.5829284],[53.2007953,8.5833063],[53.2011733,8.5838532],[53.2012723,8.5842062],[53.2015312,8.5846921],[53.2016192,8.585024],[53.2016382,8.585359],[53.2017602,8.5857499],[53.2019822,8.5861568],[53.2020312,8.5863338],[53.2020662,8.5868267],[53.2021762,8.5870597],[53.2021912,8.5872577],[53.2021572,8.5873976],[53.2022332,8.5877116],[53.2025311,8.5881485],[53.2027791,8.5881775],[53.2030541,8.5881055],[53.2032831,8.5884325],[53.203302,8.5887494],[53.203424,8.5890014],[53.203542,8.5889964],[53.203771,8.5891834],[53.203859,8.5893583],[53.203889,8.5897953],[53.203939,8.5900492],[53.20411,8.5902592],[53.2043999,8.5904852],[53.2046749,8.591326],[53.2050529,8.5920029],[53.2051289,8.5922179],[53.2053728,8.5925828],[53.2054108,8.5929278],[53.2054148,8.5939576],[53.2076921,8.5969808],[53.2083273,8.596154],[53.2085763,8.5966182],[53.20 Line truncated
// {"color":"#FF0000","zone":[[53.522646443930114,8.557278720883488],[53.53613585108562,8.576384369467405],[53.53145412966086,8.555922950556436],[53.522646443930114,8.557278720883488],[53.522646443930114,8.557278720883488]],"name":"zone_faehre_brhv-blexen"},
// {"color":"#0000FF","zone":[[53.360072726513835,8.497236197466094],[53.36417797325001,8.505911975220613],[53.36577289873361,8.504466012262185],[53.362870612753596,8.495132978616567],[53.360072726513835,8.497236197466094],[53.360072726513835,8.497236197466094]],"name":"zone_faehre_brake-sandstedt"},
// {"color":"#036B03","zone":[[53.18242653539636,8.557815807958008],[53.18118080235428,8.555433450587998],[53.17957109371926,8.558773422194633],[53.180998838319454,8.562557166253072],[53.18242653539636,8.557815807958008],[53.18242653539636,8.557815807958008]],"name":"zone_faehre_motzen-blumenthal"},
// {"color":"#FF0000","zone":[[53.196023665750005,8.516157849001559],[53.197252845427045,8.519830844220309],[53.19873995396955,8.5175763850865],[53.19738941877125,8.514182030884399],[53.196023665750005,8.516157849001559],[53.196023665750005,8.516157849001559]],"name":"zone_faehre_berne-farge"},
// {"color":"#0000FF","zone":[[53.16884281778513,8.620626645538977],[53.167523945151174,8.61694095922698],[53.16630021264061,8.618857516109358],[53.16802022672354,8.623064868791943],[53.16884281778513,8.620626645538977],[53.16884281778513,8.620626645538977]],"name":"zone_faehre_lemwerder-vegesack"},
// Berlin
//{"color":"#0000FF","zone":[[52.376437553648145,13.389955353525352],[52.3755116977114,13.424079075072427],[52.38662068789665,13.42938720953552],[52.411605697583695,13.41952924553297],[52.42178071994198,13.467302455699212],[52.396338761649474,13.481710249241218],[52.401890985996005,13.518867190481217],[52.400040322172856,13.531758374176718],[52.400502995405674,13.545407862795855],[52.38939749873654,13.537066508639782],[52.39309964147665,13.593939377884908],[52.374585822364054,13.609863781274242],[52.37875210856967,13.630338014202124],[52.36995615446162,13.645504112667766],[52.34541081214837,13.635646148665217],[52.33892486041867,13.645504112667766],[52.33985148320164,13.656878686516762],[52.361621529289096,13.665978345595647],[52.36903016264682,13.678111224368308],[52.37597462810638,13.69631054252693],[52.38338085447586,13.686452578524381],[52.395876044751844,13.712234945915384],[52.401890985996005,13.737259008383603],[52.420855814924636,13.734225788690622],[52.43241573313759,13.73650070345991],[52.44027474601131,13.754700021618532],[52.45367806264818,13.73650070345991],[52.462457334713434,13.703135286836584],[52.45275382691676,13.70389359175934],[52.463381366788525,13.690244103140145],[52.47400634168645,13.653087161900146],[52.47677765246169,13.631096319125817],[52.470310989151244,13.618963440353099],[52.473082532642536,13.60683056158041],[52.490631588442625,13.620480050199603],[52.49571027183018,13.628821404355648],[52.514173267421995,13.635646148665217],[52.52478597856813,13.660670211133436],[52.532628508738526,13.655362076670286],[52.53032202758993,13.630338014202124],[52.53585737883205,13.621238355123268],[52.54000843436822,13.635646148665217],[52.546925988124684,13.633371233895048],[52.546925988124684,13.615171915736482],[52.55199816805032,13.590147853269116],[52.571820156050194,13.584081413882387],[52.5782718938068,13.564365485877289],[52.596239586267956,13.520383800327693],[52.5948577175989,13.511284141248836],[52.6059114466278,13.499909567399783],[52.620185059123486,13.50521771895032],[52.63169264206164,13.516592292799345],[52.642276946101134,13.520383817415137],[52.65745864885389,13.487018400791754],[52.670335960348126,13.484743486021586],[52.6753938661023,13.477918741711989],[52.66941627821001,13.466544167862992],[52.66941627821001,13.455169594013967],[52.66159819847596,13.451378069398231],[52.65515872966958,13.471852302326084],[52.64963842994621,13.466544167862992],[52.649178373508676,13.442278410318465],[52.64089652992669,13.42559570200629],[52.636755020008195,13.419529262620443],[52.64319719934778,13.394505200152253],[52.630772146775,13.374030967224343],[52.623867814874785,13.355073344142085],[52.623867814874785,13.325499452135347],[52.62893109810855,13.304266914283772],[52.64135667349231,13.30654182905306],[52.65469873131266,13.305025219206556],[52.66113826787716,13.310333353669705],[52.66343787247598,13.276967937045441],[52.654238728116326,13.27924285181561],[52.65239866692974,13.287584205971626],[52.640436381521056,13.283034376432227],[52.640436381521056,13.264835058273604],[52.633533574543065,13.26635166812008],[52.62708997198334,13.261043533656931],[52.62662967834922,13.223886592416989],[52.61097681408009,13.20644557918115],[52.6054509374016,13.200379139795274],[52.59439709215462,13.216303543183727],[52.58518342364681,13.219336762876651],[52.58932981636721,13.194312697923209],[52.59596735518613,13.163498322421589],[52.58813614340366,13.136957644994226],[52.57799955338797,13.116483412065463],[52.57661710948625,13.139232559763485],[52.583989639910016,13.151365438536203],[52.567860619112764,13.151365438536203],[52.554953130132134,13.138474254840702],[52.550342393613874,13.133166112323636],[52.53835220757168,13.120492711703008],[52.52312917754881,13.115184577239916],[52.515284951058504,13.115184577239916],[52.52036078694675,13.138692029861602],[52.51989937155142,13.158407957866729],[52.507900870215224,13.172815751408677],[52.49913066267706,13.162199482482464],[52.48758824933927,13.131108977425384],[52.477190012066956,13.115942878960624],[52.46335417406527,13.107953060812179],[52.43932302144512,13.116294414967314],[52.43192618248088,13.1178110248147],[52.42036613587064,13.097336791885965],[52.41296611504552,13.08823713280708],[52.4092656389428,13.10567814604201],[52.400013090340764,13.1178110248147],[52.39631152753296,13.136768647896105],[52.39399789309792,13.164825930057248],[52.40093843252646,13.154967966054727],[52.40695268371729,13.167100844826535],[52.41620377695739,13.201982871297275],[52.42175350152934,13.237623202690799],[52.40695268371729,13.246722861770536],[52.41019078707487,13.284638107934228],[52.414353713541686,13.299045901476205],[52.400475763859106,13.306628950708586],[52.407415284464605,13.336961147639869],[52.4092656389428,13.346819111642418],[52.395386088314154,13.370326564263252],[52.385667804781434,13.37715130857282],[52.388907470374704,13.390042492268321],[52.376437553648145,13.389955353525352],[52.376437553648145,13.389955353525352]],"name":"zone_1"},
//{"color":"#036B03","zone":[[52.5563334538119,13.365488816528682],[52.552271076690744,13.3563018370144],[52.544822408442656,13.342660564402252],[52.538388450281985,13.330411258382696],[52.5343244118869,13.308139792892547],[52.53161484397114,13.290044227182705],[52.52873574486574,13.284754754128585],[52.5226382060319,13.2822492142609],[52.51857270987384,13.285033147447365],[52.5134903105982,13.285589934084896],[52.506204513080405,13.28308439421727],[52.50247642867265,13.283919574172245],[52.49671422175339,13.285868327403676],[52.49518880527185,13.291714587094049],[52.490612238308984,13.298396026740676],[52.48230540022968,13.310645332760203],[52.48010128191288,13.320945885549662],[52.479762176985844,13.33319519156916],[52.47806661314635,13.3465580708625],[52.47467528943827,13.35101236396028],[52.47569271399536,13.36131291674971],[52.47111411823491,13.370221502945299],[52.47043576723726,13.384419562194893],[52.467213457212836,13.40167994794976],[52.46195549755416,13.40808299427897],[52.46263397925145,13.421167480253501],[52.46297321617914,13.431746426361713],[52.46466936160587,13.453739498533082],[52.46840065151051,13.493828136414379],[52.492307318643924,13.45847218494967],[52.49468032135172,13.46125611813477],[52.50145962350453,13.465710411233886],[52.5134903105982,13.476289357340761],[52.520774900327694,13.478794897208417],[52.53398572504091,13.477124537297072],[52.54160554723569,13.45401789185189],[52.55176325310518,13.426735346626344],[52.552948165662826,13.410588534146626],[52.5563334538119,13.365488816528682],[52.5563334538119,13.365488816528682]],"name":"zone_2"},
//{"color":"#FF0000","zone":[[52.528158714377156,13.368527961313106],[52.52549088193484,13.369258806317987],[52.52093295996974,13.372730320088351],[52.517375228718436,13.372913031836163],[52.514251068553904,13.371449101080884],[52.50646697388032,13.372728079838538],[52.50424269355355,13.374007058490065],[52.50057238500335,13.380950086031703],[52.49890396163292,13.390999204842899],[52.49912642174064,13.405616104931767],[52.500238705003255,13.433022793660427],[52.501907077722166,13.44307191247168],[52.50591091393076,13.447822405000494],[52.51614128304632,13.452755608779654],[52.524701826545595,13.447274271246869],[52.52759202296315,13.444716313731675],[52.532593836578855,13.438321419942895],[52.53815073914666,13.425166209862823],[52.539706545842506,13.41511709105157],[52.54070667817601,13.406712373501165],[52.53803960798717,13.396663254689969],[52.53592806251075,13.392278184663553],[52.53159351942921,13.385152445869835],[52.53025972778374,13.377113150821089],[52.528158714377156,13.368527961313106],[52.528158714377156,13.368527961313106]],"name":"zone_1"},
// Essen
// {"color":"#0000FF","zone":[[51.77593264894091,6.755925125981719],[51.77575775333975,6.755543242003512],[51.774644105393236,6.750969694653946],[51.77377369893853,6.748293619644755],[51.772922247216854,6.74907723496878],[51.77155426231374,6.748369218596139],[51.77067831159269,6.7470856528512115],[51.77032065470246,6.746594376183992],[51.770204415602706,6.746348737850894],[51.77010605433526,6.740953127072032],[51.769685801869485,6.740909779131613],[51.769587444344296,6.740534096973988],[51.769676860285074,6.739811631287523],[51.76934602041936,6.735014459126887],[51.76917363774746,6.7332926223575384],[51.76850824253606,6.722107802898847],[51.768776496240974,6.721919961821158],[51.76900950175383,6.721692417106908],[51.76911369989068,6.721243407672489],[51.771660013384064,6.708493951985304],[51.771790253369005,6.708388715399423],[51.77175986407289,6.707203049861732],[51.77205507351272,6.708367668081991],[51.77288465648337,6.70866332194862],[51.77330575298481,6.708684369265995],[51.77459940631951,6.707197025514546],[51.774720955733585,6.707204041287014],[51.774885915129374,6.708003839341387],[51.77590904748169,6.712310787145782],[51.77674365911281,6.713205379251008],[51.77803780874106,6.713828085577887],[51.778159348893894,6.71403855875073],[51.77855435213024,6.714136779564143],[51.78035177310022,6.7139473500352835],[51.7804477719273,6.713885282883609],[51.780466971668005,6.713268059546209],[51.77981844256388,6.713305989472218],[51.78097042341196,6.708646913761186],[51.781013088997526,6.7077986626946995],[51.780208706523155,6.703996178141438],[51.77977636524125,6.702773207758526],[51.779277002573025,6.700365606837124],[51.77870312498848,6.699110471111794],[51.77816337337623,6.698372565235843],[51.777553213130744,6.697903613426348],[51.777258797194094,6.697741549198071],[51.777226795346195,6.697662241170889],[51.7775105442735,6.6966622704014185],[51.77759161401366,6.696234749053616],[51.77786739877877,6.679932596960299],[51.77801710691398,6.677411086257251],[51.777197792219056,6.66860087883461],[51.77847784569681,6.667571019942471],[51.78327105912916,6.665119358853332],[51.786379438110515,6.661019368960467],[51.787057734810446,6.660664206929113],[51.787773751338676,6.659596037013614],[51.7878782661889,6.6595167289864605],[51.788581725942976,6.65865777099296],[51.789272786855264,6.657895724302733],[51.791264843791055,6.653688785636547],[51.79133735871196,6.6524370980862955],[51.791601823906575,6.652226759406659],[51.79187908415966,6.652099176844786],[51.792241388482495,6.652100092253505],[51.793755693776234,6.648534114648868],[51.798242957416136,6.6388581067467385],[51.79818324839829,6.638754661493891],[51.79914834472467,6.6342365969338175],[51.799058782966796,6.634122807156814],[51.79932960277827,6.63212962214925],[51.79884127530909,6.63034001155259],[51.798444640615,6.628119386808606],[51.79733493792597,6.6220389777586774],[51.79715367451331,6.622483792342479],[51.796522445648236,6.6214527879971],[51.79517722348842,6.617494085930275],[51.79558454987108,6.617190646524222],[51.79508848874781,6.615018713360286],[51.79548088777537,6.614742859355005],[51.79442307575789,6.611953618348565],[51.79423753533439,6.6113984621617305],[51.794708849169695,6.611095022755677],[51.7942331497313,6.609221695789529],[51.80000806449539,6.6088530591736685],[51.799944093194455,6.607908257801853],[51.7999597520359,6.605715981643755],[51.79969991830103,6.601944134661039],[51.799752014861696,6.601379905243618],[51.80081960520755,6.595869642284953],[51.80190270432047,6.593098634492321],[51.80223320812459,6.592702094358714],[51.802137255656845,6.592357276852653],[51.802088213205565,6.591709019939401],[51.79915964271305,6.590110052700595],[51.79968287075579,6.588090422008634],[51.797185326532855,6.587055050331429],[51.796652194999666,6.587665377318672],[51.79591762599961,6.585967972774711],[51.795267186397524,6.586767949389866],[51.79471042532262,6.585862100216218],[51.794379866373106,6.5853655630060075],[51.79416233593565,6.585196602427516],[51.79404930500027,6.5846931688682275],[51.793686751031146,6.584462141138005],[51.79342016537083,6.583779402474931],[51.793623436328716,6.583425889792352],[51.79510775997633,6.581908700232447],[51.795651572700905,6.5814983673995755],[51.79553618863264,6.5798705579525745],[51.7947492528246,6.5785740459593],[51.79516511351011,6.577191327757674],[51.795937121663314,6.5768392998362515],[51.795768649319456,6.5761496710000245],[51.7950459063004,6.570516032668706],[51.79399104133421,6.571373050255488],[51.79299281659988,6.571898771741758],[51.79241043149693,6.572392619114908],[51.78991215579879,6.56875278404425],[51.7898481700293,6.5686941650676545],[51.79371242560592,6.564242064319103],[51.79245326763797,6.561912430016434],[51.79258632503522,6.561844219536653],[51.79286541976401,6.56113063298497],[51.79315749379299,6.560763345788757],[51.79337101245673,6.559997781276451],[51.79335154100565,6.559646234960184],[51.79350406714633,6.559347158243725],[51.794701541688255,6.55850239769245],[51.79527608969482,6.557 Line truncated
// {"color":"#036B03","zone":[[51.69975623253302,7.047237066115969],[51.70111573975555,7.054441591126107],[51.70323078780979,7.053548157788441],[51.70364235444515,7.057170544664785],[51.70445300427764,7.057593157960326],[51.70790833340163,7.060468284976878],[51.70832771394538,7.059363971218403],[51.709298942576794,7.059853771714074],[51.70810145785492,7.0669425277790765],[51.70929342331925,7.0689996898634035],[51.70971832934009,7.06894625708162],[51.70953381913833,7.0710444537466515],[51.71348825431022,7.078160332623838],[51.71433798355005,7.078472023848207],[51.71435453655866,7.0786412276573],[51.71497251120667,7.077421179147677],[51.71503486389253,7.0753655191752785],[51.71614388497645,7.075499101129822],[51.718291533766916,7.07487478405227],[51.72028871223077,7.074251400655925],[51.72025009360311,7.073619112741966],[51.720939706992624,7.074073291384593],[51.72088453830855,7.075515976482279],[51.720415601775784,7.075524881945881],[51.72059214315894,7.077893735256083],[51.72469078767551,7.078910116505654],[51.72476250091435,7.08040623438518],[51.72692294671319,7.0771261897755835],[51.72728986735615,7.076556240116531],[51.72890605289618,7.075327286143249],[51.72844271550977,7.074463456177654],[51.729270100368126,7.07262893068139],[51.73134401285037,7.075113554600307],[51.731167513449805,7.07618221022949],[51.73129437246368,7.078203750459323],[51.73123370080586,7.0798601666828915],[51.73185144661707,7.086076192106958],[51.731879024276765,7.0871804695893275],[51.73371933577286,7.086210685324858],[51.73377448879549,7.086433321912921],[51.73493268672385,7.085266706185138],[51.73585577144212,7.083562345931767],[51.737357421691144,7.080285134307758],[51.740247994099576,7.07996765655011],[51.740876643738545,7.079655965325685],[51.74422121540067,7.080198004255408],[51.746294441358884,7.08015348281387],[51.74642677166693,7.080340497548804],[51.74681824655855,7.08012676642295],[51.7475340057448,7.080162305615261],[51.747644278002355,7.079895141707624],[51.74928186651394,7.0803453962875835],[51.75025772888148,7.080728331221167],[51.750985476923006,7.0810311169819045],[51.752721980968374,7.081166226072412],[51.75328981499371,7.081139509681606],[51.75352113386154,7.080907968612365],[51.75497100034411,7.080827819439605],[51.755968788915595,7.08128199860505],[51.75635466856872,7.081406675095934],[51.75685079470611,7.081745082711308],[51.75750126293852,7.08289388751183],[51.75865334045818,7.084309856218596],[51.760174699982684,7.084651351821208],[51.76029596550475,7.084446526159013],[51.76525662191392,7.088032709888751],[51.76542880899987,7.0877407861257495],[51.76564375445875,7.087731880662091],[51.76759475105055,7.086476210297889],[51.76825608669114,7.086413872053896],[51.77021703829769,7.084054111097174],[51.7713798127848,7.084739831792888],[51.77211804071038,7.082929053733579],[51.77289503122199,7.0811479610191554],[51.77509156655847,7.077284184869285],[51.77752152731071,7.075431851453516],[51.7772350081228,7.069563151522573],[51.77716337814849,7.068262953840161],[51.77711930116885,7.060443937097574],[51.7775490797284,7.060951548522013],[51.77892103773834,7.060728911932529],[51.77906428755995,7.057309225404765],[51.778932052879554,7.056516639146764],[51.77822128483356,7.0551184813658665],[51.778948228707065,7.05278714152783],[51.77950471350391,7.0504182882176565],[51.78065814012345,7.046716343295827],[51.78130275586872,7.044133758859772],[51.78180412608236,7.041506641471329],[51.783159426908014,7.038977489817142],[51.783456926517374,7.0376861975998395],[51.783583638718426,7.037258735348132],[51.783781970144844,7.036857989487345],[51.78285625267708,7.034732463481987],[51.78279565025696,7.033583658681465],[51.782900327113225,7.032969181696245],[51.78308213370761,7.032906843450746],[51.78371788074119,7.030018534099497],[51.78456078157532,7.029555451258318],[51.78649215812152,7.0311304228166875],[51.78756086492339,7.026820178447991],[51.787940965877254,7.026642069176745],[51.78796851132799,7.025708237926921],[51.789748197344665,7.025796615336191],[51.78974901990185,7.023656191371003],[51.79397925794774,7.02350479077171],[51.79447489920602,7.021683579950917],[51.8001091044618,7.0202676047451575],[51.798908392743954,7.007000475379243],[51.79895795883755,7.006760027862413],[51.798714989246065,6.995005352484469],[51.800989475848695,6.994649133941863],[51.800967447473255,6.992013116725474],[51.80073064175491,6.992128887751306],[51.80080223858283,6.988994227035164],[51.80014688708226,6.9840606002175605],[51.80000369977188,6.984042789290328],[51.79890774984966,6.976232693999833],[51.79702419103569,6.974246787812518],[51.78844067235039,6.96939027065298],[51.78694113560152,6.96852117867104],[51.780151942273164,6.962533011081746],[51.78003089221306,6.962713618601811],[51.777040259451496,6.961944654648505],[51.77668639549975,6.961748996501655],[51.77625803211953,6.960800804074637],[51.77595072404557,6.960123525875844],[51.77568066370776,6.959476348929314],[51.77574585083397,6.958994728876235],[51.77526160136267,6.9588442226096845], Line truncated
// {"color":"#FF0000","zone":[[51.45130207220333,6.776705720189966],[51.44883975648173,6.7780572995363855],[51.44935572689866,6.781294854182846],[51.44787710952036,6.781813851492615],[51.44722249799361,6.778267369875692],[51.442239438582476,6.776772161804075],[51.44048875357083,6.767103316075492],[51.433921851308156,6.7527024061541],[51.43358289119297,6.752801262784317],[51.432471771421575,6.754607973378398],[51.429709610724814,6.757270567797349],[51.42935669221927,6.756512792190051],[51.42857684649974,6.756485402710041],[51.4283320746608,6.758649171613371],[51.42676762615034,6.761944427174711],[51.42635449395246,6.763386758213386],[51.42573982694017,6.766121935003696],[51.425832683332885,6.770420087915028],[51.42287827369364,6.770152074171534],[51.420447762760745,6.770551685934038],[51.42010405225585,6.775933654444941],[51.41603863320694,6.77429509435683],[51.413822999843546,6.769869530683366],[51.414125602078514,6.775262335926726],[51.41290818445168,6.776396626502816],[51.4115612155052,6.778001749901875],[51.41209059211343,6.783730491666461],[51.41380477019874,6.784876578712215],[51.41451693731773,6.787991612317796],[51.41450355049068,6.791598267352754],[51.41216432175315,6.79621980013124],[51.41055534879496,6.797814901488493],[51.407774040522725,6.799598329692515],[51.40569788861757,6.800299952860428],[51.400881059499,6.803241330771812],[51.400371746810464,6.8034104599143745],[51.3974966958649,6.8057066758543385],[51.39976946833701,6.81237216989723],[51.398746202757906,6.813728411680131],[51.39794499626066,6.814331192920378],[51.39487205204827,6.8166163568065485],[51.391535689899,6.817018318802411],[51.388351811075665,6.816269305424527],[51.38652944956169,6.816122099262202],[51.38397626288338,6.815269266926066],[51.38210728943321,6.815472296982193],[51.38070835457202,6.815877842462555],[51.37895483145624,6.816808319433676],[51.37729965524707,6.814100239309994],[51.37640559637998,6.813515540877205],[51.376382122131275,6.8136471648246015],[51.374086811630065,6.81425695390476],[51.37400908505441,6.814351413728218],[51.373861853287224,6.814295981325131],[51.36912313529578,6.815276367182946],[51.368008026324674,6.817169858755193],[51.36813401537634,6.820521112274633],[51.36787956493458,6.822787204765831],[51.367498471076175,6.824481340571651],[51.35881267206301,6.8296322861660315],[51.35827798534166,6.829886260748566],[51.357901889075436,6.826156460080767],[51.35234228462224,6.830227355732291],[51.35075556958458,6.83142929435445],[51.351557727589096,6.832916860768194],[51.352604590173655,6.835957297028131],[51.35258193105332,6.836305605261998],[51.3526997583559,6.836545067173205],[51.354539814077754,6.841502164713177],[51.3545987252493,6.841959319269677],[51.35456700385882,6.842481781619313],[51.3549201923351,6.843231073400972],[51.35468908046525,6.8449726145690875],[51.35527818685165,6.844987127412253],[51.35614854559111,6.845611648792783],[51.36038038543896,6.84978728139663],[51.36383407610728,6.845284986044788],[51.36399718145151,6.845183396143739],[51.36508906733576,6.845197909460211],[51.36516608726558,6.845364807155562],[51.36523404591986,6.845408345685115],[51.365356371243024,6.8455824998020205],[51.365406207392255,6.845589756223603],[51.36548322678868,6.845734884654206],[51.365388085162294,6.84636619332764],[51.365433390723325,6.846569373129682],[51.364394691818774,6.849012251234456],[51.363914439699016,6.849375072310266],[51.363076034958056,6.851177127009976],[51.36292198793845,6.851002972893042],[51.3626727931333,6.851525435243843],[51.3621517450687,6.8515181788222606],[51.36153554144636,6.853165386509687],[51.362264367122464,6.853452216850485],[51.36218030899434,6.854011196515387],[51.36214376193345,6.85419264541116],[51.36213892742168,6.8546655008881885],[51.3622120215214,6.85534154435706],[51.36305390244502,6.856026095208989],[51.36339169315232,6.857921402844255],[51.36300120719022,6.858722828147393],[51.36304689015651,6.858816479191347],[51.36251513761155,6.859170597198471],[51.361675695082766,6.860517894927995],[51.36263780656202,6.861880513711412],[51.36278620236138,6.863009420767355],[51.36283072102509,6.863001498565097],[51.36304950139268,6.867204563494369],[51.3635985587313,6.867065924955597],[51.36367275516426,6.867426385157131],[51.36380878164539,6.8673669686399705],[51.363801362029506,6.8671332636750435],[51.363994271650824,6.866875792101894],[51.36437677005864,6.865872982465817],[51.36506925371083,6.866653318730982],[51.36494312354955,6.866982090124651],[51.364873875470494,6.867334628122677],[51.36489613379291,6.867532683178581],[51.36469086218517,6.868233798076005],[51.36448806282587,6.868554647266194],[51.36436935058893,6.868843807648375],[51.364554838323954,6.8700875933975],[51.3637786818326,6.870761297819996],[51.36346458350417,6.870452331933279],[51.36342501190853,6.870567203865193],[51.36476238111902,6.873133035150346],[51.36486625345162,6.873255829284574],[51.36511852055273,6.875834480684233],[51.36409634015459,6.87614577878648],[51.36365623545473,6.876568483460176],[51.3634014 Line truncated
// {"color":"#0000FF","zone":[[51.606864357450945,6.9804172368311015],[51.60659347605457,6.980446264482424],[51.60632410453502,6.979940247254575],[51.60524660247532,6.978904116740296],[51.60486455641151,6.978542192795487],[51.6047597970213,6.97818075191762],[51.604550277516296,6.97819279994701],[51.604490414623086,6.977795214982137],[51.60307612585456,6.975667851523696],[51.6026645535068,6.9744269045127965],[51.60276183458032,6.973896791226309],[51.60253733948119,6.973234149618207],[51.60233165296876,6.972311708142996],[51.60230920329596,6.969805718062531],[51.60229423684126,6.969516565360607],[51.60025875306019,6.969335844921687],[51.599014759125964,6.970008143728677],[51.59916156784155,6.9688500485317775],[51.5993206113815,6.9672113905683375],[51.598929120806645,6.965966629131799],[51.599039227595256,6.965742100470749],[51.59908961752248,6.96559746991241],[51.599415042331685,6.963297035915872],[51.59924621321042,6.963029177163293],[51.59933292267033,6.961291312619693],[51.59910292300677,6.961086479455304],[51.59885334758624,6.960668934929117],[51.598811751549505,6.960432588970008],[51.598166719280925,6.959766506422682],[51.597775219743,6.959152006930793],[51.59776787909436,6.959053529447289],[51.59764553477666,6.959014138453881],[51.59664719151482,6.958218439742183],[51.596590911780936,6.957958459188319],[51.59643920084662,6.957568488356202],[51.596319299910846,6.957422741681967],[51.596245891018356,6.95717851752417],[51.5961406713991,6.9569736843610315],[51.59612354260105,6.956485236045523],[51.595691800358054,6.9547598045576535],[51.59499689514368,6.954734679663687],[51.59439492119765,6.954628323981552],[51.594338638672866,6.954545602896701],[51.59430193264103,6.954592872088767],[51.593389165150285,6.953722338372614],[51.59333043425718,6.9534229668254],[51.59269860170002,6.952591770694653],[51.59241717786904,6.952162408870464],[51.5922042734646,6.951547909378576],[51.59192371631514,6.951024072875072],[51.591710809597856,6.95039381698578],[51.59133149055998,6.950125958233258],[51.59126052083968,6.950216557516768],[51.59096352870327,6.9498893575024],[51.590393453657896,6.9492373433973],[51.59009488447373,6.949142805014418],[51.590055727713974,6.949075840325662],[51.58997986139599,6.948993119239532],[51.58970820830268,6.947933503961195],[51.589489254534925,6.9477821197322385],[51.58914363108664,6.947058898765903],[51.58890623774158,6.946791040012073],[51.588661501035205,6.9464877293654865],[51.58814402189901,6.944624569716154],[51.58799473016006,6.944104608607148],[51.587999625676076,6.942985915788114],[51.58829398594446,6.9407807125565455],[51.58829153854839,6.940552244765769],[51.588488735000396,6.939173313156914],[51.5885132088236,6.938897576205733],[51.588611103983766,6.938673047544626],[51.588525445730255,6.938570630963056],[51.58844957685628,6.937897044981071],[51.58795762117131,6.937900172376487],[51.587404500367,6.935678525734602],[51.5866710615376,6.934161907855469],[51.58663190182676,6.933704972334652],[51.58634936245113,6.932686393758729],[51.58613887711772,6.932292483827325],[51.58573748377884,6.931201353317874],[51.58524898950492,6.930179105250062],[51.58503849907382,6.929997906682985],[51.58501402337882,6.929915185596883],[51.58372912868228,6.929017071158171],[51.58204757267063,6.929225846681504],[51.58156004972983,6.929322747362079],[51.58043432217622,6.930512230313809],[51.57890712084614,6.93219678255889],[51.57858346173742,6.932465219309762],[51.57808408402269,6.932713382565623],[51.57753818936055,6.932839433744448],[51.57697176202299,6.932812680653029],[51.576183498113096,6.932584212892635],[51.57418340378254,6.931859419676471],[51.57285910539113,6.931397081098453],[51.571831572146436,6.931011047441359],[51.56933734977676,6.929471704240484],[51.56924920699163,6.928289974491548],[51.56906802360473,6.927986663844962],[51.569229623973854,6.927297320886595],[51.56948181056737,6.926824628969683],[51.569606679139696,6.926466170932343],[51.56973650944681,6.925696802545389],[51.56994462237731,6.925255623423141],[51.57040736442232,6.924723844501045],[51.56959939946847,6.922789746739312],[51.56969978377424,6.922474618794723],[51.56961653826781,6.920855648978829],[51.568372181523046,6.921604860089673],[51.566898179488106,6.924346474393047],[51.56675861215882,6.924488281968024],[51.56600690005155,6.924397682684514],[51.56618564705363,6.923152927302084],[51.56499230032347,6.922040658297959],[51.56342128609617,6.9222962979738725],[51.56344332586198,6.92180003982935],[51.56345801825091,6.921347043409099],[51.56343353093308,6.920169252715482],[51.56348005682605,6.9200313842399055],[51.56344332586198,6.9198501856715495],[51.563406594867786,6.919633535209101],[51.56338210752227,6.919393250150733],[51.563269465562,6.919196295185031],[51.563286606747994,6.918857532644324],[51.56318620828179,6.918660577679901],[51.56320090075383,6.918621186686522],[51.563166618311186,6.918530587401705],[51.563240080657096,6.918443927217453],[51.5633012991876,6.918258789549782],[51.563342927741786,6.918116981974833],[51.5634 Line truncated
// {"color":"#0000FF","zone":[[51.49677523126107,7.064744299749265],[51.51186279882671,7.043471330632457],[51.512063908270505,7.035473501406841],[51.51148261347035,7.031063939065746],[51.5135439603838,7.027105417528844],[51.51686203021973,7.025166549838673],[51.51615821742166,7.020157808302571],[51.51538034000316,7.01440722529216],[51.51819557402291,7.014245652985267],[51.52357419802172,7.013114646832577],[51.526489448344876,7.013114646832577],[51.52855011614466,7.010125559141528],[51.53111325568804,7.009802414526263],[51.534279287660894,7.010448703756822],[51.536138600628306,7.00220851607088],[51.53583709393311,6.994291469662528],[51.533073204562726,6.988555652742434],[51.52920347749949,6.991706312740291],[51.52608735430394,6.991787098895259],[51.52143291687108,6.992026269886736],[51.51814108644376,6.991071524768557],[51.51551617484148,6.9929816458566165],[51.51072299138261,6.9946009367832005],[51.507453678081134,6.985368684854848],[51.504927229846714,6.973271251292175],[51.50284947550847,6.960736239783245],[51.50235405448666,6.957711881392157],[51.500867759104665,6.949036748113826],[51.499232778196955,6.941714617273533],[51.49739426139837,6.936784273098965],[51.497344713607845,6.931292674968375],[51.496502392932854,6.929939672530338],[51.495511407504125,6.9242888976430095],[51.49531320783288,6.922458364933306],[51.494223094236816,6.9232542487199],[51.49209234238862,6.923970544128082],[51.4890146130725,6.9254785022422425],[51.48822169622537,6.924921383592192],[51.488023464859424,6.920066492491458],[51.48723053077529,6.912585184892947],[51.48658626167838,6.904546758644415],[51.48592720174298,6.898299578910297],[51.48533247513123,6.894399748352868],[51.48364737427488,6.893763041324519],[51.48295349111652,6.891693743478243],[51.48221003315939,6.892569215643164],[51.48121873702945,6.896071104305861],[51.47997958656603,6.894956867004339],[51.47650978615121,6.896230281064078],[51.47442777919923,6.898458755667036],[51.47338674008708,6.898936285940209],[51.47160204633633,6.899652581348391],[51.470516792075614,6.900682082807151],[51.46953017489102,6.903057855404313],[51.46854353637028,6.907492630917545],[51.46711287261758,6.912323368534231],[51.46537185224631,6.911236546754736],[51.46363076544634,6.910382615359708],[51.46290889394217,6.910538646124678],[51.45815510861519,6.910008937687053],[51.456241636031194,6.910370219582461],[51.455116026452686,6.912086308584406],[51.45331499339369,6.912447590479786],[51.45179531648023,6.915337845642227],[51.44999415240926,6.914073359009109],[51.44910192094693,6.9156142127341695],[51.448426452900634,6.917601263158929],[51.44775097486212,6.924284978221493],[51.447976135318754,6.928620360964715],[51.447807265080115,6.931149334231748],[51.445837066151825,6.932233179917091],[51.443191236722186,6.935213755552979],[51.44488008171376,6.939549138296201],[51.444091961823716,6.940813624930172],[51.43992596839513,6.9405427047002775],[51.43823694019298,6.9430716779673105],[51.43649154543348,6.944155523653535],[51.43457716481535,6.945600651234315],[51.43345102109262,6.945058728391217],[51.43283163021198,6.942529755125037],[51.42945300657399,6.943071753098394],[51.42979088217163,6.9399105365147875],[51.42995981903323,6.936839640404685],[51.42635569716913,6.936568678983548],[51.42551093998472,6.939187972724],[51.42438457277876,6.941445984569015],[51.42292025390566,6.946323290155391],[51.42292025390566,6.949484506738969],[51.42168117821177,6.950658672898641],[51.419822501682006,6.948310340579269],[51.418583342002506,6.947407135841615],[51.41672453949283,6.945420085417709],[51.415147314449314,6.946232969681972],[51.414522592996065,6.943974957837071],[51.41406742334553,6.9448872171274445],[51.412644988978315,6.944704765269364],[51.41110871015056,6.944613539340736],[51.409856889233794,6.944248635624604],[51.40879535985084,6.943496899290722],[51.400031464691665,6.945686377563106],[51.399860722502666,6.943861858983212],[51.39798251636071,6.939939144035861],[51.396787254114656,6.940760177396726],[51.3953642821474,6.946689862782108],[51.39354281343864,6.946416184994604],[51.39092432511248,6.944500440486053],[51.38682552077981,6.942584695976677],[51.385443179237456,6.941453079755064],[51.38589863383089,6.937712816665766],[51.38624022180116,6.935705846227762],[51.3876634775643,6.933425198002226],[51.38652487649509,6.931144549777542],[51.385158517814915,6.927951642261604],[51.3835643811251,6.921748279089542],[51.38168550587983,6.921930730947622],[51.380888383988065,6.92065356794194],[51.37992043159815,6.918190467858324],[51.37798446540748,6.915088786272747],[51.37929409855559,6.912899363976663],[51.37878163787323,6.9118046528281525],[51.37832611244991,6.910436263893047],[51.3771872790592,6.911895878756809],[51.37553592031543,6.914450204769025],[51.37394144845223,6.913081815833863],[51.37246081771019,6.912443234331022],[51.37160658588488,6.912078330614918],[51.37006892843502,6.911530975041501],[51.368929889623814,6.912534460260474],[51.367847776507716,6.911987104686261],[51.36779082247767,6.910436263893 Line truncated
// {"color":"#036B03","zone":[[51.39225801657281,6.9965932634794115],[51.39690271164312,7.000935582868664],[51.400901932307164,7.003830462461821],[51.4047718129311,7.015616757948351],[51.40773849965038,7.026369167864573],[51.40722256795999,7.0391893489204165],[51.40451383107691,7.046219770788952],[51.39690271164312,7.056351849364546],[51.38812900283861,7.066277150826295],[51.38954839333823,7.072687241354203],[51.3971607364314,7.077443114971203],[51.3998699088358,7.081165103018833],[51.40773849965038,7.081785434360427],[51.41367129569815,7.074341458264172],[51.41831381648677,7.071239801557141],[51.42282692634544,7.061728054323112],[51.424632045509895,7.0551111866813585],[51.42953129525904,7.05552474090905],[51.43649248341947,7.059039951843886],[51.43958600435485,7.061728054323112],[51.440230461511675,7.06689748216786],[51.44280819920752,7.071033024443295],[51.44345261089802,7.078683777653424],[51.44306596497515,7.082612542815895],[51.44603016673088,7.082819319929769],[51.449509636326525,7.0766160065157635],[51.45208685026901,7.076409229401833],[51.455437010902415,7.078063446312768],[51.46175010689737,7.07847700053955],[51.46394016066964,7.08033799456436],[51.468706372660705,7.081992010998249],[51.47038087382987,7.0840597821359665],[51.47656311500498,7.078890354291218],[51.47836611086447,7.0778564687219045],[51.48274451837969,7.073307372218778],[51.48817411624216,7.06922434254048],[51.49098472374777,7.067913857194242],[51.49379515799009,7.065875324432454],[51.4968773705196,7.0641280106379725],[51.49442974819536,7.049858281310719],[51.49044074872032,7.03573416146574],[51.48636072912558,7.015494443338014],[51.48418456938646,7.0069034838451785],[51.48064808830574,6.990886440722051],[51.479559885106625,6.978800853638944],[51.48354983656603,6.958561135511246],[51.48518198882513,6.950407004466683],[51.479741254109655,6.946912376876384],[51.47720202243457,6.946475548428111],[51.47547889185904,6.94953334757011],[51.470671920417715,6.948805300154504],[51.46740651886245,6.944291406183993],[51.46468517237528,6.945893110496144],[51.463778020813265,6.947931643257959],[51.46296155635096,6.952299972126042],[51.46296155635096,6.958124351442791],[51.4618729311959,6.963220683345327],[51.46105644528788,6.964239949725538],[51.457245984573376,6.964094340243264],[51.45316299507138,6.963075073863024],[51.44944262001496,6.965696044555415],[51.44690170185186,6.967734577317259],[51.44454215123196,6.971374814389861],[51.44318081656712,6.973413347150313],[51.44200098371138,6.9696275139600345],[51.44109338127592,6.967880200165581],[51.43746279116576,6.965113619989495],[51.43219792288724,6.96467679153983],[51.427658756313946,6.963511915677344],[51.423754712380344,6.962347039813409],[51.421666365917986,6.960308507052986],[51.4203043494214,6.959143631189079],[51.41894229233563,6.9614733829155],[51.418034231728825,6.966424105335676],[51.41612724573383,6.970064342408335],[51.415764001286504,6.974287017414241],[51.41485587753883,6.975743112242782],[51.41294875894786,6.978509692418811],[51.41222221665285,6.983023586389379],[51.41231303507121,6.989867232087732],[51.41294875894786,6.9921969838141536],[51.4094975802127,6.992633812263847],[51.40795354748934,6.993216250195758],[51.40613697164923,6.990595279501974],[51.40359364423301,6.989139184673462],[51.40105017536774,6.989284794155793],[51.39941501354431,6.991032107951611],[51.39768894597793,6.993216250195758],[51.39632621504751,6.99496356399024],[51.3946000309231,6.995691611404453],[51.39225801657281,6.9965932634794115],[51.39225801657281,6.9965932634794115]],"name":"zone_2"},
// {"color":"#FF0000","zone":[[51.446965944512925,7.0029804474297634],[51.44574227649184,7.004322548780976],[51.444407736060214,7.005931916811221],[51.44362924509707,7.007361338214338],[51.44262693854148,7.010844068474228],[51.44295946763785,7.012630269279299],[51.45108717273425,7.029954549858957],[51.45175492921621,7.029688259763105],[51.45348070587207,7.036843350963267],[51.4555974252317,7.035689456694257],[51.45626628336879,7.034351971128473],[51.45871916464449,7.034091335741891],[51.458998398977656,7.033288654826947],[51.46519515150226,7.026953412702682],[51.46904840797404,7.024182573724232],[51.470330083126925,7.021764269510157],[51.47038390486972,7.018450741206465],[51.46987992996549,7.01486935085569],[51.469829183110676,7.012542059212677],[51.46972290775449,7.009944697738831],[51.468269619593656,7.006541982671763],[51.467488671299435,7.0039448613351],[51.4668737582945,7.002333697740198],[51.46614783645779,7.001528314311315],[51.46497637870337,6.999647917294851],[51.46346992684991,6.9965142668630165],[51.461348832982736,6.996158234844501],[51.45833354415933,6.996613705003057],[51.45565626910658,6.997154694466275],[51.45370495381303,6.998141134420877],[51.45208858693272,6.999841925575879],[51.45091827444725,7.0007369410095635],[51.44863479596623,7.001099254367915],[51.446965944512925,7.0029804474297634],[51.446965944512925,7.0029804474297634]],"name":"zone_1"},
// Leipzig
// {"color":"#0000FF","zone":[[51.4159248300424,12.277389513909384],[51.4135462752684,12.276713134793795],[51.38287690449803,12.268801488674825],[51.35051642555513,12.230539829861442],[51.33262005501632,12.248863626221123],[51.31920454996592,12.253429370230918],[51.29424986119369,12.254497490042496],[51.2638731014238,12.263059032687693],[51.26516894162813,12.276936271725305],[51.25303602893143,12.310354476798096],[51.250894250927075,12.318987120937749],[51.25736650383109,12.32193896470028],[51.27072896223703,12.32187229529751],[51.28593523984455,12.33631605450509],[51.30608617460376,12.370448438625147],[51.294707429948176,12.379865176566625],[51.28477870157565,12.393911769238173],[51.28346544400955,12.400391820480877],[51.28238495404054,12.44777486226468],[51.26636909458833,12.45249150987712],[51.26723139612773,12.463469048382933],[51.266129988358045,12.472474520486742],[51.28529045443753,12.496137400058728],[51.30288827254168,12.513819387013996],[51.31594787010911,12.523104534821897],[51.31843474208597,12.518796828916607],[51.32672430082434,12.511832914506272],[51.34951106525901,12.501529734407626],[51.353860436651985,12.494904279070965],[51.37228900503763,12.459433047792402],[51.392170926172696,12.435586637065342],[51.39485531839844,12.42562440597871],[51.403326714597085,12.395429120169752],[51.41264279582441,12.341714515861554],[51.414089071637505,12.306230359349115],[51.41448835262014,12.294626341287966],[51.4159248300424,12.277389513909384],[51.4159248300424,12.277389513909384]],"name":"zone_2"},
// {"color":"#036B03","zone":[[51.3447904942831,12.370807591183677],[51.34321655003964,12.368818285199978],[51.34189872971251,12.367374930635975],[51.340515594568444,12.369692546765748],[51.33443003824962,12.370086472811181],[51.335069221416404,12.378820747372913],[51.336517793993835,12.382130466275413],[51.34342250655314,12.3840356691193],[51.345353756216525,12.380636681247324],[51.34511645959566,12.378935956615607],[51.3447904942831,12.370807591183677],[51.3447904942831,12.370807591183677]],"name":"zone_1"},
// {"color":"#0000FF","zone":[[51.3610099,12.4837328],[51.3627606,12.4805545],[51.3654383,12.4756931],[51.3658352,12.4748943],[51.3663652,12.4739824],[51.367334,12.4721676],[51.367777,12.4713427],[51.367998,12.4709317],[51.3682189,12.4704474],[51.3683799,12.4700109],[51.3683879,12.4698113],[51.3683331,12.4695481],[51.3681461,12.468838],[51.3681565,12.468488],[51.368257,12.4681562],[51.3684059,12.467935],[51.3690525,12.4671101],[51.3706692,12.4711975],[51.3709193,12.4716757],[51.3709647,12.4714826],[51.3710728,12.4713343],[51.3712398,12.4711945],[51.3716297,12.4706525],[51.3717517,12.4705623],[51.3718509,12.4705582],[51.3723134,12.4706623],[51.3726282,12.4707445],[51.3729813,12.4710581],[51.3734115,12.4716091],[51.374454,12.4723742],[51.375343,12.4731462],[51.3760746,12.4733728],[51.3768072,12.4732607],[51.3772195,12.4731931],[51.37769,12.4732047],[51.3782302,12.473606],[51.3789589,12.4746516],[51.3793891,12.4749438],[51.379823,12.4749105],[51.3802687,12.47512],[51.3805451,12.475139],[51.380866,12.4750914],[51.3812177,12.4751959],[51.381666,12.4755363],[51.3823663,12.4761246],[51.3823414,12.4765514],[51.3824297,12.4766128],[51.3831422,12.4667032],[51.3908756,12.464967],[51.3906467,12.4643163],[51.3913441,12.4633371],[51.391423,12.4635498],[51.3916606,12.4635497],[51.3917065,12.4637043],[51.3915887,12.4638956],[51.3915971,12.4641306],[51.3917307,12.4640291],[51.3917988,12.4642202],[51.3918181,12.4645306],[51.3919636,12.4648738],[51.3922911,12.4654604],[51.3928317,12.4658786],[51.3928853,12.4656017],[51.39252,12.465444],[51.3927103,12.4646522],[51.3928269,12.4645211],[51.393101,12.4648996],[51.3933992,12.4649166],[51.3936339,12.4653922],[51.3936324,12.4655184],[51.3935309,12.4654698],[51.3933447,12.4652151],[51.3932145,12.4652126],[51.3930586,12.4653437],[51.3929901,12.4654825],[51.3930296,12.4660974],[51.3932334,12.4673419],[51.3934507,12.4674449],[51.3934764,12.4676779],[51.3933962,12.4680054],[51.393378,12.4686072],[51.3934219,12.4687794],[51.3935006,12.4687697],[51.3937202,12.4684446],[51.3938279,12.4684721],[51.3940629,12.468891],[51.3941275,12.4690682],[51.3941663,12.4692589],[51.3941767,12.4696048],[51.3941506,12.4699535],[51.3959338,12.4692494],[51.3970215,12.4685676],[51.4008054,12.4680388],[51.4015836,12.4685241],[51.4017838,12.4688805],[51.4020187,12.4698908],[51.4021364,12.4712245],[51.4026169,12.47121],[51.4033827,12.4710268],[51.4034774,12.4704074],[51.4036614,12.4703465],[51.4037814,12.470325],[51.4038038,12.4702388],[51.4034179,12.466237],[51.4042996,12.4655464],[51.4076503,12.461625],[51.409784,12.4567584],[51.4113938,12.4566752],[51.4144075,12.4567553],[51.4143987,12.4572362],[51.4148343,12.4572919],[51.4171826,12.4582228],[51.4187912,12.4586464],[51.418665,12.4610809],[51.4204451,12.4616335],[51.4204708,12.4621799],[51.4204624,12.4625085],[51.4203973,12.4643193],[51.4203598,12.4659936],[51.4199933,12.4739493],[51.4198151,12.4754043],[51.4172595,12.4753167],[51.4172466,12.4759423],[51.417588,12.4793926],[51.4176253,12.481059],[51.4174729,12.4824659],[51.4174402,12.4836389],[51.4169891,12.4836851],[51.4171046,12.4848027],[51.4171081,12.486436],[51.4177537,12.486588],[51.4177383,12.4877412],[51.4176373,12.4887874],[51.4188315,12.4892158],[51.4189396,12.4892999],[51.4192893,12.489325],[51.4203937,12.4891383],[51.4204626,12.4910014],[51.4210807,12.491043],[51.4211258,12.4927785],[51.4223974,12.4924314],[51.4223919,12.4941179],[51.4241945,12.493481],[51.4242146,12.4931278],[51.4256889,12.4927062],[51.4256657,12.4921874],[51.4280225,12.4920242],[51.4281016,12.4934221],[51.4286321,12.4934361],[51.429591,12.4933354],[51.4304963,12.4931862],[51.4310409,12.4930426],[51.4311692,12.4930134],[51.4311631,12.4928495],[51.4315166,12.4928074],[51.431408,12.489993],[51.431424,12.4891142],[51.4316073,12.4891158],[51.4321664,12.4791973],[51.4323285,12.472376],[51.4340479,12.4726186],[51.4340559,12.472298],[51.4344644,12.4724015],[51.4344786,12.4721164],[51.4348141,12.4722076],[51.4348371,12.4719951],[51.4351643,12.4720911],[51.4351998,12.4713673],[51.4375698,12.4716612],[51.43771,12.4694701],[51.4426104,12.4712521],[51.4428041,12.4709171],[51.4432879,12.4650986],[51.4435897,12.4608965],[51.4436082,12.4580539],[51.4435575,12.4566381],[51.4437072,12.4532245],[51.4441283,12.4506675],[51.4447549,12.4482967],[51.447295,12.4449682],[51.4477359,12.4432886],[51.4481145,12.4411946],[51.4456421,12.4407354],[51.4444137,12.4404845],[51.4431664,12.4403955],[51.4373153,12.4416005],[51.4314924,12.4422164],[51.4306081,12.4422033],[51.43017,12.439639],[51.4297608,12.4396932],[51.4295399,12.4377372],[51.4296156,12.4341165],[51.429137,12.4324806],[51.4288173,12.4311942],[51.4283598,12.430171],[51.4280348,12.4290041],[51.4274734,12.4277897],[51.4272025,12.426483],[51.4272702,12.4258704],[51.4270892,12.4250884],[51.4267505,12.4239188],[51.426916,12.4232167],[51.4275854,12.4221523],[51.4278682,12.4213748],[51.4279856,12.4206771],[51.4277009,12.4191626],[51.4278338,12.4174002],[51.4284001,12.4170868],[51.4290212,12.4161651],[51.4291 Line truncated
// {"color":"#0000FF","zone":[[51.41637971868644,12.280681509366218],[51.40253844350809,12.26191171165263],[51.404350068108215,12.256518525078945],[51.404932360774694,12.244072709909261],[51.40156790080897,12.241998407381146],[51.4018914173308,12.247910169586646],[51.40221493156366,12.255896234320232],[51.39800906803572,12.262948862917199],[51.396650167928925,12.262430287284445],[51.39457938537683,12.260148554503388],[51.392702657719724,12.256103664573175],[51.39034493357644,12.255855251682476],[51.38827386561101,12.254195809659137],[51.38607325318151,12.254818100417879],[51.38426090465805,12.257307263451793],[51.38150639225472,12.257870045052357],[51.37852862750921,12.25745518454653],[51.37937018935801,12.2544474458808],[51.38040593654739,12.252373143351747],[51.3781402091295,12.249365404685989],[51.375226966224204,12.244594508871018],[51.37297937886635,12.232654062664352],[51.37226718966019,12.230061184504422],[51.37097227181144,12.23535065595118],[51.37077803097495,12.240225266893077],[51.36559797136363,12.240951272777806],[51.36223061837299,12.241054987903766],[51.35539842234027,12.242019541276335],[51.35367261112168,12.243069675376205],[51.349806558071606,12.242959134945096],[51.348736432175,12.243953998829397],[51.34787340921511,12.244617241419292],[51.34714845736809,12.245722645734816],[51.34580208779556,12.246606969188008],[51.343316402923364,12.248596577930755],[51.340657925745376,12.249867792893923],[51.338620806421176,12.248817658794025],[51.33734324400672,12.252576030807433],[51.33734324400672,12.255671162892526],[51.33544410000394,12.260313861019768],[51.33326862019857,12.259153186487708],[51.33247437168947,12.252852381886242],[51.331577508884436,12.245318670931596],[51.331473908212075,12.243715834673964],[51.32740022624543,12.243962345417714],[51.32657133880386,12.23904329621061],[51.32069962383645,12.240922483548133],[51.3201469531345,12.23815897275739],[51.31800529191736,12.23943019042673],[51.31879979105079,12.24390707790721],[51.31800529191736,12.24252532251188],[51.3166235215177,12.240425054311032],[51.3160708017044,12.242138431000853],[51.316830789731,12.24479140136043],[51.31724532334786,12.247002209992417],[51.31793620438583,12.250428963371974],[51.31748713342424,12.253026664441194],[51.31520716419382,12.252252881420134],[51.31341074499218,12.252750313362327],[51.30971404573566,12.250871126024833],[51.3081247189977,12.251479098399159],[51.309679495739545,12.25330301552006],[51.3105432378338,12.254518960267688],[51.312063384430246,12.256508688036376],[51.30843567856061,12.25407679854112],[51.305222328133084,12.250871126024833],[51.30449671278569,12.251313262873367],[51.3034946384235,12.253524071506376],[51.301559536358724,12.255679609921742],[51.30003904178756,12.255624339706117],[51.29838026299353,12.254574205606275],[51.29855305524788,12.260985550639873],[51.295062525578714,12.261427712365446],[51.28952425934219,12.262100692288783],[51.288545701359936,12.269509738377906],[51.28598775210688,12.274981489742743],[51.283948203995266,12.282940400818433],[51.28092285225361,12.28015296695662],[51.28088828058378,12.273188919765289],[51.28157970903388,12.262411227683344],[51.2858317651706,12.262190146820046],[51.28579719719585,12.256442044376286],[51.285104217331565,12.251165567588885],[51.28389430356168,12.249949622841285],[51.28182009151479,12.254702861399636],[51.28054094739352,12.252823674063137],[51.27915804881329,12.249010029172496],[51.2791234758152,12.244588411907557],[51.27359833971374,12.243948872833784],[51.26602531566007,12.24754143686107],[51.265525439344,12.243596858150426],[51.26189405525767,12.24647090937222],[51.25895415323649,12.244536451819158],[51.25493439489793,12.235969572145194],[51.25251294622262,12.237959299913854],[51.255314896666874,12.245641859910677],[51.25545326016581,12.250505638901132],[51.25469225576907,12.256253741344864],[51.2515384489931,12.257030646480587],[51.248805460108315,12.251835246194617],[51.24787136337255,12.250232409937013],[51.24596851503523,12.253603893101058],[51.24451537783301,12.250674571663609],[51.23795455515318,12.239574219819417],[51.23622432329299,12.244807104427167],[51.23826598842501,12.262327735191974],[51.24054977938795,12.27465299331601],[51.243006458229615,12.276255829574666],[51.24390605428033,12.278190287127757],[51.2458435860153,12.281395959645039],[51.249026476746366,12.28349618820917],[51.25134432740134,12.288138886336384],[51.25072163277531,12.292118341921423],[51.249303241218286,12.296042527244225],[51.24760803294478,12.299966712566004],[51.245808968063585,12.302066980766796],[51.24442502412174,12.305935896603017],[51.24209466429994,12.311053248464162],[51.24102202447372,12.313208788652418],[51.24199086128874,12.315253786637697],[51.24382467510543,12.317077703759622],[51.24538162944617,12.317685676132953],[51.24763397143212,12.319728840616563],[51.249294583306295,12.319452489536701],[51.249917297299646,12.32094478536419],[51.252131323204594,12.319507759753293],[51.25365340417693,12.318181274573476],[51.25441442576883,12.31 Line truncated
// {"color":"#036B03","zone":[[51.37518674907935,12.344954547810858],[51.37342062993136,12.342608690467841],[51.377467556127755,12.329554618841968],[51.36658379337223,12.324035112046914],[51.36587270376455,12.329467007622526],[51.36264531215451,12.335249348074171],[51.358761200375966,12.335862626607621],[51.356463401737585,12.338315740738807],[51.35099198867158,12.34182018949727],[51.34579354100987,12.34471135972305],[51.33966412028121,12.348303398741677],[51.334738072396675,12.35066890165433],[51.3311253008487,12.354523795288713],[51.32597934687499,12.356714075763335],[51.3222016301481,12.357064520638573],[51.32012096843752,12.356801678010186],[51.32105178135106,12.362846852119247],[51.31831404238952,12.360218515550002],[51.31486425864571,12.36030612676862],[51.31415236621925,12.362934463337837],[51.31415236621925,12.398329395801312],[51.31732841636287,12.40472501478638],[51.32143505176629,12.409631243048835],[51.32439160154294,12.41094541151756],[51.330194645154904,12.41620208465605],[51.33305392395883,12.420356627111943],[51.33748755374248,12.428767304132805],[51.34443818420431,12.432797420206015],[51.345751570762076,12.426051356344999],[51.34952734745178,12.423773464651788],[51.35177562459546,12.421794599431422],[51.35653570949816,12.418815817986228],[51.36140470988795,12.418114928234985],[51.36184234749226,12.407426359520116],[51.36643728987639,12.406813080987547],[51.369500328680544,12.406637858549516],[51.375078908611584,12.41163169803059],[51.376610164589806,12.397789125434088],[51.37622581877366,12.390950437769675],[51.37573363080563,12.379035311989668],[51.37617113148323,12.364667072079158],[51.3746398608194,12.356694451152947],[51.37518674907935,12.344954547810858],[51.37518674907935,12.344954547810858]],"name":"zone_2"},
// {"color":"#FF0000","zone":[[51.344121131357326,12.370865941353884],[51.34202356200808,12.369218640010388],[51.34019124541439,12.371146738197353],[51.33516440296708,12.3712734536754],[51.33615398245763,12.379573317519714],[51.33829140125715,12.381727480655087],[51.342209743553724,12.382804562222788],[51.34319917095931,12.382994635440951],[51.34438645565129,12.378686309170178],[51.34434687999021,12.37311082811462],[51.344121131357326,12.370865941353884],[51.344121131357326,12.370865941353884]],"name":"zone_1"},
// Dresden
// {"color":"#036B03","zone":[[51.1453408,13.8311759],[51.1454557,13.8311168],[51.1459663,13.830876],[51.1463277,13.8306947],[51.1467304,13.8305072],[51.1466813,13.8303717],[51.1467729,13.8302934],[51.1470985,13.8300319],[51.1482485,13.8290657],[51.1484821,13.8288419],[51.148671,13.8286193],[51.1488434,13.8283313],[51.1491501,13.8277764],[51.1493282,13.8274325],[51.149516,13.8270934],[51.1496622,13.8267452],[51.1498648,13.8263037],[51.1499336,13.8261782],[51.1499885,13.8260542],[51.1502516,13.8255041],[51.1504061,13.8251996],[51.1505745,13.8248948],[51.1507435,13.82464],[51.1509471,13.824351],[51.1511187,13.8240071],[51.1514489,13.8234198],[51.1516617,13.822997],[51.1517641,13.8227383],[51.1518409,13.8224848],[51.1517056,13.8221508],[51.1517248,13.8221135],[51.1517512,13.8220816],[51.1519214,13.8225139],[51.152107,13.8221689],[51.15234,13.8217547],[51.1523748,13.8216745],[51.152403,13.8216397],[51.1525623,13.8213493],[51.1524648,13.8212242],[51.1525264,13.8211404],[51.1526108,13.8210305],[51.1526583,13.8209641],[51.1526744,13.8209722],[51.1527439,13.8209676],[51.1527744,13.8209838],[51.1527901,13.8209465],[51.1528112,13.8209177],[51.1528495,13.8208288],[51.1529054,13.8207111],[51.153061,13.8204009],[51.1534687,13.8196278],[51.1539232,13.8187316],[51.1541419,13.8181391],[51.1543713,13.8175435],[51.154472,13.8173248],[51.1549891,13.815935],[51.1550444,13.8156917],[51.1551503,13.8150184],[51.1552656,13.8142699],[51.1552842,13.8142325],[51.1554027,13.8132004],[51.1554094,13.8131526],[51.1553978,13.8127386],[51.1553066,13.8114928],[51.1552476,13.8105582],[51.1552084,13.8103124],[51.1551557,13.8100194],[51.1553242,13.8101759],[51.1557374,13.8099987],[51.1556788,13.8096685],[51.1558828,13.8094963],[51.1567668,13.8092034],[51.1573368,13.8090082],[51.1576682,13.808927],[51.1585152,13.8085561],[51.1588801,13.8084196],[51.1588433,13.8081184],[51.159059,13.8080759],[51.1594807,13.8079547],[51.1594236,13.807453],[51.1597836,13.8073177],[51.159806,13.8071875],[51.1592669,13.8072297],[51.159279,13.8071111],[51.1592997,13.8070134],[51.1593662,13.8065061],[51.1593795,13.80639],[51.1594638,13.8058622],[51.1596826,13.8058434],[51.1607543,13.8057038],[51.1611828,13.8057246],[51.1619001,13.8056003],[51.162045,13.8055864],[51.1628341,13.8053487],[51.1632124,13.8052364],[51.1634623,13.805144],[51.1637975,13.8050066],[51.1638969,13.8049957],[51.1641691,13.8049071],[51.1642916,13.8048568],[51.1643499,13.804807],[51.164488,13.8046952],[51.1646321,13.8045734],[51.1651317,13.8041177],[51.165334,13.8039403],[51.1656469,13.8036763],[51.1659572,13.8034666],[51.1664363,13.8031294],[51.1668975,13.8028469],[51.1670464,13.8027617],[51.1672266,13.8026612],[51.1674184,13.802537],[51.1676507,13.8023944],[51.1680717,13.8021178],[51.168392,13.8019766],[51.1684272,13.8017838],[51.1684685,13.8015908],[51.1686311,13.8011585],[51.1687976,13.8008049],[51.1688917,13.8006253],[51.1690374,13.8003558],[51.1691774,13.8001258],[51.1693382,13.7998215],[51.1694864,13.799488],[51.1697711,13.798895],[51.1697486,13.7985167],[51.1696885,13.7980803],[51.169639,13.7980816],[51.1691122,13.7982921],[51.1686564,13.7984959],[51.168524,13.797958],[51.1684433,13.7976077],[51.168274,13.7969465],[51.1678225,13.7951572],[51.1678123,13.7951166],[51.1671485,13.7927857],[51.1671209,13.7927],[51.1668688,13.7918958],[51.1667306,13.7914523],[51.1666095,13.7910438],[51.1665399,13.7907755],[51.1664768,13.7905957],[51.1663391,13.7901585],[51.1661983,13.7897635],[51.1661627,13.7896267],[51.1660199,13.7890361],[51.165912,13.7885206],[51.1657995,13.7879945],[51.1657837,13.7875708],[51.1657956,13.7871755],[51.1658541,13.7866702],[51.1658619,13.7865432],[51.1659023,13.7860383],[51.1659742,13.7855073],[51.1661907,13.7839722],[51.1662565,13.7832819],[51.1662665,13.7831512],[51.1662718,13.7830061],[51.1662739,13.7827704],[51.1662685,13.7824698],[51.1662622,13.7823032],[51.166247,13.782155],[51.166218,13.7817789],[51.1661763,13.7812726],[51.1661368,13.7807626],[51.1659452,13.7803074],[51.1659748,13.7797256],[51.1662911,13.7798271],[51.1663393,13.7798621],[51.1667058,13.7800373],[51.1667815,13.780086],[51.1669601,13.7801719],[51.1670565,13.7802419],[51.1672361,13.7804183],[51.1673055,13.7805216],[51.1673545,13.780629],[51.1674305,13.7804929],[51.1675648,13.7802611],[51.1676608,13.7800664],[51.1682332,13.7790148],[51.1684325,13.778687],[51.1685179,13.7785651],[51.1686031,13.778436],[51.1687329,13.7782151],[51.1688402,13.7780129],[51.1691341,13.7775702],[51.1693496,13.7772601],[51.1694706,13.7770684],[51.1695602,13.7769138],[51.1696273,13.776805],[51.1696672,13.7767399],[51.169991,13.776279],[51.1700723,13.7762044],[51.1701039,13.7761782],[51.1702075,13.7760667],[51.1702752,13.7759997],[51.1703209,13.7759317],[51.1704043,13.7758147],[51.1705879,13.7755401],[51.1708305,13.7752371],[51.1709643,13.775065],[51.1712112,13.7747619],[51.1714502,13.7745128],[51.171689,13.7742571],[51.171886,13.7740429],[51.1720619,13.7738427],[51.1722042,13.7736771],[51.1723055,13.7735755],[51.1723478,13.7735284],[51 Line truncated
// Hannover
// {"color":"#0000FF","zone":[[52.4294031,9.8194172],[52.4314654,9.8205386],[52.4315934,9.8206143],[52.4319642,9.8208335],[52.4322961,9.8209137],[52.4328941,9.8208749],[52.4329251,9.8217041],[52.4322177,9.8223313],[52.4318654,9.8226437],[52.4315905,9.8228874],[52.4315814,9.8233621],[52.4319909,9.8250926],[52.4323133,9.8260824],[52.4328897,9.8271835],[52.4337022,9.8263518],[52.434296,9.825274],[52.434516,9.8239826],[52.4346317,9.8221332],[52.4351779,9.8200824],[52.435407,9.8202433],[52.4347999,9.8222236],[52.434729,9.8232304],[52.4365997,9.8240551],[52.4367562,9.8228891],[52.437634,9.8228373],[52.4385483,9.8227966],[52.438309,9.8215649],[52.4386785,9.8209756],[52.4389019,9.8201301],[52.4391619,9.818912],[52.4399093,9.8176771],[52.4403508,9.8179504],[52.4408422,9.8194998],[52.4412004,9.8215485],[52.4414951,9.823372],[52.4421414,9.8233911],[52.4431267,9.8221785],[52.4431122,9.821794],[52.443523,9.8211897],[52.4437607,9.8202231],[52.4436303,9.8196866],[52.4436469,9.818737],[52.4446334,9.8190698],[52.4442499,9.8211563],[52.446092,9.8210777],[52.4463847,9.8202692],[52.4466184,9.8190292],[52.4477002,9.8191402],[52.4477535,9.8206579],[52.4481237,9.820745],[52.4480615,9.8198188],[52.4482212,9.8171749],[52.4485111,9.8156657],[52.4488789,9.8137605],[52.4488946,9.8119897],[52.4495859,9.81029],[52.4495412,9.8079719],[52.4503103,9.8038978],[52.4506529,9.79975],[52.4497451,9.7992874],[52.4497642,9.7962417],[52.4496606,9.7950413],[52.4496839,9.7947687],[52.4499037,9.7925732],[52.4497162,9.7905349],[52.4497191,9.7901819],[52.4496904,9.7901564],[52.4495561,9.7900372],[52.4491953,9.7898282],[52.4489492,9.789721],[52.4488818,9.789789],[52.4489767,9.7888397],[52.4491358,9.787513],[52.449145,9.7874308],[52.4491578,9.7873156],[52.4493648,9.7873958],[52.4498862,9.7875977],[52.4499511,9.7874819],[52.4497374,9.7852361],[52.4494569,9.7822892],[52.4494745,9.781975],[52.452228,9.7817535],[52.4530532,9.7815319],[52.4543349,9.7811877],[52.4541417,9.7711283],[52.4534767,9.7713664],[52.452008,9.7729996],[52.4503944,9.7725868],[52.4482333,9.7710115],[52.4477483,9.7700879],[52.4467847,9.7695806],[52.4422843,9.768334],[52.4411198,9.7675718],[52.4404368,9.7673307],[52.4386652,9.7657172],[52.4351313,9.7669806],[52.4342618,9.7672108],[52.4322716,9.7676642],[52.4308584,9.7661855],[52.4303057,9.765642],[52.4273099,9.762901],[52.4275707,9.7476253],[52.4276369,9.7423265],[52.4276657,9.7388711],[52.4276851,9.7365389],[52.4276875,9.7360844],[52.4276926,9.735118],[52.4283959,9.7328943],[52.4290756,9.7323758],[52.4290453,9.7313535],[52.4288879,9.73123],[52.4287334,9.7309094],[52.4286356,9.7305705],[52.4284639,9.7302726],[52.4281268,9.7300258],[52.4277912,9.7287403],[52.4270866,9.7288398],[52.4269351,9.7294443],[52.4265319,9.7299648],[52.4263413,9.7304217],[52.4263009,9.7313868],[52.4262712,9.7316887],[52.4262162,9.7319092],[52.426118,9.7320806],[52.4258487,9.7322209],[52.425576,9.7322821],[52.4250695,9.7323569],[52.4247546,9.7323947],[52.4244167,9.7324219],[52.4244166,9.7324017],[52.4233987,9.7324801],[52.4231478,9.727844],[52.4231326,9.7275442],[52.4231096,9.7271073],[52.4230838,9.7266134],[52.423048,9.7259301],[52.4230083,9.7251721],[52.4228603,9.7223839],[52.4228452,9.7219747],[52.423249,9.7219431],[52.4232156,9.7207236],[52.4238363,9.7206757],[52.4238112,9.7197506],[52.4251952,9.7196422],[52.4251696,9.7187522],[52.425164,9.7185561],[52.4251608,9.7184458],[52.4251214,9.7170946],[52.4252779,9.7170948],[52.426468,9.7171469],[52.4270839,9.7174859],[52.4277743,9.717832],[52.4278704,9.7177211],[52.4283285,9.7179275],[52.4276874,9.7229612],[52.4280526,9.7231473],[52.4286783,9.7180972],[52.4293604,9.7131426],[52.4298756,9.7091776],[52.4302707,9.7060552],[52.4304898,9.7036112],[52.4307323,9.702673],[52.4307582,9.7022403],[52.4307761,9.7015343],[52.4307684,9.7011001],[52.4306889,9.7001757],[52.4306868,9.6999144],[52.4306966,9.6995229],[52.4307499,9.6992621],[52.4309257,9.6987302],[52.4311274,9.6980109],[52.4313209,9.6976826],[52.4313747,9.6975571],[52.431416,9.6974213],[52.4314553,9.6972381],[52.4314659,9.6970539],[52.4314333,9.6954857],[52.4314285,9.6951022],[52.4313954,9.6949291],[52.4313436,9.6947731],[52.431145,9.6943625],[52.4306485,9.693499],[52.4305844,9.6933802],[52.4305576,9.6932321],[52.4301321,9.688176],[52.4298458,9.6848683],[52.4296583,9.6826613],[52.4293921,9.679133],[52.429156,9.6760636],[52.4289239,9.6737251],[52.4285534,9.6708285],[52.427974,9.6679059],[52.428117,9.668029],[52.428296,9.668168],[52.428399,9.668254],[52.428502,9.668336],[52.428601,9.668407],[52.428695,9.668479],[52.428789,9.668528],[52.428878,9.668577],[52.429268,9.668734],[52.429654,9.668894],[52.430286,9.66905],[52.430915,9.669207],[52.43117,9.669295],[52.43143,9.669384],[52.432489,9.66332],[52.432456,9.662757],[52.432428,9.662198],[52.433044,9.662108],[52.433665,9.662018],[52.433627,9.661503],[52.43359,9.660988],[52.432788,9.657307],[52.431986,9.653627],[52.432583,9.649655],[52.43318,9.645683],[52.43323,9.644776],[52.43328,9.643869],[52.433284,9.643806],[52.433285,9.643747 Line truncated
{"color":"#0000FF","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[52.337480489832046,9.176128687175208],[52.33239618174835,9.175674281122866],[52.32849628492866,9.17727040944689],[52.31833168479517,9.183198628545199],[52.30328649504307,9.184869940190225],[52.2703511859645,9.347771995388399],[52.18930690904489,9.441549639624014],[52.171635616216406,9.466880148080378],[52.19817096408451,9.537203869715427],[52.19777604729836,9.568796545188547],[52.19892847280593,9.58457643390534],[52.19687337118373,9.604926891202012],[52.19575303244412,9.622909731894111],[52.20431117603977,9.641318294505567],[52.151920595530214,9.781309576185862],[52.108313809543546,9.895501975210038],[52.18382356726795,10.112393553062816],[52.26186697528232,10.085206132048967],[52.30798907801426,10.292335671179757],[52.38422458720541,10.278725114808196],[52.475241107317515,10.226292502011205],[52.5523622100076,10.16072209866877],[52.62379568681237,10.150489702023464],[52.669722569106966,10.128679113567387],[52.681370581044376,10.069109226455282],[52.63645105557484,9.953668809695301],[52.62441059770467,9.940257843509698],[52.60628211596932,9.718854425404515],[52.55439120338926,9.501644802945066],[52.49277227097079,9.269314835213436],[52.337480489832046,9.176128687175208],[52.337480489832046,9.176128687175208]],"name":"zone_3"},
{"color":"#036B03","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[52.4294031,9.8194172],[52.4314654,9.8205386],[52.4315934,9.8206143],[52.4319642,9.8208335],[52.4322961,9.8209137],[52.4328941,9.8208749],[52.4329251,9.8217041],[52.4322177,9.8223313],[52.4318654,9.8226437],[52.4315905,9.8228874],[52.4315814,9.8233621],[52.4319909,9.8250926],[52.4323133,9.8260824],[52.4328897,9.8271835],[52.4337022,9.8263518],[52.434296,9.825274],[52.434516,9.8239826],[52.4346317,9.8221332],[52.4351779,9.8200824],[52.435407,9.8202433],[52.4347999,9.8222236],[52.434729,9.8232304],[52.4365997,9.8240551],[52.4367562,9.8228891],[52.437634,9.8228373],[52.4385483,9.8227966],[52.438309,9.8215649],[52.4386785,9.8209756],[52.4389019,9.8201301],[52.4391619,9.818912],[52.4399093,9.8176771],[52.4403508,9.8179504],[52.4408422,9.8194998],[52.4412004,9.8215485],[52.4414951,9.823372],[52.4421414,9.8233911],[52.4431267,9.8221785],[52.4431122,9.821794],[52.443523,9.8211897],[52.4437607,9.8202231],[52.4436303,9.8196866],[52.4436469,9.818737],[52.4446334,9.8190698],[52.4442499,9.8211563],[52.446092,9.8210777],[52.4463847,9.8202692],[52.4466184,9.8190292],[52.4477002,9.8191402],[52.4477535,9.8206579],[52.4481237,9.820745],[52.4480615,9.8198188],[52.4482212,9.8171749],[52.4485111,9.8156657],[52.4488789,9.8137605],[52.4488946,9.8119897],[52.4495859,9.81029],[52.4495412,9.8079719],[52.4503103,9.8038978],[52.4506529,9.79975],[52.4497451,9.7992874],[52.4497642,9.7962417],[52.4496606,9.7950413],[52.4496839,9.7947687],[52.4499037,9.7925732],[52.4497162,9.7905349],[52.4497191,9.7901819],[52.4496904,9.7901564],[52.4495561,9.7900372],[52.4491953,9.7898282],[52.4489492,9.789721],[52.4488818,9.789789],[52.4489767,9.7888397],[52.4491358,9.787513],[52.449145,9.7874308],[52.4491578,9.7873156],[52.4493648,9.7873958],[52.4498862,9.7875977],[52.4499511,9.7874819],[52.4497374,9.7852361],[52.4494569,9.7822892],[52.4494745,9.781975],[52.452228,9.7817535],[52.4530532,9.7815319],[52.4543349,9.7811877],[52.4541417,9.7711283],[52.4534767,9.7713664],[52.452008,9.7729996],[52.4503944,9.7725868],[52.4482333,9.7710115],[52.4477483,9.7700879],[52.4467847,9.7695806],[52.4422843,9.768334],[52.4411198,9.7675718],[52.4404368,9.7673307],[52.4386652,9.7657172],[52.4351313,9.7669806],[52.4342618,9.7672108],[52.4322716,9.7676642],[52.4308584,9.7661855],[52.4303057,9.765642],[52.4273099,9.762901],[52.4275707,9.7476253],[52.4276369,9.7423265],[52.4276657,9.7388711],[52.4276851,9.7365389],[52.4276875,9.7360844],[52.4276926,9.735118],[52.4283959,9.7328943],[52.4290756,9.7323758],[52.4290453,9.7313535],[52.4288879,9.73123],[52.4287334,9.7309094],[52.4286356,9.7305705],[52.4284639,9.7302726],[52.4281268,9.7300258],[52.4277912,9.7287403],[52.4270866,9.7288398],[52.4269351,9.7294443],[52.4265319,9.7299648],[52.4263413,9.7304217],[52.4263009,9.7313868],[52.4262712,9.7316887],[52.4262162,9.7319092],[52.426118,9.7320806],[52.4258487,9.7322209],[52.425576,9.7322821],[52.4250695,9.7323569],[52.4247546,9.7323947],[52.4244167,9.7324219],[52.4244166,9.7324017],[52.4233987,9.7324801],[52.4231478,9.727844],[52.4231326,9.7275442],[52.4231096,9.7271073],[52.4230838,9.7266134],[52.423048,9.7259301],[52.4230083,9.7251721],[52.4228603,9.7223839],[52.4228452,9.7219747],[52.423249,9.7219431],[52.4232156,9.7207236],[52.4238363,9.7206757],[52.4238112,9.7197506],[52.4251952,9.7196422],[52.4251696,9.7187522],[52.425164,9.7185561],[52.4251608,9.7184458],[52.4251214,9.7170946],[52.4252779,9.7170948],[52.426468,9.7171469],[52.4270839,9.7174859],[52.4277743,9.717832],[52.4278704,9.7177211],[52.4283285,9.7179275],[52.4276874,9.7229612],[52.4280526,9.7231473],[52.4286783,9.7180972],[52.4293604,9.7131426],[52.4298756,9.7091776],[52.4302707,9.7060552],[52.4304898,9.7036112],[52.4307323,9.702673],[52.4307582,9.7022403],[52.4307761,9.7015343],[52.4307684,9.7011001],[52.4306889,9.7001757],[52.4306868,9.6999144],[52.4306966,9.6995229],[52.4307499,9.6992621],[52.4309257,9.6987302],[52.4311274,9.6980109],[52.4313209,9.6976826],[52.4313747,9.6975571],[52.431416,9.6974213],[52.4314553,9.6972381],[52.4314659,9.6970539],[52.4314333,9.6954857],[52.4314285,9.6951022],[52.4313954,9.6949291],[52.4313436,9.6947731],[52.431145,9.6943625],[52.4306485,9.693499],[52.4305844,9.6933802],[52.4305576,9.6932321],[52.4301321,9.688176],[52.4298458,9.6848683],[52.4296583,9.6826613],[52.4293921,9.679133],[52.429156,9.6760636],[52.4289239,9.6737251],[52.4285534,9.6708285],[52.427974,9.6679059],[52.428117,9.668029],[52.428296,9.668168],[52.428399,9.668254],[52.428502,9.668336],[52.428601,9.668407],[52.428695,9.668479],[52.428789,9.668528],[52.428878,9.668577],[52.429268,9.668734],[52.429654,9.668894],[52.430286,9.66905],[52.430915,9.669207],[52.43117,9.669295],[52.43143,9.669384],[52.432489,9.66332],[52.432456,9.662757],[52.432428,9.662198],[52.433044,9.662108],[52.433665,9.662018],[52.433627,9.661503],[52.43359,9.660988],[52.432788,9.657307],[52.431986,9.653627],[52.432583,9.649655],[52.43318,9.645683],[52.43323,9.644776],[52.43328,9.643869]Line truncated
// {"color":"#FF0000","zone":[[52.378671742243625,9.722327358691302],[52.369498935227185,9.731441021414383],[52.36745093387805,9.73605776233439],[52.366848500114024,9.74239996184285],[52.36991032782518,9.753517468437565],[52.37461818882121,9.751922291203387],[52.37880098225368,9.74681908416122],[52.37926194374402,9.7446636288689],[52.38000258153876,9.741986181074637],[52.381786037039404,9.738611240384841],[52.38418643346016,9.736252966117178],[52.38451729650936,9.733449201998809],[52.38288855838056,9.73166355299196],[52.38237420754038,9.73041961772961],[52.381296500636466,9.727229525683953],[52.38023101454314,9.72470152821515],[52.379416160649185,9.723502502248493],[52.378671742243625,9.722327358691302],[52.378671742243625,9.722327358691302]],"name":"zone_1"},
{"color":"#0000FF","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[52.38506046000032,9.797969752936496],[52.38471979094106,9.796771046419735],[52.38402396499393,9.79412963548171],[52.38136554490583,9.795756525782991],[52.382567678711695,9.800680853959818],[52.38040590093823,9.802162076242723],[52.38135084197998,9.805926385502232],[52.38022234889408,9.807463292833148],[52.38051467216033,9.808777459971282],[52.381153697676325,9.809111570260029],[52.3821023243562,9.809170751337064],[52.38271955107132,9.809127491303116],[52.38340938248305,9.808954451167494],[52.38410250366803,9.808462368283529],[52.38559009121991,9.807611927095763],[52.38590013843395,9.808516257799084],[52.38752562827179,9.807359234408523],[52.38506046000032,9.797969752936496],[52.38506046000032,9.797969752936496]],"name":"zone_mhh"},
// Frankfurt
// {"color":"#0000FF","zone":[[50.0849155,8.4875332],[50.0848902,8.4876032],[50.0848789,8.4876343],[50.0845943,8.4884216],[50.0845009,8.4886797],[50.0844202,8.488903],[50.0848898,8.4890878],[50.0849197,8.4893644],[50.0849968,8.4900773],[50.0850662,8.4907187],[50.0850872,8.4909127],[50.0851005,8.4910327],[50.0851224,8.4912312],[50.0851544,8.4915194],[50.085171,8.4916027],[50.0852217,8.4918566],[50.0852754,8.4921255],[50.085332,8.4924092],[50.085393,8.4927781],[50.0854353,8.4930345],[50.0855093,8.4934824],[50.0857017,8.4947201],[50.0858662,8.4947444],[50.0859151,8.4950763],[50.0844422,8.494769],[50.0844042,8.4947596],[50.0843427,8.4948701],[50.0842811,8.4949801],[50.0837713,8.4958781],[50.0837707,8.4958792],[50.0837509,8.4959174],[50.0831454,8.4970823],[50.0828923,8.4975941],[50.0828646,8.4976501],[50.0823789,8.498632],[50.0823359,8.4987189],[50.0823107,8.4987698],[50.0822998,8.4987919],[50.0821167,8.4987075],[50.0820758,8.4987219],[50.0820686,8.4987298],[50.0820496,8.4987512],[50.0816028,8.4998836],[50.0815516,8.5001176],[50.0814667,8.5013578],[50.0814304,8.5015705],[50.0813657,8.5018379],[50.0813361,8.5018924],[50.0801929,8.5015405],[50.0801212,8.5014904],[50.0793049,8.5013512],[50.0792444,8.5013418],[50.0786557,8.501242],[50.0779916,8.501132],[50.0778049,8.5011197],[50.0773961,8.5010033],[50.0765501,8.5007467],[50.0764801,8.5007591],[50.0763539,8.5008531],[50.0761987,8.5009688],[50.0761497,8.5010056],[50.0762922,8.5013291],[50.076307,8.5013627],[50.0762323,8.5013633],[50.0761716,8.5013637],[50.0761124,8.5013642],[50.076054,8.5013647],[50.0760198,8.501365],[50.0758848,8.5013661],[50.0758452,8.5013664],[50.0757957,8.5013668],[50.0756957,8.5013676],[50.0755778,8.5013686],[50.0755565,8.5013686],[50.0755039,8.5013691],[50.0754238,8.5013698],[50.0753755,8.5015805],[50.0752773,8.5020079],[50.0752125,8.5020907],[50.0752028,8.5021031],[50.0751954,8.5021126],[50.0750944,8.5022417],[50.0750812,8.5022671],[50.0749676,8.5024849],[50.0749444,8.5025295],[50.0748714,8.5026695],[50.0748181,8.5027716],[50.0747627,8.5028836],[50.074732,8.5029457],[50.0746574,8.5030966],[50.0746028,8.5032069],[50.0745678,8.5032978],[50.0745397,8.5033708],[50.0744822,8.5035202],[50.0744247,8.5036697],[50.0743977,8.5037398],[50.0743703,8.5038276],[50.0743287,8.5039608],[50.0742757,8.5041304],[50.0742437,8.5042328],[50.074224,8.5042961],[50.0742035,8.5043616],[50.0741631,8.504491],[50.0741252,8.5046122],[50.0740876,8.5047328],[50.0740381,8.5048516],[50.0739887,8.5049705],[50.0739184,8.5051396],[50.0738636,8.5052714],[50.0737477,8.5055135],[50.0737045,8.5056037],[50.0736595,8.5056979],[50.0736155,8.5057898],[50.0735729,8.5058788],[50.0735358,8.5059562],[50.0734999,8.5060313],[50.073465,8.5061041],[50.0734049,8.5062297],[50.0733743,8.5062936],[50.0733137,8.5064202],[50.0732525,8.506548],[50.0732067,8.5066438],[50.0731565,8.5067486],[50.0731227,8.5068192],[50.0730512,8.5069687],[50.0729974,8.5070809],[50.0729959,8.5070789],[50.0729797,8.5070581],[50.0719841,8.5058319],[50.0719593,8.5058017],[50.0719459,8.5057854],[50.0718982,8.5059182],[50.0717177,8.506232],[50.0715257,8.5064949],[50.0712071,8.5071002],[50.0710288,8.5077618],[50.0706697,8.5084051],[50.0705971,8.5084991],[50.0705188,8.5086005],[50.0703171,8.5087731],[50.0699543,8.5091674],[50.0691561,8.5098542],[50.0690188,8.5099944],[50.0688812,8.5100858],[50.0684422,8.5104901],[50.0681708,8.5106745],[50.0678292,8.5109297],[50.0678482,8.510954],[50.0678729,8.5109856],[50.0678515,8.5110324],[50.0666232,8.5137213],[50.0665726,8.513832],[50.0664871,8.5140191],[50.0665238,8.5140647],[50.0665435,8.5140892],[50.0665547,8.5141031],[50.0662982,8.5146271],[50.0663032,8.5147257],[50.0655678,8.5162429],[50.0654272,8.516533],[50.0654927,8.5166166],[50.0655112,8.5166403],[50.0653769,8.5169156],[50.0652519,8.517172],[50.0650262,8.5176346],[50.0649482,8.5177945],[50.0649449,8.5178011],[50.0642305,8.5171672],[50.0641427,8.5173091],[50.0641303,8.5173292],[50.0641117,8.5173593],[50.0640793,8.5174117],[50.0640507,8.5174579],[50.064022,8.5175042],[50.0639851,8.517559],[50.0639632,8.5175915],[50.0639192,8.5176566],[50.0638789,8.5177164],[50.0638389,8.5177757],[50.0637312,8.5179354],[50.0636886,8.5179954],[50.0636606,8.5180349],[50.063628,8.5180808],[50.0635355,8.5182112],[50.063465,8.5183107],[50.0633944,8.5184102],[50.0630669,8.5188719],[50.0630653,8.5188742],[50.0629849,8.5189798],[50.0629043,8.5190856],[50.0628092,8.5191929],[50.0627129,8.5193015],[50.0626536,8.5193685],[50.0626252,8.5194008],[50.0624809,8.5195742],[50.0620236,8.5201202],[50.0619521,8.5202057],[50.0617683,8.5203882],[50.0623796,8.5219718],[50.0644497,8.5256661],[50.0655932,8.5267569],[50.0662523,8.5269962],[50.0670179,8.5271451],[50.0679052,8.5270764],[50.0686313,8.5269617],[50.0694599,8.5266826],[50.0706366,8.5259671],[50.0722206,8.5244219],[50.0730228,8.5238175],[50.0738609,8.5234209],[50.0743309,8.5232609],[50.0745366,8.5231908],[50.0751759,8.5229731],[50.0752205,8.5229579],[50.0752588,8.5229448],[50.0755211,8.5228554],[50.0755561,8.5228435],[5 Line truncated
// Stuttgart
{"color":"#0000FF","weight":2,"opacity":0.7,"fillOpacity":0.1,"zone":[[48.8217597,9.083811],[48.8216302,9.0837807],[48.8208373,9.0836003],[48.8204135,9.0835364],[48.8202269,9.0835083],[48.8201405,9.0834953],[48.8200896,9.0834523],[48.820019,9.0833925],[48.8196103,9.0834223],[48.81905,9.0833991],[48.8187739,9.081819],[48.8183799,9.079912],[48.8179932,9.0803908],[48.8179809,9.0803661],[48.8179643,9.0803328],[48.8177537,9.0798437],[48.8176575,9.0800662],[48.8175319,9.0802615],[48.8174101,9.0803787],[48.8172181,9.0804958],[48.8170474,9.0805643],[48.8170268,9.0804685],[48.8169395,9.0800629],[48.8169174,9.0799604],[48.8167779,9.079436],[48.8161199,9.0798904],[48.8160093,9.0795799],[48.8159707,9.0796321],[48.8158911,9.0797261],[48.8157728,9.0798169],[48.8155656,9.0799707],[48.8152491,9.0801736],[48.8151663,9.0799632],[48.8152229,9.0798348],[48.8152752,9.0797722],[48.8154162,9.0796363],[48.814565,9.07669],[48.8143405,9.0768206],[48.8142145,9.0769132],[48.8138315,9.0772269],[48.8137473,9.0773105],[48.8137041,9.0773663],[48.8135724,9.0775505],[48.8135452,9.0776095],[48.8135043,9.0776651],[48.8134872,9.077683],[48.8134543,9.0777174],[48.8133725,9.0778321],[48.8134185,9.077939],[48.8129566,9.0783436],[48.8131063,9.0787506],[48.8129448,9.0788936],[48.8130368,9.0791143],[48.8130779,9.0791416],[48.8131237,9.0791758],[48.8126184,9.0795704],[48.8128777,9.0800111],[48.8130912,9.0804039],[48.8129342,9.0805334],[48.8127316,9.0807005],[48.8123424,9.0810078],[48.8120762,9.0812275],[48.8118394,9.0814091],[48.8116937,9.0815208],[48.8115389,9.0816223],[48.8113317,9.0817933],[48.8113838,9.082119],[48.8115894,9.0834343],[48.8101014,9.083978],[48.8100148,9.0840136],[48.8099396,9.0840353],[48.8097641,9.0840824],[48.8096294,9.0841083],[48.8094673,9.0841298],[48.8094287,9.0841349],[48.8094896,9.0844247],[48.8095371,9.08477],[48.80958,9.0851256],[48.8096021,9.0853987],[48.8096088,9.0855722],[48.8096153,9.0857374],[48.8096483,9.0863631],[48.8096966,9.0868812],[48.8097682,9.0873673],[48.8088241,9.0868226],[48.8082078,9.0865115],[48.8078673,9.0863397],[48.8069791,9.0858973],[48.8068097,9.0858199],[48.8066655,9.0857628],[48.8065123,9.0857127],[48.8063545,9.0856697],[48.8061763,9.0856373],[48.8060324,9.0856252],[48.8058886,9.085627],[48.8056694,9.0856469],[48.805186,9.0857342],[48.8050422,9.0857583],[48.8049624,9.0857801],[48.804869,9.0858123],[48.8046615,9.0858633],[48.8044153,9.0859422],[48.804017,9.0860646],[48.8035007,9.0857009],[48.8034669,9.0857843],[48.8031323,9.085536],[48.8027121,9.085337],[48.8026604,9.0853187],[48.8026178,9.0853037],[48.8025173,9.0852533],[48.8022707,9.0851615],[48.8021636,9.0851149],[48.8020797,9.0850893],[48.8020495,9.08508],[48.8019103,9.0850521],[48.8017369,9.0850173],[48.801703,9.0850147],[48.8016388,9.0850101],[48.8012348,9.0850163],[48.8010682,9.0850229],[48.8009374,9.0850149],[48.800776,9.085005],[48.8005273,9.0849839],[48.8003721,9.0849697],[48.8001074,9.0849346],[48.7999848,9.0849201],[48.7998997,9.08491],[48.799489,9.0847917],[48.7992586,9.0847117],[48.7988003,9.0845451],[48.7987681,9.0845322],[48.7986929,9.0844642],[48.7986634,9.0844226],[48.7986291,9.0843672],[48.7986018,9.0843292],[48.7985516,9.0843152],[48.7984968,9.0843288],[48.798378,9.084377],[48.7982981,9.0844251],[48.7982181,9.0844767],[48.7979533,9.0844658],[48.7971867,9.084146],[48.7970338,9.0841041],[48.7968169,9.084076],[48.7967827,9.0840793],[48.7967948,9.0834504],[48.7968072,9.0830352],[48.7965037,9.0829438],[48.7965409,9.0827021],[48.796587,9.0825366],[48.7966467,9.0824227],[48.7966949,9.0823331],[48.7967591,9.0822576],[48.7969195,9.0820752],[48.7967261,9.0818011],[48.7966099,9.0816727],[48.7964983,9.0815409],[48.7964413,9.0815163],[48.7963431,9.0814952],[48.7962609,9.081474],[48.7961269,9.0812486],[48.7960516,9.0811792],[48.7959833,9.0811132],[48.795817,9.0809189],[48.7957169,9.0807939],[48.7956485,9.0807555],[48.7955459,9.0807032],[48.795409,9.080623],[48.7952609,9.0805186],[48.7950672,9.0803103],[48.7949261,9.0801472],[48.7948053,9.0800568],[48.7947254,9.0800425],[48.7945245,9.0799862],[48.7941456,9.0798875],[48.7940657,9.0798733],[48.7940827,9.0795037],[48.7944046,9.0795709],[48.7946328,9.0796273],[48.7948565,9.0796804],[48.7950503,9.0797988],[48.7954562,9.0800496],[48.7953065,9.0796826],[48.7951839,9.079402],[48.7951066,9.0792565],[48.7950226,9.0790834],[48.7949203,9.0789239],[48.7946292,9.0784421],[48.794404,9.078092],[48.7943402,9.078026],[48.7942148,9.0779597],[48.7937221,9.0777153],[48.7932999,9.077575],[48.7930443,9.0774977],[48.7925809,9.0773468],[48.792298,9.0772624],[48.7920126,9.0771885],[48.7917821,9.0771494],[48.7916884,9.077142],[48.7914947,9.0769855],[48.7913352,9.0768533],[48.7911917,9.0766971],[48.7910528,9.0765169],[48.7909229,9.0764021],[48.7907656,9.0763047],[48.7905671,9.0761827],[48.7902955,9.0761225],[48.7901494,9.0760838],[48.7895076,9.075248],[48.7888271,9.0751962],[48.7882789,9.0751762],[48.7873337,9.075153],[48.787322,9.0751527],[48.7872375,9.0752977],[48.7870868,9.075505],[48.7869405,9.0756673],[48.786872,Line truncated
];
for (zone of zones) {
zone.polygon = L.polygon(zone.zone, {color: zone.color, weight: zone.weight, opacity:zone.opacity, fillOpacity:zone.fillOpacity}).addTo(map);
}
let geojson_B_zone_1 =
{"type":"FeatureCollection","features":[{"type":"Feature","id":"be_flaeche_27","geometry":{"type":"MultiPolygon","coordinates":[[[[13.38239178785994,52.38832045595302],[13.38238880781872,52.38832032974701],[13.381456335645877,52.38828173103941],[13.381214623767393,52.38827170399977],[13.380931650790252,52.388259969314845],[13.380621077730217,52.388245482071625],[13.380299343578104,52.3882307960914],[13.378775840884616,52.38816084114387],[13.378701679644566,52.38815745008072],[13.377850431234421,52.3881462186359],[13.376771942767519,52.38816074913088],[13.375150780488717,52.38819325532174],[13.373215439289243,52.388302534386305],[13.370927851193652,52.388415783234954],[13.370355229545021,52.3884272108874],[13.370517449806727,52.38897512891474],[13.370703045006584,52.389597142405854],[13.371004247721444,52.390624170008984],[13.371285261650435,52.39156083472114],[13.371538937968097,52.392404430770036],[13.371931149996906,52.39373063532119],[13.371950883660295,52.39379745160981],[13.37015379390914,52.394467205430125],[13.368341192379631,52.3951423915032],[13.366878661060179,52.39568728469403],[13.36567593616254,52.396135679808516],[13.364220976236687,52.39667713847965],[13.363284358219005,52.39696065948342],[13.362439249349707,52.39722172201266],[13.361407467152226,52.39766622937472],[13.361201271821152,52.397753571122884],[13.360763828583348,52.39793905528756],[13.360615347368507,52.39800235353515],[13.360272311534242,52.39812316727719],[13.359955187589762,52.3982348717636],[13.359910710692798,52.3982526597564],[13.35956021135143,52.39839269015614],[13.359504841789706,52.39841484943121],[13.359366114804471,52.39847028825583],[13.359309294799045,52.39850182320106],[13.359136511077358,52.39859684517926],[13.358990165778575,52.398677326431354],[13.358882787830492,52.39873283130122],[13.358833739039472,52.3987597175328],[13.358664476259065,52.398855264256234],[13.358496278527237,52.39895021412404],[13.35832668373718,52.39904595356621],[13.358153755287862,52.399143570594795],[13.357980736257959,52.39924123107115],[13.357808947541224,52.399338198079285],[13.357754616852835,52.399368346248394],[13.357628200526623,52.39943650594007],[13.357460321857848,52.39952709800877],[13.357323371712015,52.39959904018182],[13.357288268705428,52.39961608532147],[13.357109609910973,52.39970283165098],[13.356927132896773,52.39979143977866],[13.356740164464384,52.39988222401388],[13.356560185931595,52.399969616528104],[13.35638306594133,52.40005561890719],[13.356379114143667,52.4000575330454],[13.356211941993848,52.400134915990975],[13.356014167071006,52.400226474900535],[13.355838662225933,52.400307724563135],[13.355654093013543,52.40039316368155],[13.355470704812262,52.4004780524956],[13.35529102537388,52.4005612213523],[13.355082791722767,52.40065761435653],[13.355064169854593,52.40066623858859],[13.354884067114542,52.40075047090481],[13.354583205929355,52.40089118656156],[13.354424972883349,52.40096519383506],[13.354414923435444,52.40097137479751],[13.3542499966964,52.401070392324016],[13.354077949908989,52.40117348243179],[13.353925372657756,52.40126530761545],[13.353768255640516,52.40136020733455],[13.353601028681316,52.401458940172056],[13.353587935513028,52.40146750631582],[13.353174260897392,52.401712339539465],[13.353084014882059,52.401765695201526],[13.352898100700902,52.4018758823214],[13.352735501214976,52.40197222381098],[13.352654659433135,52.402017761912155],[13.352530679517573,52.40208757758927],[13.35236161336864,52.4021680577136],[13.352264479077908,52.40221409673005],[13.35198421983174,52.40234781908813],[13.351533152711877,52.40256168974658],[13.351481513193992,52.40258685545581],[13.351432573964455,52.402610170634375],[13.350933974811449,52.40285321815349],[13.350831758324869,52.4029030063967],[13.35041163530774,52.40314534840036],[13.350399634227132,52.40315219411719],[13.350347452483955,52.40318358273283],[13.349968445993715,52.403411625428355],[13.349731532178676,52.40355419260227],[13.349480503628046,52.403701894045064],[13.349283087360517,52.40382359461198],[13.349123829233909,52.403921776109556],[13.349086348202102,52.40394917955659],[13.348902657090656,52.404065847257684],[13.348720259834058,52.404181696562134],[13.348542890658182,52.40429436099265],[13.348368239212986,52.40440508505174],[13.348129977620394,52.40455865354168],[13.34803503128586,52.40461984304753],[13.347908233487098,52.40470369490753],[13.34748881793304,52.40496200506003],[13.346936345915584,52.40529871823854],[13.346930599599428,52.40530220741711],[13.346163987720114,52.40577075541923],[13.346065150732217,52.40583126852456],[13.34594420931153,52.40590535478351],[13.344428031897754,52.40683244888135],[13.343685353339554,52.4072952830492],[13.343057743605128,52.40768641067467],[13.343185331114672,52.409352406172616],[13.343296849450688,52.41087186060765],[13.343323673176199,52.411326413447746],[13.343347234707304,52.41172168593238],[13.343331859078853,52.41171651624558],[13.34307182741136,52.41162908182134],[13.342803911334459,52.4115386Line truncated
L.geoJSON(geojson_B_zone_1, {color: "#036B03", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_B_zone_2 =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[13.930153407643388,52.54928915785098],[13.926722107226993,52.57490255625868],[13.919675270915377,52.589549741170714],[13.88109028397514,52.6136634418429],[13.73167821894856,52.68167240361154],[13.637570685879012,52.723622696694804],[13.575426483944199,52.74255973872147],[13.497802574651644,52.76554165008321],[13.439189395472852,52.7743020579008],[13.361931689035828,52.77739633585503],[13.254650421129128,52.77566581199386],[13.192464840971809,52.772625044945414],[13.14464571687975,52.76562544275555],[13.074409893543617,52.74479151986105],[13.024789810623503,52.72807587937925],[12.995058338736612,52.711969807069295],[12.958144897477979,52.68869878218587],[12.934997876877247,52.67075166391092],[12.911284751237076,52.64932810008733],[12.89129919965788,52.617113075148694],[12.87569731025468,52.58952803510917],[12.869389143678063,52.56197086349809],[12.86473944065608,52.525242287589435],[12.86481679625183,52.50148047375396],[12.871267300847563,52.47516003299657],[12.88074826060759,52.446554655022254],[12.903635953753252,52.404437698914165],[12.916149063524813,52.37987623463522],[12.937764139623823,52.36155209818148],[12.977106503489779,52.34049300382705],[13.09503664615309,52.30717405247924],[13.208262364139301,52.297020288534156],[13.335555463163502,52.28856304603107],[13.445312193708787,52.28354514347188],[13.579739944919197,52.28147448982372],[13.661534924557543,52.29457169404213],[13.739987400004367,52.312826084579996],[13.801572802903024,52.34215896497565],[13.86480939351722,52.40354475476633],[13.90566528690087,52.47179398139784],[13.923874395078997,52.526565050476194],[13.930153407643388,52.54928915785098]]],"type":"Polygon"}}]};
L.geoJSON(geojson_B_zone_2, {color: "#0000FF", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_L_zone =
//{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[12.277389513909384,51.4159248300424],[12.276713134793795,51.4135462752684],[12.268801488674825,51.38287690449803],[12.230539829861442,51.35051642555513],[12.248863626221123,51.33262005501632],[12.253429370230918,51.31920454996592],[12.254497490042496,51.29424986119369],[12.263059032687693,51.2638731014238],[12.276936271725305,51.26516894162813],[12.310354476798096,51.25303602893143],[12.318987120937749,51.250894250927075],[12.32193896470028,51.25736650383109],[12.32187229529751,51.27072896223703],[12.33631605450509,51.28593523984455],[12.370448438625147,51.30608617460376],[12.379865176566625,51.294707429948176],[12.393911769238173,51.28477870157565],[12.400391820480877,51.28346544400955],[12.44777486226468,51.28238495404054],[12.45249150987712,51.26636909458833],[12.463469048382933,51.26723139612773],[12.472474520486742,51.266129988358045],[12.496137400058728,51.28529045443753],[12.513819387013996,51.30288827254168],[12.523104534821897,51.31594787010911],[12.518796828916607,51.31843474208597],[12.511832914506272,51.32672430082434],[12.501529734407626,51.34951106525901],[12.494904279070965,51.353860436651985],[12.459433047792402,51.37228900503763],[12.435586637065342,51.392170926172696],[12.42562440597871,51.39485531839844],[12.395429120169752,51.403326714597085],[12.341714515861554,51.41264279582441],[12.306230359349115,51.414089071637505],[12.294626341287966,51.41448835262014],[12.277389513909384,51.4159248300424]]],"type":"Polygon"}},{"type":"Feature","properties":{},"geometry":{"coordinates":[[[12.370807591183677,51.3447904942831],[12.368818285199978,51.34321655003964],[12.367374930635975,51.34189872971251],[12.369692546765748,51.340515594568444],[12.370086472811181,51.33443003824962],[12.378820747372913,51.335069221416404],[12.382130466275413,51.336517793993835],[12.3840356691193,51.34342250655314],[12.380636681247324,51.345353756216525],[12.378935956615607,51.34511645959566],[12.370807591183677,51.3447904942831]]],"type":"Polygon"},"id":1}]};
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[12.38452427272287,51.406004531569636],[12.383895884440335,51.406466389901766],[12.372745294278502,51.40857036966071],[12.36176770588591,51.41056739048361],[12.342956047910235,51.41356418817068],[12.329696145061064,51.41420327676252],[12.315170820508854,51.414595314610295],[12.311110419964876,51.41448825961177],[12.306878468839727,51.414880359881664],[12.288809299923855,51.415413905452596],[12.279089378143908,51.41634072339025],[12.27336849267968,51.396651627408374],[12.284918607943098,51.393725397734386],[12.283324209591342,51.39042078031153],[12.265077112286406,51.364467442937894],[12.249464367926777,51.35167522671691],[12.247688581336234,51.34717773341663],[12.251520763060029,51.338889600902434],[12.262957562728332,51.33821086706567],[12.263986797926208,51.33138806037405],[12.247289694719626,51.32724345160037],[12.255180699473442,51.30883773521552],[12.256495442161622,51.29889894978527],[12.285429829641572,51.30247500941732],[12.293548355400617,51.28420368758711],[12.31030432611297,51.28413207249764],[12.32958431410853,51.296896323651765],[12.376045629433605,51.29600210530495],[12.377303508768023,51.2880648404022],[12.387839947533053,51.289550820760496],[12.39161419340138,51.284686616529996],[12.394416411154623,51.28543780443303],[12.411407747713724,51.28147064929422],[12.412608912410633,51.284260174614076],[12.430333088170983,51.28579935446143],[12.431304986517148,51.283869286572326],[12.452566121937338,51.2818681427064],[12.46834019860816,51.27618374609514],[12.476398975527246,51.2816191390973],[12.479600602630171,51.29391866389972],[12.469824971834669,51.30492768412117],[12.469539096368095,51.31039632427641],[12.475026323535133,51.31761460965751],[12.513966662441732,51.32569131967594],[12.509044224818354,51.33819610170687],[12.502522988880884,51.349765024516074],[12.496120683910249,51.35376349395207],[12.492576613528996,51.3537635763295],[12.49120479004651,51.355191707725595],[12.492576715451094,51.35569145786528],[12.470395437114973,51.367902819465286],[12.467995671706234,51.3674735825621],[12.463877384303572,51.368830724446724],[12.46696296263164,51.36990208523102],[12.456790538937383,51.37582501261343],[12.44525655620663,51.38581404972686],[12.438387158901605,51.391310878922496],[12.434726188586382,51.3929522601598],[12.42523054418848,51.39594857669192],[12.421687778848707,51.39495020510944],[12.420544135734815,51.39516426149282],[12.417912453397037,51.397732075274035],[12.39218536894623,51.404508776869704],[12.389440472078718,51.403437980764465],[12.38646777726538,51.40379409957731],[12.38452427272287,51.406004531569636]]],"type":"Polygon"}}]};
L.geoJSON(geojson_L_zone, {color: "#0000FF", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
//let geojson_DD_zone_1 =
//{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[{"type":"Feature","properties":{"@id":"relation/191596","admin_level":"11","boundary":"administrative","name":"InnereAltstadt","official_name":null,"ref":"01","source":"KommunaleStatistikstelleDresden","type":"boundary","wikipedia":null,"TMC:cid_58:tabcd_1:Class":null,"TMC:cid_58:tabcd_1:LCLversion":null,"TMC:cid_58:tabcd_1:LocationCode":null,"@relations":null,"history":null},"geometry":{"type":"Polygon","coordinates":[[[13.7429427,51.04717],[13.7429747,51.0472131],[13.7431384,51.047322],[13.74318,51.0473671],[13.7432237,51.0474147],[13.7432542,51.0474636],[13.7432804,51.0474976],[13.7433035,51.0475396],[13.7434411,51.0477198],[13.7435483,51.0478394],[13.7436888,51.0479921],[13.7438486,51.0481858],[13.7440289,51.0483952],[13.7441375,51.0485141],[13.7442594,51.0486499],[13.7443592,51.0487768],[13.7444272,51.0488686],[13.7445001,51.0489467],[13.7445754,51.0490361],[13.7446055,51.0490747],[13.7446097,51.0490929],[13.7446014,51.0491204],[13.7447537,51.0492444],[13.7449113,51.0494244],[13.744963,51.0495176],[13.7449729,51.0496224],[13.7450419,51.0496856],[13.745141,51.0497874],[13.7451956,51.0498587],[13.7453212,51.0500585],[13.7454209,51.0501807],[13.7454723,51.0502659],[13.7455663,51.0503825],[13.7456862,51.0505103],[13.7457686,51.0506008],[13.745887,51.05074],[13.7459901,51.0508565],[13.7461008,51.050981],[13.7461981,51.051085],[13.7462979,51.0512085],[13.7463656,51.0512923],[13.7466676,51.0514886],[13.7468206,51.0516983],[13.746903,51.0518209],[13.7466714,51.0518682],[13.7467626,51.0520707],[13.7468313,51.0523111],[13.7468937,51.0524625],[13.7469333,51.0525776],[13.7469882,51.0527153],[13.7470299,51.0528383],[13.7470561,51.0529272],[13.7470605,51.0529477],[13.7470675,51.0529795],[13.7470812,51.0530424],[13.7470918,51.0530837],[13.7471059,51.0531439],[13.7471205,51.0532089],[13.7471259,51.0532706],[13.7471351,51.0533334],[13.7471414,51.0534889],[13.7471158,51.0536081],[13.7470962,51.0536804],[13.7470449,51.0537885],[13.7467382,51.0545261],[13.7464827,51.0544862],[13.7462787,51.0544646],[13.7460071,51.0544266],[13.7458014,51.054413],[13.745414,51.0543879],[13.7451084,51.0543721],[13.744914,51.0543652],[13.744656,51.0543615],[13.7443381,51.0543584],[13.7431044,51.0543993],[13.7427707,51.054417],[13.7423863,51.0544387],[13.7419842,51.0544744],[13.7416166,51.0545131],[13.7413996,51.0545408],[13.7412257,51.0545589],[13.7410052,51.054597],[13.7409147,51.0546106],[13.7407396,51.0546448],[13.7405466,51.0546905],[13.7404345,51.0547113],[13.7402542,51.0547534],[13.7399746,51.0548231],[13.7397981,51.0548744],[13.7395781,51.0549307],[13.7391044,51.0550534],[13.7389199,51.0548357],[13.738831,51.0547099],[13.7387684,51.0546147],[13.738648,51.0544654],[13.7385987,51.0543245],[13.7385619,51.0542524],[13.738485,51.0541021],[13.7380827,51.0542484],[13.7378204,51.0543462],[13.7375473,51.0544486],[13.7373212,51.054546],[13.7370878,51.0546411],[13.736903,51.0547186],[13.7367827,51.0547679],[13.7367019,51.0547974],[13.7366405,51.0548095],[13.7365715,51.0548103],[13.7364571,51.0548721],[13.7362257,51.054973],[13.7359948,51.0550853],[13.7359107,51.055132],[13.7357766,51.0552044],[13.7356391,51.0552825],[13.7355053,51.0553686],[13.7354003,51.0554429],[13.7352883,51.0555254],[13.73518,51.0556078],[13.7351161,51.0556633],[13.7349923,51.0557745],[13.7348313,51.0559272],[13.7343302,51.0557236],[13.7338639,51.0555357],[13.7335514,51.0554114],[13.7333132,51.0553166],[13.7329407,51.0551687],[13.7324672,51.054982],[13.7318927,51.0547541],[13.7311461,51.054472],[13.7307118,51.0543226],[13.7307536,51.0542603],[13.7309649,51.0540316],[13.7312231,51.0537348],[13.7313975,51.053517],[13.7316199,51.0532612],[13.7318607,51.0529861],[13.7319887,51.0528417],[13.7320475,51.0527986],[13.732132,51.0527408],[13.7321482,51.0527232],[13.732369,51.0524817],[13.7325487,51.0522839],[13.7327893,51.0520247],[13.7326071,51.0519549],[13.7324338,51.0519024],[13.7323321,51.0520081],[13.7322942,51.0519953],[13.7322745,51.0519814],[13.7322493,51.0519641],[13.7322209,51.0519331],[13.732194,51.0519055],[13.7321693,51.0518756],[13.732139,51.0518434],[13.7321336,51.0518376],[13.7320778,51.0518098],[13.7319695,51.0517725],[13.7319346,51.0517952],[13.7317687,51.0517335],[13.7317636,51.0517175],[13.7317588,51.0516832],[13.7317484,51.0516522],[13.731591,51.0516158],[13.7315189,51.0515925],[13.7314176,51.0515678],[13.731329,51.0515524],[13.7312184,51.0515403],[13.7311026,51.0515224],[13.7312632,51.0514742],[13.7314768,51.0514081],[13.7313051,51.051263],[13.731504,51.0512093],[13.7317086,51.0511386],[13.7320624,51.0510436],[13.7320555,51.0510252],[13.7321979,51.0509781],[13.7321933,51.05093],[13.7321744,51.0508739],[13.7321555,51.050812],[13.7321438,51.050757],[13.7321339,51.0507044],[13.7321292,51.0506586],[13.7321266,51.0506446],[13.7321206,51.0506126],[13.7321219,51.0503601],[13.732135,51.0503407],[13.7321589,51.050326],[13.7321828,51.0503021],[13.7321983,51 Line truncated
//L.geoJSON(geojson_DD_zone_1, {color: "#FF0000", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_DD_zone_1 =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[13.7079792,51.1119466],[13.7077099,51.111829],[13.707448,51.1117658],[13.7069912,51.1116431],[13.7059491,51.111369],[13.7048354,51.1110821],[13.7046204,51.1110556],[13.7044816,51.111048],[13.7041558,51.1110444],[13.7039814,51.1109369],[13.7037366,51.1107772],[13.7035866,51.1106549],[13.7034744,51.1105541],[13.7032218,51.110159],[13.7027505,51.1100451],[13.7032084,51.1097817],[13.7036237,51.1094996],[13.7038975,51.1093095],[13.7050671,51.1084826],[13.7047587,51.108468],[13.7042138,51.1088027],[13.703799,51.1090666],[13.7025699,51.1098808],[13.7025194,51.1099357],[13.7023531,51.1101034],[13.7022972,51.1101768],[13.7021249,51.1103845],[13.7019733,51.1105523],[13.7018118,51.1107231],[13.7015229,51.1110713],[13.7014388,51.1111901],[13.7012822,51.1114197],[13.7012762,51.1115032],[13.7012555,51.1115792],[13.7012228,51.1117486],[13.7011855,51.1120822],[13.7011389,51.1127496],[13.7010364,51.1137502],[13.700969,51.1138315],[13.700928,51.1139657],[13.700886,51.1141352],[13.7009307,51.1142001],[13.7008813,51.114305],[13.700767,51.1143975],[13.7006076,51.1144367],[13.7005022,51.1144542],[13.7003271,51.1144831],[13.699929,51.1140777],[13.6995177,51.1138095],[13.6992738,51.1135431],[13.699146,51.1134538],[13.69889,51.1132928],[13.6985058,51.1130542],[13.6975199,51.1133596],[13.6969776,51.1134473],[13.6963404,51.1135708],[13.6964102,51.1133121],[13.6964111,51.113277],[13.6963944,51.1132123],[13.6961815,51.1125069],[13.6960436,51.1124468],[13.6945357,51.1117062],[13.6937284,51.1114871],[13.6920869,51.1110482],[13.6921123,51.1109961],[13.6921479,51.1109207],[13.6920296,51.1109194],[13.6920581,51.1105101],[13.691915,51.1101894],[13.6919602,51.1097857],[13.6920543,51.1094464],[13.6922111,51.1089801],[13.6922815,51.108968],[13.6922907,51.1082603],[13.6926692,51.1083372],[13.6928701,51.1083828],[13.6941107,51.1083496],[13.694417,51.1078171],[13.694488,51.1076816],[13.6947561,51.1069136],[13.6949208,51.1063654],[13.6949215,51.1062403],[13.6949009,51.1059084],[13.6949424,51.1056034],[13.6949636,51.1054326],[13.6956287,51.1054815],[13.6956152,51.1050825],[13.6955813,51.1048283],[13.6953961,51.1043911],[13.6952102,51.1039799],[13.6947636,51.1033776],[13.6932893,51.1032669],[13.6931304,51.1028747],[13.6930632,51.1028132],[13.6927611,51.1024483],[13.6932704,51.1024684],[13.6932968,51.1020639],[13.6923758,51.1020283],[13.6922635,51.1019338],[13.6921977,51.1018775],[13.6921637,51.1018542],[13.6918294,51.1018316],[13.69187,51.1016337],[13.6915025,51.1010159],[13.6913562,51.1005326],[13.691134,51.10008],[13.6908921,51.1000763],[13.6907761,51.1000794],[13.6901617,51.1000725],[13.6890111,51.1000418],[13.6888069,51.1000173],[13.6886811,51.0999669],[13.6882049,51.0995702],[13.6882203,51.0995259],[13.688278,51.099482],[13.6884358,51.0993993],[13.6899898,51.0986561],[13.6918162,51.0977691],[13.6927968,51.0985674],[13.6945658,51.0977109],[13.6944193,51.097647],[13.6955571,51.0968321],[13.6956092,51.0967952],[13.6965574,51.0961246],[13.6976106,51.0953801],[13.6981352,51.0950054],[13.6989416,51.0944439],[13.6978713,51.0938393],[13.6983321,51.0935016],[13.6984668,51.0934147],[13.6985856,51.093328],[13.699282,51.0928255],[13.6997447,51.092489],[13.6998365,51.0924238],[13.6998152,51.0924084],[13.6999819,51.0922966],[13.7002016,51.0921392],[13.7005022,51.0919162],[13.7006897,51.0917732],[13.7008982,51.0916327],[13.701044,51.091526],[13.7008665,51.0914165],[13.7011071,51.0912469],[13.7010016,51.0911798],[13.700902,51.0911674],[13.700429,51.0911128],[13.7001374,51.0910781],[13.700135,51.0906945],[13.7001339,51.0906277],[13.6979963,51.0911961],[13.6978346,51.0912587],[13.6954288,51.0921508],[13.6951615,51.0922468],[13.6943433,51.0925537],[13.6934709,51.0928786],[13.6930527,51.0930343],[13.692562,51.0932159],[13.6921268,51.0933781],[13.6919259,51.0934827],[13.6915154,51.0936945],[13.691433,51.0936979],[13.69139,51.093701],[13.6911769,51.0937844],[13.6911946,51.0936189],[13.6912064,51.093464],[13.6912079,51.0933454],[13.6911887,51.0931963],[13.6910791,51.0926077],[13.6909766,51.092072],[13.6908936,51.0920709],[13.6908231,51.0920538],[13.6908173,51.0919567],[13.6901211,51.092213],[13.6897409,51.0923434],[13.6890649,51.0912796],[13.6896364,51.091111],[13.6896638,51.0909824],[13.6900735,51.0908597],[13.6899294,51.0906655],[13.6899228,51.0906427],[13.6898749,51.090556],[13.6897104,51.0902594],[13.6893488,51.0895479],[13.6892874,51.0894293],[13.6891245,51.0893322],[13.6894619,51.0891138],[13.6896231,51.0890159],[13.6896959,51.0889895],[13.6897465,51.088981],[13.6896209,51.088839],[13.6893385,51.0886408],[13.689155,51.0885119],[13.6891076,51.088542],[13.689025,51.0886052],[13.6888635,51.088718],[13.6886853,51.0888474],[13.6885964,51.0889038],[13.6884883,51.0889671],[13.6881492,51.0891497],[13.6879062,51.089288],[13.6876243,51.0894569],[13.6870921,51.0897569],[13.6869531,51.0898414],[13.6868494,51.0898856],[13.6866406,51.0900219],[13.6864005,51.0901889],[13.686Line truncated
L.geoJSON(geojson_DD_zone_1, {color: "#036B03", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_DD_zone_2 =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[13.737056006338037,51.27746041197616],[13.70172724857732,51.27636938078167],[13.666743705840469,51.273106949001345],[13.632447073594259,51.26770499329401],[13.599172049892234,51.260216280214486],[13.567242940190926,51.250713928898655],[13.536970384373017,51.23929066774062],[13.508648243411152,51.22605789379174],[13.48255068040362,51.21114454584422],[13.45892946748783,51.19469580420796],[13.438011546480737,51.176871632022056],[13.419996867107525,51.157845174535304],[13.405056522465543,51.13780103412869],[13.393331197035266,51.11693343992539],[13.38492993819501,51.09544433163755],[13.37992925791642,51.07354137783564],[13.378372567197403,51.051435949103976],[13.380269941900304,51.029341066577146],[13.385598215064189,51.00746934615402],[13.394301387494107,50.98603095827731],[13.406291345525911,50.9652316225695],[13.421448872336757,50.945270655853484],[13.439624937019419,50.92633909118069],[13.460642243852245,50.90861788446342],[13.484297022754713,50.89227622418492],[13.510361040791905,50.8774699584568],[13.538583813744824,50.86434015243031],[13.568694996158085,50.8530117877585],[13.600406927870939,50.84359261446503],[13.633417314791023,50.836172164212726],[13.667412021542773,50.8308209325888],[13.702067953577538,50.827589736641016],[13.737056006338037,50.82650925251299],[13.772044059098532,50.827589736641016],[13.806699991133298,50.8308209325888],[13.840694697885048,50.836172164212726],[13.873705084805135,50.84359261446503],[13.905417016517987,50.8530117877585],[13.935528198931246,50.86434015243031],[13.963750971884165,50.8774699584568],[13.989814989921356,50.89227622418492],[14.013469768823825,50.90861788446342],[14.034487075656653,50.92633909118069],[14.052663140339314,50.945270655853484],[14.06782066715016,50.9652316225695],[14.079810625181965,50.98603095827731],[14.088513797611881,51.00746934615402],[14.093842070775768,51.029341066577146],[14.095739445478667,51.051435949103976],[14.094182754759652,51.07354137783564],[14.089182074481062,51.09544433163755],[14.080780815640805,51.11693343992539],[14.06905549021053,51.13780103412869],[14.054115145568549,51.157845174535304],[14.036100466195332,51.176871632022056],[14.015182545188242,51.19469580420796],[13.991561332272452,51.21114454584422],[13.96546376926492,51.22605789379174],[13.937141628303054,51.23929066774062],[13.906869072485145,51.250713928898655],[13.874939962783838,51.260216280214486],[13.841664939081811,51.26770499329401],[13.807368306835603,51.273106949001345],[13.772384764098751,51.27636938078167],[13.737056006338037,51.27746041197616]]]}}]};
L.geoJSON(geojson_DD_zone_2, {color: "#0000FF", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_E_zone_1 =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[7.000732817132189,51.54367451905716],[6.99324253137048,51.54344542983304],[6.985824605467751,51.542760375296204],[6.9785506937636805,51.54162597327398],[6.971491046689397,51.54005318176544],[6.9647138265565545,51.53805719213271],[6.958284444410663,51.53565728108174],[6.952264924594358,51.53287662292469],[6.946713303352031,51.52974206401319],[6.9416830674237175,51.526283861607006],[6.937222638129356,51.522535389793084],[6.933374905941318,51.51853281539113],[6.930176819990653,51.51431474707022],[6.927659036358984,51.50992186115522],[6.9258456283813885,51.50539650781752],[6.924753861534579,51.50078230152255],[6.924394034817223,51.49612369974282],[6.924769389853823,51.491465574041676],[6.9258760882777555,51.48685277768716],[6.927703257280323,51.48232971396885],[6.930233102557747,51.477939909363805],[6.933441087253156,51.47372559563091],[6.937296174881231,51.46972730480883],[6.9417611336440785,51.46598348095148],[6.94679289900229,51.4625301122605],[6.952342990858311,51.45940038706599],[6.958357981243089,51.45662437687056],[6.964780007973637,51.45422874940697],[6.971547329370404,51.45223651437115],[6.978594914790263,51.45066680418145],[6.985855065444669,51.44953469178615],[6.993258059733315,51.44885104719482],[7.000732817132189,51.448622434051046],[7.0082075745310615,51.44885104719482],[7.015610568819709,51.44953469178615],[7.022870719474114,51.45066680418145],[7.029918304893974,51.45223651437115],[7.03668562629074,51.45422874940697],[7.043107653021289,51.45662437687056],[7.049122643406066,51.45940038706599],[7.054672735262088,51.4625301122605],[7.0597045006203,51.46598348095148],[7.064169459383146,51.46972730480883],[7.0680245470112215,51.47372559563091],[7.071232531706632,51.477939909363805],[7.073762376984054,51.48232971396885],[7.075589545986623,51.48685277768716],[7.076696244410554,51.491465574041676],[7.077071599447154,51.49612369974282],[7.076711772729799,51.50078230152255],[7.075620005882989,51.50539650781752],[7.073806597905394,51.50992186115522],[7.071288814273725,51.51431474707022],[7.06809072832306,51.51853281539113],[7.064242996135023,51.522535389793084],[7.05978256684066,51.526283861607006],[7.054752330912346,51.52974206401319],[7.04920070967002,51.53287662292469],[7.043181189853715,51.53565728108174],[7.036751807707824,51.53805719213271],[7.029974587574982,51.54005318176544],[7.022914940500698,51.54162597327398],[7.015641028796626,51.542760375296204],[7.008223102893899,51.54344542983304],[7.000732817132189,51.54367451905716]]]}}]};
L.geoJSON(geojson_E_zone_1, {color: "#0000FF", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
//let geojson_E_zone_2 =
//{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[7.000752445417987,51.647283350467134],[6.9768790897170785,51.64655318359508],[6.9532379316762905,51.64436978504383],[6.930058843875718,51.64075438987493],[6.907567074639946,51.63574215354081],[6.885981000278614,51.629381800175345],[6.865509953478687,51.62173513568919],[6.846352151444918,51.6128764310583],[6.8286927459112485,51.60289168259361],[6.812702015373823,51.59187775727965],[6.798533717868482,51.5799414324522],[6.786323620379358,51.567198340136684],[6.776188218570818,51.55377182727825],[6.768223658033712,51.53979174385321],[6.762504865679835,51.525393171455654],[6.759084897353897,51.51071510540014],[6.757994505205748,51.49589910367274],[6.759241925916953,51.481087916202696],[6.762812888540009,51.466424107920304],[6.768670838513964,51.45204868892272],[6.776757372388507,51.43809976479617],[6.786992875935357,51.424711219752105],[6.799277356659543,51.41201144473675],[6.8134914602470005,51.400122122079566],[6.829497659196489,51.38915707756823],[6.847141600776091,51.37922121008696],[6.866253600507049,51.370409508141236],[6.886650266597163,51.36280616172587],[6.908136240106937,51.356483777083774],[6.930506035118521,51.35150270095716],[6.953545962773765,51.347910459958854],[6.977036122738131,51.34574131969563],[7.000752445417987,51.34501596726172],[7.024468768097844,51.34574131969563],[7.047958928062209,51.347910459958854],[7.070998855717453,51.35150270095716],[7.093368650729037,51.356483777083774],[7.11485462423881,51.36280616172587],[7.135251290328925,51.370409508141236],[7.154363290059884,51.37922121008696],[7.172007231639483,51.38915707756823],[7.188013430588975,51.400122122079566],[7.202227534176432,51.41201144473675],[7.214512014900616,51.424711219752105],[7.224747518447468,51.43809976479617],[7.23283405232201,51.45204868892272],[7.2386920022959655,51.466424107920304],[7.242262964919022,51.481087916202696],[7.243510385630224,51.49589910367274],[7.242419993482077,51.51071510540014],[7.23900002515614,51.525393171455654],[7.233281232802262,51.53979174385321],[7.225316672265157,51.55377182727825],[7.215181270456615,51.567198340136684],[7.202971172967493,51.5799414324522],[7.188802875462151,51.59187775727965],[7.172812144924726,51.60289168259361],[7.155152739391056,51.6128764310583],[7.135994937357286,51.62173513568919],[7.11552389055736,51.629381800175345],[7.093937816196028,51.63574215354081],[7.071446046960256,51.64075438987493],[7.048266959159685,51.64436978504383],[7.024625801118895,51.64655318359508],[7.000752445417987,51.647283350467134]]]}}]};
//L.geoJSON(geojson_E_zone_2, {color: "#0000FF", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
//let geojson_H_zone_1 =
//{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[9.721827386573779,52.3783693202497],[9.724408502830897,52.376986429808724],[9.726454028546868,52.375466396966694],[9.727239046885941,52.374847479024936],[9.731240615261555,52.36945125894984],[9.735971130096722,52.36657849556059],[9.738733507645957,52.366307497217804],[9.742199555690021,52.36680082383668],[9.75274321344989,52.369782802050054],[9.751812357991525,52.37092314158653],[9.75089160707188,52.374409720003335],[9.749101129770867,52.37692175396836],[9.74698378549974,52.3781687663071],[9.744723358477025,52.37858976546679],[9.74130071987328,52.379553008630026],[9.73792852769887,52.38145215327032],[9.735492997347137,52.38381791480883],[9.73324879584598,52.38446962023201],[9.731463146839133,52.38284088210321],[9.730219211576781,52.38232653126303],[9.727029119531124,52.38124882435912],[9.724501122062321,52.380183338265795],[9.723302096095665,52.37936848437184],[9.721827386573779,52.3783693202497]]],"type":"Polygon"}},{"type":"Feature","properties":{},"geometry":{"coordinates":[[[9.748041042222496,52.37846678622304],[9.748041042222496,52.37848542294287],[9.74801051238228,52.37848542294287],[9.74801051238228,52.37846678622304],[9.748041042222496,52.37846678622304]]],"type":"Polygon"}}]};
//L.geoJSON(geojson_H_zone_1, {color: "#FF0000", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_F_zone_1 =
//{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[8.672344050378172,50.217388470274926],[8.669076072905682,50.21696482816577],[8.658287766514661,50.2095853581211],[8.650791569860047,50.20696251882512],[8.645787241192437,50.203140031991666],[8.638723557236602,50.201729602985694],[8.635963968588754,50.197590304918464],[8.633142598105565,50.19505909232652],[8.63361625690436,50.19445635403238],[8.623751757185346,50.189090199182374],[8.61883758131654,50.184729397426224],[8.617571697860512,50.184417641232415],[8.614406989222374,50.18301471318054],[8.609830333652837,50.18239117637492],[8.60539974155867,50.18083229875046],[8.606470873713846,50.178899219843544],[8.609830327217736,50.176280089047424],[8.604718105570129,50.1738790892376],[8.6026245290862,50.171571521178805],[8.596976741362482,50.17319306713091],[8.59215664666661,50.16742385520877],[8.587920805874262,50.16820351914299],[8.589722255406429,50.15934578837397],[8.590988138862429,50.1601255840836],[8.60291665603799,50.15691274400655],[8.59353264170528,50.13981675982751],[8.53495277865619,50.11604709910958],[8.531058424538259,50.11637240436028],[8.528857863873782,50.11517920925192],[8.522087321202775,50.12081320545042],[8.507707178492183,50.11549664969613],[8.50008452754929,50.10920544594944],[8.505996788799905,50.104428718304064],[8.517516109877505,50.10073239065596],[8.515642638586769,50.09715556701997],[8.52258988585021,50.09726178625263],[8.52428173111548,50.09628552016147],[8.519027478758801,50.09389766379908],[8.513948575601887,50.08911476616686],[8.513610261595034,50.08759316053755],[8.514795045491098,50.085419951708644],[8.516150231922722,50.085419890950476],[8.519365194527126,50.08194301781725],[8.52223999151397,50.080966275148],[8.525286081093839,50.083033356846954],[8.532405710088426,50.07879169051341],[8.534947138234884,50.07835673740817],[8.537318620838448,50.07672601943116],[8.541384910274502,50.07650845776428],[8.543080108653896,50.0755294728811],[8.543757025501378,50.07096318248139],[8.549689360872264,50.066834722940996],[8.549515697870532,50.05390379448477],[8.586249501801035,50.060422845190516],[8.64193538138909,50.057055192518646],[8.697937421512108,50.06130680540596],[8.704793062077528,50.0601992574893],[8.724774508000479,50.06160634228138],[8.734433611712717,50.075625388468296],[8.734518765751659,50.07793293129228],[8.733138945538684,50.08012023138846],[8.731656524577517,50.080464314825235],[8.735954317997653,50.08653823872018],[8.73948971947334,50.08925170482277],[8.739649796974732,50.089825182702015],[8.74105061642723,50.0908009540851],[8.742051201751025,50.09226457390804],[8.742838334096348,50.09276099826198],[8.743878942831998,50.09286370568228],[8.744826163604984,50.093462827913925],[8.746813993113562,50.094087618833356],[8.748815163760156,50.094190323410515],[8.74938883267933,50.09505474487622],[8.749388842621585,50.09567095697736],[8.750242675430826,50.096578143146274],[8.74820152164844,50.099419410921314],[8.745986892799579,50.10020671943329],[8.744532708796214,50.10120795178568],[8.744652806274075,50.101926787080515],[8.74358551526251,50.102542910420055],[8.742371471737414,50.10295365491061],[8.741957896469728,50.103775133325314],[8.741957896469728,50.10435700534583],[8.74090394659612,50.1042799932782],[8.740917287734078,50.10457948395597],[8.739503127143593,50.104536699688],[8.739489786005663,50.10472495018115],[8.737783500716802,50.10458726166391],[8.73793149920644,50.105349494286],[8.73013447857906,50.10525398910556],[8.725678433200414,50.10839779200745],[8.745434090769066,50.1158275491014],[8.748031769802509,50.12225695262714],[8.74572978587807,50.122780662517016],[8.74483897571892,50.124161364760226],[8.747289829601556,50.124780318114745],[8.743873480295093,50.12630388153474],[8.743650455691522,50.12701799070015],[8.742387784520133,50.12701794807873],[8.741942509930453,50.12963641803631],[8.740686627957672,50.12937080099556],[8.744316580172693,50.134118918123846],[8.748034104716538,50.13576490432382],[8.745378764359259,50.13856396845196],[8.746057204380378,50.138961239156856],[8.741040824492643,50.14495631340688],[8.744227964905434,50.145599328077424],[8.745083173331011,50.147982268086594],[8.744315624330966,50.14837941904233],[8.746027071352074,50.148700831443136],[8.741185151624308,50.15582278159883],[8.742275561091816,50.156294959491476],[8.739312227678738,50.16027651861515],[8.73557365344567,50.16284056010056],[8.733109175589021,50.162349938774526],[8.730643245002824,50.16229574728487],[8.729026561717689,50.162896551831466],[8.722326155091707,50.16365073351761],[8.713334926867816,50.16844481820141],[8.709827679837929,50.17276656463534],[8.709332188626718,50.1783940873855],[8.711921677780367,50.18844053140978],[8.683010363863445,50.21250294017989],[8.672344050378172,50.217388470274926]]],"type":"Polygon"},"id":2}]};
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[8.671124596717704,50.216076825734746],[8.669035375935891,50.21705828187038],[8.659652317869131,50.208456991459],[8.658933680317233,50.209133227509255],[8.65825737820694,50.209728328232245],[8.653861525124881,50.206373953539014],[8.646464729934735,50.202505354759666],[8.642364978147128,50.2027758865126],[8.641730995558902,50.20220777070469],[8.633362227161541,50.194550941171855],[8.624866815065559,50.18957204650607],[8.623810105644822,50.18913903999439],[8.622161695956805,50.18805656397274],[8.619583490305217,50.18581041371027],[8.617042635229495,50.183211981793505],[8.600402521849958,50.15292899343095],[8.599404613564502,50.15242188006789],[8.599542256087545,50.151253294016215],[8.593102894629567,50.13943776123597],[8.583467918082363,50.13560012251787],[8.581940833352235,50.13271207941082],[8.576790418034221,50.13043767551275],[8.571696534481163,50.1294636219061],[8.570763608875467,50.12952082729194],[8.5691005675763,50.12942721844331],[8.56839269542175,50.12955911140148],[8.560113205153982,50.12597179130145],[8.551906209125093,50.12245642252546],[8.53558910226252,50.116384415239736],[8.533466603290123,50.116747349995904],[8.530070604933314,50.11559048586909],[8.529999854967087,50.11456970019091],[8.521969733852444,50.111711384515274],[8.523030974786508,50.11123497509996],[8.524516724068178,50.105948857536674],[8.525931723383593,50.103748027140085],[8.521213128770256,50.097390994555894],[8.522847801374013,50.09735604372082],[8.523447171809494,50.097041447450806],[8.524482428781567,50.09623764638539],[8.520777163869269,50.09448986491546],[8.519905362266087,50.09396550510931],[8.514020499458326,50.088896556939716],[8.513584531336903,50.08791765982659],[8.51505579052224,50.08526055659266],[8.516145577867746,50.08543537106209],[8.519469353882243,50.08207878996481],[8.52204644465121,50.08098692717596],[8.525670486816125,50.08383058967084],[8.529083644699,50.082058782523745],[8.530834965295867,50.08150097845137],[8.53004239685012,50.080770901549926],[8.532532289333943,50.07874509954368],[8.534732607491463,50.07842102842881],[8.536139368282107,50.07733305937907],[8.537618270649403,50.07670804471687],[8.53754612907133,50.0761524692887],[8.540864641701745,50.075110748009024],[8.54356995091257,50.071128849206275],[8.54462431453561,50.07138077701623],[8.547724512610102,50.06912560751445],[8.549357283596237,50.06754692576408],[8.55041408024914,50.065083814867734],[8.550000721877012,50.061954239333005],[8.550930781299456,50.061450052743226],[8.551302805068616,50.06053454249377],[8.549566694155601,50.0594995974634],[8.550598261660156,50.055211048056066],[8.549862990785755,50.055109993194094],[8.551701010101965,50.05180592555283],[8.553538647687503,50.04961437098021],[8.552751010565373,50.04934463112389],[8.553118556808016,50.04887257428069],[8.578322722701358,50.05349177091529],[8.5842034508469,50.05352551188372],[8.60007161697692,50.052580098089834],[8.60116268913471,50.05186462044232],[8.601869535450739,50.05109256700425],[8.604992117695208,50.05070653259123],[8.606904873154406,50.05171881077938],[8.610780774968504,50.05213496076871],[8.621489932960088,50.05168982344759],[8.62620642069794,50.05204358383264],[8.65185112918357,50.05921515812037],[8.666008920119651,50.06067993892276],[8.695423891345683,50.06098384934589],[8.724997737035238,50.061742388260456],[8.725064711746683,50.06233356865735],[8.724930762322543,50.06274201631226],[8.724662863472957,50.063204202885714],[8.724311246233697,50.06355890118914],[8.723808935892094,50.06389210023639],[8.723088957735541,50.06415005919985],[8.722469441646666,50.064279038161345],[8.722469441646666,50.06507440076021],[8.723942885316347,50.06511739295729],[8.724880531287994,50.06540758928037],[8.725332610596297,50.065837506532006],[8.72601910139656,50.066245924351676],[8.727241386976146,50.06666508560642],[8.72811205823507,50.06806226595401],[8.728379957084712,50.068900554626055],[8.728564137543344,50.06923371656808],[8.730425117537322,50.07064027081],[8.727796360080987,50.07166120659684],[8.7260215302054,50.072144800172936],[8.725971299170851,50.07297227120284],[8.728164720998421,50.07379972795377],[8.732266851058768,50.07496027990635],[8.734326323460834,50.07587366750184],[8.734142143002146,50.0769589642596],[8.73435981081721,50.078033491302335],[8.73377378208474,50.07881788083708],[8.73332172995734,50.07977418197507],[8.73288639432846,50.080193225779425],[8.731563643761177,50.080644499626544],[8.73196549203496,50.08192308579038],[8.732216647205064,50.08220243621156],[8.73245105869833,50.082492529156326],[8.733355217313658,50.08370660280329],[8.734356753277979,50.08443813141443],[8.735528810742892,50.08624304147642],[8.735982695322093,50.08662253061388],[8.736786391868378,50.08694482627848],[8.737791012552776,50.08796541491793],[8.738410528641623,50.08834141578066],[8.739431893002944,50.08926529108513],[8.739635227004385,50.08973614216612],[8.741092593352647,50.09083555840516]Line truncated
L.geoJSON(geojson_F_zone_1, {color: "#0000FF", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_hh_elbtunnel =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"Elbtunnel (A7) - Zone ~100m","source":"Wikipedia Neuer Elbtunnel portals"},"geometry":{"coordinates":[[[9.92632098832871,53.54047258971503],[9.91614138086612,53.54046413646645],[9.911680682455916,53.54247420948778],[9.921057686807025,53.542405998114404],[9.92632098832871,53.54047258971503]]],"type":"Polygon"},"id":0}]}
L.geoJSON(geojson_hh_elbtunnel, {color: "#FF0000", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_flughafen =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"zone":"terminal_delivery_zone"},"geometry":{"coordinates":[[[10.006378705124593,53.62963816381066],[10.007905203594587,53.62914923043443],[10.008088425929655,53.63453431174195],[10.005141954359193,53.63415407242004],[10.006378705124593,53.62963816381066]]],"type":"Polygon"}},{"type":"Feature","properties":{"zone":"cargo_main_entry_zone"},"geometry":{"coordinates":[[[9.994947163056137,53.617992833161665],[9.995264284782824,53.61783410216071],[9.995826249969532,53.618043089040924],[9.996606357611213,53.61839308019305],[9.99644745923931,53.61858011510702],[9.998661448061007,53.61941768894296],[9.997378556369632,53.62048561932081],[9.996138264119642,53.620099721477715],[9.995033417188044,53.619744721782304],[9.99355304426953,53.61920775787777],[9.994947163056137,53.617992833161665]]],"type":"Polygon"}},{"type":"Feature","properties":{"zone":"cargo_secondary_entry_zone"},"geometry":{"coordinates":[[[9.99661292706563,53.62159131904289],[9.997112433940044,53.62058405568695],[9.9976109179167,53.620727292262735],[9.997549166885953,53.621165402406824],[9.997411925492319,53.62164754558942],[9.996986865279656,53.62168512827765],[9.99661292706563,53.62159131904289]]],"type":"Polygon"}}]};
L.geoJSON(geojson_flughafen, {color: "#0000FF", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_hh_innenstadt =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"Hamburger Innenstadt (grob)","note":"grob gesetztes Polygon; bitte bei Bedarf verfeinern","source":"manuell gesetzt (keine amtlichen Grenzen)"},"geometry":{"coordinates":[[[9.973668384655538,53.54984606694394],[9.97441157081683,53.54970722159386],[9.974837136956756,53.549627600952405],[9.97516915778882,53.54958767860664],[9.975762972670848,53.54953137724577],[9.976410242015735,53.54949215004591],[9.978287469391432,53.54946356231572],[9.980144515573809,53.54920550200524],[9.984595590769475,53.54824272740052],[9.98929463049081,53.54736795648198],[9.989680791607825,53.547283807488505],[9.99009466445951,53.54726551921132],[9.990866986695043,53.547248151982],[9.992362913335143,53.547286089988035],[9.995115652051274,53.547501811483315],[9.996047661691428,53.547572095420676],[9.996946311730593,53.547631367760104],[9.998802917766316,53.54769265243259],[9.999213486393467,53.54770668358461],[9.999731547068436,53.54770750099878],[10.000018377073525,53.547706808547986],[10.000238487876405,53.54772373451452],[10.000767668418371,53.54770913581133],[10.002010620766104,53.547579564378125],[10.002229619951862,53.54754717148402],[10.00245603238002,53.54752138559252],[10.002879204259969,53.54752266927129],[10.003803108650352,53.54767280855798],[10.004068710968047,53.54771737963346],[10.00435284639747,53.54776415298721],[10.004633275204544,53.54780652170371],[10.00487663778816,53.54789734094301],[10.005198656450109,53.54821393437482],[10.005441891637298,53.5484532958936],[10.005599851043243,53.548708363817646],[10.005701590573441,53.54895508073502],[10.005749795580696,53.549241478434574],[10.005779001749538,53.54947447199817],[10.005861143104667,53.5497640764722],[10.005830786279937,53.5506758063404],[10.005630784696972,53.551335912832705],[10.005529156225208,53.551666505013436],[10.005419798731895,53.552199134366894],[10.005153790112999,53.55269664589457],[10.004524517486587,53.55321252709015],[10.004142581302817,53.553433848490386],[10.0036236810103,53.553733227622466],[10.00296739583549,53.554153090681396],[10.002302887331535,53.55457649922054],[10.001572347594617,53.555024046159076],[9.999837770729393,53.55581625790974],[9.99788986217841,53.55644553419401],[9.993239012030042,53.55739894333752],[9.99270249919266,53.557494434091794],[9.992379274372501,53.557538643041966],[9.991692198445989,53.55765119369749],[9.99041961231308,53.55783406317032],[9.990035978154083,53.557913826390426],[9.98972343999827,53.55798152349686],[9.989179616265169,53.55805658675733],[9.98863800879781,53.558101449616004],[9.988258906485969,53.5581221802923],[9.987846025318031,53.558097277693996],[9.986886249192242,53.558014350190675],[9.986154501962854,53.557960445591036],[9.98536524156211,53.55790201607438],[9.98485020861393,53.557828503728345],[9.984020363256398,53.557643654643],[9.983236222474297,53.55741958997176],[9.982678515168054,53.55722121099015],[9.982116957127124,53.55699934552819],[9.98153255098423,53.5566977563856],[9.980972573588563,53.55638700120738],[9.980070898663671,53.55577879927972],[9.979611657408306,53.55548622288498],[9.979108033023863,53.55521122351478],[9.978907718588212,53.55506723616047],[9.978652277140089,53.55487023722726],[9.978243547273658,53.554537864519375],[9.977847733363973,53.55422031394282],[9.977444522268588,53.553896904031035],[9.976666994261917,53.55325213397178],[9.976015248789828,53.55259365672907],[9.975350436033958,53.55192662102961],[9.975025426844677,53.55158577871039],[9.97487525089782,53.55141975218203],[9.97471521203273,53.55124640110453],[9.973969962330113,53.5503271031599],[9.973668384655538,53.54984606694394]]],"type":"Polygon"}},{"type":"Feature","properties":{},"geometry":{"coordinates":[[[10.006675904930063,53.550398408836884],[10.016372012347631,53.552181685836445],[10.017131934895787,53.55230766531928],[10.017701438086021,53.55247606704266],[10.020816045294737,53.55320880848055],[10.022965952556817,53.55354488493812],[10.025591908211197,53.55382439962182],[10.026739277915965,53.55613412839881],[10.02514432625178,53.55717911975816],[10.023335152811605,53.55811099807722],[10.02257923643776,53.558466718722144],[10.02150198739993,53.55914056206383],[10.0195498098904,53.56022670446253],[10.01926562111844,53.56044376594163],[10.018767210570603,53.56068910347332],[10.01743715560023,53.56140598509529],[10.016946135920142,53.56174821080039],[10.016217092044343,53.5620056109253],[10.0155265284592,53.562290771922505],[10.015276309634931,53.5621730159159],[10.014371230854186,53.561683025696134],[10.013394157977626,53.56095751586433],[10.013003806520011,53.56073437139586],[10.01265391506465,53.56053443673939],[10.012351628446938,53.56036277742584],[10.011154383190494,53.55985993404058],[10.006317797321643,53.55791925345237],[10.003361602601224,53.556798617089335],[10.002073924598083,53.55632313467318],[10.001632406162615,53.55609246330339],[10.001431935010174,53.55576992277091],[10.002129718297493,53.5553227977624],[10.0042689782Line truncated
L.geoJSON(geojson_hh_innenstadt, {color: "#0000FF", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_hh_stadtgebiet =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"hamburg"},"geometry":{"coordinates":[[[9.760067349700657,53.624275858906735],[9.76357432062714,53.62492097304424],[9.763803172584701,53.62735338528314],[9.769865411150183,53.62757745755556],[9.770992304298519,53.63122384219838],[9.771448403690778,53.63130516969489],[9.768508873353616,53.62246938819586],[9.770645169466592,53.61608054008466],[9.785960851449197,53.611428237066946],[9.788851415406466,53.611167382357664],[9.78888529562411,53.61057695353054],[9.79107260320356,53.60863379741506],[9.796397259844785,53.61027117821314],[9.799071110506572,53.607986912383986],[9.797151367700783,53.60570249932165],[9.79473803980709,53.60520672248691],[9.792261375814107,53.60489884661085],[9.792159815529299,53.604290325555894],[9.78971481958471,53.603944871694765],[9.79128510978103,53.60118696538056],[9.79741559909817,53.5968505256351],[9.79753305546757,53.59603881092431],[9.79854182513576,53.595971248864714],[9.799297250409133,53.59571574412905],[9.801305573916341,53.59495684839321],[9.802483909942461,53.59401354462677],[9.803725582067813,53.59329578208232],[9.80433389320384,53.59346139291454],[9.804625523845699,53.59377736643451],[9.805747141969885,53.592980872274325],[9.806805423994781,53.592597879643215],[9.806768560682826,53.59228299157357],[9.811270867204431,53.58929426635339],[9.815899845922337,53.58645591891511],[9.821167629130922,53.5851027594048],[9.821261178929623,53.58480306118162],[9.821798081421065,53.584616157941156],[9.822745214205373,53.58450554117431],[9.823436093896786,53.584246710149586],[9.82475451717805,53.58421783385095],[9.825122898976959,53.584696535860544],[9.825807961269977,53.585100040696766],[9.829265776052633,53.58553139460912],[9.832596918637735,53.586658304763304],[9.83286225782193,53.587032265200776],[9.83415296937711,53.58736662888843],[9.835087653915252,53.58728342993136],[9.836767014696063,53.587793774955244],[9.836799636905905,53.58896205785079],[9.836657607763827,53.58939582000217],[9.836008889829664,53.58975439350889],[9.836627204302818,53.590933898371176],[9.83692782269163,53.591452694362644],[9.83695519799707,53.59197149035411],[9.837310542544806,53.592127847795275],[9.837870819407028,53.59204093815711],[9.838888906971587,53.59259691918414],[9.839729643609948,53.59253309674622],[9.839971103935127,53.59326733180509],[9.83932170365632,53.594001592016994],[9.83965193140096,53.59504938863227],[9.84510183082304,53.59497396785746],[9.844531411926233,53.59646132604032],[9.846526804631342,53.5968336591241],[9.84935535380751,53.59742434520811],[9.849077411562597,53.597773196388644],[9.849708535192244,53.597798485916925],[9.852926944886985,53.597413038979376],[9.854643242250472,53.598453718771765],[9.857830385558726,53.59935658862968],[9.857661820311272,53.60215847132095],[9.860336370450572,53.604585621937076],[9.861508330596333,53.60724629630515],[9.868325617138716,53.609331614470996],[9.869209283113552,53.613605611154206],[9.879314844624597,53.61983393151645],[9.88325145899952,53.62093901825759],[9.8848816849674,53.622043650730845],[9.888941821299863,53.62296814249503],[9.885696902741003,53.624952595523126],[9.888963311631903,53.62821285154976],[9.896280456140996,53.63164246645167],[9.896655069855184,53.63497707471868],[9.900898664334996,53.63649921829541],[9.899343470472104,53.640031692476754],[9.90579575525453,53.64182032917202],[9.905596233235713,53.64509520453397],[9.906087216961907,53.6452623127612],[9.905505816578767,53.64597599817],[9.904451970350067,53.64640962399085],[9.905205319914842,53.64719951546161],[9.905698242465633,53.64930330690554],[9.9062841632325,53.650718064561254],[9.907163987648207,53.65095915709533],[9.906981778869525,53.65245836675142],[9.909238520168296,53.65305012617218],[9.91045079637262,53.65248927682795],[9.913049266626782,53.6529748470346],[9.914453882366788,53.65346037765049],[9.914893601572055,53.65493190163845],[9.917494760447369,53.65425841863765],[9.919724984453,53.65458941850777],[9.921159138357584,53.65562808325378],[9.921384583038034,53.65518651087146],[9.921304571195556,53.654696778908196],[9.922072736947875,53.65450379080605],[9.921884999389498,53.65396026528973],[9.92535741075763,53.65302925127111],[9.929915187820836,53.65328930093357],[9.930807193442998,53.652707417288894],[9.932856431273791,53.65280116654371],[9.935361514638068,53.65204429518999],[9.936656700400011,53.65320497575655],[9.937405133182349,53.652252970466385],[9.94531451585698,53.65287256508422],[9.948089151051398,53.65125288922164],[9.951660526388721,53.65049811702627],[9.953115225616571,53.65152443372749],[9.955244859373046,53.650869107986324],[9.958333670587535,53.650420507799154],[9.959453045919346,53.649833475644165],[9.961008349384656,53.64963401436064],[9.963435645287364,53.650054672160934],[9.964327116151896,53.649436058366845],[9.964956984763393,53.64855905696203],[9.967126441107201,53.64961401502655],[9.968990744182113,53.65028138718317],[9.973819573130182,53.6481130872848],[9.97592302981739,Line truncated
L.geoJSON(geojson_hh_stadtgebiet, {color: "#036B03", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_hh_uke =
{"type":"FeatureCollection","licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright","features":[{"type":"Feature","properties":{"place_id":131480586,"osm_type":"way","osm_id":4482267,"place_rank":30,"category":"amenity","type":"hospital","importance":0.4400317604083171,"addresstype":"amenity","name":"Universitätsklinikum Eppendorf","display_name":"Universitätsklinikum Eppendorf, 52, Martinistraße, Eppendorf, Hamburg-Nord, Hamburg, 20251, Deutschland","address":{"amenity":"Universitätsklinikum Eppendorf","house_number":"52","road":"Martinistraße","suburb":"Eppendorf","city_district":"Hamburg-Nord","city":"Hamburg","ISO3166-2-lvl4":"DE-HH","postcode":"20251","country":"Deutschland","country_code":"de"}},"bbox":[9.9682758,53.5871576,9.9810918,53.594341],"geometry":{"type":"Polygon","coordinates":[[[9.9682758,53.5883686],[9.9683983,53.5876837],[9.9694151,53.5880656],[9.9695568,53.587927],[9.9700181,53.5880854],[9.9707602,53.5873607],[9.9709682,53.5871576],[9.9723055,53.5876641],[9.9724767,53.5877292],[9.972184,53.5880172],[9.9733108,53.5884487],[9.9730731,53.5886715],[9.9736268,53.5888816],[9.9741832,53.5883783],[9.9755551,53.5889274],[9.9756329,53.5889586],[9.9759383,53.5890896],[9.9764983,53.5893215],[9.9766436,53.5893546],[9.9781746,53.5900056],[9.9791028,53.5904073],[9.9810918,53.5912729],[9.9800578,53.5920618],[9.9791527,53.5928417],[9.9781993,53.5935823],[9.9780801,53.5936803],[9.9779758,53.5937863],[9.9779525,53.5939946],[9.9779558,53.5940224],[9.9776394,53.5940194],[9.9775134,53.5940176],[9.9774584,53.5940169],[9.9769966,53.5940106],[9.9769664,53.5940102],[9.9769375,53.5940098],[9.9768821,53.5940091],[9.9768392,53.5940085],[9.976788,53.5940078],[9.9767388,53.5940071],[9.9765687,53.5940048],[9.9763501,53.5940018],[9.9763282,53.5940015],[9.9760653,53.5939979],[9.9755644,53.593992],[9.9754053,53.5942525],[9.9754066,53.594341],[9.9750864,53.5943384],[9.9746227,53.5942634],[9.9737254,53.5941234],[9.9731578,53.5940356],[9.9727872,53.5939774],[9.9723841,53.5938949],[9.9720928,53.593875],[9.9718187,53.5938489],[9.9717769,53.5938442],[9.9718432,53.5935037],[9.9715835,53.5934481],[9.9717201,53.5932134],[9.9716485,53.5931978],[9.9717086,53.5931076],[9.9718691,53.5931387],[9.9719948,53.59296],[9.9708988,53.5927318],[9.9713908,53.5920825],[9.9715272,53.5919096],[9.9715432,53.5918813],[9.9716136,53.5917288],[9.9716007,53.5915889],[9.9715844,53.5915407],[9.9715543,53.5914972],[9.9716231,53.591476],[9.9715932,53.5914352],[9.9715687,53.5914017],[9.9714909,53.5914151],[9.9714419,53.5913625],[9.9713224,53.5912857],[9.9711826,53.5912285],[9.9709983,53.5911804],[9.970443,53.5911206],[9.970567,53.5906896],[9.9701146,53.5906397],[9.9701431,53.5905013],[9.9704264,53.5895695],[9.970674,53.5892645],[9.9682758,53.5883686]]]}}]};
L.geoJSON(geojson_hh_uke, {color: "#036B03", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_hh_umland =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"hamburg_buffer_20km_ext_noHorst_ElmKakiSafe"},"geometry":{"coordinates":[[[9.524233879938086,53.71299136035548],[9.58990627503375,53.755022871255186],[9.65013631037318,53.77686881347298],[9.692673827790125,53.789984339969514],[9.707387178733038,53.79667981260086],[9.875795018179758,53.838051492358815],[9.906855110764248,53.85555683020597],[9.936225362965395,53.86472250177539],[9.99711314022004,53.86472250177539],[10.036797047082434,53.86218419255723],[10.107583070611648,53.85660842942968],[10.114219890412881,53.86250329758184],[10.121113955870591,53.86534750947649],[10.127595275473853,53.87035388505996],[10.156436157658794,53.87206855801907],[10.170539028811765,53.86919254418172],[10.183204783477276,53.87035834784148],[10.192153317040964,53.862998162534645],[10.209143034569648,53.86137965681722],[10.225792302342851,53.85880948568904],[10.241948353211576,53.85531105946166],[10.257462945591639,53.85091625038697],[10.291622945591639,53.84002052741568],[10.306694297588459,53.834632690555296],[10.32079908074171,53.82839847865062],[10.33380163419561,53.821377489904414],[10.345576898421793,53.813636875943686],[10.356011618051173,53.805250710399356],[10.37005077127456,53.8032705959165],[10.393041067813819,53.796955139741115],[10.405760014060451,53.781101366750505],[10.529826944410376,53.503978758501404],[10.51840086554081,53.48038470421119],[10.52002776659964,53.46989394374736],[10.519913358373849,53.45935617455075],[10.518058750733935,53.4488736278627],[10.514481935168595,53.43854807441931],[10.52144264331875,53.43104350013549],[10.507611935168592,53.42269809388385],[10.502038744027,53.41212750203828],[10.494663608834058,53.40195425156393],[10.485565455953047,53.39228753774798],[10.474841650937366,53.3832311909735],[10.462606956555195,53.37488254932532],[10.448992304634647,53.36733139897627],[10.370102379297963,53.324760942422884],[10.35645169267122,53.31850029070823],[10.341861200612355,53.313047950287505],[10.326464756078702,53.308454259351336],[10.310403605823614,53.30476164350999],[10.293825094600853,53.30200421620274],[10.276881313426017,53.3002074570381],[10.264861313426017,53.29928515881902],[10.248863603493003,53.29848988847145],[10.232811012516473,53.29855148342205],[10.182700923643235,53.292834637090806],[10.167819866434904,53.293582068842085],[10.155989033636518,53.295030305138575],[9.904262562945442,53.319881583796935],[9.887398176027567,53.32160793373769],[9.870885099311224,53.32428489978801],[9.853408244887945,53.317237020508855],[9.838584675099437,53.329365117310125],[9.794103576514342,53.343987705399],[9.77886718726562,53.348777494528214],[9.764468590358039,53.3544156018446],[9.751040036958694,53.36084991594905],[9.738704868381397,53.3680209913394],[9.703296831411848,53.37031123131649],[9.684293868381397,53.40282070417833],[9.67042623889058,53.40179979638662],[9.656547341343723,53.40513166542029],[9.612572617502796,53.41614748115032],[9.61053634480787,53.43843197330968],[9.611370704948081,53.47119624838605],[9.60386012174409,53.480595832565264],[9.560083279703381,53.5249851030008],[9.560888242426744,53.53811661125377],[9.546352671044877,53.543788044786986],[9.53941753616278,53.557407790681125],[9.54291391808061,53.569716087636],[9.554031430905717,53.57943818255762],[9.556594704426445,53.589763102717846],[9.565778704426444,53.61731960597159],[9.56897478529524,53.62528493359241],[9.542135439645614,53.65510273272835],[9.542713922202072,53.66543792074912],[9.53944566061927,53.685746054094054],[9.524233879938086,53.71299136035548]]],"type":"Polygon"}}]};
L.geoJSON(geojson_hh_umland, {color: "#0000FF", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_sylt_hindenburgdamm =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"Hindenburgdamm (grob)","note":"grob gesetztes Polygon; bitte bei Bedarf verfeinern"},"geometry":{"coordinates":[[[8.566872781709549,54.87897887661524],[8.572400100033594,54.87997930760147],[8.57476208083162,54.882957599962204],[8.577411220160732,54.889973714563894],[8.567682792582417,54.8904839691587],[8.556768705628816,54.88965630427172],[8.547822443496708,54.88941478622619],[8.523678241880086,54.886836771846745],[8.52246858658493,54.87793014753983],[8.528711430157355,54.878116718775075],[8.536676258029853,54.878832567143384],[8.544194492054944,54.878845548681824],[8.552513180728136,54.878847271504185],[8.56085871137642,54.878437942967174],[8.566872781709549,54.87897887661524]]],"type":"Polygon"}}]};
L.geoJSON(geojson_sylt_hindenburgdamm, {color: "#FF0000", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
let geojson_zone_glueckstadt_faehre =
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[9.355112257530038,53.79722484060912],[9.369807167482776,53.77491470870953],[9.407569668598626,53.78238638746916],[9.395437824334095,53.80539899729234],[9.355112257530038,53.79722484060912]]],"type":"Polygon"}}]};
L.geoJSON(geojson_zone_glueckstadt_faehre, {color: "#FF0000", weight: 2, opacity: 0.7, fillOpacity: 0.1}).addTo(map);
</script>
</body>
</html>
+119
View File
@@ -0,0 +1,119 @@
<?php
// Tobedone:
// - Adressen checken ob sie von Google Maps gefunden wurden
// - Problem, wenn Reihenfolge nicht eingehalten (Station in der Mitte unerledigt, die davor und danach jedoch schon erledigt)
include_once("../include/caglobal.inc.php");
include_once("../include/ranking.inc.php");
$country_codes = array(
"AL" => "Albania",
"AT" => "Austria",
"BE" => "Belgium",
"BG" => "Bulgaria",
"CH" => "Switzerland",
"CZ" => "Czech Republic",
"DE" => "Germany",
"DK" => "Denmark",
"ES" => "Spain",
"FI" => "Finland",
"FR" => "France",
"GB" => "United Kingdom",
"GR" => "Greece",
"HR" => "Croatia",
"HU" => "Hungary",
"IE" => "Ireland",
"IS" => "Iceland",
"IT" => "Italy",
"LI" => "Liechtenstein",
"LT" => "Lithuania",
"LU" => "Luxembourg",
"LV" => "Latvia",
"MC" => "Monaco",
"MK" => "Macedonia",
"NL" => "Netherlands",
"NO" => "Norway",
"PL" => "Poland",
"PT" => "Portugal",
"RO" => "Romania",
"SE" => "Sweden",
"SI" => "Slovenia",
"SK" => "Slovakia",
"UA" => "Ukraine");
function showInGoogleMaps($jb_id) {
global $usr_id, $country_codes;
// gespeicherte Job-Daten holen
list($hq_id, $cr_id, $cr_sid) = getFieldsValueFromId("job", "jb_id", $jb_id, array("hq_id", "cr_id", "cr_sid"));
// if ($hq_id != 3 && $hq_id != 2)
// return "";
$debug_text = "\$cr_id = " . $cr_id . ", \$cr_sid = " . $cr_sid . "\n";
$points = "";
$points_txt = "";
if ($cr_id != 0) {
$locatingStateArray = checkLocatingState($cr_id);
$debug_text .= "\$locatingStateArray = " . json_encode($locatingStateArray) . "\n";
if ($locatingStateArray[0] == "0") {
$points = "/" . $locatingStateArray[2] . "," . $locatingStateArray[1];
$points_txt = "(" . $locatingStateArray[2] . ", " . $locatingStateArray[1] . ")";
}
}
$debug_text .= "\$points = " . $points . "\n";
$i = 1;
$prevStopMap = "";
$prevStopText = "";
do {
$tourFound = 0;
// gespeicherte Tour-Daten holen
if (existsEntry("tour", array("jb_id", $jb_id, "tr_sort", $i))) {
$tourFound = 1;
list($csc_id, $tr_comp, $tr_person, $ad_street, $tr_hsno,
$ad_zipcode, $ad_city, $ad_country, $tr_remark, $tr_status, $tr_ware_from_to, $tr_commission_no, $tr_mediationarea_id, $tr_status, $tr_sign, $tr_signname, $tr_finishtime, $tr_id) =
getTourData($jb_id, $i, "tour");
$debug_text .= "\$tr_sort = " . $i . ", \$tr_status = " . $tr_status . "\n";
$country_code = $country_codes[($ad_country == "D" ? "DE" : $ad_country)];
if ($country_code == "Germany")
$country_code = "";
$endStopMap = "/" . str_replace("/", "%2F", my_str_check($ad_street)) . " " . str_replace("/", "%2F", $tr_hsno) . ", " . str_replace("/", "%2F", $ad_zipcode) . " " .
str_replace("/", "%2F", my_str_check($ad_city)) . ($country_code == "" ? "" : "," . $country_code);
$endStopText = my_str_check($ad_street) . " " . $tr_hsno . ", " . ($country_code == "" ? "" : $country_code . " ") . $ad_zipcode . " " . my_str_check($ad_city);
if ($tr_status == 1 && $points == "") {
$prevStopMap = $endStopMap;
$prevStopText = $endStopText;
}
$i++;
}
} while ($tourFound == 1 && $tr_status == 1);
$debug_text .= "\$prevStopMap = " . $prevStopMap . "\n";
$debug_text .= "\$endStopMap = " . $endStopMap . "\n";
$retStr = "";
if (($points != "" || $prevStopMap != "") && $endStopMap != "") {
$points .= $prevStopMap . $endStopMap;
$points_txt .= $prevStopText . " &minus;&gt; " . $endStopText;
$retStr = "<a href=\"https://www.google.de/maps/dir" . $points . "/" . "\" target=\"_blank\">" . $points_txt . "</a>";
} elseif ($points == "" && $prevStopMap == "") {
$retStr .= "<i>Keine&nbsp;aktuellen&nbsp;GPS&minus;Daten&nbsp;von&nbsp;" . $cr_sid . "&nbsp;verfügbar&nbsp;und&nbsp;erste&nbsp;Station&nbsp;noch&nbsp;nicht&nbsp;erledigt</i>";
} elseif ($endStopMap == "") {
$retStr .= "<i>Keine&nbsp;unerledigte&nbsp;Station&nbsp;mehr&nbsp;vorhanden</i>";
}
$debug_text .= "\$retStr = " . $retStr . "\n";
writeLog_showInGoogleMaps("\$jb_id = " . $jb_id . ", \$usr_id = " . $usr_id . "\n" . $debug_text);
return $retStr;
}
function writeLog_showInGoogleMaps($log_text) {
$today = getdate();
// echo $log_text . "\n"; die();
$fileHandle = @fopen("../log/showInGoogleMaps_" . $today['year'] . sprintf("%02d", $today['mon']) . ".log", 'a');
@fwrite($fileHandle, "[" . date("Y-m-d H:i:s") . "] " . $log_text . "\n");
@fclose($fileHandle);
return;
}
?>
File diff suppressed because it is too large. Load diff