From 6bc81d69e7a4f33a1a08761d24cfc20f69427410 Mon Sep 17 00:00:00 2001 From: Mihkel Oviir Date: Wed, 14 Feb 2018 11:13:32 +0200 Subject: [PATCH] [#36] Map features to geotrip --- vendor/ol3/ol-custom.json | 2 + www/src/css/app/featureinfo.css | 5 +- www/src/js/app/main.js | 9 +- www/src/js/app/map.js | 19 +- www/src/js/app/service/featureinfo.js | 38 +- www/src/js/app/service/filter.js | 10 +- www/src/js/app/service/geocache.js | 123 ++- www/src/js/app/service/geolocation.js | 1 - www/src/js/app/service/search/coordinates.js | 30 +- www/src/js/app/service/search/map-features.js | 30 +- www/src/js/app/service/search/nominatim.js | 48 +- www/src/js/app/service/search/search.js | 43 +- www/src/js/lib/ol-custom.js | 845 +++++++++--------- .../service/geocache/featureinfo_title.html | 5 +- www/src/tmpl/service/geocache/geotrip.html | 4 +- 15 files changed, 648 insertions(+), 564 deletions(-) diff --git a/vendor/ol3/ol-custom.json b/vendor/ol3/ol-custom.json index b4643ee..c67fbcb 100644 --- a/vendor/ol3/ol-custom.json +++ b/vendor/ol3/ol-custom.json @@ -67,6 +67,8 @@ "ol.Feature#getProperties", "ol.Feature#setProperties", "ol.Feature#getStyleFunction", + "ol.Feature#getId", + "ol.Feature#setId", "ol.geom.Point", "ol.geom.Point#getType", "ol.geom.Point#getCoordinates", diff --git a/www/src/css/app/featureinfo.css b/www/src/css/app/featureinfo.css index e65a58a..ce9641f 100644 --- a/www/src/css/app/featureinfo.css +++ b/www/src/css/app/featureinfo.css @@ -6,9 +6,12 @@ .popover-title a.remove-marker { position: absolute; right: 14px; - padding-left:3px; + padding-left:10px; background: #f7f7f7 } +.popover-title a.remove-marker { + right: 34px; +} .popover-title { white-space: nowrap; min-width: 240px; diff --git a/www/src/js/app/main.js b/www/src/js/app/main.js index b77e4c0..c93ab67 100755 --- a/www/src/js/app/main.js +++ b/www/src/js/app/main.js @@ -7,6 +7,7 @@ define([ 'app/map', 'app/service/store', 'app/service/search/search', + 'app/service/featureinfo', 'app/service/geocache', 'app/service/osm-edit', 'app/service/data-import', @@ -21,6 +22,7 @@ define([ Map, AppStore, Search, + FeatureInfo, Geocache, OSMEdit, DataImport, @@ -73,6 +75,11 @@ define([ app.geocoding = new Search(app.mapmodule); app.geocoding.init(); } + // featureinfo + if (app.get('settings').map.featureInfo) { + app.featureInfo = new FeatureInfo(app); + app.mapmodule.set('featureInfo', app.featureInfo); + } // geocaches app.geocache = new Geocache(app.get('settings').geocache, app.mapmodule); @@ -99,7 +106,7 @@ define([ }, onclick: function (e, coord) { var xy = ol.coordinate.format(app.mapmodule.transform('point', coord, 'EPSG:3857', 'EPSG:4326'), '{y}, {x}', 5); - app.mapmodule.addMarker(coord, {'WGS84': xy}); + app.mapmodule.addMarker(coord, {coordinates: xy}); }, closeonclick: true }, { diff --git a/www/src/js/app/map.js b/www/src/js/app/map.js index fe5dc71..a4f2509 100644 --- a/www/src/js/app/map.js +++ b/www/src/js/app/map.js @@ -6,10 +6,9 @@ define([ 'ol', 'proj4', 'templator', - 'app/service/featureinfo', 'app/service/geolocation', 'text!tmpl/map/layerswitcher.html' -], function ($, ol, proj4, Templator, FeatureInfo, GeoLocation, tmpl_layerswitcher) { +], function ($, ol, proj4, Templator, GeoLocation, tmpl_layerswitcher) { 'use strict'; @@ -33,7 +32,6 @@ define([ }); this._activeBaseLayer = null; this._el = null; - this._featureInfo = null; this._geoLocation = null; this._controls = { mouseCoordinates : null @@ -48,6 +46,10 @@ define([ return this['_' + key]; }, + set: function (key, value) { + this['_' + key] = value; + }, + // convert radians to degrees radToDeg: function (rad) { return rad * 360 / (Math.PI * 2); @@ -69,9 +71,6 @@ define([ if (this._config.scaleLine) { this.createScaleLineControl(); } - if (this._config.featureInfo) { - this._featureInfo = new FeatureInfo(this); - } this._overlay = new ol.layer.Vector({ map: this._map, source: new ol.source.Vector({ @@ -360,6 +359,7 @@ define([ layer.getSource().addFeatures([marker]); this._vectorLayers.getLayers().remove(layer); this._vectorLayers.getLayers().push(layer); + return marker; }, createMarker : function (coords, props) { @@ -369,6 +369,13 @@ define([ } else { f.setGeometry(null); } + f.setId(Date.now() + '_' + Math.random()); + if (!props) { + props = {}; + } + if (!props.name) { + props.name = 'Kaardiobjekt'; + } if (props) { f.setProperties(props); } diff --git a/www/src/js/app/service/featureinfo.js b/www/src/js/app/service/featureinfo.js index 85a886b..0f650d3 100644 --- a/www/src/js/app/service/featureinfo.js +++ b/www/src/js/app/service/featureinfo.js @@ -4,20 +4,24 @@ define([ 'jquery', 'ol', - 'app/service/search/nominatim' -], function ($, ol, Nominatim) { + 'templator', + 'app/service/search/nominatim', + 'text!tmpl/service/geocache/featureinfo_title.html' +], function ($, ol, Templator, Nominatim, tmpl_featureinfo_title) { 'use strict'; - function FeatureInfo(mapmodule) { - this._mapmodule = mapmodule; - this._map = mapmodule.get('map'); - this._geocode = new Nominatim(mapmodule); + function FeatureInfo(app) { + this._app = app; + this._mapmodule = app.mapmodule; + this._map = this._mapmodule.get('map'); + this._geocode = new Nominatim(this._mapmodule); this._tooltip = null; this._styleCache = {}; this._highlight = null; this._popup = null; this._infoHandlers = {}; + this._tmpl_featureinfo_title = Templator.compile(tmpl_featureinfo_title); this.init(); } @@ -181,7 +185,14 @@ define([ content.push(key + ': ' + prop[key]); } } - var title = ' Kaardiobjekt'; + var in_collection = $.inArray(feature, this._app.geocache.get('geotrip').getArray()); + var title = this._tmpl_featureinfo_title({ + 'type_class': 'fa fa-map-marker', + 'text': 'Kaardiobjekt', + 'trash': '', + 'icon': (in_collection > -1) ? 'fa-minus-square' : 'fa-thumb-tack' + }); + var geotrip = t._app.geocache.get('geotrip'); return { 'definition' : { 'placement': 'top', @@ -195,10 +206,19 @@ define([ e.preventDefault(); if (f[0]) { f[0].getSource().removeFeature(f[1]); + geotrip.remove(f[1]); t._popup.popover('destroy'); } - - }) + }); + $('a.cache-toggle').on('click', function (e) { + e.preventDefault(); + $(this).find('i').toggleClass('fa-thumb-tack fa-minus-square'); + if ($.inArray(f[1], geotrip.getArray()) > -1) { + geotrip.remove(f[1]); + } else { + geotrip.push(f[1]); + } + }); }, 'onHide' : function () {} }; diff --git a/www/src/js/app/service/filter.js b/www/src/js/app/service/filter.js index 31123fb..05a593a 100644 --- a/www/src/js/app/service/filter.js +++ b/www/src/js/app/service/filter.js @@ -17,10 +17,13 @@ define([ this._features = layer.getSource().getFeatures(); this._filters = { fstatus: { - //'0': 'Leidmata', - //'1': 'Leitud', + '0': 'Leidmata', + '1': 'Leitud', '2': 'Minu aare' }, + new_cache: { + 'yes': 'Uus aare (30p)' + }, type: { 'Tavaline aare': 'Tavaline aare', 'Multiaare': 'Multiaare', @@ -29,9 +32,6 @@ define([ 'Sündmusaare': 'Sündmusaare', 'Asukohata (tagurpidi) aare': 'Asukohata aare', 'Mõistatusaare': 'Mõistatusaare' - }, - new_cache: { - 'yes': 'Uus aare (30p)' } }; diff --git a/www/src/js/app/service/geocache.js b/www/src/js/app/service/geocache.js index 502f79c..ce6de04 100644 --- a/www/src/js/app/service/geocache.js +++ b/www/src/js/app/service/geocache.js @@ -125,7 +125,7 @@ define([ hash, features, json, - fset; + fset = []; this.createUi(); // todo: comment in @@ -138,25 +138,40 @@ define([ return _this.getContent(feature); }; } - // get permalink hash = window.location.hash.split('&hash='); if (hash[1]) { features = jsonpack.unpack(decodeURIComponent(hash[1])); - if (features && features.length) { + var caches = features.filter(function (feature) { + return (typeof feature.properties.fstatus !== 'undefined'); + }); + var markers = features.filter(function (feature) { + return (typeof feature.properties.fstatus === 'undefined'); + }); + if (caches && caches.length) { json = { type: 'FeatureCollection', - features: features + features: caches }; this.clearTrip(); - if (json) { - fset = this.initTrip(json); - fset && fset.forEach(function (feature) { - _this._geotrip.push(feature); + fset = this.initTrip(json); + } + if (markers && markers.length) { + markers = markers.map(function (marker) { + var feature = _this._mapmodule.addMarker(_this._mapmodule.transform('point', marker.geometry.coordinates, 'EPSG:4326', 'EPSG:3857'), marker.properties); + feature.setId(marker.id); + fset.push(feature); + }); + } + if (fset) { + features.forEach(function (item) { + var feature = fset.filter(function(f) { + return f.getId() === item.id; }); - - //this.renderTrip(); - } + if (feature && feature.length > 0) { + _this._geotrip.push(feature[0]); + } + }); } } }, @@ -184,9 +199,13 @@ define([ _this.clearTrip(); if (content.length > 0) { + // FIXME: temporary hack to fix known json false + content = content.replace('"NAVY"', 'NAVY'); try { json = $.parseJSON(content); - } catch (err) {} + } catch (err) { + console.error(err); + } } if (json) { _this.initTrip(json); @@ -219,7 +238,7 @@ define([ var id = $(this).data('id'), feature = null; _this._geotrip.forEach(function (item, i) { - if (Number(item.get('id')) === id) { + if (item.getId() === id) { _this._mapmodule.setView('center', [item.getGeometry().getCoordinates(), 16]); return; } @@ -281,25 +300,7 @@ define([ }; } - this._route = new ol.layer.Vector({ - name: 'route', - source: new ol.source.Vector(), - style: [ - new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: 'rgba(255, 255, 255, 0.6)', - width: 7 - }) - }), - new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: 'rgba(0, 0, 0, 0.3)', - width: 5 - }) - }) - ] - }); - this._mapmodule.get('vectorLayers').getLayers().push(this._route); + this.createRouteLayer(); this._layer = new ol.layer.Vector({ name: 'geocache', @@ -331,12 +332,39 @@ define([ date = new Date(feature.get('date_hidden')), test = new Date(date.getFullYear(), date.getMonth(), date.getDate()+30), newCache = (fstatus == '0' && test > today) ? 'yes' : 'no'; - feature.set('new_cache', newCache); + if (!feature.get('new_cache')) { + feature.set('new_cache', newCache); + } + if (!feature.getId()) { + feature.setId(Date.now() + '_' + Math.random()); + } }, this); this._mapmodule.get('vectorLayers').getLayers().push(this._layer); return source.features || []; }, + createRouteLayer: function () { + this._route = new ol.layer.Vector({ + name: 'route', + source: new ol.source.Vector(), + style: [ + new ol.style.Style({ + stroke: new ol.style.Stroke({ + color: 'rgba(255, 255, 255, 0.6)', + width: 7 + }) + }), + new ol.style.Style({ + stroke: new ol.style.Stroke({ + color: 'rgba(0, 0, 0, 0.3)', + width: 5 + }) + }) + ] + }); + this._mapmodule.get('vectorLayers').getLayers().push(this._route); + }, + removeLayer : function () { this._layer.getSource().clear(); this._route.getSource().clear(); @@ -365,9 +393,8 @@ define([ 'html': true, 'title': this._tmpl_featureinfo_title({ 'type_class': this._styleConfig.text[prop.type]['class'], - 'cache_url': this._config.cache_url, - 'id': prop.id, - 'name': prop.name, + 'text': ''+prop.name+'', + 'trash': '', 'icon': (in_collection > -1) ? 'fa-minus-square' : 'fa-thumb-tack' }), 'content': this._tmpl_featureinfo(prop) @@ -410,11 +437,16 @@ define([ var collection = [''],// empty element for 1 based numbering len = this._geotrip.getLength(), line = [], - _this = this; + _this = this, + prop; this._geotrip.forEach(function (item, i) { - collection.push(item.getProperties()); - line.push(item.getGeometry().getCoordinates()); + if (item) { + prop = item.getProperties(); + prop._id = item.getId(); + collection.push(prop); + line.push(item.getGeometry().getCoordinates()); + } }); if (len === 0) { this._el.find('button.btn-geotrip') @@ -440,10 +472,13 @@ define([ onUpdate: function (e) { _this.reorderTrip(); _this.renderTrip(); - } }); + if (!this._route) { + this.createRouteLayer(); + } + this._route.getSource().clear(); this._el.find('.geotrip ul li a.export-gpx').removeAttr('href'); @@ -470,7 +505,7 @@ define([ function getObj(item_id) { var obj; _this._geotrip.forEach(function (item, j) { - if (item.get('id') === item_id) { + if (item && item.getId() === item_id) { obj = item; } }); @@ -479,8 +514,10 @@ define([ for (i = 0, len = order.length; i < len; i++) { obj = getObj(order[i]); - this._geotrip.remove(obj); - this._geotrip.insertAt(i, obj); + if (obj) { + this._geotrip.remove(obj); + this._geotrip.insertAt(i, obj); + } } }, diff --git a/www/src/js/app/service/geolocation.js b/www/src/js/app/service/geolocation.js index 774f317..4f37089 100644 --- a/www/src/js/app/service/geolocation.js +++ b/www/src/js/app/service/geolocation.js @@ -85,7 +85,6 @@ define([ 'Speed: ' + (speed * 3.6).toFixed(1) + ' km/h', 'Delta: ' + Math.round(this._deltaMean) + 'ms' ].join('
'); - //this._mapmodule.get('featureInfo').setPositionInfo(position); $('#statusbar .locationinfo').html(html); }, this); diff --git a/www/src/js/app/service/search/coordinates.js b/www/src/js/app/service/search/coordinates.js index 363effb..9bce77b 100644 --- a/www/src/js/app/service/search/coordinates.js +++ b/www/src/js/app/service/search/coordinates.js @@ -4,8 +4,8 @@ define(function () { 'use strict'; - function CoordinateParser() { - + function CoordinateParser(search) { + this._mapmodule = search._mapmodule; // coordinates formats parsers this._formats = [{ /* @@ -153,6 +153,10 @@ define(function () { }, + clear : function () { + this._results = null; + }, + test : function (query) { var matches, i, len, coords; for (i = 0, len = this._formats.length; i < len; i++) { @@ -167,6 +171,28 @@ define(function () { } } return false; + }, + + find : function (query, cb, context) { + // test coordinates + var coords = this.test(query), + clone; + this._results = null; + if (coords && coords.srid) { + clone = this._mapmodule.transform('point', [coords.x, coords.y], coords.srid, 'EPSG:3857'); + this._mapmodule.addMarker(clone, {coordinates: ol.coordinate.format([coords.x, coords.y], '{y}, {x}', 5)}); + this._mapmodule.setView('center', [clone, 15]); + /*this.reverse([coords.x, coords.y], 18, function (data) { + if (data && data.place_id) { + data.boundingbox = [coords.y, coords.y, coords.x, coords.x]; + data = _this.format([data]); + _this._results = data; + } + if (typeof cb === 'function') { + cb(_this._title, _this._results, context); + } + });*/ + } } }; diff --git a/www/src/js/app/service/search/map-features.js b/www/src/js/app/service/search/map-features.js index cbd5564..cd829b2 100644 --- a/www/src/js/app/service/search/map-features.js +++ b/www/src/js/app/service/search/map-features.js @@ -3,40 +3,40 @@ define([ 'jquery' ], function ($) { - + 'use strict'; - - function MapFeatures(mapmodule) { - this._mapmodule = mapmodule; + + function MapFeatures(search) { + this._mapmodule = search._mapmodule; this._results = null; this._id = 'mapfeatures'; this._title = ' Leitud aarded'; } - + MapFeatures.prototype = { - + get : function (key) { return this['_' + key]; }, - + init : function () { - + }, - + test : function (query) { return true; }, - + clear : function () { this._results = null; }, - + find : function (query, cb, context) { var i, len, id, name, _this = this, data = [], fset = null; - + // async function setTimeout(function () { fset = _this._mapmodule.getAllFeatures(); @@ -59,7 +59,7 @@ define([ cb(_this._title, _this._results, context); } }); - + }, getResultItem : function (id) { @@ -72,6 +72,6 @@ define([ return null; } }; - + return MapFeatures; -}); \ No newline at end of file +}); diff --git a/www/src/js/app/service/search/nominatim.js b/www/src/js/app/service/search/nominatim.js index 6713ba0..9d84137 100644 --- a/www/src/js/app/service/search/nominatim.js +++ b/www/src/js/app/service/search/nominatim.js @@ -1,16 +1,12 @@ /*jslint browser: true, regexp: true, nomen: true, plusplus: true, continue: true */ /*global define*/ -define([ - 'jquery', - 'app/service/search/coordinates' -], function ($, CoordinateParser) { +define(['jquery'], function ($) { 'use strict'; - function Nominatim(mapmodule) { + function Nominatim(search) { this._url = 'https://nominatim.openstreetmap.org'; - this._mapmodule = mapmodule; - this._coordinateParser = new CoordinateParser(); + this._mapmodule = search._mapmodule; this._results = null; this._id = 'nominatim'; this._title = ' Leitud aadressid'; @@ -40,35 +36,17 @@ define([ find : function (query, cb, context) { // test coordinates - var coords = this._coordinateParser.test(query), - _this = this, - clone; + var _this = this; this._results = null; - if (coords && coords.srid) { - clone = this._mapmodule.transform('point', [coords.x, coords.y], coords.srid, 'EPSG:3857'); - this._mapmodule.addMarker(clone, {'WGS84': ol.coordinate.format([coords.x, coords.y], '{y}, {x}', 5)}); - this._mapmodule.setView('center', [clone, 15]); - this.reverse([coords.x, coords.y], 18, function (data) { - if (data && data.place_id) { - data.boundingbox = [coords.y, coords.y, coords.x, coords.x]; - data = _this.format([data]); - _this._results = data; - } - if (typeof cb === 'function') { - cb(_this._title, _this._results, context); - } - }); - } else { - this.geocode(query, function (data) { - if (data.length > 0) { - data = _this.format(data); - _this._results = data; - } - if (typeof cb === 'function') { - cb(_this._title, _this._results, context); - } - }); - } + this.geocode(query, function (data) { + if (data.length > 0) { + data = _this.format(data); + _this._results = data; + } + if (typeof cb === 'function') { + cb(_this._title, _this._results, context); + } + }); }, geocode : function (q, cb) { diff --git a/www/src/js/app/service/search/search.js b/www/src/js/app/service/search/search.js index 985b333..54e1162 100644 --- a/www/src/js/app/service/search/search.js +++ b/www/src/js/app/service/search/search.js @@ -5,47 +5,50 @@ define([ 'templator', 'text!tmpl/service/search/search.html', 'text!tmpl/service/search/search-item.html', + 'app/service/search/coordinates', 'app/service/search/nominatim', 'app/service/search/map-features', 'jquery.bootstrap' -], function ($, Templator, tmpl_search, tmpl_search_item, Nominatim, MapFeatures) { - +], function ($, Templator, tmpl_search, tmpl_search_item, CoordinateParser, Nominatim, MapFeatures) { + 'use strict'; - + function Search(mapmodule) { this._mapmodule = mapmodule; this._el = null; this._open = false; this._result = false; this._providers = { + coordinates: null, nominatim: null, mapfeatures: null }; this._counter = 0; } - + Search.prototype = { - + get : function (key) { return this['_' + key]; }, - + init : function () { - this._providers.nominatim = new Nominatim(this._mapmodule); - this._providers.mapfeatures = new MapFeatures(this._mapmodule); + this._providers.coordinates = new CoordinateParser(this); + this._providers.nominatim = new Nominatim(this); + this._providers.mapfeatures = new MapFeatures(this); this.createUi(); }, - + createUi : function () { var _this = this, template = Templator.compile(tmpl_search); - + this._el = $(template({ search: 'Otsi' })); - + $('#toolbar').append(this._el); - + this._el.find('.dropdown') .on('shown.bs.dropdown', function () { _this._open = true; @@ -53,7 +56,7 @@ define([ .on('hidden.bs.dropdown', function () { _this._open = false; }); - + this._el.find('input').on('keyup', function (e) { var val, provider; // clear @@ -79,14 +82,14 @@ define([ _this.search(val); } }); - + this._el.find('.dropdown-toggle').on('click', function (e) { var val = $.trim(_this._el.find('input').val()); if (!_this._result && val.length > 1) { _this.search(val); } }); - + this._el.find('.dropdown-menu').on('click', 'li a', function (e) { e.preventDefault(); var id = $(this).attr('data-id'), @@ -101,7 +104,7 @@ define([ } }); }, - + search : function (query) { var provider, searches = []; @@ -133,13 +136,13 @@ define([ _this.searchEnd(); } }, - + searchStart : function () { this._el.find('.dropdown-toggle i') .removeClass('fa-search') .addClass('fa-spinner fa-pulse'); }, - + searchEnd : function () { this._el.find('.dropdown-toggle i') .removeClass('fa-spinner fa-pulse') @@ -147,6 +150,6 @@ define([ } }; - + return Search; -}); \ No newline at end of file +}); diff --git a/www/src/js/lib/ol-custom.js b/www/src/js/lib/ol-custom.js index 7843727..1fb4de4 100644 --- a/www/src/js/lib/ol-custom.js +++ b/www/src/js/lib/ol-custom.js @@ -1,462 +1,463 @@ // OpenLayers. See https://openlayers.org/ // License: https://raw.githubusercontent.com/openlayers/openlayers/master/LICENSE.md // Version: v4.6.4 -var m,ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function da(a,b){if(b){var c=ca;a=a.split(".");for(var d=0;da*b?a+b:a}function sa(a,b,c){return a+c*(b-a)};function ta(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]*b+.5|0;c[1]=a[1]*b+.5|0;return c}function ua(a,b){if(Array.isArray(a))return a;void 0===b?b=[a,a]:b[0]=b[1]=a;return b};function va(a){for(var b=wa(),c=0,d=a.length;ca[2]&&(a[2]=b[2]);b[1]a[3]&&(a[3]=b[3])}function xa(a,b){b[0]a[2]&&(a[2]=b[0]);b[1]a[3]&&(a[3]=b[1])}function Ja(a){var b=0;Ka(a)||(b=La(a)*Ma(a));return b}function Na(a){return[(a[0]+a[2])/2,(a[1]+a[3])/2]} -function Oa(a,b,c,d,e){var f=b*d[0]/2;d=b*d[1]/2;b=Math.cos(c);var g=Math.sin(c);c=f*b;f*=g;b*=d;var h=d*g,k=a[0],l=a[1];a=k-c+h;d=k-c-h;g=k+c-h;c=k+c+h;h=l-f-b;k=l-f+b;var n=l+f+b;f=l+f-b;return Da(Math.min(a,d,g,c),Math.min(h,k,n,f),Math.max(a,d,g,c),Math.max(h,k,n,f),e)}function Ma(a){return a[3]-a[1]}function Pa(a,b){var c=wa();Qa(a,b)&&(c[0]=a[0]>b[0]?a[0]:b[0],c[1]=a[1]>b[1]?a[1]:b[1],c[2]=a[2]=b[0]&&a[1]<=b[3]&&a[3]>=b[1]}function Ka(a){return a[2]a*b?a+b:a}function ta(a,b,c){return a+c*(b-a)};function ua(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]*b+.5|0;c[1]=a[1]*b+.5|0;return c}function va(a,b){if(Array.isArray(a))return a;void 0===b?b=[a,a]:b[0]=b[1]=a;return b};function wa(a){for(var b=xa(),c=0,d=a.length;ca[2]&&(a[2]=b[2]);b[1]a[3]&&(a[3]=b[3])}function ya(a,b){b[0]a[2]&&(a[2]=b[0]);b[1]a[3]&&(a[3]=b[1])}function Ka(a){var b=0;La(a)||(b=Ma(a)*Na(a));return b}function Oa(a){return[(a[0]+a[2])/2,(a[1]+a[3])/2]} +function Pa(a,b,c,d,e){var f=b*d[0]/2;d=b*d[1]/2;b=Math.cos(c);var g=Math.sin(c);c=f*b;f*=g;b*=d;var h=d*g,k=a[0],l=a[1];a=k-c+h;d=k-c-h;g=k+c-h;c=k+c+h;h=l-f-b;k=l-f+b;var n=l+f+b;f=l+f-b;return Ea(Math.min(a,d,g,c),Math.min(h,k,n,f),Math.max(a,d,g,c),Math.max(h,k,n,f),e)}function Na(a){return a[3]-a[1]}function Qa(a,b){var c=xa();Ra(a,b)&&(c[0]=a[0]>b[0]?a[0]:b[0],c[1]=a[1]>b[1]?a[1]:b[1],c[2]=a[2]=b[0]&&a[1]<=b[3]&&a[3]>=b[1]}function La(a){return a[2]kb?f=kb:f<-kb&&(f=-kb);b[e+1]=f}return b}function nb(a,b,c){var d=a.length;c=1b?1:ac)for(c=1;c=a.minZoom;){2===a.u?(h=Math.floor(h/2),k=Math.floor(k/2),b=la(h,h,k,k,d)):b=bc(a,f,g,d);if(c.call(null,g,b))break;--g}}Vb.prototype.C=function(){return this.l};function cc(a,b,c,d){if(b[0]=Math.abs(c-f[0])&&25>=g)return!0}return!1}function cd(a){var b=dd(a,a),c=b.preventDefault;b.preventDefault=function(){a.preventDefault();c()};b.pointerId=1;b.isPrimary=!0;b.pointerType="mouse";return b}m=ad.prototype; -m.uf=function(a){if(!bd(this,a)){(1).toString()in this.f&&this.cancel(a);var b=cd(a);this.f[(1).toString()]=a;ed(this.a,"pointerdown",b,a)}};m.vf=function(a){if(!bd(this,a)){var b=cd(a);ed(this.a,"pointermove",b,a)}};m.yf=function(a){if(!bd(this,a)){var b=this.f[(1).toString()];b&&b.button===a.button&&(b=cd(a),ed(this.a,"pointerup",b,a),delete this.f[(1).toString()])}};m.xf=function(a){if(!bd(this,a)){var b=cd(a);fd(this.a,b,a)}};m.wf=function(a){if(!bd(this,a)){var b=cd(a);gd(this.a,b,a)}}; -m.cancel=function(a){var b=cd(a);this.a.cancel(b,a);delete this.f[(1).toString()]};function hd(a){$c.call(this,a,{MSPointerDown:this.Df,MSPointerMove:this.Ef,MSPointerUp:this.Hf,MSPointerOut:this.Ff,MSPointerOver:this.Gf,MSPointerCancel:this.Cf,MSGotPointerCapture:this.Af,MSLostPointerCapture:this.Bf});this.f=a.i;this.i=["","unavailable","touch","pen","mouse"]}w(hd,$c);function id(a,b){var c=b;"number"===typeof b.pointerType&&(c=dd(b,b),c.pointerType=a.i[b.pointerType]);return c}m=hd.prototype; -m.Df=function(a){this.f[a.pointerId.toString()]=a;var b=id(this,a);ed(this.a,"pointerdown",b,a)};m.Ef=function(a){var b=id(this,a);ed(this.a,"pointermove",b,a)};m.Hf=function(a){var b=id(this,a);ed(this.a,"pointerup",b,a);delete this.f[a.pointerId.toString()]};m.Ff=function(a){var b=id(this,a);gd(this.a,b,a)};m.Gf=function(a){var b=id(this,a);fd(this.a,b,a)};m.Cf=function(a){var b=id(this,a);this.a.cancel(b,a);delete this.f[a.pointerId.toString()]}; -m.Bf=function(a){this.a.f(new qd("lostpointercapture",a,a))};m.Af=function(a){this.a.f(new qd("gotpointercapture",a,a))};function rd(a){$c.call(this,a,{pointerdown:this.ng,pointermove:this.og,pointerup:this.rg,pointerout:this.pg,pointerover:this.qg,pointercancel:this.mg,gotpointercapture:this.Se,lostpointercapture:this.rf})}w(rd,$c);m=rd.prototype;m.ng=function(a){sd(this.a,a)};m.og=function(a){sd(this.a,a)};m.rg=function(a){sd(this.a,a)};m.pg=function(a){sd(this.a,a)};m.qg=function(a){sd(this.a,a)};m.mg=function(a){sd(this.a,a)};m.rf=function(a){sd(this.a,a)};m.Se=function(a){sd(this.a,a)};function qd(a,b,c){tc.call(this,a);this.a=b;a=c?c:{};this.buttons=td(a);this.pressure=ud(a,this.buttons);this.bubbles="bubbles"in a?a.bubbles:!1;this.cancelable="cancelable"in a?a.cancelable:!1;this.view="view"in a?a.view:null;this.detail="detail"in a?a.detail:null;this.screenX="screenX"in a?a.screenX:0;this.screenY="screenY"in a?a.screenY:0;this.clientX="clientX"in a?a.clientX:0;this.clientY="clientY"in a?a.clientY:0;this.ctrlKey="ctrlKey"in a?a.ctrlKey:!1;this.altKey="altKey"in a?a.altKey:!1;this.shiftKey= +function Xa(a){this.radius=a}Xa.prototype.offset=function(a,b,c){var d=ra(a[1]);b/=this.radius;var e=Math.asin(Math.sin(d)*Math.cos(b)+Math.cos(d)*Math.sin(b)*Math.cos(c));return[180*(ra(a[0])+Math.atan2(Math.sin(c)*Math.sin(b)*Math.cos(d),Math.cos(b)-Math.sin(d)*Math.sin(e)))/Math.PI,180*e/Math.PI]}; +function Ya(a,b){var c=b||{},d=c.radius||6371008.8;c=c.projection||"EPSG:3857";a=a.clone().Ya(c,"EPSG:4326");var e=a.F();c=0;var f;switch(e){case "Point":case "MultiPoint":break;case "LineString":case "LinearRing":b=a.I();c=Za(b,d);break;case "MultiLineString":case "Polygon":b=a.I();a=0;for(e=b.length;alb?f=lb:f<-lb&&(f=-lb);b[e+1]=f}return b}function pb(a,b,c){var d=a.length;c=1b?1:ac)for(c=1;c=a.minZoom;){2===a.u?(h=Math.floor(h/2),k=Math.floor(k/2),b=ma(h,h,k,k,d)):b=cc(a,f,g,d);if(c.call(null,g,b))break;--g}}Wb.prototype.C=function(){return this.l};function dc(a,b,c,d){if(b[0]=Math.abs(c-f[0])&&25>=g)return!0}return!1}function dd(a){var b=ed(a,a),c=b.preventDefault;b.preventDefault=function(){a.preventDefault();c()};b.pointerId=1;b.isPrimary=!0;b.pointerType="mouse";return b}m=bd.prototype; +m.vf=function(a){if(!cd(this,a)){(1).toString()in this.f&&this.cancel(a);var b=dd(a);this.f[(1).toString()]=a;fd(this.a,"pointerdown",b,a)}};m.wf=function(a){if(!cd(this,a)){var b=dd(a);fd(this.a,"pointermove",b,a)}};m.zf=function(a){if(!cd(this,a)){var b=this.f[(1).toString()];b&&b.button===a.button&&(b=dd(a),fd(this.a,"pointerup",b,a),delete this.f[(1).toString()])}};m.yf=function(a){if(!cd(this,a)){var b=dd(a);gd(this.a,b,a)}};m.xf=function(a){if(!cd(this,a)){var b=dd(a);hd(this.a,b,a)}}; +m.cancel=function(a){var b=dd(a);this.a.cancel(b,a);delete this.f[(1).toString()]};function id(a){ad.call(this,a,{MSPointerDown:this.Ef,MSPointerMove:this.Ff,MSPointerUp:this.If,MSPointerOut:this.Gf,MSPointerOver:this.Hf,MSPointerCancel:this.Df,MSGotPointerCapture:this.Bf,MSLostPointerCapture:this.Cf});this.f=a.i;this.i=["","unavailable","touch","pen","mouse"]}w(id,ad);function qd(a,b){var c=b;"number"===typeof b.pointerType&&(c=ed(b,b),c.pointerType=a.i[b.pointerType]);return c}m=id.prototype; +m.Ef=function(a){this.f[a.pointerId.toString()]=a;var b=qd(this,a);fd(this.a,"pointerdown",b,a)};m.Ff=function(a){var b=qd(this,a);fd(this.a,"pointermove",b,a)};m.If=function(a){var b=qd(this,a);fd(this.a,"pointerup",b,a);delete this.f[a.pointerId.toString()]};m.Gf=function(a){var b=qd(this,a);hd(this.a,b,a)};m.Hf=function(a){var b=qd(this,a);gd(this.a,b,a)};m.Df=function(a){var b=qd(this,a);this.a.cancel(b,a);delete this.f[a.pointerId.toString()]}; +m.Cf=function(a){this.a.f(new rd("lostpointercapture",a,a))};m.Bf=function(a){this.a.f(new rd("gotpointercapture",a,a))};function sd(a){ad.call(this,a,{pointerdown:this.pg,pointermove:this.qg,pointerup:this.tg,pointerout:this.rg,pointerover:this.sg,pointercancel:this.og,gotpointercapture:this.Te,lostpointercapture:this.sf})}w(sd,ad);m=sd.prototype;m.pg=function(a){td(this.a,a)};m.qg=function(a){td(this.a,a)};m.tg=function(a){td(this.a,a)};m.rg=function(a){td(this.a,a)};m.sg=function(a){td(this.a,a)};m.og=function(a){td(this.a,a)};m.sf=function(a){td(this.a,a)};m.Te=function(a){td(this.a,a)};function rd(a,b,c){uc.call(this,a);this.a=b;a=c?c:{};this.buttons=ud(a);this.pressure=vd(a,this.buttons);this.bubbles="bubbles"in a?a.bubbles:!1;this.cancelable="cancelable"in a?a.cancelable:!1;this.view="view"in a?a.view:null;this.detail="detail"in a?a.detail:null;this.screenX="screenX"in a?a.screenX:0;this.screenY="screenY"in a?a.screenY:0;this.clientX="clientX"in a?a.clientX:0;this.clientY="clientY"in a?a.clientY:0;this.ctrlKey="ctrlKey"in a?a.ctrlKey:!1;this.altKey="altKey"in a?a.altKey:!1;this.shiftKey= "shiftKey"in a?a.shiftKey:!1;this.metaKey="metaKey"in a?a.metaKey:!1;this.button="button"in a?a.button:0;this.relatedTarget="relatedTarget"in a?a.relatedTarget:null;this.pointerId="pointerId"in a?a.pointerId:0;this.width="width"in a?a.width:0;this.height="height"in a?a.height:0;this.tiltX="tiltX"in a?a.tiltX:0;this.tiltY="tiltY"in a?a.tiltY:0;this.pointerType="pointerType"in a?a.pointerType:"";this.isPrimary="isPrimary"in a?a.isPrimary:!1;b.preventDefault&&(this.preventDefault=function(){b.preventDefault()})} -w(qd,tc);function td(a){if(a.buttons||vd)a=a.buttons;else switch(a.which){case 1:a=1;break;case 2:a=4;break;case 3:a=2;break;default:a=0}return a}function ud(a,b){var c=0;a.pressure?c=a.pressure:c=b?.5:0;return c}var vd=!1;try{vd=1===(new MouseEvent("click",{buttons:1})).buttons}catch(a){};function wd(a,b){$c.call(this,a,{touchstart:this.Gg,touchmove:this.Fg,touchend:this.Eg,touchcancel:this.Dg});this.f=a.i;this.j=b;this.i=void 0;this.g=0;this.b=void 0}w(wd,$c);m=wd.prototype;m.Td=function(){this.g=0;this.b=void 0}; -function xd(a,b,c){b=dd(b,c);b.pointerId=c.identifier+2;b.bubbles=!0;b.cancelable=!0;b.detail=a.g;b.button=0;b.buttons=1;b.width=c.webkitRadiusX||c.radiusX||0;b.height=c.webkitRadiusY||c.radiusY||0;b.pressure=c.webkitForce||c.force||.5;b.isPrimary=a.i===c.identifier;b.pointerType="touch";b.clientX=c.clientX;b.clientY=c.clientY;b.screenX=c.screenX;b.screenY=c.screenY;return b} -function yd(a,b,c){function d(){b.preventDefault()}var e=Array.prototype.slice.call(b.changedTouches),f=e.length,g;for(g=0;g=b.length){var e=[],f;for(f=0;fa.B||Math.abs(b.clientY-a.b.clientY)>a.B}m.aa=function(){this.s&&(z(this.s),this.s=null);this.l&&(z(this.l),this.l=null);this.c.forEach(z);this.c.length=0;this.a&&(sc(this.a),this.a=null);this.g&&(sc(this.g),this.g=null);vc.prototype.aa.call(this)};function Kd(a,b){this.l=a;this.b=b;this.a=[];this.f=[];this.i={}}Kd.prototype.clear=function(){this.a.length=0;this.f.length=0;Sa(this.i)};Kd.prototype.j=function(a){y(!(this.b(a)in this.i),31);var b=this.l(a);return Infinity!=b?(this.a.push(a),this.f.push(b),this.i[this.b(a)]=!0,Ld(this,0,this.a.length-1),!0):!1};function Md(a,b){for(var c=a.a,d=a.f,e=c.length,f=c[b],g=d[b],h=b;b>1;){var k=2*b+1,l=2*b+2;k=lb;){var g=c-1>>1;if(a[g]>f)d[c]=d[g],a[c]=a[g],c=g;else break}d[c]=e;a[c]=f};function Nd(a,b){Kd.call(this,function(b){return a.apply(null,b)},function(a){return a[0].Xa()});this.s=b;this.g=0;this.c={}}w(Nd,Kd);Nd.prototype.j=function(a){var b=Kd.prototype.j.call(this,a);b&&B(a[0],"change",this.u,this);return b};Nd.prototype.u=function(a){a=a.target;var b=a.state;if(2===b||3===b||4===b||5===b)qc(a,"change",this.u,this),a=a.Xa(),a in this.c&&(delete this.c[a],--this.g),this.s()};function Od(a){return function(b){if(b)return[na(b[0],a[0],a[2]),na(b[1],a[1],a[3])]}}function Pd(a){return a};function Qd(a){return function(b,c,d){if(void 0!==b)return b=Pb(a,b,d),b=na(b+c,0,a.length-1),c=Math.floor(b),b!=c&&c=c?(a=b,c=d):1<=c?(a=f,c=e):(a=b+c*g,c=d+c*h);return[a,c]}function Zd(a,b){for(var c=!0,d=a.length-1;0<=d;--d)if(a[d]!=b[d]){c=!1;break}return c} -function $d(a,b){var c=Math.cos(b);b=Math.sin(b);var d=a[1]*c+a[0]*b;a[0]=a[0]*c-a[1]*b;a[1]=d}function ae(a,b){var c=a[0]-b[0];a=a[1]-b[1];return c*c+a*a}function be(a,b){return Math.sqrt(ae(a,b))}function ce(a,b){return ae(a,Yd(a,b))};function ee(a){return 1-Math.pow(1-a,3)}function le(a){return 3*a*a-2*a*a*a}function me(a){return a};function ne(){return!0}function oe(){return!1};function pe(a,b,c,d,e,f){for(var g=f?f:[],h=0;ba||0!==this.g&&a<=this.g)return this;var b=a.toString();if(this.c.hasOwnProperty(b))return this.c[b];var c=this.ib(a);if(c.X().length=b.length){var e=[],f;for(f=0;fa.B||Math.abs(b.clientY-a.b.clientY)>a.B}m.aa=function(){this.s&&(z(this.s),this.s=null);this.l&&(z(this.l),this.l=null);this.c.forEach(z);this.c.length=0;this.a&&(tc(this.a),this.a=null);this.g&&(tc(this.g),this.g=null);wc.prototype.aa.call(this)};function Ld(a,b){this.l=a;this.b=b;this.a=[];this.f=[];this.i={}}Ld.prototype.clear=function(){this.a.length=0;this.f.length=0;Ua(this.i)};Ld.prototype.j=function(a){y(!(this.b(a)in this.i),31);var b=this.l(a);return Infinity!=b?(this.a.push(a),this.f.push(b),this.i[this.b(a)]=!0,Md(this,0,this.a.length-1),!0):!1};function Nd(a,b){for(var c=a.a,d=a.f,e=c.length,f=c[b],g=d[b],h=b;b>1;){var k=2*b+1,l=2*b+2;k=lb;){var g=c-1>>1;if(a[g]>f)d[c]=d[g],a[c]=a[g],c=g;else break}d[c]=e;a[c]=f};function Od(a,b){Ld.call(this,function(b){return a.apply(null,b)},function(a){return a[0].Xa()});this.s=b;this.g=0;this.c={}}w(Od,Ld);Od.prototype.j=function(a){var b=Ld.prototype.j.call(this,a);b&&B(a[0],"change",this.u,this);return b};Od.prototype.u=function(a){a=a.target;var b=a.state;if(2===b||3===b||4===b||5===b)rc(a,"change",this.u,this),a=a.Xa(),a in this.c&&(delete this.c[a],--this.g),this.s()};function Pd(a){return function(b){if(b)return[oa(b[0],a[0],a[2]),oa(b[1],a[1],a[3])]}}function Qd(a){return a};function Rd(a){return function(b,c,d){if(void 0!==b)return b=Qb(a,b,d),b=oa(b+c,0,a.length-1),c=Math.floor(b),b!=c&&c=c?(a=b,c=d):1<=c?(a=f,c=e):(a=b+c*g,c=d+c*h);return[a,c]}function $d(a,b){for(var c=!0,d=a.length-1;0<=d;--d)if(a[d]!=b[d]){c=!1;break}return c} +function ae(a,b){var c=Math.cos(b);b=Math.sin(b);var d=a[1]*c+a[0]*b;a[0]=a[0]*c-a[1]*b;a[1]=d}function be(a,b){var c=a[0]-b[0];a=a[1]-b[1];return c*c+a*a}function ce(a,b){return Math.sqrt(be(a,b))}function ee(a,b){return be(a,Zd(a,b))};function le(a){return 1-Math.pow(1-a,3)}function me(a){return 3*a*a-2*a*a*a}function ne(a){return a};function oe(){return!0}function pe(){return!1};function qe(a,b,c,d,e,f){for(var g=f?f:[],h=0;ba||0!==this.g&&a<=this.g)return this;var b=a.toString();if(this.c.hasOwnProperty(b))return this.c[b];var c=this.ib(a);if(c.X().lengthe&&(e=f);f=h;g=k}return e}function Ee(a,b,c,d,e){var f;var g=0;for(f=c.length;gh){for(;bt&&(l=n,t=G)}t>e&&(k[(l-b)/d]=1,q+de&&(e=f);f=h;g=k}return e}function Fe(a,b,c,d,e){var f;var g=0;for(f=c.length;gh){for(;bt&&(l=n,t=G)}t>e&&(k[(l-b)/d]=1,q+dH&&KH)&&(0>I&&LI)||(v[A++]=F, -v[A++]=g,C=F,G=g);F=Q;g=R}}v[A++]=F;v[A++]=g}g=A}h.push(g);b=n}return g};function Pe(a,b){ye.call(this);this.b=this.j=-1;this.ga(a,b)}w(Pe,ye);m=Pe.prototype;m.clone=function(){var a=new Pe(null);Ae(a,this.U,this.o.slice());a.D();return a};m.Ja=function(a,b,c,d){if(df&&0<(l-h)*(f-k)-(e-h)*(n-k)&&g++:n<=f&&0>(l-h)*(f-k)-(e-h)*(n-k)&&g--;h=l;k=n}return 0!==g};function Se(a,b,c,d,e,f,g){for(var h,k,l,n,p,q=e[f+1],t=[],u=0,v=c.length;uv){l=(l+n)/2;a:if(0!==c.length&&Re(a,b,c[0],d,l,q)){var C=1;for(p=c.length;C>1)-1;0<=e;e--)Md(b,e);e=0;for(f=!1;b.g=h.minResolution&&ea.a.length)return!1;var b=Date.now()-100,c=a.a.length-3;if(a.a[c+2]b;)d-=3;b=a.a[c+2]-a.a[d+2];if(b<1E3/60)return!1;var e=a.a[c]-a.a[d];c=a.a[c+1]-a.a[d+1];a.i=Math.atan2(c,e);a.f=Math.sqrt(e*e+c*c)/b;return.05=this.l}function xg(a){if(fg(a)){var b=this.a,c=a.pixel;b.b=this.b;b.i=c;ug(b);tg(b);this.f(new Ag(Bg,a.coordinate,a))}}vg.prototype.S=function(){return this.a.S()}; -vg.prototype.g=fa;function yg(a){if(!fg(a))return!0;this.a.setMap(null);this.j(a,this.b,a.pixel)&&(this.g(a),this.f(new Ag(Cg,a.coordinate,a)));return!1}function wg(a){if(fg(a)&&bg(a)&&this.v(a)){this.b=a.pixel;this.a.setMap(a.map);var b=this.a,c=this.b;b.b=this.b;b.i=c;ug(b);tg(b);this.f(new Ag(Dg,a.coordinate,a));return!0}return!1}var Dg="boxstart",Bg="boxdrag",Cg="boxend";function Ag(a,b,c){tc.call(this,a);this.coordinate=b;this.mapBrowserEvent=c}w(Ag,tc);function Eg(a){a=a?a:{};var b=a.condition?a.condition:dg;this.B=void 0!==a.duration?a.duration:200;this.J=void 0!==a.out?a.out:!1;vg.call(this,{condition:b,className:a.className||"ol-dragzoom"})}w(Eg,vg); -Eg.prototype.g=function(){var a=this.A,b=a.T(),c=a.kb(),d=this.S().C();if(this.J){var e=c||mf(b);var f=b.ba();y(f,1);var g=b.ua();y(void 0!==g,2);var h=b.ya();y(void 0!==h,3);e=Oa(f,g,h,e);d=[a.ra([d[0],d[1]]),a.ra([d[2],d[3]])];a=Ea(void 0);f=0;for(g=d.length;fMath.abs(d)?Lg:Mg;if(this.c===Lg){b=b.T();this.j?clearTimeout(this.j): -hf(b,1,1);this.j=setTimeout(this.v.bind(this),400);c=b.ua()*Math.pow(2,d/300);var e=b.l,f=b.c,g=0;cf&&(c=Math.min(c,1.5*f),g=-1);if(this.a){var h=kf(b,c,this.a);b.Ba(b.b.center(h))}pf(b,c);0===g&&this.G&&b.animate({resolution:b.constrainResolution(c,0g&&b.animate({resolution:f,easing:ee,anchor:this.a,duration:500});this.b=a;return!1}this.g+=d;d=Math.max(this.J- -(a-this.b),0);clearTimeout(this.l);this.l=setTimeout(this.B.bind(this,b),d);return!1}Jg.prototype.v=function(){this.j=void 0;hf(this.A.T(),1,-1)};Jg.prototype.B=function(a){a=a.T();0this.v&&(this.a=!0));this.g=c;a=a.map;c=a.T();if(c.b.rotation!==Sd){d=a.a.getBoundingClientRect();var e=jg(this.c);e[0]-=d.left;e[1]-=d.top;this.b=a.xa(e);this.a&&(d=c.ya(),a.render(),Wf(c,d+b,this.b))}} -function Qg(a){if(2>this.c.length){a=a.map.T();hf(a,1,-1);if(this.a){var b=a.ya(),c=this.b,d=this.l;b=a.constrainRotation(b,0);Wf(a,b,c,d)}return!1}return!0}function Og(a){return 2<=this.c.length?(a=a.map,this.b=null,this.g=void 0,this.a=!1,this.j=0,this.s||hf(a.T(),1,1),!0):!1}Ng.prototype.qb=oe;function Rg(a){hg.call(this,{handleDownEvent:Sg,handleDragEvent:Tg,handleUpEvent:eh});a=a?a:{};this.j=a.constrainResolution||!1;this.b=null;this.l=void 0!==a.duration?a.duration:400;this.a=void 0;this.g=1}w(Rg,hg); -function Tg(a){var b=1,c=this.c[0],d=this.c[1],e=c.clientX-d.clientX;c=c.clientY-d.clientY;e=Math.sqrt(e*e+c*c);void 0!==this.a&&(b=this.a/e);this.a=e;a=a.map;e=a.T();d=e.ua();var f=e.c,g=e.l;c=d*b;c>f?(b=f/d,c=f):cthis.c.length){a=a.map.T();hf(a,1,-1);var b=a.ua();if(this.j||ba.c){var c=this.b,d=this.l;b=a.constrainResolution(b,0,this.g-1);Yf(a,b,c,d)}return!1}return!0}function Sg(a){return 2<=this.c.length?(a=a.map,this.b=null,this.a=void 0,this.g=1,this.s||hf(a.T(),1,1),!0):!1}Rg.prototype.qb=oe;function fh(a,b,c,d){vc.call(this);this.extent=a;this.i=c;this.resolution=b;this.state=d}w(fh,vc);fh.prototype.C=function(){return this.extent};function gh(a,b,c,d,e){this.c=void 0!==e?e:null;fh.call(this,a,b,c,void 0!==e?0:2);this.b=d}w(gh,fh);gh.prototype.a=function(a){this.state=a?3:2;this.f("change")};gh.prototype.load=function(){0==this.state&&(this.state=1,this.f("change"),this.c(this.a.bind(this)))};gh.prototype.W=function(){return this.b};function hh(a,b,c,d,e){tc.call(this,a);this.vectorContext=b;this.frameState=c;this.context=d;this.glContext=e}w(hh,tc);function ih(a){vc.call(this);this.highWaterMark=void 0!==a?a:2048;this.c=0;this.b={};this.a=this.i=null}w(ih,vc);function jh(a){return a.c>a.highWaterMark}m=ih.prototype;m.clear=function(){this.c=0;this.b={};this.a=this.i=null;this.f("clear")};m.forEach=function(a,b){for(var c=this.i;c;)a.call(b,c.cb,c.Ka,this),c=c.ta}; +function Pe(a,b,c,d,e,f,g,h){var k;var l=0;for(k=c.length;lH&&KH)&&(0>I&&LI)||(v[A++]=F, +v[A++]=g,C=F,G=g);F=Q;g=R}}v[A++]=F;v[A++]=g}g=A}h.push(g);b=n}return g};function Qe(a,b){ze.call(this);this.b=this.j=-1;this.ga(a,b)}w(Qe,ze);m=Qe.prototype;m.clone=function(){var a=new Qe(null);Be(a,this.U,this.o.slice());a.D();return a};m.Ja=function(a,b,c,d){if(df&&0<(l-h)*(f-k)-(e-h)*(n-k)&&g++:n<=f&&0>(l-h)*(f-k)-(e-h)*(n-k)&&g--;h=l;k=n}return 0!==g};function Te(a,b,c,d,e,f,g){for(var h,k,l,n,p,q=e[f+1],t=[],u=0,v=c.length;uv){l=(l+n)/2;a:if(0!==c.length&&Se(a,b,c[0],d,l,q)){var C=1;for(p=c.length;C>1)-1;0<=e;e--)Nd(b,e);e=0;for(f=!1;b.g=h.minResolution&&ea.a.length)return!1;var b=Date.now()-100,c=a.a.length-3;if(a.a[c+2]b;)d-=3;b=a.a[c+2]-a.a[d+2];if(b<1E3/60)return!1;var e=a.a[c]-a.a[d];c=a.a[c+1]-a.a[d+1];a.i=Math.atan2(c,e);a.f=Math.sqrt(e*e+c*c)/b;return.05=this.l}function yg(a){if(gg(a)){var b=this.a,c=a.pixel;b.b=this.b;b.i=c;vg(b);ug(b);this.f(new Bg(Cg,a.coordinate,a))}}wg.prototype.S=function(){return this.a.S()}; +wg.prototype.g=ha;function zg(a){if(!gg(a))return!0;this.a.setMap(null);this.j(a,this.b,a.pixel)&&(this.g(a),this.f(new Bg(Dg,a.coordinate,a)));return!1}function xg(a){if(gg(a)&&cg(a)&&this.v(a)){this.b=a.pixel;this.a.setMap(a.map);var b=this.a,c=this.b;b.b=this.b;b.i=c;vg(b);ug(b);this.f(new Bg(Eg,a.coordinate,a));return!0}return!1}var Eg="boxstart",Cg="boxdrag",Dg="boxend";function Bg(a,b,c){uc.call(this,a);this.coordinate=b;this.mapBrowserEvent=c}w(Bg,uc);function Fg(a){a=a?a:{};var b=a.condition?a.condition:eg;this.B=void 0!==a.duration?a.duration:200;this.J=void 0!==a.out?a.out:!1;wg.call(this,{condition:b,className:a.className||"ol-dragzoom"})}w(Fg,wg); +Fg.prototype.g=function(){var a=this.A,b=a.T(),c=a.kb(),d=this.S().C();if(this.J){var e=c||nf(b);var f=b.ba();y(f,1);var g=b.ua();y(void 0!==g,2);var h=b.ya();y(void 0!==h,3);e=Pa(f,g,h,e);d=[a.ra([d[0],d[1]]),a.ra([d[2],d[3]])];a=Fa(void 0);f=0;for(g=d.length;fMath.abs(d)?Mg:Ng;if(this.c===Mg){b=b.T();this.j?clearTimeout(this.j): +jf(b,1,1);this.j=setTimeout(this.v.bind(this),400);c=b.ua()*Math.pow(2,d/300);var e=b.l,f=b.c,g=0;cf&&(c=Math.min(c,1.5*f),g=-1);if(this.a){var h=lf(b,c,this.a);b.Ba(b.b.center(h))}qf(b,c);0===g&&this.G&&b.animate({resolution:b.constrainResolution(c,0g&&b.animate({resolution:f,easing:le,anchor:this.a,duration:500});this.b=a;return!1}this.g+=d;d=Math.max(this.J- +(a-this.b),0);clearTimeout(this.l);this.l=setTimeout(this.B.bind(this,b),d);return!1}Kg.prototype.v=function(){this.j=void 0;jf(this.A.T(),1,-1)};Kg.prototype.B=function(a){a=a.T();0this.v&&(this.a=!0));this.g=c;a=a.map;c=a.T();if(c.b.rotation!==Td){d=a.a.getBoundingClientRect();var e=kg(this.c);e[0]-=d.left;e[1]-=d.top;this.b=a.xa(e);this.a&&(d=c.ya(),a.render(),Xf(c,d+b,this.b))}} +function Rg(a){if(2>this.c.length){a=a.map.T();jf(a,1,-1);if(this.a){var b=a.ya(),c=this.b,d=this.l;b=a.constrainRotation(b,0);Xf(a,b,c,d)}return!1}return!0}function Pg(a){return 2<=this.c.length?(a=a.map,this.b=null,this.g=void 0,this.a=!1,this.j=0,this.s||jf(a.T(),1,1),!0):!1}Og.prototype.qb=pe;function Sg(a){ig.call(this,{handleDownEvent:Tg,handleDragEvent:eh,handleUpEvent:fh});a=a?a:{};this.j=a.constrainResolution||!1;this.b=null;this.l=void 0!==a.duration?a.duration:400;this.a=void 0;this.g=1}w(Sg,ig); +function eh(a){var b=1,c=this.c[0],d=this.c[1],e=c.clientX-d.clientX;c=c.clientY-d.clientY;e=Math.sqrt(e*e+c*c);void 0!==this.a&&(b=this.a/e);this.a=e;a=a.map;e=a.T();d=e.ua();var f=e.c,g=e.l;c=d*b;c>f?(b=f/d,c=f):cthis.c.length){a=a.map.T();jf(a,1,-1);var b=a.ua();if(this.j||ba.c){var c=this.b,d=this.l;b=a.constrainResolution(b,0,this.g-1);Zf(a,b,c,d)}return!1}return!0}function Tg(a){return 2<=this.c.length?(a=a.map,this.b=null,this.a=void 0,this.g=1,this.s||jf(a.T(),1,1),!0):!1}Sg.prototype.qb=pe;function gh(a,b,c,d){wc.call(this);this.extent=a;this.i=c;this.resolution=b;this.state=d}w(gh,wc);gh.prototype.C=function(){return this.extent};function hh(a,b,c,d,e){this.c=void 0!==e?e:null;gh.call(this,a,b,c,void 0!==e?0:2);this.b=d}w(hh,gh);hh.prototype.a=function(a){this.state=a?3:2;this.f("change")};hh.prototype.load=function(){0==this.state&&(this.state=1,this.f("change"),this.c(this.a.bind(this)))};hh.prototype.W=function(){return this.b};function ih(a,b,c,d,e){uc.call(this,a);this.vectorContext=b;this.frameState=c;this.context=d;this.glContext=e}w(ih,uc);function jh(a){wc.call(this);this.highWaterMark=void 0!==a?a:2048;this.c=0;this.b={};this.a=this.i=null}w(jh,wc);function kh(a){return a.c>a.highWaterMark}m=jh.prototype;m.clear=function(){this.c=0;this.b={};this.a=this.i=null;this.f("clear")};m.forEach=function(a,b){for(var c=this.i;c;)a.call(b,c.cb,c.Ka,this),c=c.ta}; m.get=function(a){a=this.b[a];y(void 0!==a,15);if(a===this.a)return a.cb;a===this.i?(this.i=this.i.ta,this.i.Fa=null):(a.ta.Fa=a.Fa,a.Fa.ta=a.ta);a.ta=null;a.Fa=this.a;this.a=this.a.ta=a;return a.cb};m.remove=function(a){var b=this.b[a];y(void 0!==b,15);if(b===this.a){if(this.a=b.Fa)this.a.ta=null}else if(b===this.i){if(this.i=b.ta)this.i.Fa=null}else b.ta.Fa=b.Fa,b.Fa.ta=b.ta;delete this.b[a];--this.c;return b.cb}; -m.pop=function(){var a=this.i;delete this.b[a.Ka];a.ta&&(a.ta.Fa=null);this.i=a.ta;this.i||(this.a=null);--this.c;return a.cb};function kh(a,b,c){a.get(b);a.b[b].cb=c}m.set=function(a,b){y(!(a in this.b),16);b={Ka:a,ta:null,Fa:this.a,cb:b};this.a?this.a.ta=b:this.i=b;this.a=b;this.b[a]=b;++this.c};var lh=[0,0,0,1],mh=[],nh=[0,0,0,1],oh=[0,0,0,0],ph=new ih,qh={},rh=null,sh={},uh=function(){function a(a){var b=th();b.font="32px monospace";f=b.measureText("wmytzilWMYTZIL@#/&?$%10").width;var c=!0;"monospace"!=a&&(b.font="32px "+a+",monospace",c=b.measureText("wmytzilWMYTZIL@#/&?$%10").width!=f);return c}function b(){var b=!0,f;for(f in c)60>c[f]&&(a(f)?(c[f]=60,Sa(sh),rh=null,d.clear()):(++c[f],b=!1));b&&(window.clearInterval(e),e=void 0)}var c=qh,d=ph,e,f;return function(d){if(d=Kf(d))for(var f= -0,g=d.length;f=e?1:2;var g=4===e||8===e;e=parseInt(d.substr(1+0*f,f),16);var h=parseInt(d.substr(1+1*f,f),16);var k=parseInt(d.substr(1+2*f,f),16);d=g?parseInt(d.substr(1+3*f,f), -16):255;1==f&&(e=(e<<4)+e,h=(h<<4)+h,k=(k<<4)+k,g&&(d=(d<<4)+d));f=[e,h,k,d/255]}else 0==d.indexOf("rgba(")?(d=d.slice(5,-1).split(",").map(Number),f=Dh(d)):0==d.indexOf("rgb(")?(d=d.slice(4,-1).split(",").map(Number),d.push(1),f=Dh(d)):y(!1,14);d=f;a[c]=d;++b}return d}}();function Dh(a){var b=[];b[0]=na(a[0]+.5|0,0,255);b[1]=na(a[1]+.5|0,0,255);b[2]=na(a[2]+.5|0,0,255);b[3]=na(a[3],0,1);return b};function Fh(a){return"string"===typeof a||a instanceof CanvasPattern||a instanceof CanvasGradient?a:Ch(a)};function Gh(){}m=Gh.prototype;m.kd=function(){};m.rc=function(){};m.sc=function(){};m.tc=function(){};m.uc=function(){};m.vc=function(){};m.wc=function(){};m.xc=function(){};m.Ra=function(){};m.Ua=function(){};m.Yb=function(){};m.Na=function(){};function Hh(a,b,c,d,e){this.i=a;this.g=b;this.c=c;this.A=d;this.Pa=e;this.H=this.a=this.f=this.$=this.L=this.J=null;this.ea=this.qa=this.s=this.B=this.v=this.V=0;this.ha=!1;this.b=this.ia=0;this.Oa=!1;this.da=0;this.ca="";this.Ca=this.Aa=0;this.Ga=!1;this.l=this.Ha=0;this.G=this.u=this.j=null;this.K=[];this.Ia=re()}w(Hh,Gh); -function Ih(a,b,c){if(a.H){b=pe(b,0,c,2,a.A,a.K);c=a.i;var d=a.Ia,e=c.globalAlpha;1!=a.s&&(c.globalAlpha=e*a.s);var f=a.ia;a.ha&&(f+=a.Pa);var g;var h=0;for(g=b.length;hc[f]&&(a(f)?(c[f]=60,Ua(th),sh=null,d.clear()):(++c[f],b=!1));b&&(window.clearInterval(e),e=void 0)}var c=rh,d=qh,e,f;return function(d){if(d=Lf(d))for(var f= +0,g=d.length;f=e?1:2;var g=4===e||8===e;e=parseInt(d.substr(1+0*f,f),16);var h=parseInt(d.substr(1+1*f,f),16);var k=parseInt(d.substr(1+2*f,f),16);d=g?parseInt(d.substr(1+3*f,f), +16):255;1==f&&(e=(e<<4)+e,h=(h<<4)+h,k=(k<<4)+k,g&&(d=(d<<4)+d));f=[e,h,k,d/255]}else 0==d.indexOf("rgba(")?(d=d.slice(5,-1).split(",").map(Number),f=Eh(d)):0==d.indexOf("rgb(")?(d=d.slice(4,-1).split(",").map(Number),d.push(1),f=Eh(d)):y(!1,14);d=f;a[c]=d;++b}return d}}();function Eh(a){var b=[];b[0]=oa(a[0]+.5|0,0,255);b[1]=oa(a[1]+.5|0,0,255);b[2]=oa(a[2]+.5|0,0,255);b[3]=oa(a[3],0,1);return b};function Gh(a){return"string"===typeof a||a instanceof CanvasPattern||a instanceof CanvasGradient?a:Dh(a)};function Hh(){}m=Hh.prototype;m.ld=function(){};m.rc=function(){};m.sc=function(){};m.tc=function(){};m.uc=function(){};m.vc=function(){};m.wc=function(){};m.xc=function(){};m.Ra=function(){};m.Ua=function(){};m.Yb=function(){};m.Na=function(){};function Ih(a,b,c,d,e){this.i=a;this.g=b;this.c=c;this.A=d;this.Pa=e;this.H=this.a=this.f=this.$=this.L=this.J=null;this.ea=this.qa=this.s=this.B=this.v=this.V=0;this.ha=!1;this.b=this.ia=0;this.Oa=!1;this.da=0;this.ca="";this.Ca=this.Aa=0;this.Ga=!1;this.l=this.Ha=0;this.G=this.u=this.j=null;this.K=[];this.Ia=se()}w(Ih,Hh); +function Jh(a,b,c){if(a.H){b=qe(b,0,c,2,a.A,a.K);c=a.i;var d=a.Ia,e=c.globalAlpha;1!=a.s&&(c.globalAlpha=e*a.s);var f=a.ia;a.ha&&(f+=a.Pa);var g;var h=0;for(g=b.length;ha.R&&(a.R=d.R),d.Na.P&&(a.P=d.P)):a[b][c]=d:(a[b]={},a[b][c]=d)} -function Xh(a,b,c,d,e,f,g,h){var k=x(b).toString();k in a.wantedTiles||(a.wantedTiles[k]={});var l=a.wantedTiles[k];a=a.tileQueue;var n,p,q;for(q=c.minZoom;q<=g;++q){var t=bc(c,f,q,t);var u=c.a[q];for(n=t.O;n<=t.R;++n)for(p=t.N;p<=t.P;++p)if(g-q<=h){var v=Yh(b,q,n,p,d,e);0==v.state&&(l[v.Xa()]=!0,v.Xa()in a.i||a.j([v,k,gc(c,v.ja),u]))}else b.ae(q,n,p,e)}};function Zh(a){Qh.call(this,a);this.$=re()}w(Zh,Qh);function $h(a,b,c){var d=b.pixelRatio,e=b.size[0]*d,f=b.size[1]*d,g=b.viewState.rotation,h=[c[0],c[3]],k=[c[2],c[3]],l=[c[2],c[1]];c=[c[0],c[1]];ve(b.coordinateToPixelTransform,h);ve(b.coordinateToPixelTransform,k);ve(b.coordinateToPixelTransform,l);ve(b.coordinateToPixelTransform,c);a.save();xh(a,-g,e/2,f/2);a.beginPath();a.moveTo(h[0]*d,h[1]*d);a.lineTo(k[0]*d,k[1]*d);a.lineTo(l[0]*d,l[1]*d);a.lineTo(c[0]*d,c[1]*d);a.clip();xh(a,g,e/2,f/2)} -function ai(a,b,c,d,e){var f=a.a;if(wc(f,b)){var g=d.size[0]*d.pixelRatio,h=d.size[1]*d.pixelRatio,k=d.viewState.rotation;xh(c,-k,g/2,h/2);a=void 0!==e?e:bi(a,d,0);f.f(new hh(b,new Hh(c,d.pixelRatio,d.extent,a,d.viewState.rotation),d,c,null));xh(c,k,g/2,h/2)}}Zh.prototype.Wb=function(a,b,c,d){ai(this,"postcompose",a,b,d)};function bi(a,b,c){var d=b.viewState,e=b.pixelRatio,f=e/d.resolution;return we(a.$,e*b.size[0]/2,e*b.size[1]/2,f,-f,-d.rotation,-d.center[0]+c,-d.center[1])};function ci(a){Zh.call(this,a);this.j=re()}w(ci,Zh);ci.prototype.pc=function(a,b,c){ai(this,"precompose",c,a,void 0);var d=this.W();if(d){var e=b.extent,f=void 0!==e&&!Ba(e,a.extent)&&Qa(e,a.extent);f&&$h(c,a,e);e=this.u();var g=c.globalAlpha;c.globalAlpha=b.opacity;c.drawImage(d,0,0,+d.width,+d.height,Math.round(e[4]),Math.round(e[5]),Math.round(d.width*e[0]),Math.round(d.height*e[3]));c.globalAlpha=g;f&&c.restore()}this.Wb(c,a,b)}; -ci.prototype.wa=function(a,b,c,d,e){var f=this.a;return f.fa().wa(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};function Af(a){ci.call(this,a);this.H=null;this.c=re();this.l=[];this.b=null}w(Af,ci);Af.handles=function(a,b){return"canvas"===a&&("IMAGE"===b.F()||"VECTOR"===b.F()&&"image"===b.b)};Af.create=function(a,b){var c=new Af(b);if("VECTOR"===b.F())for(var d=0,e=xf.length;dp[2])l=[t+q*Math.ceil((p[0]-t)/q),a[1]]}p=b.layerStatesArray;for(q=p.length-1;0<=q;--q){var u=p[q];t=u.layer;if(u.visible&&n>=u.minResolution&&n=h.minResolution&&db?1:aa.R&&(a.R=d.R),d.Na.P&&(a.P=d.P)):a[b][c]=d:(a[b]={},a[b][c]=d)} +function Yh(a,b,c,d,e,f,g,h){var k=x(b).toString();k in a.wantedTiles||(a.wantedTiles[k]={});var l=a.wantedTiles[k];a=a.tileQueue;var n,p,q;for(q=c.minZoom;q<=g;++q){var t=cc(c,f,q,t);var u=c.a[q];for(n=t.O;n<=t.R;++n)for(p=t.N;p<=t.P;++p)if(g-q<=h){var v=Zh(b,q,n,p,d,e);0==v.state&&(l[v.Xa()]=!0,v.Xa()in a.i||a.j([v,k,hc(c,v.ja),u]))}else b.be(q,n,p,e)}};function $h(a){Rh.call(this,a);this.$=se()}w($h,Rh);function ai(a,b,c){var d=b.pixelRatio,e=b.size[0]*d,f=b.size[1]*d,g=b.viewState.rotation,h=[c[0],c[3]],k=[c[2],c[3]],l=[c[2],c[1]];c=[c[0],c[1]];we(b.coordinateToPixelTransform,h);we(b.coordinateToPixelTransform,k);we(b.coordinateToPixelTransform,l);we(b.coordinateToPixelTransform,c);a.save();yh(a,-g,e/2,f/2);a.beginPath();a.moveTo(h[0]*d,h[1]*d);a.lineTo(k[0]*d,k[1]*d);a.lineTo(l[0]*d,l[1]*d);a.lineTo(c[0]*d,c[1]*d);a.clip();yh(a,g,e/2,f/2)} +function bi(a,b,c,d,e){var f=a.a;if(xc(f,b)){var g=d.size[0]*d.pixelRatio,h=d.size[1]*d.pixelRatio,k=d.viewState.rotation;yh(c,-k,g/2,h/2);a=void 0!==e?e:ci(a,d,0);f.f(new ih(b,new Ih(c,d.pixelRatio,d.extent,a,d.viewState.rotation),d,c,null));yh(c,k,g/2,h/2)}}$h.prototype.Wb=function(a,b,c,d){bi(this,"postcompose",a,b,d)};function ci(a,b,c){var d=b.viewState,e=b.pixelRatio,f=e/d.resolution;return xe(a.$,e*b.size[0]/2,e*b.size[1]/2,f,-f,-d.rotation,-d.center[0]+c,-d.center[1])};function di(a){$h.call(this,a);this.j=se()}w(di,$h);di.prototype.pc=function(a,b,c){bi(this,"precompose",c,a,void 0);var d=this.W();if(d){var e=b.extent,f=void 0!==e&&!Ca(e,a.extent)&&Ra(e,a.extent);f&&ai(c,a,e);e=this.u();var g=c.globalAlpha;c.globalAlpha=b.opacity;c.drawImage(d,0,0,+d.width,+d.height,Math.round(e[4]),Math.round(e[5]),Math.round(d.width*e[0]),Math.round(d.height*e[3]));c.globalAlpha=g;f&&c.restore()}this.Wb(c,a,b)}; +di.prototype.wa=function(a,b,c,d,e){var f=this.a;return f.fa().wa(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};function Bf(a){di.call(this,a);this.H=null;this.c=se();this.l=[];this.b=null}w(Bf,di);Bf.handles=function(a,b){return"canvas"===a&&("IMAGE"===b.F()||"VECTOR"===b.F()&&"image"===b.b)};Bf.create=function(a,b){var c=new Bf(b);if("VECTOR"===b.F())for(var d=0,e=yf.length;dp[2])l=[t+q*Math.ceil((p[0]-t)/q),a[1]]}p=b.layerStatesArray;for(q=p.length-1;0<=q;--q){var u=p[q];t=u.layer;if(u.visible&&n>=u.minResolution&&n=h.minResolution&&db?1:af;){if(600l-k/2?-1:1);b(a,e,Math.max(f,Math.floor(e-l*p/k+n)),Math.min(g,Math.floor(e+(k-l)*p/k+n)),h)}k=a[e];l=f;p=g;c(a,f,e);for(0h(a[l],k);)l++;for(;0b?1:0}function e(a,b){if(!(this instanceof e))return new e(a,b);this.jc=Math.max(4,a||9);this.Zc=Math.max(2,Math.ceil(.4*this.jc));b&&this.le(b);this.clear()}function f(a,b){g(a,0,a.children.length,b,a)}function g(a,b,c,d,e){e||(e=u(null));e.O=Infinity;e.N=Infinity;e.R=-Infinity;e.P=-Infinity;for(var f;b=a.O&&b.P>=a.N}function u(a){return{children:a,height:1,oa:!0,O:Infinity,N:Infinity,R:-Infinity,P:-Infinity}}function v(a,b,c,d,e){for(var f=[b,c],g;f.length;)c=f.pop(),b=f.pop(),c-b<=d||(g=b+Math.ceil((c-b)/d/2)*d,A(a,g,b,c,e),f.push(b,g,g,c))}var A=b;e.prototype={all:function(){return this.Vc(this.data, -[])},search:function(a){var b=this.data,c=[],d=this.za;if(!t(a,b))return c;for(var e=[],f,g,h,k;b;){f=0;for(g=b.children.length;fthis.jc)this.ne(d,b),b--;else break;this.fe(c,d,b)},ne:function(a,b){var c=a[b],d=c.children.length, -e=this.Zc;this.ge(c,e,d);d=this.he(c,e,d);d=u(c.children.splice(d,c.children.length-d));d.height=c.height;d.oa=c.oa;f(c,this.za);f(d,this.za);b?a[b-1].children.push(d):this.bd(c,d)},bd:function(a,b){this.data=u([a,b]);this.data.height=a.height+1;this.data.oa=!1;f(this.data,this.za)},he:function(a,b,c){var d,e;var f=e=Infinity;for(d=b;d<=c-b;d++){var h=g(a,0,d,this.za);var k=g(a,d,c,this.za);var l=Math.max(0,Math.min(h.R,k.R)-Math.max(h.O,k.O))*Math.max(0,Math.min(h.P,k.P)-Math.max(h.N,k.N));h=n(h)+ -n(k);if(l=b;l--)n=a.children[l],h(f,a.oa?d(n):n),k+=p(f);return k},fe:function(a,b,c){for(;0<=c;c--)h(b[c],a)},je:function(a){for(var b=a.length- -1,c;0<=b;b--)0===a[b].children.length?0e.width?e.width-n:v;k=k+p>e.height?e.height-p:k;v=a.Ha;var R=A[3]+u*t+A[1],H=A[0]+k*t+A[2],I=c-A[3],K=d-A[0];if(F||0!==q){var L=[I,K];var T=[I+R,K];var ka=[I+R,K+H];var Z=[I,K+H]}A=null;0!==q?(f=c+f,g=d+g,A=we(Q,f,g,1,1,q,-f,-g),Ea(v),xa(v,ve(Q,L)),xa(v,ve(Q,T)),xa(v,ve(Q,ka)),xa(v,ve(Q,Z))):Da(I,K,I+R,K+H,v);q=b.canvas;q=v[0]<=q.width&&0<=v[2]&&v[1]<=q.height&&0<=v[3]; -if(h){if(q||1!=h[4])Ia(h,v),(a=q?[b,A?A.slice(0):null,l,e,n,p,u,k,c,d,t]:null)&&F&&a.push(C,G,L,T,ka,Z),h.push(a)}else q&&(F&&ui(a,b,L,T,ka,Z,C,G),zh(b,A,l,e,n,p,u,k,c,d,t))}function xi(a,b){var c=a.pixelRatio;return 1==c?b:b.map(function(a){return a*c})} -function yi(a,b,c,d,e,f,g){var h=a.coordinates.length,k=zi(a);g&&(c+=e);g=[b[c],b[c+1]];var l=[NaN,NaN],n=!0,p;for(p=c+e;pt&&(C|=4);Au&&(C|=2);0===C&&(C=1);q=C;q!==G?(n&&(a.coordinates[h++]=g[0],a.coordinates[h++]=g[1]),a.coordinates[h++]=l[0],a.coordinates[h++]=l[1],n=!1):1===q?(a.coordinates[h++]=l[0],a.coordinates[h++]=l[1],n=!1):n=!0;g[0]=l[0];g[1]=l[1];var G=q}if(f&&n||p===c+e)a.coordinates[h++]= -g[0],a.coordinates[h++]=g[1];return h}function Ai(a,b,c,d,e,f){for(var g=0,h=d.length;gZ&&(a.ma(b),R=0);H>Z&&(b.stroke(), -H=0);R||H||(b.beginPath(),v=A=NaN);++l;break;case 2:p=E[1];var Cb=h[p],Ac=h[p+1],Ta=h[p+2]-Cb,ob=h[p+3]-Ac,de=Math.sqrt(Ta*Ta+ob*ob);b.moveTo(Cb+de,Ac);b.arc(Cb,Ac,de,0,2*Math.PI,!0);++l;break;case 3:b.closePath();++l;break;case 4:p=E[1];q=E[2];var jd=E[4],kd=6==E.length?E[5]:void 0;ka.geometry=E[3];ka.feature=aa;l in L||(L[l]=[]);var Bc=L[l];kd?kd(h,p,q,2,Bc):(Bc[0]=h[p],Bc[1]=h[p+1],Bc.length=2);jd(Bc,ka);++l;break;case 6:p=E[1];q=E[2];Q=E[3];t=E[4];u=E[5];F=f?null:E[6];var Yb=E[7],cn=E[8],dn=E[9], -en=E[10],fn=E[11],yj=E[12],gn=E[13],hn=E[14],jn=E[15];if(16Zb[Oj-2],Rj=Pj.length,he=Zb[qb],ie=Zb[qb+1];qb+=2;for(var ld=Zb[qb],md=Zb[qb+1],ah=0,Ye=Math.sqrt(Math.pow(ld-he,2)+Math.pow(md-ie,2)),Dc="",bh=0,Ze=0;ZeMath.PI?-2*Math.PI:$e<-Math.PI?2*Math.PI:0;if(Math.abs($e)>nn){var pd=null;break a}}var Tj=on/Ye,Uj=sa(he,ld,Tj),Vj=sa(ie,md,Tj);Xe==od?(ge&&(Cc[0]=Uj,Cc[1]=Vj,Cc[2]=nd/2),Cc[4]=Dc):(Dc=ch,bh=nd,Cc=[Uj,Vj,nd/2,od,Dc],ge?$g.unshift(Cc):$g.push(Cc),Xe=od);Qj+=nd}pd=$g}if(pd){var af;if(Gj){var Ec=0;for(af=pd.length;Ecthis.$&&(this.$=c.lineWidth,this.c=null)):(c.strokeStyle=void 0,c.lineCap=void 0,c.lineDash=null,c.lineDashOffset=void 0,c.lineJoin=void 0,c.lineWidth=void 0,c.miterLimit= -void 0)};m.dd=function(a,b){var c=a.fillStyle;a=[10,c];"string"!==typeof c&&(b=b.C(),a.push([b[0],b[3]]));this.f.push(a)};m.gb=function(a){this.f.push([11,a.strokeStyle,a.lineWidth*this.pixelRatio,a.lineCap,a.lineJoin,a.miterLimit,xi(this,a.lineDash),a.lineDashOffset*this.pixelRatio])};function Gi(a,b,c,d){var e=b.fillStyle;if("string"!==typeof e||b.ue!=e)c.call(a,b,d),b.ue=e} -function Hi(a,b,c){var d=b.strokeStyle,e=b.lineCap,f=b.lineDash,g=b.lineDashOffset,h=b.lineJoin,k=b.lineWidth,l=b.miterLimit;if(b.Ae!=d||b.ve!=e||f!=b.jd&&!Rb(b.jd,f)||b.we!=g||b.xe!=h||b.ye!=k||b.ze!=l)c.call(a,b),b.Ae=d,b.ve=e,b.jd=f,b.we=g,b.xe=h,b.ye=k,b.ze=l}function Ci(a,b){a.G[2]=a.f.length;a.G=null;a.J[2]=a.a.length;a.J=null;b=[7,b];a.f.push(b);a.a.push(b)}m.Tb=fa;function zi(a){a.c||(a.c=za(a.Ga),0e.maxAngle&&(F>G&&(G=F,n=Q,C=l),F=0,Q=l-h)),A=g,v=t,u=q);t=R;q=H}g=F+g>G?[Q,l]:[n,C];l=g[0];n=g[1]}else n=k[f];for(g=l;g=p)&&d.push(n[g],n[g+1]);g=d.length;if(0==g)return}g=yi(this,d,0,g,h,!1,!1);Bi(this,b);if(e.backgroundFill||e.backgroundStroke)this.Ua(e.backgroundFill,e.backgroundStroke),Gi(this,this.state, -this.dd,a),Hi(this,this.state,this.gb);Qi(this,k,c,g)}Ci(this,b)}}; -Oi.prototype.W=function(a,b,c,d){var e=d+b+a+c+this.pixelRatio;if(!ph.b.hasOwnProperty(e)){var f=d?this.ia[d]||this.i:null,g=c?this.K[c]||this.b:null,h=this.l[b]||this.g,k=h.scale*this.pixelRatio,l=si[h.textAlign||"center"];b=d&&f.lineWidth?f.lineWidth:0;a=a.split("\n");var n=a.length,p=[],q=h.font;var t=a.length;var u=0;var v;for(v=0;v=e)for(d=e;d=d;)Ti(c,a+b,a+d),Ti(c,a+d,a+b),Ti(c,a-d,a+b),Ti(c,a-b,a+d),Ti(c,a-b,a-d),Ti(c,a-d,a-b),Ti(c,a+d,a-b),Ti(c,a+b,a-d),d++,e+=1+2*d,0<2*(e-b)+1&&(--b,e+=1-2*b);return Si[a]=c}function Vi(a,b){var c=null;a.f&&(b?(c=a.b,c[4]++):(c=a.b=wa(),c.push(1)));return c}function Wi(a){for(var b in a.a){var c=a.a[b],d;for(d in c)c[d].Tb()}} -Ri.prototype.wa=function(a,b,c,d,e,f,g){d=Math.round(d);var h=2*d+1,k=we(this.j,d+.5,d+.5,1/b,-1/b,-c,-a[0],-a[1]),l=this.g;l.canvas.width!==h||l.canvas.height!==h?(l.canvas.width=h,l.canvas.height=h):l.clearRect(0,0,h,h);if(void 0!==this.c){var n=wa();xa(n,a);ya(n,b*(this.c+d),n)}var p=Ui(d),q;this.f&&(q=this.f.all().map(function(a){return a.value}));return Xi(this,l,k,c,e,function(a){for(var b=l.getImageData(0,0,h,h).data,c=0;cl[2];)++Q,p=n*Q,p=bi(this,a,p),t.Ta(C,p,k,f),h-=n;p=bi(this,a,0)}xh(C,k,F/2,e/2);C!=c&&(A&&ai(this,"render",C,a,p),v?(d=c.globalAlpha,c.globalAlpha=b.opacity,c.drawImage(C.canvas,-q,-u),c.globalAlpha=d):c.drawImage(C.canvas,-q,-u), -C.translate(-q,-u));v||(C.globalAlpha=G)}g&&c.restore();this.Wb(c,a,b,p)};m.wa=function(a,b,c,d,e){if(this.b){var f=this.a,g={};return this.b.wa(a,b.viewState.resolution,b.viewState.rotation,c,{},function(a){var b=x(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)},null)}};m.Hd=function(){var a=this.a;a.wb()&&this.b&&a.D()};m.Id=function(){Th(this)}; -m.ob=function(a){var b=this.a,c=b.fa();Vh(a,c);var d=a.viewHints[0],e=a.viewHints[1],f=b.B,g=b.G;if(!this.c&&!f&&d||!g&&e)return!0;f=a.extent;var h=a.viewState;g=h.projection;var k=h.resolution,l=a.pixelRatio;d=b.i;var n=b.j;e=b.get(fj);void 0===e&&(e=aj);f=ya(f,n*k);n=h.projection.C();c.A&&h.projection.f&&!Ba(n,a.extent)&&(a=Math.max(La(f)/2,La(n)),f[0]=n[0]-a,f[2]=n[2]+a);if(!this.c&&this.s==k&&this.A==d&&this.l==e&&Ba(this.u,f))return this.j=!1,!0;this.b=null;this.c=!1;var p=new Ri(.5*k/l,f,k, -l,c.L,this.g,b.j);gj(c,f,k,g);a=function(a){var c=a.Sa();if(c)var d=c.call(a,k);else(c=b.Sa())&&(d=c(a,k));if(d){if(d){c=!1;if(Array.isArray(d))for(var e=0,f=d.length;eb?1:0}function e(a,b){if(!(this instanceof e))return new e(a,b);this.jc=Math.max(4,a||9);this.$c=Math.max(2,Math.ceil(.4*this.jc));b&&this.me(b);this.clear()}function f(a,b){g(a,0,a.children.length,b,a)}function g(a,b,c,d,e){e||(e=u(null));e.O=Infinity;e.N=Infinity;e.R=-Infinity;e.P=-Infinity;for(var f;b=a.O&&b.P>=a.N}function u(a){return{children:a,height:1,oa:!0,O:Infinity,N:Infinity,R:-Infinity,P:-Infinity}}function v(a,b,c,d,e){for(var f=[b,c],g;f.length;)c=f.pop(),b=f.pop(),c-b<=d||(g=b+Math.ceil((c-b)/d/2)*d,A(a,g,b,c,e),f.push(b,g,g,c))}var A=b;e.prototype={all:function(){return this.Wc(this.data, +[])},search:function(a){var b=this.data,c=[],d=this.za;if(!t(a,b))return c;for(var e=[],f,g,h,k;b;){f=0;for(g=b.children.length;fthis.jc)this.oe(d,b),b--;else break;this.ge(c,d,b)},oe:function(a,b){var c=a[b],d=c.children.length, +e=this.$c;this.he(c,e,d);d=this.ie(c,e,d);d=u(c.children.splice(d,c.children.length-d));d.height=c.height;d.oa=c.oa;f(c,this.za);f(d,this.za);b?a[b-1].children.push(d):this.cd(c,d)},cd:function(a,b){this.data=u([a,b]);this.data.height=a.height+1;this.data.oa=!1;f(this.data,this.za)},ie:function(a,b,c){var d,e;var f=e=Infinity;for(d=b;d<=c-b;d++){var h=g(a,0,d,this.za);var k=g(a,d,c,this.za);var l=Math.max(0,Math.min(h.R,k.R)-Math.max(h.O,k.O))*Math.max(0,Math.min(h.P,k.P)-Math.max(h.N,k.N));h=n(h)+ +n(k);if(l=b;l--)n=a.children[l],h(f,a.oa?d(n):n),k+=p(f);return k},ge:function(a,b,c){for(;0<=c;c--)h(b[c],a)},ke:function(a){for(var b=a.length- +1,c;0<=b;b--)0===a[b].children.length?0e.width?e.width-n:v;k=k+p>e.height?e.height-p:k;v=a.Ha;var R=A[3]+u*t+A[1],H=A[0]+k*t+A[2],I=c-A[3],K=d-A[0];if(F||0!==q){var L=[I,K];var T=[I+R,K];var ka=[I+R,K+H];var aa=[I,K+H]}A=null;0!==q?(f=c+f,g=d+g,A=xe(Q,f,g,1,1,q,-f,-g),Fa(v),ya(v,we(Q,L)),ya(v,we(Q,T)),ya(v,we(Q,ka)),ya(v,we(Q,aa))):Ea(I,K,I+R,K+H,v);q=b.canvas;q=v[0]<=q.width&&0<=v[2]&&v[1]<=q.height&&0<= +v[3];if(h){if(q||1!=h[4])Ja(h,v),(a=q?[b,A?A.slice(0):null,l,e,n,p,u,k,c,d,t]:null)&&F&&a.push(C,G,L,T,ka,aa),h.push(a)}else q&&(F&&vi(a,b,L,T,ka,aa,C,G),Ah(b,A,l,e,n,p,u,k,c,d,t))}function yi(a,b){var c=a.pixelRatio;return 1==c?b:b.map(function(a){return a*c})} +function zi(a,b,c,d,e,f,g){var h=a.coordinates.length,k=Ai(a);g&&(c+=e);g=[b[c],b[c+1]];var l=[NaN,NaN],n=!0,p;for(p=c+e;pt&&(C|=4);Au&&(C|=2);0===C&&(C=1);q=C;q!==G?(n&&(a.coordinates[h++]=g[0],a.coordinates[h++]=g[1]),a.coordinates[h++]=l[0],a.coordinates[h++]=l[1],n=!1):1===q?(a.coordinates[h++]=l[0],a.coordinates[h++]=l[1],n=!1):n=!0;g[0]=l[0];g[1]=l[1];var G=q}if(f&&n||p===c+e)a.coordinates[h++]= +g[0],a.coordinates[h++]=g[1];return h}function Bi(a,b,c,d,e,f){for(var g=0,h=d.length;gaa&&(a.ma(b),R=0);H>aa&& +(b.stroke(),H=0);R||H||(b.beginPath(),v=A=NaN);++l;break;case 2:p=E[1];var Cb=h[p],Ac=h[p+1],Ta=h[p+2]-Cb,ob=h[p+3]-Ac,de=Math.sqrt(Ta*Ta+ob*ob);b.moveTo(Cb+de,Ac);b.arc(Cb,Ac,de,0,2*Math.PI,!0);++l;break;case 3:b.closePath();++l;break;case 4:p=E[1];q=E[2];var jd=E[4],kd=6==E.length?E[5]:void 0;ka.geometry=E[3];ka.feature=ba;l in L||(L[l]=[]);var Bc=L[l];kd?kd(h,p,q,2,Bc):(Bc[0]=h[p],Bc[1]=h[p+1],Bc.length=2);jd(Bc,ka);++l;break;case 6:p=E[1];q=E[2];Q=E[3];t=E[4];u=E[5];F=f?null:E[6];var Yb=E[7], +cn=E[8],dn=E[9],en=E[10],fn=E[11],yj=E[12],gn=E[13],hn=E[14],jn=E[15];if(16Zb[Oj-2],Rj=Pj.length,he=Zb[qb],ie=Zb[qb+1];qb+=2;for(var ld=Zb[qb],md=Zb[qb+1],ah=0,Ye=Math.sqrt(Math.pow(ld-he,2)+Math.pow(md-ie,2)),Dc="",bh=0,Ze=0;ZeMath.PI?-2*Math.PI:$e<-Math.PI?2*Math.PI:0;if(Math.abs($e)>nn){var pd=null;break a}}var Tj=on/Ye,Uj=ta(he,ld,Tj),Vj=ta(ie,md,Tj);Xe==od?(ge&&(Cc[0]=Uj,Cc[1]=Vj,Cc[2]=nd/2),Cc[4]=Dc):(Dc=ch,bh=nd,Cc=[Uj,Vj,nd/2,od,Dc],ge?$g.unshift(Cc):$g.push(Cc),Xe=od);Qj+=nd}pd=$g}if(pd){var af;if(Gj){var Ec=0;for(af=pd.length;Ec< +af;++Ec){var cb=pd[Ec];var dh=cb[4];var Eb=a.W(dh,Vg,"",Gj);t=cb[2]+Hj;u=Ug*Eb.height+2*(.5-Ug)*Hj-Fj;xi(a,b,cb[0],cb[1],Eb,t,u,F,Eb.height,1,0,0,cb[3],Jj,!1,Eb.width,ph,null,null)}}if(Dj)for(Ec=0,af=pd.length;Ecthis.$&&(this.$=c.lineWidth,this.c=null)):(c.strokeStyle=void 0,c.lineCap=void 0,c.lineDash=null,c.lineDashOffset=void 0,c.lineJoin=void 0,c.lineWidth=void 0,c.miterLimit= +void 0)};m.ed=function(a,b){var c=a.fillStyle;a=[10,c];"string"!==typeof c&&(b=b.C(),a.push([b[0],b[3]]));this.f.push(a)};m.gb=function(a){this.f.push([11,a.strokeStyle,a.lineWidth*this.pixelRatio,a.lineCap,a.lineJoin,a.miterLimit,yi(this,a.lineDash),a.lineDashOffset*this.pixelRatio])};function Hi(a,b,c,d){var e=b.fillStyle;if("string"!==typeof e||b.ve!=e)c.call(a,b,d),b.ve=e} +function Ii(a,b,c){var d=b.strokeStyle,e=b.lineCap,f=b.lineDash,g=b.lineDashOffset,h=b.lineJoin,k=b.lineWidth,l=b.miterLimit;if(b.Be!=d||b.we!=e||f!=b.kd&&!Sb(b.kd,f)||b.xe!=g||b.ye!=h||b.ze!=k||b.Ae!=l)c.call(a,b),b.Be=d,b.we=e,b.kd=f,b.xe=g,b.ye=h,b.ze=k,b.Ae=l}function Di(a,b){a.G[2]=a.f.length;a.G=null;a.J[2]=a.a.length;a.J=null;b=[7,b];a.f.push(b);a.a.push(b)}m.Tb=ha;function Ai(a){a.c||(a.c=Aa(a.Ga),0e.maxAngle&&(F>G&&(G=F,n=Q,C=l),F=0,Q=l-h)),A=g,v=t,u=q);t=R;q=H}g=F+g>G?[Q,l]:[n,C];l=g[0];n=g[1]}else n=k[f];for(g=l;g=p)&&d.push(n[g],n[g+1]);g=d.length;if(0==g)return}g=zi(this,d,0,g,h,!1,!1);Ci(this,b);if(e.backgroundFill||e.backgroundStroke)this.Ua(e.backgroundFill,e.backgroundStroke),Hi(this,this.state, +this.ed,a),Ii(this,this.state,this.gb);Ri(this,k,c,g)}Di(this,b)}}; +Pi.prototype.W=function(a,b,c,d){var e=d+b+a+c+this.pixelRatio;if(!qh.b.hasOwnProperty(e)){var f=d?this.ia[d]||this.i:null,g=c?this.K[c]||this.b:null,h=this.l[b]||this.g,k=h.scale*this.pixelRatio,l=ti[h.textAlign||"center"];b=d&&f.lineWidth?f.lineWidth:0;a=a.split("\n");var n=a.length,p=[],q=h.font;var t=a.length;var u=0;var v;for(v=0;v=e)for(d=e;d=d;)Ui(c,a+b,a+d),Ui(c,a+d,a+b),Ui(c,a-d,a+b),Ui(c,a-b,a+d),Ui(c,a-b,a-d),Ui(c,a-d,a-b),Ui(c,a+d,a-b),Ui(c,a+b,a-d),d++,e+=1+2*d,0<2*(e-b)+1&&(--b,e+=1-2*b);return Ti[a]=c}function Wi(a,b){var c=null;a.f&&(b?(c=a.b,c[4]++):(c=a.b=xa(),c.push(1)));return c}function Xi(a){for(var b in a.a){var c=a.a[b],d;for(d in c)c[d].Tb()}} +Si.prototype.wa=function(a,b,c,d,e,f,g){d=Math.round(d);var h=2*d+1,k=xe(this.j,d+.5,d+.5,1/b,-1/b,-c,-a[0],-a[1]),l=this.g;l.canvas.width!==h||l.canvas.height!==h?(l.canvas.width=h,l.canvas.height=h):l.clearRect(0,0,h,h);if(void 0!==this.c){var n=xa();ya(n,a);za(n,b*(this.c+d),n)}var p=Vi(d),q;this.f&&(q=this.f.all().map(function(a){return a.value}));return Yi(this,l,k,c,e,function(a){for(var b=l.getImageData(0,0,h,h).data,c=0;cl[2];)++Q,p=n*Q,p=ci(this,a,p),t.Ta(C,p,k,f),h-=n;p=ci(this,a,0)}yh(C,k,F/2,e/2);C!=c&&(A&&bi(this,"render",C,a,p),v?(d=c.globalAlpha,c.globalAlpha=b.opacity,c.drawImage(C.canvas,-q,-u),c.globalAlpha=d):c.drawImage(C.canvas,-q,-u), +C.translate(-q,-u));v||(C.globalAlpha=G)}g&&c.restore();this.Wb(c,a,b,p)};m.wa=function(a,b,c,d,e){if(this.b){var f=this.a,g={};return this.b.wa(a,b.viewState.resolution,b.viewState.rotation,c,{},function(a){var b=x(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)},null)}};m.Id=function(){var a=this.a;a.wb()&&this.b&&a.D()};m.Jd=function(){Uh(this)}; +m.ob=function(a){var b=this.a,c=b.fa();Wh(a,c);var d=a.viewHints[0],e=a.viewHints[1],f=b.B,g=b.G;if(!this.c&&!f&&d||!g&&e)return!0;f=a.extent;var h=a.viewState;g=h.projection;var k=h.resolution,l=a.pixelRatio;d=b.i;var n=b.j;e=b.get(gj);void 0===e&&(e=bj);f=za(f,n*k);n=h.projection.C();c.A&&h.projection.f&&!Ca(n,a.extent)&&(a=Math.max(Ma(f)/2,Ma(n)),f[0]=n[0]-a,f[2]=n[2]+a);if(!this.c&&this.s==k&&this.A==d&&this.l==e&&Ca(this.u,f))return this.j=!1,!0;this.b=null;this.c=!1;var p=new Si(.5*k/l,f,k, +l,c.L,this.g,b.j);hj(c,f,k,g);a=function(a){var c=a.Sa();if(c)var d=c.call(a,k);else(c=b.Sa())&&(d=c(a,k));if(d){if(d){c=!1;if(Array.isArray(d))for(var e=0,f=d.length;ee;++e)Qb(b,a.offset(c, -d,2*Math.PI*e/32));b.push(b[0],b[1]);a=new cf(null);df(a,"XY",b,[b.length]);a.sb(this.c);this.set("accuracyGeometry",a);this.D()};m.tg=function(a){a.type="error";this.Zb(!1);this.f(a)};m.Ge=function(){return this.get("accuracy")};m.He=function(){return this.get("accuracyGeometry")||null};m.Ie=function(){return this.get("altitude")};m.Je=function(){return this.get("altitudeAccuracy")};m.Me=function(){return this.get("heading")};m.Kf=function(){return this.get("position")};m.zd=function(){return this.get("projection")}; -m.Pe=function(){return this.get("speed")};m.qd=function(){return this.get("tracking")};m.rd=function(){return this.get("trackingOptions")};m.Ad=function(a){this.set("projection",Ab(a))};m.Zb=function(a){this.set("tracking",a)};m.Vd=function(a){this.set("trackingOptions",a)};function Yj(a,b,c,d,e){var f=NaN,g=NaN,h=(c-b)/d;if(1===h)f=a[b],g=a[b+1];else if(2==h)f=.5*a[b]+.5*a[b+d],g=.5*a[b+1]+.5*a[b+d+1];else if(0!==h){g=a[b];h=a[b+1];var k=0;f=[0];var l;for(l=b+d;l>1),h=+Ob(f[g],c),0>h?k=g+1:(l=g,n=!h);g=n?k:~k;0>g?(c=(c-f[-g-2])/(f[-g-1]-f[-g-2]),b+=(-g-2)*d,f=sa(a[b],a[b+d],c),g=sa(a[b+1],a[b+d+1],c)):(f=a[b+g*d],g=a[b+g*d+1])}return e?(e[0]= -f,e[1]=g,e):[f,g]}function Zj(a,b,c,d,e){if(0==b)return null;if(d>1;de;++e)Rb(b,a.offset(c, +d,2*Math.PI*e/32));b.push(b[0],b[1]);a=new df(null);ef(a,"XY",b,[b.length]);a.sb(this.c);this.set("accuracyGeometry",a);this.D()};m.vg=function(a){a.type="error";this.Zb(!1);this.f(a)};m.He=function(){return this.get("accuracy")};m.Ie=function(){return this.get("accuracyGeometry")||null};m.Je=function(){return this.get("altitude")};m.Ke=function(){return this.get("altitudeAccuracy")};m.Ne=function(){return this.get("heading")};m.Mf=function(){return this.get("position")};m.Ad=function(){return this.get("projection")}; +m.Qe=function(){return this.get("speed")};m.rd=function(){return this.get("tracking")};m.sd=function(){return this.get("trackingOptions")};m.Bd=function(a){this.set("projection",Bb(a))};m.Zb=function(a){this.set("tracking",a)};m.Wd=function(a){this.set("trackingOptions",a)};function Yj(a,b,c,d,e){var f=NaN,g=NaN,h=(c-b)/d;if(1===h)f=a[b],g=a[b+1];else if(2==h)f=.5*a[b]+.5*a[b+d],g=.5*a[b+1]+.5*a[b+d+1];else if(0!==h){g=a[b];h=a[b+1];var k=0;f=[0];var l;for(l=b+d;l>1),h=+Pb(f[g],c),0>h?k=g+1:(l=g,n=!h);g=n?k:~k;0>g?(c=(c-f[-g-2])/(f[-g-1]-f[-g-2]),b+=(-g-2)*d,f=ta(a[b],a[b+d],c),g=ta(a[b+1],a[b+d+1],c)):(f=a[b+g*d],g=a[b+g*d+1])}return e?(e[0]= +f,e[1]=g,e):[f,g]}function Zj(a,b,c,d,e){if(0==b)return null;if(d>1;d=a.b?1:Math.pow(b/a.b,3)};function gk(a,b,c,d,e,f){dk.call(this,a,b,f);this.c=d;this.g=c;this.H=new Image;null!==d&&(this.H.crossOrigin=d);this.i=null;this.j=e}w(gk,dk);m=gk.prototype;m.aa=function(){1==this.state&&(hk(this),this.H=ik());this.a&&sc(this.a);this.state=5;ek(this);dk.prototype.aa.call(this)};m.W=function(){return this.H};m.Xa=function(){return this.g};m.Mf=function(){this.state=3;hk(this);this.H=ik();ek(this)};m.Nf=function(){this.state=this.H.naturalWidth&&this.H.naturalHeight?2:4;hk(this);ek(this)}; -m.load=function(){3==this.state&&(this.state=0,this.H=new Image,null!==this.c&&(this.H.crossOrigin=this.c));0==this.state&&(this.state=1,ek(this),this.i=[B(this.H,"error",this.Mf,this,!0),B(this.H,"load",this.Nf,this,!0)],this.j(this,this.g))};function hk(a){a.i.forEach(z);a.i=null}function ik(){var a=qf(1,1);a.fillStyle="rgba(0,0,0,0)";a.fillRect(0,0,1,1);return a.canvas};function jk(){this.f=pi.$a(void 0);this.a={}}m=jk.prototype;m.Y=function(a,b){a={O:a[0],N:a[1],R:a[2],P:a[3],value:b};this.f.Y(a);this.a[x(b)]=a};m.load=function(a,b){for(var c=Array(b.length),d=0,e=b.length;dd?b[0]=d-c:0>e&&(b[0]=Math.abs(e)+c),0>f?b[1]=f-c:0>g&&(b[1]=Math.abs(g)+c), -0===b[0]&&0===b[1])||(c=a.T().ba(),c=a.ra(c),b=[c[0]+b[0],c[1]+b[1]],a.T().animate({center:a.xa(b),duration:this.autoPanAnimation.duration,easing:this.autoPanAnimation.easing}))}}};m.cf=function(){vk(this)};m.setMap=function(a){this.set(rk,a)};m.Ud=function(a){this.set(sk,a)};m.Bd=function(a){this.set(tk,a)};function wk(a,b){var c=a.getBoundingClientRect();a=c.left+window.pageXOffset;c=c.top+window.pageYOffset;return[a,c,a+b[0],c+b[1]]} +ck.prototype.sa=function(){return this.ca};function dk(a,b,c){wc.call(this);c=c?c:{};this.ja=a;this.state=b;this.a=null;this.key="";this.b=void 0===c.transition?250:c.transition;this.u={}}w(dk,wc);function ek(a){a.f("change")}dk.prototype.Xa=function(){return this.key+"/"+this.ja};function ni(a){if(!a.a)return a;var b=a.a;do{if(2==b.state)return b;b=b.a}while(b);return a}function fk(a){if(a.a){var b=a.a;do{if(2==b.state){b.a=null;break}else 1==b.state?a=b:0==b.state?a.a=b.a:a=b;b=a.a}while(b)}}function mi(a){a.state=2;ek(a)} +function oi(a,b,c){if(!a.b)return 1;var d=a.u[b];if(!d)d=c,a.u[b]=d;else if(-1===d)return 1;b=c-d+1E3/60;return b>=a.b?1:Math.pow(b/a.b,3)};function gk(a,b,c,d,e,f){dk.call(this,a,b,f);this.c=d;this.g=c;this.H=new Image;null!==d&&(this.H.crossOrigin=d);this.i=null;this.j=e}w(gk,dk);m=gk.prototype;m.aa=function(){1==this.state&&(hk(this),this.H=ik());this.a&&tc(this.a);this.state=5;ek(this);dk.prototype.aa.call(this)};m.W=function(){return this.H};m.Xa=function(){return this.g};m.Of=function(){this.state=3;hk(this);this.H=ik();ek(this)};m.Pf=function(){this.state=this.H.naturalWidth&&this.H.naturalHeight?2:4;hk(this);ek(this)}; +m.load=function(){3==this.state&&(this.state=0,this.H=new Image,null!==this.c&&(this.H.crossOrigin=this.c));0==this.state&&(this.state=1,ek(this),this.i=[B(this.H,"error",this.Of,this,!0),B(this.H,"load",this.Pf,this,!0)],this.j(this,this.g))};function hk(a){a.i.forEach(z);a.i=null}function ik(){var a=rf(1,1);a.fillStyle="rgba(0,0,0,0)";a.fillRect(0,0,1,1);return a.canvas};function jk(){this.f=qi.$a(void 0);this.a={}}m=jk.prototype;m.Y=function(a,b){a={O:a[0],N:a[1],R:a[2],P:a[3],value:b};this.f.Y(a);this.a[x(b)]=a};m.load=function(a,b){for(var c=Array(b.length),d=0,e=b.length;dd?b[0]=d-c:0>e&&(b[0]=Math.abs(e)+c),0>f?b[1]=f-c:0>g&&(b[1]=Math.abs(g)+c), +0===b[0]&&0===b[1])||(c=a.T().ba(),c=a.ra(c),b=[c[0]+b[0],c[1]+b[1]],a.T().animate({center:a.xa(b),duration:this.autoPanAnimation.duration,easing:this.autoPanAnimation.easing}))}}};m.df=function(){vk(this)};m.setMap=function(a){this.set(rk,a)};m.Vd=function(a){this.set(sk,a)};m.Cd=function(a){this.set(tk,a)};function wk(a,b){var c=a.getBoundingClientRect();a=c.left+window.pageXOffset;c=c.top+window.pageYOffset;return[a,c,a+b[0],c+b[1]]} function xk(a,b){a.a.visible!==b&&(a.element.style.display=b?"":"none",a.a.visible=b)} function vk(a){var b=a.get(rk),c=a.get(tk);if(b&&b.b&&c){c=b.ra(c);var d=b.kb();b=a.element.style;var e=a.get(sk),f=a.get(uk);xk(a,!0);var g=e[0];e=e[1];if("bottom-right"==f||"center-right"==f||"top-right"==f)""!==a.a.Qb&&(a.a.Qb=b.left=""),g=Math.round(d[0]-c[0]-g)+"px",a.a.Xb!=g&&(a.a.Xb=b.right=g);else{""!==a.a.Xb&&(a.a.Xb=b.right="");if("bottom-center"==f||"center-center"==f||"top-center"==f)g-=a.element.offsetWidth/2;g=Math.round(c[0]+g)+"px";a.a.Qb!=g&&(a.a.Qb=b.left=g)}if("bottom-left"==f|| -"bottom-center"==f||"bottom-right"==f)""!==a.a.bc&&(a.a.bc=b.top=""),c=Math.round(d[1]-c[1]-e)+"px",a.a.Hb!=c&&(a.a.Hb=b.bottom=c);else{""!==a.a.Hb&&(a.a.Hb=b.bottom="");if("center-left"==f||"center-center"==f||"center-right"==f)e-=a.element.offsetHeight/2;c=Math.round(c[1]+e)+"px";a.a.bc!=c&&(a.a.bc=b.top=c)}}else xk(a,!1)}var qk="element",rk="map",sk="offset",tk="position",uk="positioning";function yk(a){a=a?a:{};var b=document.createElement("DIV");b.className=void 0!==a.className?a.className:"ol-mouse-position";Jf.call(this,{element:b,render:a.render?a.render:zk,target:a.target});B(this,zc(Ak),this.v,this);a.coordinateFormat&&this.set(Bk,a.coordinateFormat);a.projection&&this.set(Ak,Ab(a.projection));this.B=void 0!==a.undefinedHTML?a.undefinedHTML:"";this.j=b.innerHTML;this.g=this.c=this.a=null}w(yk,Jf); -function zk(a){a=a.frameState;a?this.a!=a.viewState.projection&&(this.a=a.viewState.projection,this.c=null):this.a=null;Ck(this,this.g)}yk.prototype.v=function(){this.c=null};yk.prototype.s=function(a){this.g=this.b.Kb(a);Ck(this,this.g)};yk.prototype.A=function(){Ck(this,null);this.g=null};yk.prototype.setMap=function(a){Jf.prototype.setMap.call(this,a);a&&(a=a.a,this.l.push(B(a,"mousemove",this.s,this),B(a,"mouseout",this.A,this)))}; -function Ck(a,b){var c=a.B;if(b&&a.a){if(!a.c){var d=a.get(Ak);a.c=d?Bb(a.a,d):Lb}if(b=a.b.xa(b))a.c(b,b),c=(c=a.get(Bk))?c(b):b.toString()}a.j&&c==a.j||(a.element.innerHTML=c,a.j=c)}var Ak="projection",Bk="coordinateFormat";function Dk(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-scale-line";this.g=document.createElement("DIV");this.g.className=b+"-inner";this.a=document.createElement("DIV");this.a.className=b+" ol-unselectable";this.a.appendChild(this.g);this.s=null;this.j=void 0!==a.minWidth?a.minWidth:64;this.c=!1;this.v=void 0;this.A="";Jf.call(this,{element:this.a,render:a.render?a.render:Ek,target:a.target});B(this,zc(Fk),this.B,this);this.set(Fk,a.units||"metric")}w(Dk,Jf);var Gk=[1,2,5]; +"bottom-center"==f||"bottom-right"==f)""!==a.a.bc&&(a.a.bc=b.top=""),c=Math.round(d[1]-c[1]-e)+"px",a.a.Hb!=c&&(a.a.Hb=b.bottom=c);else{""!==a.a.Hb&&(a.a.Hb=b.bottom="");if("center-left"==f||"center-center"==f||"center-right"==f)e-=a.element.offsetHeight/2;c=Math.round(c[1]+e)+"px";a.a.bc!=c&&(a.a.bc=b.top=c)}}else xk(a,!1)}var qk="element",rk="map",sk="offset",tk="position",uk="positioning";function yk(a){a=a?a:{};var b=document.createElement("DIV");b.className=void 0!==a.className?a.className:"ol-mouse-position";Kf.call(this,{element:b,render:a.render?a.render:zk,target:a.target});B(this,Fc(Ak),this.v,this);a.coordinateFormat&&this.set(Bk,a.coordinateFormat);a.projection&&this.set(Ak,Bb(a.projection));this.B=void 0!==a.undefinedHTML?a.undefinedHTML:"";this.j=b.innerHTML;this.g=this.c=this.a=null}w(yk,Kf); +function zk(a){a=a.frameState;a?this.a!=a.viewState.projection&&(this.a=a.viewState.projection,this.c=null):this.a=null;Ck(this,this.g)}yk.prototype.v=function(){this.c=null};yk.prototype.s=function(a){this.g=this.b.Kb(a);Ck(this,this.g)};yk.prototype.A=function(){Ck(this,null);this.g=null};yk.prototype.setMap=function(a){Kf.prototype.setMap.call(this,a);a&&(a=a.a,this.l.push(B(a,"mousemove",this.s,this),B(a,"mouseout",this.A,this)))}; +function Ck(a,b){var c=a.B;if(b&&a.a){if(!a.c){var d=a.get(Ak);a.c=d?Db(a.a,d):Mb}if(b=a.b.xa(b))a.c(b,b),c=(c=a.get(Bk))?c(b):b.toString()}a.j&&c==a.j||(a.element.innerHTML=c,a.j=c)}var Ak="projection",Bk="coordinateFormat";function Dk(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-scale-line";this.g=document.createElement("DIV");this.g.className=b+"-inner";this.a=document.createElement("DIV");this.a.className=b+" ol-unselectable";this.a.appendChild(this.g);this.s=null;this.j=void 0!==a.minWidth?a.minWidth:64;this.c=!1;this.v=void 0;this.A="";Kf.call(this,{element:this.a,render:a.render?a.render:Ek,target:a.target});B(this,Fc(Fk),this.B,this);this.set(Fk,a.units||"metric")}w(Dk,Kf);var Gk=[1,2,5]; function Ek(a){(a=a.frameState)?this.s=a.viewState:this.s=null;Hk(this)}Dk.prototype.B=function(){Hk(this)}; -function Hk(a){var b=a.s;if(b){var c=b.center,d=b.projection,e=a.get(Fk);b=zb(d,b.resolution,c,"degrees"==e?"degrees":"m");"degrees"!=e&&(b*=gb(d));var f=a.j*b;c="";"degrees"==e?(c=db.degrees,"degrees"==d.a?f*=c:b/=c,ff?(c="in",b/=.0254):1609.344>f?(c="ft",b/=.3048):(c="mi",b/=1609.344):"nautical"==e?(b/=1852,c="nm"):"metric"==e?.001>f?(c="\u03bcm",b*=1E6):1>f?(c="mm",b*=1E3):1E3>f?c="m":(c="km",b/=1E3):"us"==e?.9144> +function Hk(a){var b=a.s;if(b){var c=b.center,d=b.projection,e=a.get(Fk);b=Ab(d,b.resolution,c,"degrees"==e?"degrees":"m");"degrees"!=e&&(b*=hb(d));var f=a.j*b;c="";"degrees"==e?(c=eb.degrees,"degrees"==d.a?f*=c:b/=c,ff?(c="in",b/=.0254):1609.344>f?(c="ft",b/=.3048):(c="mi",b/=1609.344):"nautical"==e?(b/=1852,c="nm"):"metric"==e?.001>f?(c="\u03bcm",b*=1E6):1>f?(c="mm",b*=1E3):1E3>f?c="m":(c="km",b/=1E3):"us"==e?.9144> f?(c="in",b*=39.37):1609.344>f?(c="ft",b/=.30480061):(c="mi",b/=1609.3472):y(!1,33);for(e=3*Math.floor(Math.log(a.j*b)/Math.log(10));;){f=Gk[(e%3+3)%3]*Math.pow(10,Math.floor(e/3));d=Math.round(f/b);if(isNaN(d)){a.a.style.display="none";a.c=!1;return}if(d>=a.j)break;++e}b=f+" "+c;a.A!=b&&(a.g.innerHTML=b,a.A=b);a.v!=d&&(a.g.style.width=d+"px",a.v=d);a.c||(a.a.style.display="",a.c=!0)}else a.c&&(a.a.style.display="none",a.c=!1)}var Fk="units";var Ik=document.implementation.createDocument("","",null);function Jk(a){return Kk(a,!1,[]).join("")}function Kk(a,b,c){if(a.nodeType==Node.CDATA_SECTION_NODE||a.nodeType==Node.TEXT_NODE)b?c.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):c.push(a.nodeValue);else for(a=a.firstChild;a;a=a.nextSibling)Kk(a,b,c);return c}function Lk(a){return(new DOMParser).parseFromString(a,"application/xml")}function Mk(a){return function(b,c){b=a.call(this,b,c);void 0!==b&&c[c.length-1].push(b)}} -function Nk(a){return function(b,c){b=a.call(this,b,c);void 0!==b&&(c[c.length-1]=b)}}function Ok(a){return function(b,c){var d=a.call(this,b,c);if(void 0!==d){c=c[c.length-1];b=b.localName;var e;b in c?e=c[b]:e=c[b]=[];e.push(d)}}}function O(a,b){return function(c,d){var e=a.call(this,c,d);void 0!==e&&(d[d.length-1][void 0!==b?b:c.localName]=e)}}function P(a){return function(b,c,d){a.call(this,b,c,d);d[d.length-1].node.appendChild(b)}} -function Pk(a){var b,c;return function(d,e,f){if(void 0===b){b={};var g={};g[d.localName]=a;b[d.namespaceURI]=g;c=Qk(d.localName)}Rk(b,c,e,f)}}function Qk(a){return function(b,c,d){b=c[c.length-1].node;c=a;void 0===c&&(c=d);return Ik.createElementNS(b.namespaceURI,c)}}var Sk=Qk();function Tk(a,b){for(var c=b.length,d=Array(c),e=0;eg.status){var a=b.F();if("json"==a||"text"==a)var d=g.responseText;else"xml"==a?(d=g.responseXML)||(d=Lk(g.responseText)):"arraybuffer"==a&&(d=g.response);d&&c.call(this,b.zb(d,{featureProjection:f}),b.Mc(d),null)}}.bind(this);g.onerror=function(){}.bind(this);g.send()}} -function Xk(a,b){return Wk(a,b,function(a){this.lc(a)})};function Yk(){this.a=this.defaultDataProjection=null}function Zk(a,b,c){var d;c&&(d={dataProjection:c.dataProjection?c.dataProjection:a.Mc(b),featureProjection:c.featureProjection});return $k(a,d)}function $k(a,b){return Ra({dataProjection:a.defaultDataProjection,featureProjection:a.a},b)} -function al(a,b,c){var d=c?Ab(c.featureProjection):null,e=c?Ab(c.dataProjection):null,f;d&&e&&!Jb(d,e)?a instanceof xe?f=(b?a.clone():a).Ya(b?d:e,b?e:d):f=Nb(a,e,d):f=a;if(b&&c&&void 0!==c.decimals){var g=Math.pow(10,c.decimals);f===a&&(f=f.clone());f.sb(function(a){for(var b=0,c=a.length;bg.status){var a=b.F();if("json"==a||"text"==a)var d=g.responseText;else"xml"==a?(d=g.responseXML)||(d=Lk(g.responseText)):"arraybuffer"==a&&(d=g.response);d&&c.call(this,b.zb(d,{featureProjection:f}),b.Mc(d),null)}}.bind(this);g.onerror=function(){}.bind(this);g.send()}} +function Xk(a,b){return Wk(a,b,function(a){this.lc(a)})};function Yk(){this.a=this.defaultDataProjection=null}function Zk(a,b,c){var d;c&&(d={dataProjection:c.dataProjection?c.dataProjection:a.Mc(b),featureProjection:c.featureProjection});return $k(a,d)}function $k(a,b){return Sa({dataProjection:a.defaultDataProjection,featureProjection:a.a},b)} +function al(a,b,c){var d=c?Bb(c.featureProjection):null,e=c?Bb(c.dataProjection):null,f;d&&e&&!Kb(d,e)?a instanceof ye?f=(b?a.clone():a).Ya(b?d:e,b?e:d):f=Ob(a,e,d):f=a;if(b&&c&&void 0!==c.decimals){var g=Math.pow(10,c.decimals);f===a&&(f=f.clone());f.sb(function(a){for(var b=0,c=a.length;ba||0!==this.g&&aa||0!==this.g&&ac;++c){var d=parseInt(b[c],10).toString(16);b[c]=1==d.length?"0"+d:d}X(a,b.join(""))} -function bn(a,b,c){a={node:a};var d=b.F();if("GeometryCollection"==d){var e=Za(b.a);var f=pn}else if("MultiPoint"==d){e=b.o;f=b.U;b=b.a;d=[];var g;var h=0;for(g=e.length;hc;++c){var d=parseInt(b[c],10).toString(16);b[c]=1==d.length?"0"+d:d}Y(a,b.join(""))} +function bn(a,b,c){a={node:a};var d=b.F();if("GeometryCollection"==d){var e=$a(b.a);var f=pn}else if("MultiPoint"==d){e=b.o;f=b.U;b=b.a;d=[];var g;var h=0;for(g=e.length;hp&&(p=0);h=k.geometry;var q=f=h.I();var t=!1;switch(h.F()){case "MultiLineString":2l?h[1]:h[0]),Gp(a,k),l=1,c=f.length;lc&&(a.index+=e)})}function Ap(){var a=vj();return function(){return a.Point}}function Dp(a,b,c){tc.call(this,a);this.features=b;this.mapBrowserEvent=c}w(Dp,tc);function Lp(a){hg.call(this,{handleEvent:Mp,handleDownEvent:ne,handleUpEvent:Np});a=a?a:{};this.j=a.source?a.source:null;this.L=void 0!==a.vertex?a.vertex:!0;this.v=void 0!==a.edge?a.edge:!0;this.g=a.features?a.features:null;this.ha=[];this.B={};this.$={};this.l={};this.J=null;this.b=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.ia=Op.bind(this);this.a=new jk;this.ea={Point:this.hg,LineString:this.Gd,LinearRing:this.Gd,Polygon:this.ig,MultiPoint:this.fg,MultiLineString:this.eg,MultiPolygon:this.gg, -GeometryCollection:this.dg,Circle:this.cg}}w(Lp,hg);m=Lp.prototype;m.fb=function(a,b){b=void 0!==b?b:!0;var c=x(a),d=a.S();if(d){var e=this.ea[d.F()];e&&(this.$[c]=d.C(wa()),e.call(this,a,d))}b&&(this.B[c]=B(a,"change",this.bg,this))};m.De=function(a){this.fb(a)};m.Fe=function(a){this.La(a)};m.Ed=function(a){if(a instanceof tp)var b=a.feature;else a instanceof Kc&&(b=a.element);this.fb(b)};m.Fd=function(a){if(a instanceof tp)var b=a.feature;else a instanceof Kc&&(b=a.element);this.La(b)}; -m.bg=function(a){a=a.target;if(this.s){var b=x(a);b in this.l||(this.l[b]=a)}else this.Zd(a)};m.La=function(a,b){b=void 0!==b?b:!0;var c=x(a),d=this.$[c];if(d){var e=this.a,f=[];ok(e,d,function(b){a===b.feature&&f.push(b)});for(d=f.length-1;0<=d;--d)e.remove(f[d])}b&&(z(this.B[c]),delete this.B[c])}; -m.setMap=function(a){var b=this.A,c=this.ha,d;this.g?d=this.g:this.j&&(d=this.j.Kc());b&&(c.forEach(z),c.length=0,d.forEach(this.Fe,this));hg.prototype.setMap.call(this,a);a&&(this.g?c.push(B(this.g,"add",this.Ed,this),B(this.g,"remove",this.Fd,this)):this.j&&c.push(B(this.j,"addfeature",this.Ed,this),B(this.j,"removefeature",this.Fd,this)),d.forEach(this.De,this))};m.qb=oe; -function Pp(a,b,c,d){var e=d.xa([b[0]-a.b,b[1]+a.b]),f=d.xa([b[0]+a.b,b[1]-a.b]);e=va([e,f]);var g=mk(a.a,e);a.L&&!a.v&&(g=g.filter(function(a){return"Circle"!==a.feature.S().F()}));var h=!1;e=!1;var k=f=null;if(0b?l[1]:l[0],k=d.ra(f)}else a.v&&(f=h?Xd(c,g[0].feature.S()):Yd(c,l),k=d.ra(f),be(b,k)<=a.b&&(e=!0,a.L&& -!h&&(c=d.ra(l[0]),h=d.ra(l[1]),c=ae(k,c),b=ae(k,h),h=Math.sqrt(Math.min(c,b)),h=h<=a.b)))&&(f=c>b?l[1]:l[0],k=d.ra(f));e&&(k=[Math.round(k[0]),Math.round(k[1])])}return{Bg:e,vertex:f,Jg:k}}m.Zd=function(a){this.La(a,!1);this.fb(a,!1)}; -m.cg=function(a,b){var c=b.Z(),d=b.U,e=new cf(null,d);c*=33;for(var f=Array(c),g=0;gZ&&(Z=aa,l=E)}if(0===Z){g=null;break a}Z=g[l];g[l]=g[k];g[k]=Z;for(l=k+1;ll?h[1]:h[0]),Gp(a,k),l=1,c=f.length;lc&&(a.index+=e)})}function Ap(){var a=wj();return function(){return a.Point}}function Dp(a,b,c){uc.call(this,a);this.features=b;this.mapBrowserEvent=c}w(Dp,uc);function Lp(a){ig.call(this,{handleEvent:Mp,handleDownEvent:oe,handleUpEvent:Np});a=a?a:{};this.j=a.source?a.source:null;this.L=void 0!==a.vertex?a.vertex:!0;this.v=void 0!==a.edge?a.edge:!0;this.g=a.features?a.features:null;this.ha=[];this.B={};this.$={};this.l={};this.J=null;this.b=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.ia=Op.bind(this);this.a=new jk;this.ea={Point:this.jg,LineString:this.Hd,LinearRing:this.Hd,Polygon:this.kg,MultiPoint:this.hg,MultiLineString:this.gg,MultiPolygon:this.ig, +GeometryCollection:this.fg,Circle:this.eg}}w(Lp,ig);m=Lp.prototype;m.fb=function(a,b){b=void 0!==b?b:!0;var c=x(a),d=a.S();if(d){var e=this.ea[d.F()];e&&(this.$[c]=d.C(xa()),e.call(this,a,d))}b&&(this.B[c]=B(a,"change",this.dg,this))};m.Ee=function(a){this.fb(a)};m.Ge=function(a){this.La(a)};m.Fd=function(a){if(a instanceof tp)var b=a.feature;else a instanceof Lc&&(b=a.element);this.fb(b)};m.Gd=function(a){if(a instanceof tp)var b=a.feature;else a instanceof Lc&&(b=a.element);this.La(b)}; +m.dg=function(a){a=a.target;if(this.s){var b=x(a);b in this.l||(this.l[b]=a)}else this.$d(a)};m.La=function(a,b){b=void 0!==b?b:!0;var c=x(a),d=this.$[c];if(d){var e=this.a,f=[];ok(e,d,function(b){a===b.feature&&f.push(b)});for(d=f.length-1;0<=d;--d)e.remove(f[d])}b&&(z(this.B[c]),delete this.B[c])}; +m.setMap=function(a){var b=this.A,c=this.ha,d;this.g?d=this.g:this.j&&(d=this.j.Kc());b&&(c.forEach(z),c.length=0,d.forEach(this.Ge,this));ig.prototype.setMap.call(this,a);a&&(this.g?c.push(B(this.g,"add",this.Fd,this),B(this.g,"remove",this.Gd,this)):this.j&&c.push(B(this.j,"addfeature",this.Fd,this),B(this.j,"removefeature",this.Gd,this)),d.forEach(this.Ee,this))};m.qb=pe; +function Pp(a,b,c,d){var e=d.xa([b[0]-a.b,b[1]+a.b]),f=d.xa([b[0]+a.b,b[1]-a.b]);e=wa([e,f]);var g=mk(a.a,e);a.L&&!a.v&&(g=g.filter(function(a){return"Circle"!==a.feature.S().F()}));var h=!1;e=!1;var k=f=null;if(0b?l[1]:l[0],k=d.ra(f)}else a.v&&(f=h?Yd(c,g[0].feature.S()):Zd(c,l),k=d.ra(f),ce(b,k)<=a.b&&(e=!0,a.L&& +!h&&(c=d.ra(l[0]),h=d.ra(l[1]),c=be(k,c),b=be(k,h),h=Math.sqrt(Math.min(c,b)),h=h<=a.b)))&&(f=c>b?l[1]:l[0],k=d.ra(f));e&&(k=[Math.round(k[0]),Math.round(k[1])])}return{Dg:e,vertex:f,Lg:k}}m.$d=function(a){this.La(a,!1);this.fb(a,!1)}; +m.eg=function(a,b){var c=b.Z(),d=b.U,e=new df(null,d);c*=33;for(var f=Array(c),g=0;gaa&&(aa=ba,l=E)}if(0===aa){g=null;break a}aa=g[l];g[l]=g[k];g[k]=aa;for(l=k+1;lthis.a/2){var b=[[a.source[0][0],a.source[0][1]],[a.source[1][0],a.source[1][1]],[a.source[2][0],a.source[2][1]]];b[0][0]-n>this.a/2&&(b[0][0]-=this.a);b[1][0]-n>this.a/2&&(b[1][0]-=this.a);b[2][0]-n>this.a/2&&(b[2][0]-=this.a);Math.max(b[0][0],b[1][0],b[2][0])-Math.min(b[0][0],b[1][0],b[2][0])p,u=!1;if(0p,u=!1;if(0a.s),u)){Math.abs(b[0]-d[0])<=Math.abs(b[1]-d[1])?(t=[(c[0]+d[0])/2,(c[1]+d[1])/2],q=a.f(t),n=[(e[0]+b[0])/2,(e[1]+b[1])/2],p=a.f(n),$p(a,b,c,t,n,f,g,q,p,l-1),$p(a,n,t,d,e,p,q,h,k,l-1)):(t=[(b[0]+c[0])/2,(b[1]+c[1])/2],q=a.f(t),n=[(d[0]+e[0])/2,(d[1]+e[1])/2],p=a.f(n),$p(a,b,t,n,e,f,q,p,k,l-1),$p(a,t,c,d,n,q,g,h,p,l-1));return}if(t){if(!a.l)return;a.u=!0}a.b.push({source:[f,h,k],target:[b,d,e]});a.b.push({source:[f,g,h],target:[b,c,d]})}} -function aq(a){var b=wa();a.b.forEach(function(a){a=a.source;xa(b,a[0]);xa(b,a[1]);xa(b,a[2])});return b};function bq(a,b,c,d,e,f,g,h,k,l,n){dk.call(this,e,0);this.G=void 0!==n?n:!1;this.B=g;this.v=h;this.A=null;this.c=b;this.j=d;this.l=f?f:e;this.i=[];this.rb=null;this.g=0;f=ac(d,this.l);h=this.j.C();e=this.c.C();f=h?Pa(f,h):f;if(0===Ja(f))this.state=4;else{(h=a.C())&&(e?e=Pa(e,h):e=h);h=Na(f);n=d.a[this.l[0]];d=Mb(h,c,a);h=zb(c,n,h);n=gb(c);void 0!==n&&(h*=n);n=gb(a);void 0!==n&&(h/=n);n=a.C();if(!n||Ca(n,d[0],d[1]))d=zb(a,h,d)/h,isFinite(d)&&0=d)this.state=4;else if(this.s= -new Zp(a,c,f,e,d*(void 0!==l?l:.5)),0===this.s.b.length)this.state=4;else if(this.g=na(Pb(b.a,d,0),b.minZoom,b.maxZoom),c=aq(this.s),e&&(a.f?(c[1]=na(c[1],e[1],e[3]),c[3]=na(c[3],e[1],e[3])):c=Pa(c,e)),Ja(c)){a=bc(b,c,this.g);for(b=a.O;b<=a.R;b++)for(c=a.N;c<=a.P;c++)(l=k(this.g,b,c,g))&&this.i.push(l);0===this.i.length&&(this.state=4)}else this.state=4}}w(bq,dk);bq.prototype.aa=function(){1==this.state&&(this.rb.forEach(z),this.rb=null);dk.prototype.aa.call(this)};bq.prototype.W=function(){return this.A}; -bq.prototype.Sd=function(){var a=[];this.i.forEach(function(b){b&&2==b.state&&a.push({extent:ac(this.c,b.ja),image:b.W()})},this);this.i.length=0;if(0===a.length)this.state=3;else{var b=this.l[0],c=ec(this.j,b),d="number"===typeof c?c:c[0];c="number"===typeof c?c:c[1];b=this.j.a[b];var e=this.c.a[this.g],f=ac(this.j,this.l);this.A=Yp(d,c,this.B,e,this.c.C(),b,f,this.s,a,this.v,this.G);this.state=2}ek(this)}; -bq.prototype.load=function(){if(0==this.state){this.state=1;ek(this);var a=0;this.rb=[];this.i.forEach(function(b){var c=b.state;if(0==c||1==c){a++;var d=B(b,"change",function(){var c=b.state;if(2==c||3==c||4==c)z(d),a--,0===a&&(this.rb.forEach(z),this.rb=null,this.Sd())},this);this.rb.push(d)}},this);this.i.forEach(function(a){0==a.state&&a.load()});0===a&&setTimeout(this.Sd.bind(this),0)}};function cq(a){mp.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state,wrapX:a.wrapX});this.Ca=void 0!==a.opaque?a.opaque:!1;this.Ia=void 0!==a.tilePixelRatio?a.tilePixelRatio:1;this.tileGrid=void 0!==a.tileGrid?a.tileGrid:null;this.a=new Vp(a.cacheSize);this.l=[0,0];this.Ka="";this.Ha={transition:a.transition}}w(cq,mp);m=cq.prototype;m.Ld=function(){return jh(this.a)};m.hb=function(a,b){(a=this.vb(a))&&a.hb(b)}; -function Sh(a,b,c,d,e){a=a.vb(b);if(!a)return!1;b=!0;for(var f,g,h=d.O;h<=d.R;++h)for(var k=d.N;k<=d.P;++k)f=c+"/"+h+"/"+k,g=!1,a.b.hasOwnProperty(f)&&(f=a.get(f),(g=2===f.state)&&(g=!1!==e(f))),g||(b=!1);return b}m.od=function(){return 0};m.Fc=function(){return this.Ca};m.Ea=function(a){return this.tileGrid?this.tileGrid:hc(a)};m.vb=function(a){var b=this.j;return b&&!Jb(b,a)?null:this.a};m.Mb=function(){return this.Ia}; -function oi(a,b,c,d){d=a.Ea(d);c=a.Mb(c);b=ua(ec(d,b),a.l);return 1==c?b:ta(b,c,a.l)}function dq(a,b,c){var d=void 0!==c?c:a.j;c=a.Ea(d);if(a.A&&d.i){var e=b;b=e[0];a=gc(c,e);d=ic(d);Ca(d,a[0],a[1])?b=e:(e=La(d),a[0]+=e*Math.ceil((d[0]-a[0])/e),b=fc(c,a[0],a[1],b,!1,void 0))}e=b[0];d=b[1];a=b[2];if(c.minZoom>e||e>c.maxZoom)c=!1;else{var f=c.C();c=(c=f?bc(c,f,e):c.b?c.b[e]:null)?ma(c,d,a):!0}return c?b:null}m.ae=fa;function eq(a,b){tc.call(this,a);this.tile=b}w(eq,tc);function fq(a){cq.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tilePixelRatio:a.tilePixelRatio,wrapX:a.wrapX,transition:a.transition});this.tileLoadFunction=a.tileLoadFunction;this.tileUrlFunction=this.c?this.c.bind(this):Up;this.urls=null;if(a.urls){var b=a.urls;this.urls=b;var c=b.join("\n");gq(this,this.c?this.c.bind(this):Sp(b,this.tileGrid),c)}else if(a.url){b=a.url;c=[];var d= +function aq(a){var b=xa();a.b.forEach(function(a){a=a.source;ya(b,a[0]);ya(b,a[1]);ya(b,a[2])});return b};function bq(a,b,c,d,e,f,g,h,k,l,n){dk.call(this,e,0);this.G=void 0!==n?n:!1;this.B=g;this.v=h;this.A=null;this.c=b;this.j=d;this.l=f?f:e;this.i=[];this.rb=null;this.g=0;f=bc(d,this.l);h=this.j.C();e=this.c.C();f=h?Qa(f,h):f;if(0===Ka(f))this.state=4;else{(h=a.C())&&(e?e=Qa(e,h):e=h);h=Oa(f);n=d.a[this.l[0]];d=Nb(h,c,a);h=Ab(c,n,h);n=hb(c);void 0!==n&&(h*=n);n=hb(a);void 0!==n&&(h/=n);n=a.C();if(!n||Da(n,d[0],d[1]))d=Ab(a,h,d)/h,isFinite(d)&&0=d)this.state=4;else if(this.s= +new Zp(a,c,f,e,d*(void 0!==l?l:.5)),0===this.s.b.length)this.state=4;else if(this.g=oa(Qb(b.a,d,0),b.minZoom,b.maxZoom),c=aq(this.s),e&&(a.f?(c[1]=oa(c[1],e[1],e[3]),c[3]=oa(c[3],e[1],e[3])):c=Qa(c,e)),Ka(c)){a=cc(b,c,this.g);for(b=a.O;b<=a.R;b++)for(c=a.N;c<=a.P;c++)(l=k(this.g,b,c,g))&&this.i.push(l);0===this.i.length&&(this.state=4)}else this.state=4}}w(bq,dk);bq.prototype.aa=function(){1==this.state&&(this.rb.forEach(z),this.rb=null);dk.prototype.aa.call(this)};bq.prototype.W=function(){return this.A}; +bq.prototype.Td=function(){var a=[];this.i.forEach(function(b){b&&2==b.state&&a.push({extent:bc(this.c,b.ja),image:b.W()})},this);this.i.length=0;if(0===a.length)this.state=3;else{var b=this.l[0],c=fc(this.j,b),d="number"===typeof c?c:c[0];c="number"===typeof c?c:c[1];b=this.j.a[b];var e=this.c.a[this.g],f=bc(this.j,this.l);this.A=Yp(d,c,this.B,e,this.c.C(),b,f,this.s,a,this.v,this.G);this.state=2}ek(this)}; +bq.prototype.load=function(){if(0==this.state){this.state=1;ek(this);var a=0;this.rb=[];this.i.forEach(function(b){var c=b.state;if(0==c||1==c){a++;var d=B(b,"change",function(){var c=b.state;if(2==c||3==c||4==c)z(d),a--,0===a&&(this.rb.forEach(z),this.rb=null,this.Td())},this);this.rb.push(d)}},this);this.i.forEach(function(a){0==a.state&&a.load()});0===a&&setTimeout(this.Td.bind(this),0)}};function cq(a){mp.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state,wrapX:a.wrapX});this.Ca=void 0!==a.opaque?a.opaque:!1;this.Ia=void 0!==a.tilePixelRatio?a.tilePixelRatio:1;this.tileGrid=void 0!==a.tileGrid?a.tileGrid:null;this.a=new Vp(a.cacheSize);this.l=[0,0];this.Ka="";this.Ha={transition:a.transition}}w(cq,mp);m=cq.prototype;m.Md=function(){return kh(this.a)};m.hb=function(a,b){(a=this.vb(a))&&a.hb(b)}; +function Th(a,b,c,d,e){a=a.vb(b);if(!a)return!1;b=!0;for(var f,g,h=d.O;h<=d.R;++h)for(var k=d.N;k<=d.P;++k)f=c+"/"+h+"/"+k,g=!1,a.b.hasOwnProperty(f)&&(f=a.get(f),(g=2===f.state)&&(g=!1!==e(f))),g||(b=!1);return b}m.pd=function(){return 0};m.Fc=function(){return this.Ca};m.Ea=function(a){return this.tileGrid?this.tileGrid:ic(a)};m.vb=function(a){var b=this.j;return b&&!Kb(b,a)?null:this.a};m.Mb=function(){return this.Ia}; +function pi(a,b,c,d){d=a.Ea(d);c=a.Mb(c);b=va(fc(d,b),a.l);return 1==c?b:ua(b,c,a.l)}function dq(a,b,c){var d=void 0!==c?c:a.j;c=a.Ea(d);if(a.A&&d.i){var e=b;b=e[0];a=hc(c,e);d=jc(d);Da(d,a[0],a[1])?b=e:(e=Ma(d),a[0]+=e*Math.ceil((d[0]-a[0])/e),b=gc(c,a[0],a[1],b,!1,void 0))}e=b[0];d=b[1];a=b[2];if(c.minZoom>e||e>c.maxZoom)c=!1;else{var f=c.C();c=(c=f?cc(c,f,e):c.b?c.b[e]:null)?na(c,d,a):!0}return c?b:null}m.be=ha;function eq(a,b){uc.call(this,a);this.tile=b}w(eq,uc);function fq(a){cq.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tilePixelRatio:a.tilePixelRatio,wrapX:a.wrapX,transition:a.transition});this.tileLoadFunction=a.tileLoadFunction;this.tileUrlFunction=this.c?this.c.bind(this):Up;this.urls=null;if(a.urls){var b=a.urls;this.urls=b;var c=b.join("\n");gq(this,this.c?this.c.bind(this):Sp(b,this.tileGrid),c)}else if(a.url){b=a.url;c=[];var d= /\{([a-z])-([a-z])\}/.exec(b);if(d){var e=d[2].charCodeAt(0),f;for(f=d[1].charCodeAt(0);f<=e;++f)c.push(b.replace(d[0],String.fromCharCode(f)))}else if(d=d=/\{(\d+)-(\d+)\}/.exec(b))for(e=parseInt(d[2],10),f=parseInt(d[1],10);f<=e;f++)c.push(b.replace(d[0],f.toString()));else c.push(b);c=this.urls=c;gq(this,this.c?this.c.bind(this):Sp(c,this.tileGrid),b)}a.tileUrlFunction&&gq(this,a.tileUrlFunction);this.B={}}w(fq,cq); -fq.prototype.Aa=function(a){a=a.target;var b=x(a),c=a.state;if(1==c){this.B[b]=!0;var d="tileloadstart"}else b in this.B&&(delete this.B[b],d=3==c?"tileloaderror":2==c||5==c?"tileloadend":void 0);void 0!=d&&this.f(new eq(d,a))};function gq(a,b,c){a.tileUrlFunction=b;Wp(a.a);"undefined"!==typeof c?a.Ka!==c&&(a.Ka=c,a.D()):a.D()}fq.prototype.ae=function(a,b,c){a=a+"/"+b+"/"+c;this.a.b.hasOwnProperty(a)&&this.a.get(a)};function hq(a){fq.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:iq,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,wrapX:a.wrapX,transition:a.transition});this.crossOrigin=void 0!==a.crossOrigin?a.crossOrigin:null;this.tileClass=void 0!==a.tileClass?a.tileClass:gk;this.b={};this.v={};this.Ga= -a.reprojectionErrorThreshold}w(hq,fq);m=hq.prototype;m.Ld=function(){if(jh(this.a))return!0;for(var a in this.b)if(jh(this.b[a]))return!0;return!1};m.hb=function(a,b){a=this.vb(a);this.a.hb(this.a==a?b:{});for(var c in this.b){var d=this.b[c];d.hb(d==a?b:{})}};m.od=function(a){return this.j&&a&&!Jb(this.j,a)?0:this.Dc()};m.Dc=function(){return 0};m.Fc=function(a){return this.j&&a&&!Jb(this.j,a)?!1:fq.prototype.Fc.call(this,a)}; -m.Ea=function(a){var b=this.j;return!this.tileGrid||b&&!Jb(b,a)?(b=x(a).toString(),b in this.v||(this.v[b]=hc(a)),this.v[b]):this.tileGrid};m.vb=function(a){var b=this.j;if(!b||Jb(b,a))return this.a;a=x(a).toString();a in this.b||(this.b[a]=new Vp(this.a.highWaterMark));return this.b[a]}; +fq.prototype.Aa=function(a){a=a.target;var b=x(a),c=a.state;if(1==c){this.B[b]=!0;var d="tileloadstart"}else b in this.B&&(delete this.B[b],d=3==c?"tileloaderror":2==c||5==c?"tileloadend":void 0);void 0!=d&&this.f(new eq(d,a))};function gq(a,b,c){a.tileUrlFunction=b;Wp(a.a);"undefined"!==typeof c?a.Ka!==c&&(a.Ka=c,a.D()):a.D()}fq.prototype.be=function(a,b,c){a=a+"/"+b+"/"+c;this.a.b.hasOwnProperty(a)&&this.a.get(a)};function hq(a){fq.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:iq,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,wrapX:a.wrapX,transition:a.transition});this.crossOrigin=void 0!==a.crossOrigin?a.crossOrigin:null;this.tileClass=void 0!==a.tileClass?a.tileClass:gk;this.b={};this.v={};this.Ga= +a.reprojectionErrorThreshold}w(hq,fq);m=hq.prototype;m.Md=function(){if(kh(this.a))return!0;for(var a in this.b)if(kh(this.b[a]))return!0;return!1};m.hb=function(a,b){a=this.vb(a);this.a.hb(this.a==a?b:{});for(var c in this.b){var d=this.b[c];d.hb(d==a?b:{})}};m.pd=function(a){return this.j&&a&&!Kb(this.j,a)?0:this.Dc()};m.Dc=function(){return 0};m.Fc=function(a){return this.j&&a&&!Kb(this.j,a)?!1:fq.prototype.Fc.call(this,a)}; +m.Ea=function(a){var b=this.j;return!this.tileGrid||b&&!Kb(b,a)?(b=x(a).toString(),b in this.v||(this.v[b]=ic(a)),this.v[b]):this.tileGrid};m.vb=function(a){var b=this.j;if(!b||Kb(b,a))return this.a;a=x(a).toString();a in this.b||(this.b[a]=new Vp(this.a.highWaterMark));return this.b[a]}; function jq(a,b,c,d,e,f,g){b=[b,c,d];e=(c=dq(a,b,f))?a.tileUrlFunction(c,e,f):void 0;e=new a.tileClass(b,void 0!==e?0:4,void 0!==e?e:"",a.crossOrigin,a.tileLoadFunction,a.Ha);e.key=g;B(e,"change",a.Aa,a);return e} -function Yh(a,b,c,d,e,f){var g=a.j;if(g&&f&&!Jb(g,f)){var h=a.vb(f);d=[b,c,d];var k;b=d[0]+"/"+d[1]+"/"+d[2];h.b.hasOwnProperty(b)&&(k=h.get(b));c=a.Ka;if(k&&k.key==c)return k;var l=a.Ea(g),n=a.Ea(f),p=dq(a,d,f);a=new bq(g,l,f,n,d,p,a.Mb(e),a.Dc(),function(a,b,c,d){return kq(this,a,b,c,d,g)}.bind(a),a.Ga,!1);a.key=c;k?(a.a=k,fk(a),kh(h,b,a)):h.set(b,a);return a}return kq(a,b,c,d,e,g||f)} -function kq(a,b,c,d,e,f){var g=b+"/"+c+"/"+d,h=a.Ka;if(a.a.b.hasOwnProperty(g)){var k=a.a.get(g);if(k.key!=h){var l=k;k=jq(a,b,c,d,e,f,h);0==l.state?k.a=l.a:k.a=l;fk(k);kh(a.a,g,k)}}else k=jq(a,b,c,d,e,f,h),a.a.set(g,k);return k}function iq(a,b){a.W().src=b};function lq(a){a=a||{};var b=void 0!==a.projection?a.projection:"EPSG:3857";if(void 0!==a.tileGrid)var c=a.tileGrid;else{c={extent:ic(b),maxZoom:a.maxZoom,minZoom:a.minZoom,tileSize:a.tileSize};var d={};Ra(d,void 0!==c?c:{});void 0===d.extent&&(d.extent=Ab("EPSG:3857").C());d.resolutions=jc(d.extent,d.maxZoom,d.tileSize);delete d.maxZoom;c=new Vb(d)}hq.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:a.opaque,projection:b,reprojectionErrorThreshold:a.reprojectionErrorThreshold, +function Zh(a,b,c,d,e,f){var g=a.j;if(g&&f&&!Kb(g,f)){var h=a.vb(f);d=[b,c,d];var k;b=d[0]+"/"+d[1]+"/"+d[2];h.b.hasOwnProperty(b)&&(k=h.get(b));c=a.Ka;if(k&&k.key==c)return k;var l=a.Ea(g),n=a.Ea(f),p=dq(a,d,f);a=new bq(g,l,f,n,d,p,a.Mb(e),a.Dc(),function(a,b,c,d){return kq(this,a,b,c,d,g)}.bind(a),a.Ga,!1);a.key=c;k?(a.a=k,fk(a),lh(h,b,a)):h.set(b,a);return a}return kq(a,b,c,d,e,g||f)} +function kq(a,b,c,d,e,f){var g=b+"/"+c+"/"+d,h=a.Ka;if(a.a.b.hasOwnProperty(g)){var k=a.a.get(g);if(k.key!=h){var l=k;k=jq(a,b,c,d,e,f,h);0==l.state?k.a=l.a:k.a=l;fk(k);lh(a.a,g,k)}}else k=jq(a,b,c,d,e,f,h),a.a.set(g,k);return k}function iq(a,b){a.W().src=b};function lq(a){a=a||{};var b=void 0!==a.projection?a.projection:"EPSG:3857";if(void 0!==a.tileGrid)var c=a.tileGrid;else{c={extent:jc(b),maxZoom:a.maxZoom,minZoom:a.minZoom,tileSize:a.tileSize};var d={};Sa(d,void 0!==c?c:{});void 0===d.extent&&(d.extent=Bb("EPSG:3857").C());d.resolutions=kc(d.extent,d.maxZoom,d.tileSize);delete d.maxZoom;c=new Wb(d)}hq.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:a.opaque,projection:b,reprojectionErrorThreshold:a.reprojectionErrorThreshold, tileGrid:c,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0,transition:a.transition})}w(lq,hq);function mq(a,b){var c=[];Object.keys(b).forEach(function(a){null!==b[a]&&void 0!==b[a]&&c.push(a+"="+encodeURIComponent(b[a]))});var d=c.join("&");a=a.replace(/[?&]$/,"");a=-1===a.indexOf("?")?a+"?":a+"&";return a+d};function nq(a){a=a||{};var b;void 0!==a.attributions?b=a.attributions:b=['© OpenStreetMap contributors.'];lq.call(this,{attributions:b,cacheSize:a.cacheSize,crossOrigin:void 0!==a.crossOrigin?a.crossOrigin:"anonymous",opaque:void 0!==a.opaque?a.opaque:!0,maxZoom:void 0!==a.maxZoom?a.maxZoom:19,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png", -wrapX:a.wrapX})}w(nq,lq);pi.Lc={};pi.Lc.Uc=function(){}; +wrapX:a.wrapX})}w(nq,lq);qi.Lc={};qi.Lc.Vc=function(){}; (function(a){function b(a,b,c){if(g)return new ImageData(a,b,c);b=h.createImageData(b,c);b.data.set(a);return b}function c(a){var b=!0;try{new ImageData(10,10)}catch(n){b=!1}return function(c){var d=c.buffers,e=c.meta,f=c.width,g=c.height,h=d.length,k=d[0].byteLength;if(c.imageOps){k=Array(h);for(c=0;ce){a=1;break a}if(e>d){a=-1;break a}}a=0}this.G=0<=a;a=0;b=[];for(f in this.g)b[a++]=f+"-"+this.g[f];var f=b.join("/");this.Ka!==f&&(this.Ka=f,this.D())}w(oq,hq);oq.prototype.Dc=function(){return this.L};oq.prototype.Mb=function(a){return this.J&&void 0!==this.s?a:1}; -oq.prototype.c=function(a,b,c){var d=this.tileGrid;d||(d=this.Ea(c));if(!(d.a.length<=a[0])){1==b||this.J&&void 0!==this.s||(b=1);var e=d.a[a[0]],f=ac(d,a,this.ia),g=ua(ec(d,a[0]),this.l);d=this.L;if(0!==d){var h=this.l;void 0===h&&(h=[0,0]);h[0]=g[0]+2*d;h[1]=g[1]+2*d;g=h;f=ya(f,e*d,f)}1!=b&&(g=ta(g,b,this.l));e={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Ra(e,this.g);d=g;g=b;if(b=this.urls){e.WIDTH=d[0];e.HEIGHT=d[1];e[this.G?"CRS":"SRS"]=c.Qa;"STYLES"in this.g|| -(e.STYLES="");if(1!=g)switch(this.s){case "geoserver":d=90*g+.5|0;e.FORMAT_OPTIONS="FORMAT_OPTIONS"in e?e.FORMAT_OPTIONS+(";dpi:"+d):"dpi:"+d;break;case "mapserver":e.MAP_RESOLUTION=90*g;break;case "carmentaserver":case "qgis":e.DPI=90*g;break;default:y(!1,52)}c=c.ed;this.G&&"ne"==c.substr(0,2)&&(c=f[0],f[0]=f[1],f[1]=c,c=f[2],f[2]=f[3],f[3]=c);e.BBOX=f.join(",");a=mq(1==b.length?b[0]:b[ra((a[1]<e){a=1;break a}if(e>d){a=-1;break a}}a=0}this.G=0<=a;a=0;b=[];for(f in this.g)b[a++]=f+"-"+this.g[f];var f=b.join("/");this.Ka!==f&&(this.Ka=f,this.D())}w(oq,hq);oq.prototype.Dc=function(){return this.L};oq.prototype.Mb=function(a){return this.J&&void 0!==this.s?a:1}; +oq.prototype.c=function(a,b,c){var d=this.tileGrid;d||(d=this.Ea(c));if(!(d.a.length<=a[0])){1==b||this.J&&void 0!==this.s||(b=1);var e=d.a[a[0]],f=bc(d,a,this.ia),g=va(fc(d,a[0]),this.l);d=this.L;if(0!==d){var h=this.l;void 0===h&&(h=[0,0]);h[0]=g[0]+2*d;h[1]=g[1]+2*d;g=h;f=za(f,e*d,f)}1!=b&&(g=ua(g,b,this.l));e={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Sa(e,this.g);d=g;g=b;if(b=this.urls){e.WIDTH=d[0];e.HEIGHT=d[1];e[this.G?"CRS":"SRS"]=c.Qa;"STYLES"in this.g|| +(e.STYLES="");if(1!=g)switch(this.s){case "geoserver":d=90*g+.5|0;e.FORMAT_OPTIONS="FORMAT_OPTIONS"in e?e.FORMAT_OPTIONS+(";dpi:"+d):"dpi:"+d;break;case "mapserver":e.MAP_RESOLUTION=90*g;break;case "carmentaserver":case "qgis":e.DPI=90*g;break;default:y(!1,52)}c=c.fd;this.G&&"ne"==c.substr(0,2)&&(c=f[0],f[0]=f[1],f[1]=c,c=f[2],f[2]=f[3],f[3]=c);e.BBOX=f.join(",");a=mq(1==b.length?b[0]:b[sa((a[1]< -{{name}} +{{{text}}} - \ No newline at end of file + +{{{trash}}} diff --git a/www/src/tmpl/service/geocache/geotrip.html b/www/src/tmpl/service/geocache/geotrip.html index 37b07aa..5030f3e 100644 --- a/www/src/tmpl/service/geocache/geotrip.html +++ b/www/src/tmpl/service/geocache/geotrip.html @@ -7,9 +7,9 @@
Geotuur
  • {{#each collection}} -{{#if this.id}} +{{#if this._id}}
  • - + {{@key}}. {{this.name}}