From e43dee3ac3b9358dbedcd49ebd6645fc1b1ae2a4 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 20 May 2022 20:00:03 +0200 Subject: [PATCH] time and menu improved --- proj/map/asset/css/style.css | 30 +++++- proj/map/asset/js/.main.js.swp | Bin 28672 -> 32768 bytes proj/map/asset/js/db.js | 116 ++++++++++++++++++++-- proj/map/asset/js/main.js | 149 ++++++++++++++++------------- proj/map/asset/js/map.js | 119 +++++++++++++++++++---- proj/map/asset/leaflet/leaflet.js | 1 - proj/map/asset/markers/markers.svg | 40 ++++++-- 7 files changed, 350 insertions(+), 105 deletions(-) diff --git a/proj/map/asset/css/style.css b/proj/map/asset/css/style.css index 04ff7ce..da2581b 100644 --- a/proj/map/asset/css/style.css +++ b/proj/map/asset/css/style.css @@ -183,6 +183,7 @@ section.card { background-color: var(--b9h-color-bg); z-index: 1000; transition: top 0.5s; + height: 100vh; } section.card nav { @@ -217,7 +218,7 @@ section.tabroll { section.tabroll section.singletab { width: 100vw; - height: 100%; + height: ; } nav.cardnav { @@ -253,3 +254,30 @@ div.leaflet-popup-tip { .leaflet-container a.leaflet-popup-close-button { color: var(--b9h-color-bg); } + +div.timetable p span.hour { + float: right; + margin-right: 20px; +} +div.timetable p { + margin-left: 30px; + margin-bottom: 30px; +} + +section.restomenu { + margin-top: 50px; + padding: 10px; + height: 100%; + overflow-y: scroll; + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ +} + +section.restomenu div.dish h3 { + margin-bottom: 10px; + margin-top: 10px; +} + +::-webkit-scrollbar { + display: none; +} \ No newline at end of file diff --git a/proj/map/asset/js/.main.js.swp b/proj/map/asset/js/.main.js.swp index 16c8d3d4cda1292db56b5b22607584c8eea5c1c1..a46d65f8050f6c14b0c4229fedd19161a69eb86f 100644 GIT binary patch delta 4196 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

q zMhBDYJDkA@>_RglScuse0XYe8Gm#EJPPQ`0Nj4J&xWimIjE3~_Ld;_@1|v{_9Q?^M zx`(Uy5__=@CSJhQ#Kr}!srL1W8TPs7#^qKR5z`3kp0Kf^z*S|$B9^YX?Cs-+^zV8m z6j|X)40!&llt-^Jb!(0qCCv*<6OKWTTxJH1m0a~--1W=ebi|*PuQ8#^AR9Tz?Lrol z01Gf5#c(4JgK>jsKZ1cNm;fKf;XV(F6l>Jt&1Q&MpsWxWzkl z18r!9G6rgDjoDeMtnOTA%%~cfB>Yi(eQ=mlwd^l~V^dYj6OyB$ z_T+d^dq}7kO{gU|q13gByGLbph-=5BaqQAY){@%DQg>~vV63wZ$1ZJTEvbzxb=PL4 zu64HI*rkoECAE>I?%G%}{olKZ>0R1zF1d{?b<@UKWe~(zd1w!gPxDk64@IMNMk7l} zSIU_ETIf~#sHXH?6sppn9;h +

+

{{ d.name }}

+

{{ l2s(ings2ls(d.ing,"fr"), "fr") }}

+

{{ l2s(ings2ls(d.ing,"en"), "en") }}

+

{{ l2s(ings2ls(d.ing,"it"), "it") }}

+ + + +
+ + `, + props : { + obj : Object + }, + data () { + return { + message : "hello from menu", + et : { + fr : " et ", + en : " and ", + it : " e ", + }, + fourchette : { + fr : "Fourchette de prix par personne:", + en : "Price range per person:", + it : "Fascia di prezzo per persona:", + }, + horsboissons : { + fr : "hors boissons", + en : "excluding drinks", + it : "bevande escluse", + } + } + }, + methods : { + capitalize(s){ + return s.charAt(0).toUpperCase() + s.slice(1) + }, + l2s(l, lang) { + let r = "" + let llength = l.length - 1 + for (i in l){ + if (parseInt(i) === 0){ + r = this.capitalize(l[i]) + } else if (parseInt(i) < parseInt(llength)) { + r = r + ", " + l[i] + } else { + r = r + this.et[lang] + l[i] + } + } + return r + }, + ings2ls(ings, lang){ + let l = [] + for (i in ings) { + l.push(ings[i][lang]) + } + return l + } + } +}) Vue.component('Time', { template : ` -
-

- {{ this.days.mon.fr }} - {{ this.days.mon.en }} - {{ this.days.mon.it }} - {{ this.obj.mon }} -

- -

- {{ this.days.tue.fr }} - {{ this.days.tue.en }} - {{ this.days.tue.it }} - {{ this.obj.tue }} -

- -

- {{ this.days.wed.fr }} - {{ this.days.wed.en }} - {{ this.days.wed.it }} - {{ this.obj.wed }} -

- -

- {{ this.days.thu.fr }} - {{ this.days.thu.en }} - {{ this.days.thu.it }} - {{ this.obj.thu }} -

- -

- {{ this.days.fri.fr }} - {{ this.days.fri.en }} - {{ this.days.fri.it }} - {{ this.obj.fri }} -

- -

- {{ this.days.sat.fr }} - {{ this.days.sat.en }} - {{ this.days.sat.it }} - {{ this.obj.sat }} -

- -

- {{ this.days.sun.fr }} - {{ this.days.sun.en }} - {{ this.days.sun.it }} - {{ this.obj.sun }} -

- +
+

+ {{ days[i].fr }} + {{ days[i].en }} + {{ days[i].it }} + {{ d }} +

`, props : { @@ -62,6 +80,11 @@ Vue.component('Time', { data () { return { message : "hello from time", + closed : { + fr : "fermé", + fr : "closed", + it : "chiuso", + }, days : { mon : { fr : "Lundi", @@ -102,8 +125,13 @@ Vue.component('Time', { } }, methods : { - getTime () { - tabtype + checkTime (d) { + if (d != "" ){ + return d + } else { + return this.closed + } + } } @@ -177,12 +205,9 @@ Vue.component('Accordeon', { >
-

{{ i.tabtype }}

+
- - -
@@ -240,7 +265,6 @@ Vue.component('Accordeon', { }, tabcount: function () { if ('card' in this.list){ - console.log(this.list + " has a card") var arr = Object.entries(this.list.card.tabs); return arr.length } else { @@ -269,7 +293,6 @@ Vue.component('Accordeon', { t = document.getElementById(this.cardid + ind); this.markerL = t.offsetLeft + "px" this.markerW = t.offsetWidth + "px" - console.log(this.markerL) }, getTabLogo(obj) { switch(obj.tabtype) { @@ -288,7 +311,6 @@ Vue.component('Accordeon', { showCard() { this.displayCard = "block"; this.setTab(0) - console.log("showing card") this.cardTop = "0vh" this.setTab(0) this.setTab(0) @@ -308,7 +330,6 @@ Vue.component('Accordeon', { setMap () { map.setView(this.dirxy, this.dirzl) this.list.marker.openPopup() - console.log("setMap") } }, }) @@ -360,9 +381,7 @@ let vm = new Vue({ this.setlang('fr'); }, mounted: function() { - console.log("mounting"); this.setlang('fr'); - console.log("mounted"); this.setlang('fr'); this.setlang('fr'); this.setlang('fr'); diff --git a/proj/map/asset/js/map.js b/proj/map/asset/js/map.js index 8d995d5..d4adf8c 100644 --- a/proj/map/asset/js/map.js +++ b/proj/map/asset/js/map.js @@ -1,4 +1,3 @@ -console.log("hello from map.js") var hotelxy=[-19.8,47.5] var maxZoomLevel = 6 @@ -32,10 +31,6 @@ map.setMaxBounds(new L.LatLngBounds( map.unproject(mapNE, map.getMaxZoom()) )) -console.log("getMaxZoom:") -console.log(map.getMaxZoom()) - - var markPointerIcon = L.icon({ iconUrl: 'asset/markers/pointer.png', iconSize: [22, 32], @@ -69,38 +64,52 @@ marker.on('click', function(e) { console.log(marker.getLatLng()) }) -console.log("looping resto from map.js") - -var layzl3 = L.layerGroup() -var layzl3 = L.layerGroup() +var layzl1 = L.layerGroup() +var layzl2 = L.layerGroup() var layzl3 = L.layerGroup() +var layzl4 = L.layerGroup() +var layzl5 = L.layerGroup() +var layzl6 = L.layerGroup() +let layzls = [null,null,layzl2,layzl3,layzl4,layzl5,layzl6] var layResto = L.layerGroup() +var layParking = L.layerGroup() let resto = jdb.data.db.resto.sub +function removeLs(list) { + for (i in list){ + map.removeLayer(list[i]) + } +} + +function addLs(list) { + for (i in list) { + list[i].addTo(map) + } +} + +function iToZL(i) { + return lay +} + + let parking = jdb.data.db.parking.sub Object.entries(parking).forEach(p => { - console.log(p[1]['name']) p[1]['marker'] = L.marker(p[1]['xy'], { icon: markParkingIcon, - }).addTo(map); - + }).addTo(layzls[p[1]['minz']]); }) +layParking.addTo(map) Object.entries(resto).forEach(item => { - console.log(item) - console.log(item[1]['sub']) Object.entries(item[1]['sub']).forEach(r => { - console.log(r[1]['name']) - console.log(r[1]['xy']) if (typeof r[1]['xy'] !== "undefined") { r[1]['marker'] = L.marker(r[1]['xy'], { icon: markRestoIcon, - }).addTo(layResto); + }).addTo(layzls[r[1]['minz']]); r[1]['marker'].bindPopup(r[1]['name']) r[1]['marker'].on('click', function(e) { - console.log("hello") jdb.data.db.resto.isActive = true item[1]['isActive'] = true let target = document.getElementById(r[1]['id']) @@ -116,3 +125,77 @@ layResto.addTo(map) min/max = 163 map.setView([-163,-163],2) */ + +map.on('zoomend', function() { + let z = map.getZoom(); + switch(z) { + case 1: + addLs([layzl1]) + removeLs([ + layzl2, + layzl3, + layzl4, + layzl5, + layzl6 + ]) + break; + case 2: + addLs([ + layzl1, + layzl2 + ]) + removeLs([ + layzl3, + layzl4, + layzl5, + layzl6 + ]) + break; + case 3: + addLs([ + layzl1, + layzl2, + layzl3 + ]) + removeLs([ + layzl4, + layzl5, + layzl6 + ]) + break; + case 4: + addLs([ + layzl1, + layzl2, + layzl3, + layzl4 + ]) + removeLs([ + layzl5, + layzl6 + ]) + break; + case 5: + addLs([ + layzl1, + layzl2, + layzl3, + layzl4, + layzl5 + ]) + removeLs([ + layzl6 + ]) + break; + case 6: + addLs([ + layzl1, + layzl2, + layzl3, + layzl4, + layzl5, + layzl6 + ]) + break; + } + }); diff --git a/proj/map/asset/leaflet/leaflet.js b/proj/map/asset/leaflet/leaflet.js index 091ef06..ac492b8 100644 --- a/proj/map/asset/leaflet/leaflet.js +++ b/proj/map/asset/leaflet/leaflet.js @@ -2,6 +2,5 @@ * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade */ -console.log("hello from leaflet") !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";function h(t){for(var i,e,n=1,o=arguments.length;n=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=O(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.xi.y&&n.y=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=N(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lati.lng&&n.lng';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function kt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Bt={ie:tt,ielt9:it,edge:et,webkit:nt,android:ot,android23:st,androidStock:at,opera:ht,chrome:ut,gecko:lt,safari:ct,phantom:_t,opera12:dt,win:pt,ie3d:mt,webkit3d:ft,gecko3d:gt,any3d:vt,mobile:yt,mobileWebkit:xt,mobileWebkit3d:wt,msPointer:Pt,pointer:Lt,touch:bt,mobileOpera:Tt,mobileGecko:Mt,retina:zt,passiveEvents:Ct,canvas:St,svg:Zt,vml:Et},At=Pt?"MSPointerDown":"pointerdown",It=Pt?"MSPointerMove":"pointermove",Ot=Pt?"MSPointerUp":"pointerup",Rt=Pt?"MSPointerCancel":"pointercancel",Nt={},Dt=!1;function jt(t,i,e,n){function o(t){Ut(t,r)}var s,r,a,h,u,l,c,_;function d(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,h)}return"touchstart"===i?(u=t,l=e,c=n,_=p(function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Ri(t),Ut(t,l)}),u["_leaflet_touchstart"+c]=_,u.addEventListener(At,_,!1),Dt||(document.addEventListener(At,Wt,!0),document.addEventListener(It,Ht,!0),document.addEventListener(Ot,Ft,!0),document.addEventListener(Rt,Ft,!0),Dt=!0)):"touchmove"===i?(h=e,(a=t)["_leaflet_touchmove"+n]=d,a.addEventListener(It,d,!1)):"touchend"===i&&(r=e,(s=t)["_leaflet_touchend"+n]=o,s.addEventListener(Ot,o,!1),s.addEventListener(Rt,o,!1)),this}function Wt(t){Nt[t.pointerId]=t}function Ht(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Ft(t){delete Nt[t.pointerId]}function Ut(t,i){for(var e in t.touches=[],Nt)t.touches.push(Nt[e]);t.changedTouches=[t],i(t)}var Vt=Pt?"MSPointerDown":Lt?"pointerdown":"touchstart",qt=Pt?"MSPointerUp":Lt?"pointerup":"touchend",Gt="_leaflet_";var Kt,Yt,Xt,Jt,$t,Qt,ti=fi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ii=fi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ei="webkitTransition"===ii||"OTransition"===ii?ii+"End":"transitionend";function ni(t){return"string"==typeof t?document.getElementById(t):t}function oi(t,i){var e,n=t.style[i]||t.currentStyle&&t.currentStyle[i];return n&&"auto"!==n||!document.defaultView||(n=(e=document.defaultView.getComputedStyle(t,null))?e[i]:null),"auto"===n?null:n}function si(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function ri(t){var i=t.parentNode;i&&i.removeChild(t)}function ai(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function hi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function ui(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function li(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=pi(t);return 0this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,N(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e,n,o=A((i=i||{}).paddingTopLeft||i.padding||[0,0]),s=A(i.paddingBottomRight||i.padding||[0,0]),r=this.getCenter(),a=this.project(r),h=this.project(t),u=this.getPixelBounds(),l=u.getSize().divideBy(2),c=O([u.min.add(o),u.max.subtract(s)]);return c.contains(h)||(this._enforcingBounds=!0,e=a.subtract(h),n=A(h.x+e.x,h.y+e.y),(h.xc.max.x)&&(n.x=a.x-e.x,0c.max.y)&&(n.y=a.y-e.y,0=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if((e=this._targets[m(s)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)){if(o&&!Vi(s,t))break;if(n.push(e),o)break}if(s===this._container)break;s=s.parentNode}return n.length||r||o||!Vi(s,t)||(n=[this]),n},_handleDOMEvent:function(t){var i;this._loaded&&!Ui(t)&&("mousedown"!==(i=t.type)&&"keypress"!==i&&"keyup"!==i&&"keydown"!==i||Pi(t.target||t.srcElement),this._fireDOMEvent(t,i))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,e){var n;if("click"===t.type&&((n=h({},t)).type="preclick",this._fireDOMEvent(n,n.type,e)),!t._stopped&&(e=(e||[]).concat(this._findEventTargets(t,i))).length){var o=e[0];"contextmenu"===i&&o.listens(i,!0)&&Ri(t);var s,r={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(s=o.getLatLng&&(!o._radius||o._radius<=10),r.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=s?o.getLatLng():this.layerPointToLatLng(r.layerPoint));for(var a=0;athis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o))&&(M(function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,e,n){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ci(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),setTimeout(p(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_i(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M(function(){this._moveEnd(!0)},this))}});function Yi(t){return new Xi(t)}var Xi=S.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ci(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ri(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+m(this),n),this._layerControlInputs.push(i),i.layerId=m(t.layer),zi(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return e.appendChild(s),s.appendChild(i),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;0<=s;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;si.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),$i=Xi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=si("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=si("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),Oi(s),zi(s,"click",Ni),zi(s,"click",o,this),zi(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";_i(this._zoomInButton,i),_i(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMinZoom()||ci(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMaxZoom()||ci(this._zoomInButton,i)}});Ki.mergeOptions({zoomControl:!0}),Ki.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $i,this.addControl(this.zoomControl))});var Qi=Xi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=si("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=si("div",i,e)),t.imperial&&(this._iScale=si("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;5280Leaflet'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var i in(t.attributionControl=this)._container=si("div","leaflet-control-attribution"),Oi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});Ki.mergeOptions({attributionControl:!0}),Ki.addInitHook(function(){this.options.attributionControl&&(new te).addTo(this)});Xi.Layers=Ji,Xi.Zoom=$i,Xi.Scale=Qi,Xi.Attribution=te,Yi.layers=function(t,i,e){return new Ji(t,i,e)},Yi.zoom=function(t){return new $i(t)},Yi.scale=function(t){return new Qi(t)},Yi.attribution=function(t){return new te(t)};var ie=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});ie.addTo=function(t,i){return t.addHandler(i,this),this};var ee,ne={Events:Z},oe=bt?"touchstart mousedown":"mousedown",se={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},re={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ae=E.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){c(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(zi(this._dragStartTarget,oe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ae._dragging===this&&this.finishDrag(),Si(this._dragStartTarget,oe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var i,e;!t._simulated&&this._enabled&&(this._moved=!1,li(this._element,"leaflet-zoom-anim")||ae._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((ae._dragging=this)._preventOutline&&Pi(this._element),xi(),Xt(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=bi(this._element),this._startPoint=new k(i.clientX,i.clientY),this._parentScale=Ti(e),zi(document,re[t.type],this._onMove,this),zi(document,se[t.type],this._onUp,this))))},_onMove:function(t){var i,e;!t._simulated&&this._enabled&&(t.touches&&1i&&(e.push(t[n]),o=n);oi.max.x&&(e|=2),t.yi.max.y&&(e|=8),e}function de(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||Oe.prototype._containsPoint.call(this,t,!0)}});var Ne=Ce.extend({initialize:function(t,i){c(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=g(t)?t:t.features;if(o){for(i=0,e=o.length;iu.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c]))},_onCloseButtonClick:function(t){this._close(),Ni(t)},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ki.mergeOptions({closePopupOnClick:!0}),Ki.include({openPopup:function(t,i,e){return t instanceof tn||(t=new tn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Me.include({bindPopup:function(t,i){return t instanceof tn?(c(t,i),(this._popup=t)._source=this):(this._popup&&!i||(this._popup=new tn(i,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,i){return this._popup&&this._map&&(i=this._popup._prepareOpen(this,t,i),this._map.openPopup(this._popup,i)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i=t.layer||t.target;this._popup&&this._map&&(Ni(t),i instanceof Be?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var en=Qe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Qe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Qe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Qe.prototype.getEvents.call(this);return bt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=si("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e=this._map,n=this._container,o=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=n.offsetWidth,h=n.offsetHeight,u=A(this.options.offset),l=this._getAnchor(),c="top"===r?(i=a/2,h):"bottom"===r?(i=a/2,0):(i="center"===r?a/2:"right"===r?0:"left"===r?a:s.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oe.max.x)||!i.wrapLat&&(t.ye.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new R(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new k(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(ri(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ci(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,it&&this.options.opacity<1&&mi(t,this.options.opacity),ot&&!st&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var e=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),p(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(p(this._tileReady,this,t,null,o)),vi(o,e),this._tiles[n]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var n=this._tileCoordsToKey(t);(e=this._tiles[n])&&(e.loaded=+new Date,this._map._fadeAnimated?(mi(e.el,0),z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ci(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(p(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new k(this._wrapX?o(t.x,this._wrapX):t.x,this._wrapY?o(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new I(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var sn=on.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=c(this,i)).detectRetina&&zt&&0')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_n={_initContainer:function(){this._container=si("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=cn("shape");ci(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=cn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ri(i),t.removeInteractiveTarget(i),delete this._layers[m(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i=i||(t._stroke=cn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e=e||(t._fill=cn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){hi(t._container)},_bringToBack:function(t){ui(t._container)}},dn=Et?cn:J,pn=hn.extend({getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=dn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ri(this._container),Si(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,i,e;this._map._animatingZoom&&this._bounds||(hn.prototype._update.call(this),i=(t=this._bounds).getSize(),e=this._container,this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),vi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update"))},_initPath:function(t){var i=t._path=dn("path");t.options.className&&ci(i,t.options.className),t.options.interactive&&ci(i,"leaflet-interactive"),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ri(t._path),t.removeInteractiveTarget(t._path),delete this._layers[m(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,$(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){hi(t._path)},_bringToBack:function(t){ui(t._path)}});function mn(t){return Zt||Et?new pn(t):null}Et&&pn.include(_n),Ki.include({getRenderer:function(t){var i=(i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&ln(t)||mn(t)}});var fn=Re.extend({initialize:function(t,i){Re.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pn.create=dn,pn.pointsToPath=$,Ne.geometryToLayer=De,Ne.coordsToLatLng=We,Ne.coordsToLatLngs=He,Ne.latLngToCoords=Fe,Ne.latLngsToCoords=Ue,Ne.getFeature=Ve,Ne.asFeature=qe,Ki.mergeOptions({boxZoom:!0});var gn=ie.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){zi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Si(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ri(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),xi(),this._startPoint=this._map.mouseEventToContainerPoint(t),zi(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=si("div","leaflet-zoom-box",this._container),ci(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new I(this._point,this._startPoint),e=i.getSize();vi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ri(this._box),_i(this._container,"leaflet-crosshair")),Jt(),wi(),Si(document,{contextmenu:Ni,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){var i;1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(p(this._resetState,this),0),i=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ki.addInitHook("addHandler","boxZoom",gn),Ki.mergeOptions({doubleClickZoom:!0});var vn=ie.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});Ki.addInitHook("addHandler","doubleClickZoom",vn),Ki.mergeOptions({dragging:!0,inertia:!st,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yn=ie.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new ae(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),ci(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_i(this._map._container,"leaflet-grab"),_i(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,i=this._map;i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=N(this._map.options.maxBounds),this._offsetLimit=O(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var i,e;this._map.options.inertia&&(i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(e),this._times.push(i),this._prunePositions(i)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)i.getMaxZoom()&&1 + transform="matrix(1.2909742,0,0,1.2909742,-393.13541,489.87865)"> + ry="102.63766" + inkscape:export-xdpi="3.05" + inkscape:export-ydpi="3.05" /> P + + +