diff --git a/.gitignore b/.gitignore index 13f3646..2a59ddf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,15 @@ -# VS Code -.vscode \ No newline at end of file +# dependencies +node_modules/ + +# build output +dist/ + +# local tooling +.vscode/ +.idea/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* diff --git a/README.MD b/README.MD index 7a9c35d..4a2b85f 100644 --- a/README.MD +++ b/README.MD @@ -1,30 +1,57 @@

- Logo -
- Map-INSA + Logo +
+ Map-INSA

- + Map-INSA preview

+Application 3D du campus INSA Toulouse, migree vers une stack moderne: -## 🏗️ Ajouter / Modifier un bâtiment +- Vite + TypeScript +- maptalks + maptalks.three + three +- source de donnees unique: `json/map.geojson` -- Rendez-vous sur [geojson.io](https://geojson.io/) -- Ouvrer le fichier [json/map.geojson](./json/map.geojson) -- Faites vos modifications - > **Remplissez le tableau dans `Table` comme ceci**: - > | name | short_name | description | height | - > | ---- | ----------- | ---------- | ------ | - > | | | | | +## Lancer le projet - > Pour récupérer la hauteur d'un bâtiment, vous pouvez vous rendre sur le site de [OSMBuildings](https://www.osmbuildings.org/) et cliquer sur le bâtiment en question. -- Enregistrez le fichier dans le dossier [json](./json) sous le nom `map.geojson` -- Ouvrez le fichier [js/buildins.js](./js/buildins.js) et copiez le contenu de `map.geojson` dans la variable `buildings` comme ceci : +```bash +npm install +npm run dev +``` +Build production: -```js -const buildings = COLLER LE CONTENU DE map.geojson ICI +```bash +npm run build ``` +Preview locale du build: + +```bash +npm run preview +``` + +## Ajouter / Modifier un batiment + +- Rendez-vous sur [geojson.io](https://geojson.io/) +- Ouvrez le fichier [`json/map.geojson`](./json/map.geojson) +- Faites vos modifications puis sauvegardez le fichier + +Proprietes attendues dans `properties`: + +| name | short_name | description | height | +| ---- | ---------- | ----------- | ------ | +| string (optionnel) | string (optionnel) | string (optionnel) | number (requis) | + +Pour recuperer la hauteur d'un batiment, vous pouvez utiliser [OSMBuildings](https://www.osmbuildings.org/). + +## Deploiement + +La configuration Vite utilise `base: './'` pour etre compatible avec: + +- hebergement en sous-dossier sur serveur INSA +- affichage dans navigateur standard +- integration WebView dans une application mobile + diff --git a/css/maptalks.min.css b/css/maptalks.min.css deleted file mode 100644 index 877219c..0000000 --- a/css/maptalks.min.css +++ /dev/null @@ -1 +0,0 @@ - .maptalks-zoom {text-align: center;}.maptalks-zoom .maptalks-zoom-zoomlevel {display: block;width: 29px;height: 29px;background: #172029;color: #fff;line-height: 29px;font-size: 12px;transform: scale(0.8);-ms-transform: scale(0.8);transform-origin: bottom left;-ms-transform-origin: bottom left;}.maptalks-zoom-slider {margin-top: 6px;}.maptalks-zoom-slider a.maptalks-zoom-zoomin, .maptalks-zoom-slider a.maptalks-zoom-zoomout {display: block;font-size: 16px;width: 21px;height: 21px;border: 1px solid #363539;background: #172029;color: #fff;line-height: 19px;text-decoration: none;}.maptalks-zoom-slider-box {width: 21px;height: 124px;background: #34495e;background: url(../assets/images/control/kedu.png) repeat-y;border: 1px solid #35383b;position: relative;}.maptalks-zoom-slider-box .maptalks-zoom-slider-ruler {width: 5px;height: 112px;background: #372e2b;border-radius: 2px;-moz-border-radius: 2px;-webkit-border-radius: 2px;margin: 4px auto;position: relative;}.maptalks-zoom-slider-box .maptalks-zoom-slider-ruler .maptalks-zoom-slider-reading {width: 5px;height: 50%;position: absolute;bottom: 0;left: 0;background: #1bbc9b;border-radius: 2px;-moz-border-radius: 2px;-webkit-border-radius: 2px;}.maptalks-zoom-slider-box .maptalks-zoom-slider-dot {width: 15px;height: 15px;background: url(../assets/images/control/3.png) no-repeat;position: absolute;top: 50%;left: 3px;cursor: pointer;}.maptalks-toolbar-vertical {margin: 0;overflow: visible;}.maptalks-toolbar-horizonal ul, .maptalks-toolbar-vertical ul {margin: 0;padding: 0;}.maptalks-toolbar-vertical ul li + li {border-top: 1px solid #425568;}.maptalks-toolbar-vertical li {text-align: center;list-style: none;line-height: 28px;color: #fff;background: #34495e;min-width: 10px;min-height: 28px;position: relative;padding: 0 10px;}.maptalks-toolbar-vertical li:hover {background: #1bbc9b;}.maptalks-toolbar-vertical li .maptalks-dropMenu {padding: 0;position: absolute;top: 0;overflow: visible;}.maptalks-toolbar-vertical li .maptalks-dropMenu li {list-style: none;min-width: 95px;background: #223140;height: 27px;}.maptalks-toolbar-vertical li .maptalks-dropMenu li a {color: #fff;display: block;line-height: 27px;background: url(../assets/images/control/ico-dot.png) no-repeat 14px 10px;text-indent: 33px;text-decoration: none;font-size: 12px;}.maptalks-toolbar-vertical li .maptalks-dropMenu em.maptalks-ico {display: block;width: 5px;height: 6px;position: absolute;top: 12px;right: -4px;}.maptalks-toolbar-vertical li .maptalks-dropMenu li.maptalks-on, .maptalks-toolbar-vertical li .maptalks-dropMenu li:hover {background: #0e595e;}.maptalks-toolbar-horizonal {margin: 0;overflow: visible;}.maptalks-toolbar-horizonal li {text-align: left;line-height: 28px;color: #fff;padding: 0 10px;list-style: none;min-width: 28px;min-height: 28px;float: left;background: #34495e;position: relative;}.maptalks-toolbar-horizonal ul li + li {border-left: 1px solid #425568;}.maptalks-toolbar-horizonal li:hover {background: #1bbc9b;}.maptalks-toolbar-horizonal li .maptalks-dropMenu {display: block;position: absolute;left: 0;overflow: visible;}.maptalks-toolbar-horizonal li .maptalks-dropMenu li {list-style: none;min-width: 95px;background: #223140;height: 27px;}.maptalks-toolbar-horizonal li .maptalks-dropMenu li + li {border-left: none;border-top: 1px solid #425568;}.maptalks-toolbar-horizonal li .maptalks-dropMenu li a {color: #fff;display: block;line-height: 27px;background: url(../assets/images/control/ico-dot.png) no-repeat 5px 10px;text-indent: 20px;text-decoration: none;font-size: 12px;}.maptalks-toolbar-horizonal li .maptalks-dropMenu em.maptalks-ico {display: block;width: 5px;height: 6px;position: absolute;top: -4px;left: 12px;}.maptalks-toolbar-horizonal .maptalks-dropMenu li:hover {background: #0e595e;}.maptalks-menu {background: #fff;padding: 1px;width: 172px;border: 1px solid #b4b3b3;}.maptalks-menu em.maptalks-ico {display: block;width: 17px;height: 10px;background: url(../assets/images/control/5.png) no-repeat;position: absolute;top: -10px;left: 8px;}.maptalks-menu .maptalks-menu-items {color: #5a5756;margin: 0;padding: 0;font-size: 12px;}.maptalks-menu .maptalks-menu-items li {list-style: none;height: 30px;line-height: 30px;text-indent: 16px;}.maptalks-menu .maptalks-menu-items li:hover {background: #007fbe;color: #fff;cursor: pointer;}.maptalks-menu .maptalks-menu-items li.maptalks-menu-splitter {list-style: none;height: 2px;background: #ddd;}.maptalks-msgBox {background: #fff;border: 1px solid #b4b3b3;border-radius: 3px;}.maptalks-msgBox em.maptalks-ico {display: block;width: 17px;height: 10px;background: url(../assets/images/control/5_1.png) no-repeat;position: absolute;left: 50%;margin-left: -5px;bottom: -10px;}.maptalks-msgBox h2 {display: block;font-weight: 700;font-size: 14px;padding: 10px 10px 0 10px;margin: 0;}.maptalks-msgBox a.maptalks-close {display: block;width: 13px;height: 13px;background: url(../assets/images/control/infownd-close.png) no-repeat;position: absolute;top: 15px;right: 10px;}.maptalks-msgBox a.maptalks-close:hover {background: url(../assets/images/control/infownd-close-hover.png) no-repeat;}.maptalks-msgBox .maptalks-msgContent {font-size: 12px;padding: 10px;min-width: 200px;}.maptalks-panel {background: #fff;border: 1px solid #b4b3b3;border-radius: 3px;}.maptalks-panel .maptalks-panel-content {padding: 10px;min-width: 200px;min-height: 60px;}.maptalks-panel a.maptalks-close {display: block;width: 6px;height: 7px;background: url(../assets/images/control/close-2.png) no-repeat;position: absolute;top: 10px;right: 10px;}.maptalks-panel a.maptalks-close:hover {opacity: 0.5;}.maptalks-attribution {display: inline-block;opacity: 1;background: #fff;background-color: hsla(0, 0%, 100%, 0.7);padding: 0;font-size: 13px;font-family: microsoft yahei, Helvetica Neue, Helvetica, sans-serif;}.maptalks-attribution a {text-decoration: none;color: #0078a8;}.maptalks-attribution a:hover {text-decoration: underline;}.maptalks-overview {background: #fff;border: 1px solid #b4b3b3;width: 100%;height: 100%;}.maptalks-overview-button {cursor: pointer;background: #fff;width: 18px;height: 18px;position: absolute;bottom: 1px;right: 1px;font: 16px sans-serif;text-align: center;line-height: 16px;border: 1px solid #b4b3b3;color: #363539;}.maptalks-layer-switcher ul {list-style: none;}.maptalks-layer-switcher .panel > ul {padding-left: 1em;}.maptalks-layer-switcher .group > ul {padding-left: 10px;}.maptalks-layer-switcher .group + .group {padding-top: 1em;}.maptalks-layer-switcher label {text-overflow: ellipsis;overflow: hidden;display: inline-block;font-size: 14px;white-space: nowrap;color: #bbb;}.maptalks-layer-switcher .group > label {font-weight: 700;color: #ddd;width: 100%;}.maptalks-layer-switcher .layer label {padding-top: 5px;width: 92%;}.maptalks-layer-switcher input {margin: 0 5px;position: relative;top: -2px;}.maptalks-layer-switcher input[disabled="disabled"] {cursor: not-allowed;}.maptalks-layer-switcher input[disabled="disabled"] + label {color: #666;}.maptalks-layer-switcher .panel, .maptalks-layer-switcher button {border-radius: 4px;}.maptalks-layer-switcher button {width: 28px;height: 28px;background: url(../assets/images/control/layer.png) no-repeat 4px 4px;background-color: #172029;border: none;}.maptalks-layer-switcher.shown button {display: none;}.maptalks-layer-switcher .panel {background-color: #172029;display: none;overflow-y: auto;overflow-x: hidden;min-width: 120px;max-width: 400px;max-height: 500px;}.maptalks-layer-switcher li {white-space: nowrap;}.maptalks-layer-switcher li.group {margin-right: 1em;}.maptalks-layer-switcher.shown .panel {display: block;}.maptalks-layer-switcher ::-webkit-scrollbar {width: 6px;}.maptalks-layer-switcher ::-webkit-scrollbar-track {background-color: #1f1f1f;}.maptalks-layer-switcher ::-webkit-scrollbar-thumb {border-radius: 5px;background-color: #777;}.maptalks-tooltip {display: block;background: #fff;border: 1px solid #b4b3b3;padding: 0 4px;height: 24px;line-height: 24px;font-size: 14px;white-space: nowrap;} \ No newline at end of file diff --git a/index.html b/index.html index 79de87a..208d50c 100644 --- a/index.html +++ b/index.html @@ -1,11 +1,10 @@ - - + + - Map-INSA - @@ -30,12 +28,8 @@ property="og:description" content="Find your way around the INSA Toulouse campus." /> - - - -
- -
-
- -
- -
- -
-
-
- -
",t},t.onMouseOut=function(){clearTimeout(this._timeout),this.isVisible()&&this._removePrevDOM(),this._switchMapEvents("off")},t.onMouseMove=function(t){var e=this;clearTimeout(this._timeout);var i=this.getMap();if(i){var n=i.locateByPoint(t.coordinate,-5,25);0===this.options.showTimeout?this.show(n):this._timeout=setTimeout(function(){i&&e.show(n)},this.options.showTimeout)}},t.onRemove=function(){clearTimeout(this._timeout),this._owner&&(this._owner.off("mouseover",this.onMouseOver,this),this._owner.off("mouseout",this.onMouseOut,this),this._owner.off(kh,this.hideDom,this))},t.hideDom=function(){return this.hide()},t.onEvent=function(){return n.prototype.onEvent.call(this),this.hideDom(),this},t._getViewPoint=function(){return this.getMap().coordToViewPoint(this._coordinate,void 0,0)._add(this.options.dx,this.options.dy)},e}(Ch);Oh.mergeOptions({width:0,height:0,animation:"fade",containerClass:"maptalks-tooltip",showTimeout:400});var Lh=function(e){function t(t){return e.call(this,t)||this}et(t,e);var i=t.prototype;return i._getClassName=function(){return"Menu"},i.addTo=function(t){return t._menu&&t._menu!==this&&t.removeMenu(),(t._menu=this)._owner=t,Ch.prototype.addTo.apply(this,arguments)},i.setItems=function(t){return this.options.items=t,this},i.getItems=function(){return this.options.items||[]},i.buildOn=function(){if(this.options.custom){if(b(this.options.items)){var t=ri("div");return t.innerHTML=this.options.items,t}return this.options.items}var e=ri("div");this.options.containerClass&&vi(e,this.options.containerClass),e.style.width=this._getMenuWidth()+"px";var i=this._createMenuItemDom();return e.appendChild(i),Ti(e,"contextmenu",ui),e},i.getOffset=function(){if(!this.getMap())return null;var t=this.getMap().getSize(),e=this.getMap().viewPointToContainerPoint(this._getViewPoint()),i=this.getSize(),n=0,r=0;return e.x+i.width>t.width&&(n=-i.width),e.y+i.height>t.height&&(r=-i.height),new ct(n,r)},i.getTransformOrigin=function(){var t=this.getOffset()._multi(-1);return t.x+"px "+t.y+"px"},i.getEvents=function(){return{"_zoomstart _zoomend _movestart _dblclick _click":this._removePrevDOM}},i._createMenuItemDom=function(){var n=this,r=this.getMap(),t=ri("ul");vi(t,"maptalks-menu-items");var e,i,o=this.getItems();function s(i){return function(t){var e=r._parseEvent(t,"click");e.target=n,e.owner=n._owner,e.index=i,!1!==this._callback(e)&&(n.hide(),n._owner&&n._owner.fire("closemenu"))}}for(var a=0,h=o.length;a"}},e}(jh);Hh.mergeOptions({position:{bottom:0,left:0},content:'maptalks'}),Ms.mergeOptions({attribution:!0}),Ms.addOnLoadHook(function(){var t=this.options.attribution||this.options.attributionControl;t&&(this.attributionControl=new Hh(t),this.addControl(this.attributionControl))});var Fh=function(t){function e(){return t.apply(this,arguments)||this}et(e,t);var i=e.prototype;return i.buildOn=function(){var t=this.container=ri("div",this.options.containerClass),e=this.panel=ri("div","panel"),i=this.button=ri("button");return t.appendChild(i),t.appendChild(e),t},i.onAdd=function(){Ti(this.button,"mouseover",this._show,this),Ti(this.panel,"mouseleave",this._hide,this),Ti(this.getMap(),"click",this._hide,this)},i.onRemove=function(){this.panel&&(Si(this.button,"mouseover",this._show,this),Si(this.panel,"mouseleave",this._hide,this),Si(this.getMap(),"click",this._hide,this),si(this.panel),si(this.button),delete this.panel,delete this.button,delete this.container)},i._show=function(){_i(this.container,"shown")||(vi(this.container,"shown"),this._createPanel())},i._hide=function(t){this.panel.contains(t.toElement||t.relatedTarget)||yi(this.container,this.options.containerClass)},i._createPanel=function(){this.panel.innerHTML="";var t=ri("ul");this.panel.appendChild(t),this._renderLayers(this.getMap(),t)},i._renderLayers=function(t,e){var r=this,i=t.getBaseLayer(),n=t.getLayers(),o=n.length;if(i){var s=i.layers||[i],a=ri("li","group"),h=ri("ul"),l=ri("label");l.innerHTML=this.options.baseTitle,a.appendChild(l);for(var u=0,c=s.length;u'+h.item+"
"}else l.innerHTML=h.item;if(h.click&&Ti(l,"click",n(h.click,o,null,l)),Pt(h.children)){var c=this._createDropMenu(o);l.appendChild(c),l._menu=c,Ti(l,"mouseover",function(){this._menu.style.display=""}),Ti(l,"mouseout",function(){this._menu.style.display="none"})}i.appendChild(l)}return e},i._createDropMenu=function(t){var o=this;function e(e,i,n){var r=o._getItems()[i].children[n];return function(t){return ci(t),e({target:r,index:i,childIndex:n})}}var i=ri("div","maptalks-dropMenu"),n=this._getItems(),r=n.length,s=ri("ul"),a=n[t].children;t===r-1&&a&&(i.style.cssText="right: 0px;",s.style.cssText="right: 0px;position: absolute;",this.options.reverseMenu&&(s.style.bottom=0)),i.appendChild(ri("em","maptalks-ico"));for(var h=0,l=0,u=a.length;lh&&(h=c.width)}for(var d=0,f=a.length;d'+g.item+"",p.style.cursor="pointer",p.style.width=h+24+"px",Ti(p.childNodes[0],"click",e(g.click,t,d)),s.appendChild(p)}if(this.options.vertical){var m=h<95?95:h;this.options.reverseMenu?i.style.right=-(m+20)+"px":i.style.left=-(m+20)+"px"}else this.options.reverseMenu?i.style.bottom="28px":i.style.top="28px";return i.appendChild(s),i.style.display="none",i},i._getItems=function(){return this.options.items||[]},e}(jh);Wh.mergeOptions({height:28,vertical:!1,position:"top-right",reverseMenu:!1,items:{}});var Bh=function(t){function e(){return t.apply(this,arguments)||this}et(e,t);var i=e.prototype;return i.buildOn=function(t){var e=this.options,i=ri("div","maptalks-zoom");if(e.zoomLevel){var n=ri("span","maptalks-zoom-zoomlevel");i.appendChild(n),this._levelDOM=n}var r=ri("div","maptalks-zoom-slider"),o=ri("a","maptalks-zoom-zoomin");if(o.href="javascript:;",o.innerHTML="+",r.appendChild(o),this._zoomInButton=o,e.slider){var s=ri("div","maptalks-zoom-slider-box"),a=ri("div","maptalks-zoom-slider-ruler"),h=ri("span","maptalks-zoom-slider-reading"),l=ri("span","maptalks-zoom-slider-dot");a.appendChild(h),s.appendChild(a),s.appendChild(l),r.appendChild(s),this._sliderBox=s,this._sliderRuler=a,this._sliderReading=h,this._sliderDot=l}var u=ri("a","maptalks-zoom-zoomout");return u.href="javascript:;",u.innerHTML="-",r.appendChild(u),this._zoomOutButton=u,i.appendChild(r),t.on("_zoomend _zooming _zoomstart _spatialreferencechange",this._update,this),this._update(),this._registerDomEvents(),i},i.onRemove=function(){this.getMap().off("_zoomend _zooming _zoomstart _spatialreferencechange",this._update,this),this._zoomInButton&&Si(this._zoomInButton,"click",this._onZoomInClick,this),this._zoomOutButton&&Si(this._zoomOutButton,"click",this._onZoomOutClick,this),this._sliderRuler&&(Si(this._sliderRuler,"click",this._onClickRuler,this),this.dotDragger.disable(),delete this.dotDragger)},i._update=function(){var t=this.getMap();if(this._sliderBox){var e=10*(t.getMaxZoom()-t.getMinZoom());this._sliderBox.style.height=e+16+"px",this._sliderRuler.style.height=e+8+"px",this._sliderRuler.style.cursor="pointer";var i=10*(t.getMaxZoom()-t.getZoom());this._sliderReading.style.height=10*(t.getZoom()-t.getMinZoom()+1)+"px",this._sliderDot.style.top=i+"px"}this._updateText()},i._updateText=function(){if(this._levelDOM){var t=this.getMap().getZoom();d(t)||(t=Math.floor(10*t)/10),this._levelDOM.innerHTML=t}},i._registerDomEvents=function(){this._zoomInButton&&Ti(this._zoomInButton,"click",this._onZoomInClick,this),this._zoomOutButton&&Ti(this._zoomOutButton,"click",this._onZoomOutClick,this),this._sliderRuler&&(Ti(this._sliderRuler,"click",this._onClickRuler,this),this.dotDragger=new xn(this._sliderDot,{ignoreMouseleave:!0}),this.dotDragger.on("dragstart",this._onDotDragstart,this).on("dragging dragend",this._onDotDrag,this).enable())},i._onZoomInClick=function(t){ui(t),this.getMap().zoomIn()},i._onZoomOutClick=function(t){ui(t),this.getMap().zoomOut()},i._onClickRuler=function(t){ui(t);var e=this.getMap(),i=pi(t,this._sliderRuler).y,n=e.getMaxZoom(),r=Math.floor(n-i/10);e.setZoom(r)},i._onDotDragstart=function(t){ui(t.domEvent);var e=this.getMap(),i=e.getSize().toPoint()._multi(.5);e.onZoomStart(e.getZoom(),i)},i._onDotDrag=function(t){ui(t.domEvent);var e=this.getMap(),i=e.getSize().toPoint()._multi(.5),n=pi(t.domEvent,this._sliderRuler),r=e.getMaxZoom(),o=e.getMinZoom(),s=n.y,a=r-s/10;r=i.left?1:-1,this._yScale=i.top>=i.bottom?1:-1;var r=t.getGLRes();this._pointOrigin=t._prjToPointAtRes(new ct(this.tileSystem.origin),r),this._glRes=r}var e=t.prototype;return e.prepareTileInfo=function(t,e){if(b(t)?t=Uh[t.toLowerCase()]:Array.isArray(t)&&(t=new Uh(t)),!t)throw new Error("Invalid TileSystem");this.tileSystem=t;var i=e.right>e.left?1:-1,n=e.top>e.bottom?-1:1,r=t.origin.x,o=t.origin.y;this.transformation=new Hn([i,n,r,o])},e._getTileNum=function(t,e){var i=this.tileSystem,n=this.tileSize,r=Math.floor(1e-7*i.scale.x+t.x/(n.width*e)),o=Math.ceil(1e-7*i.scale.y+t.y/(n.height*e));return{x:i.scale.x*r,y:i.scale.y*o}},e.getTileIndex=function(t,e,i){var n=this.tileSystem,r=this.transformation.transform(t,1),o=this._getTileNum(r,e);return n.scale.x<0&&(o.x-=1),0=d.xmax&&(a=d.xmin+(a-d.xmin)%(d.xmax-d.xmin))),!0!==o&&"y"!==o||(d.ymax===d.ymin?h=d.ymin:h>=d.ymax?h=d.ymin+(h-d.ymin)%(d.ymax-d.ymin):hd.xmax||h>d.ymax||h>1,A=(d<<1)+E,k=(f<<1)+R,O=(p<<1)+E,L=(m<<1)+R;t.children||(t.children=[]);var D=t.children[S];D||(D=this._getTileId(O,L,u),t.children[S]=D);var I=C.isTileCachedOrLoading(D),j=void 0,z=I&&I.info;if(!z){if(this.tileInfoCache||(this.tileInfoCache=new Oi(4*this.options.maxCacheSize)),!(z=this.tileInfoCache.get(D))){if(l<0){var H=y+E*_,F=x-R*v;j=new zn(H,F-v,H+_,F)}else{var G=y+E*_,Z=w+R*v;j=new zn(G,Z,G+_,Z+v)}z={x:A,y:k,idx:O,idy:L,z:u,extent2d:j,error:t.error/2,res:M,id:D,parentNodeId:t.id,children:[],url:this.getTileUrl(A,k,u+this.options.zoomOffset),offset:s},this.tileInfoCache.add(D,z)}a&&(z.layer=this.getId())}z.error=t.error/2,z.offset[0]=s[0],z.offset[1]=s[1];var N=this._isTileVisible(z,e,T,o,s);if(1===N)P=!0;else{if(-1===N)continue;if(0===N&&u!==o)return n.push(t),void r._combine(t.extent2d)}b.push(z)}u===o?P?i.push.apply(i,b):(n.push(t),r._combine(t.extent2d)):i.push.apply(i,b)},t._isTileVisible=function(t,e,i,n,r){if(0===t.z)return 1;if(!this._isTileInFrustum(t,e,i,r))return-1;var o=this.options.maxError;return ut(o)&&(o=1),o<=this._getScreenSpaceError(t,i,n,r)?1:0},t._isTileInFrustum=function(t,e,i,n){if(!this._zScale){var r=this.getMap(),o=r.getGLRes();this._zScale=r.altitudeToPoint(100,o)/100}var s=t.extent2d,a=s.xmin,h=s.ymin,l=s.xmax,u=s.ymax;return dl[0][0]=(a-n[0])*i,dl[0][1]=(h-n[1])*i,dl[0][2]=(t.minAltitude||0)*this._zScale,dl[1][0]=(l-n[0])*i,dl[1][1]=(u-n[1])*i,dl[1][2]=(t.maxAltitude||0)*this._zScale,Kh(e,dl)},t._getScreenSpaceError=function(t,e,i,n){var r=t.error,o=this.getMap(),s=t.extent2d,a=s.xmin,h=s.ymin,l=s.xmax,u=s.ymax;fl[0]=(a-n[0])*e,fl[1]=(h-n[1])*e,gl[0]=(l-n[0])*e,gl[1]=(u-n[1])*e;var c,d,f,g,p,m,_=(c=fl,d=gl,f=o.cameraPosition,g=Math.max(c[0]-f[0],0,f[0]-d[0]),p=Math.max(c[1]-f[1],0,f[1]-d[1]),m=Math.max(c[2]-f[2],0,f[2]-d[2]),Math.sqrt(g*g+p*p+m*m)),v=Math.max(Math.abs(_),1e-7),y=Math.abs(t.z-i);return r*(o.height<1e3?1:y<=1?1:y<=2?.7:.605)/v},t._getCascadeTiles=function(t,e){var i=this.getMap(),n=i.getPitch(),r=e&&e.getRenderer(),o=i.getContainerExtent(),s=[],a=0,h=this.getMinZoom(),l=i.options.cascadePitches[0],u=i.options.cascadePitches[1],c=Math.floor(i._getVisualHeight(u)),d=ut(t)?this._getTileZoom(i.getZoom()):t;if(this._visitedTiles=new nl,!ut(t)||!this.options.cascadeTiles||n<=l||!ut(h)&&d<=h){var f=n<=u?o:new zn(0,i.height-c,i.width,i.height),g=this._getTiles(d,f,2,r);return g&&(a+=g.tiles.length,s.push(g)),{tileGrids:s,count:a}}var p=Math.floor(i._getVisualHeight(l)),m=new zn(0,i.height-p,i.width,i.height),_=this._getTiles(d,m,0,r);a+=_?_.tiles.length:0,s.push(_);var v,y,x=m.ymin,w=i.getSpatialReference().getZoomDirection(),C=w;if(u response.blob())\n .then(blob => createImageBitmap(blob))\n .then(bitmap => {\n var { width, height } = bitmap;\n offCanvas.width = width;\n offCanvas.height = height;\n offCtx.drawImage(bitmap, 0, 0);\n bitmap.close();\n var imgData = offCtx.getImageData(0, 0, width, height);\n // debugger\n cb(null, { width, height, data: new Uint8Array(imgData.data) });\n }).catch(err => {\n console.warn('error when loading tile:', url);\n console.warn(err);\n cb(err);\n });\n }\n}"});var _l=new Pe(256,256),vl="show hide remove";function yl(t){return Array.isArray(t)||(t=[t]),t}var xl=function(r){function i(t,e,i){var n;return(n=r.call(this,t,i)||this).layers=e||[],n._checkChildren(),n.layerMap={},n._groupChildren=[],n}et(i,r),i.fromJSON=function(t){if(!t||"GroupTileLayer"!==t.type)return null;var e=t.layers.map(function(t){return Wo.fromJSON(t)});return new i(t.id,e,t.options)};var t=i.prototype;return t.getLayers=function(){return this.layers},t.addLayer=function(t){var e=this;void 0===t&&(t=[]),t=yl(t);var i=this.layers.length;return t.forEach(function(t){t instanceof ml&&(-1!==e.layers.indexOf(t)||e.layerMap[t.getId()]||e.layers.push(t))}),i!==this.layers.length&&(this._sortLayers(),this._refresh(),this._renderLayers()),this},t.removeLayer=function(t){var i=this;void 0===t&&(t=[]),t=yl(t);var e=this.layers.length;return t.forEach(function(t){if(t instanceof ml||(t=i.layerMap[t]),t instanceof ml){var e=i.layers.indexOf(t);0<=e&&(i.layers.splice(e,1),t._doRemove(),t.off(vl,i._onLayerShowHide,i))}}),e!==this.layers.length&&(this._refresh(),this._renderLayers()),this},t.clearLayers=function(){var e=this;return this.layers.forEach(function(t){t._doRemove(),t.off(vl,e._onLayerShowHide,e)}),this.layers=[],this._refresh(),this._renderLayers(),this},t.toJSON=function(){return{type:this.getJSONType(),id:this.getId(),layers:this.layers.map(function(t){return t.toJSON()}),options:this.config()}},t.getTileSize=function(t){var e=this.getLayer(t);return e?e.getTileSize():_l},t.getTiles=function(t,e){for(var i=this.layers,n=[],r=0,o=0,s=i.length;o=s&&t.x<=s+r&&t.y>=a&&t.y<=a+o},e.addTo=function(t){(this.map=t).getRenderer().addTopElement(this)},e.onEvent=function(t){this.fire(t.type,t)},e.mousedown=function(t){var e=t.target,i=this.options.cursor;i&&e.setCursor(i),this.onDragstart(t)},e.onDragstart=function(t){var e=t.containerPoint,i=t.target,n=i._panels.mapWrapper||i._containerDOM,r=this._dragger=new xn(n);r.on("dragging",this.onDragging,this).on("mouseup",this.onDragend,this).enable(),r.type="handle",r.onMouseDown(t.domEvent),Ul=e.x,Jl=e.y,this.fire("dragstart",{containerPoint:e})},e.onDragging=function(t){if(this._dragger){var e=this.map,i=pi(t.domEvent,e._containerDOM),n={x:i.x-Ul,y:i.y-Jl},r=e.containerPointToCoord(new ct(Ul,Jl)),o=e.containerPointToCoord(i);Ul=i.x,Jl=i.y,this.offset(n),this.fire("dragging",{containerPoint:i,coordOffset:o._sub(r)})}},e.onDragend=function(t){if(this._dragger){var e=this.map;e.resetCursor();var i=pi(t.domEvent,e._containerDOM),n={x:i.x-Ul,y:i.y-Jl};this.offset(n),this._dragger.disable(),delete this._dragger,this.fire("dragend",{containerPoint:i})}},t}(Ui(Yi)),Xl=function(){function t(t,e){(this.target=t).once("remove",this.delete,this),this.map=e,this.addTo(e)}var e=t.prototype;return e.setPoints=function(t){var e=(this.points=t).map(function(t){return t.x}),i=t.map(function(t){return t.y});this.xmin=Math.min.apply(Math,e),this.xmax=Math.max.apply(Math,e),this.ymin=Math.min.apply(Math,i),this.ymax=Math.max.apply(Math,i)},e.hitTest=function(){return!1},e.render=function(t){var e=this.map;if(!(this.xmax<=0||this.xmin>=e.width||this.ymax<=0||this.ymin>=e.height)){var i=e.getDevicePixelRatio(),n=.5;t.lineWidth=1,t.strokeStyle="#000",t.globalAlpha=1,t.beginPath();var r=this.points;t.moveTo(s(r[0].x),s(r[0].y));for(var o=1;or.y&&(s.y=0);var a="middle"===_?2:1,h="left"===v?1:2,l=Math.abs(s.x)*h,u=Math.abs(s.y)*a;y&&(u=(l=Math.max(l,u*y))/y);var c=x[e];f instanceof pa?((y||0===c||2===c)&&(f.setWidth(l),f!==d._geometry&&d._geometry.setWidth(l)),(y||1===c||2===c)&&(f.setHeight(u),f!==d._geometry&&d._geometry.setHeight(u))):((y||0===c||2===c)&&(o.markerWidth=Math.min(l,d._geometry.options.maxMarkerWidth||1/0)),(y||1===c||2===c)&&(o.markerHeight=Math.min(u,d._geometry.options.maxMarkerHeight||1/0)),f.setSymbol(o),f!==d._geometry&&d._geometry.setSymbol(o))},function(){d._update(n())})}else console&&console.warn("A marker can't be resized with symbol:",f.getSymbol());function n(){var t=[["setCoordinates",f.getCoordinates().toArray()]];return f instanceof pa?(t.push(["setWidth",f.getWidth()]),t.push(["setHeight",f.getHeight()])):t.push(["setSymbol",f.getSymbol()]),t}},e.createCircleEditor=function(){var s=this,a=this._shadow||this._geometry,h=this.getMap();this._history||this._recordHistory([["setCoordinates",a.getCoordinates().toArray()],["setRadius",a.getRadius()]]),this._createResizeHandles(null,function(t){var e=a.getCenter(),i=h.containerPointToCoord(t),n=new Js([[e.x,e.y],[i.x,e.y]]),r=new Js([[e.x,e.y],[e.x,i.y]]),o=Math.max(h.computeGeometryLength(n),h.computeGeometryLength(r));a.setRadius(o),a!==s._geometry&&s._geometry.setRadius(o)},function(){s._update("setRadius",a.getRadius())})},e.createEllipseOrRectEditor=function(){var b=this,M=[2,1,2,0,0,2,1,2],T=this._shadow||this._geometry;this._history||this._recordHistory(t());var S,E=this.getMap(),R=this._geometry instanceof sa;this.options.fixAspectRatio&&(S=T.getWidth()/T.getHeight());var A=this._createResizeHandles(null,function(t,e){var i,n,r,o=R?1:2,s=A[e].getContainerPoint(),a=M[e];if(R){var h=A[7-e].getContainerPoint(),l=(i=s.sub(h)).abs();n=E.pixelToDistance(l.x,0),r=E.pixelToDistance(0,l.y);var u=T.getSize(),c=T.getCoordinates(),d=T.getWidth(),f=T.getHeight(),g=E.containerPointToCoord(t),p=E.containerPointToCoord(h),m=new Js([[p.x,p.y],[g.x,p.y]]),_=new Js([[p.x,p.y],[p.x,g.y]]);if(n=E.computeGeometryLength(m),r=E.computeGeometryLength(_),0===a)if(S&&(l.y=l.x/S,u.height=Math.abs(l.y),r=n/S),s.y=h.y-u.height/2,g.y=c.y,4===e)g.x=Math.min(g.x,c.x);else{var v=E.locate(c,d,0);g.x=E.locate(new wn(v.x,g.y),-n,0).x}else if(1===a)S&&(l.x=l.y*S,u.width=Math.abs(l.x),n=r*S),s.x=h.x-u.width/2,g.x=c.x,g.y=Math.max(g.y,p.y);else{if(S&&(r*S=a.length?a[0]:a[t+1];var n=a[t].add(i).multi(.5),h=c.createHandle(n,{symbol:c.options.newVertexHandleSymbol,cursor:"pointer",axis:null,onDown:function(t,e){if(!e||!e.domEvent||2!==e.domEvent.button){var i=m(s),n=h[d],r=h.getContainerPoint(),o=l._containerPointToPrj(r);i.splice(n+1,0,o),0/gi,"").replace(/<\/p>/gi,"
"),this._textEditor.innerHTML=t;var e=this._textEditor.innerText.replace(/[\r\n]+$/gi,"");this.setContent(e),Si(this._textEditor,"mousedown dblclick",ci),this.getMap().off("mousedown",this.endEditText,this),this._editUIMarker.remove(),delete this._editUIMarker,this._textEditor.onkeyup=null,delete this._textEditor,this.show(),this._fireEvent("edittextend")}return this},isEditingText:function(){return!!this._textEditor},getTextEditor:function(){return this._editUIMarker},_prepareEditor:function(){var t=this.getMap(),e=this._createEditor();this._textEditor=e,t.on("mousedown",this.endEditText,this);var i=this._getEditorOffset();this._editUIMarker=new bh(this.getCoordinates(),{animation:null,content:e,dx:i.dx,dy:i.dy}).addTo(t),this._setCursorToLast(this._textEditor)},_getEditorOffset:function(){var t=this._getInternalSymbol()||{},e=0,i=0,n=t.textHorizontalAlignment;return"middle"===n||ut(n)?(e=(t.textDx||0)-2,i=(t.textDy||0)-2):(e=(t.markerDx||0)-2,i=(t.markerDy||0)-2),{dx:e,dy:i}},_createEditor:function(){var t=this.getContent(),e=this.getSize(),i=this._getInternalSymbol()||{},n=e.width,r=i.textFill||"#000000",o=i.textSize||12,s=e.height,a=i.markerLineColor||"#000",h=i.markerFill||"#3398CC",l=i.textLineSpacing||0,u=ri("div");return u.contentEditable=!0,u.style.cssText="background:"+h+"; border:1px solid "+a+";\n color:"+r+";font-size:"+o+"px;width:"+(n-2)+"px;height:"+(s-2)+"px;margin: auto;\n line-height:"+(o+l)+"px;outline: 0; padding:0; margin:0;word-wrap: break-word;\n overflow: hidden;-webkit-user-modify: read-write-plaintext-only;",u.innerText=t,Ti(u,"mousedown dblclick",ci),u.onkeyup=function(t){var e=u.style.height||0;13===t.keyCode&&(u.style.height=parseInt(e)+o/2+"px")},u},_setCursorToLast:function(t){var e;window.getSelection?(t.focus(),(e=window.getSelection()).selectAllChildren(t),e.collapseToEnd()):document.selection&&((e=document.selection.createRange()).moveToElementText(t),e.collapse(!1),e.select())}};ga.include(tu),Zo.include({animate:function(t,e,u){var c=this;this._animPlayer&&this._animPlayer.finish(),G(e)&&(u=e),e||(e={});var d,f=this.getMap(),g=this._getProjection(),i=this._prepareAnimationStyles(t),p=e.focus;if(delete this._animationStarted,f){var n=f._getRenderer();e.framer=function(t){n.callInNextFrame(t)}}var m=zs.animate(i,e,function(t){if(f&&f.isRemoved())m.finish();else{f&&!c._animationStarted&&p&&f.onMoveStart();var e=t.styles;for(var i in e)if("symbol"!==i&&"translate"!==i&&e.hasOwnProperty(i)){var n="set"+i[0].toUpperCase()+i.slice(1);c[n](e[i])}var r=e.translate;if(r){var o=r;d&&(o=r.sub(d)),d=r,c.translate(o)}var s=e.symbol;if(s){var a=c.getSymbol()||{};c.setSymbol(Ve(a,s))}if(f&&p){var h=g.project(c.getCenter());f._setPrjCenter(h);var l=f._parseEventFromCoord(g.unproject(h));"running"!==m.playState?f.onMoveEnd(l):f.onMoving(l)}c._fireAnimateEvent(m.playState),u&&u(t)}},this);return this._animPlayer=m,this._animPlayer.play()},_prepareAnimationStyles:function(t){var e=this._getInternalSymbol(),i={};for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if("translate"!==n&&"symbol"!==n){var o=this["get"+n[0].toUpperCase()+n.substring(1)]();i[n]=[o,r]}else if("symbol"===n){var s=void 0;if(Array.isArray(t.symbol)){if(!Array.isArray(e))throw new Error("geometry'symbol isn't a composite symbol, while the symbol in styles is.");s=[];for(var a=t.symbol,h=0;h=this.tileCache.max/2&&this.tileCache.setMaxSize(2*i+1);var n=0,r=!1,o={},s=[],a=[],h={},l=[],u={},c=[],d={},f={},g=this._markTiles(),p=this._getLoadLimit(),m=e.length;this._tileZoom=e[0].zoom;for(var _=0;_p)&&(!t.isInteracting()||t.isMoving()||t.isRotating()))n++,f[P]=C}if(b&&!o[P]){o[P]=1,y&&!d[P]&&(C.cache=!1,c.push({image:y,info:C}),d[P]=1);var T=this._findParentTile(C);if(T){var S=T.info.id;void 0===h[S]&&(h[S]=a.length,a.push(T))}else if(!a.length){var E=this._findChildTiles(C);E.length&&E.forEach(function(t){u[t.info.id]||(l.push(t),u[t.info.id]=1)})}}}}return a.length&&(l.length=0,this._childTiles.length=0),{childTiles:l,parentTiles:a,tiles:s,placeholders:c,loading:r,loadingCount:n,tileQueue:f}},e.isTileCachedOrLoading=function(t){return this.tileCache.get(t)||this.tilesInView[t]||this.tilesLoading[t]},e._drawTiles=function(t,e,i,n,r){var o=this;e.length&&(e.sort(function(t,e){return Math.abs(e.info.z-o._tileZoom)-Math.abs(t.info.z-o._tileZoom)}),this._parentTiles=e),i.length&&(this._childTiles=i);var s={tiles:t,parentTiles:this._parentTiles,childTiles:this._childTiles,parentContext:r};this.onDrawTileStart(s,r),1===this.layer.options.opacity&&(this._childTiles.forEach(function(t){return o._drawTile(t.info,t.image,r)}),this._parentTiles.forEach(function(t){return o._drawTile(t.info,t.image,r)})),t.sort(this._compareTiles);for(var a=0,h=t.length;at.onerrorTick)return t.onerrorTick++,void this._fetchImage(t,e);var i=this.layer.options.errorUrl;if(i){if(t instanceof Image&&t.src!==i)return void(t.src=i);(t=new Image).src=i}t=t instanceof Image?t:uu,this.abortTileLoading(t,e),t.loadTime=0,delete this.tilesLoading[e.id],this._addTileToCache(e,t),this.setToRedraw(),this.layer.fire("tileerror",{tile:e})}},e.drawTile=function(t,e){if(e&&this.getMap()){var i=t.extent2d,n=t.offset,r=ru.set(i.xmin-n[0],i.ymax-n[1]),o=t.z,s=t.id,a=this.getMap(),h=a.getZoom(),l=this.context,u=a._pointAtResToContainerPoint(r,t.res,0,ou),c=a.getBearing(),d=c||h!==o,f=this.getTileOpacity(e),g=l.globalAlpha;f<1&&(l.globalAlpha=f,this.setToRedraw()),d||u._round();var p=u.x,m=u.y,_=t.extent2d.xmax-t.extent2d.xmin,v=t.extent2d.ymax-t.extent2d.ymin;if(d){l.save(),l.translate(p,m),c&&(l.rotate(-c*Math.PI/180),_+=.1,v+=.1);var y=a._getResolution();if(y!==t.res){var x=t.res/y;l.scale(x,x)}p=m=0}if(zi.image(l,e,p,m,_,v),this.layer.options.debug){var w=this.layer.options.debugOutline;l.save(),l.strokeStyle=w,l.fillStyle=w,l.strokeWidth=10,l.font="20px monospace";var C=new ct(p,m);zi.rectangle(l,C,{width:_,height:v},1,0),zi.fillText(l,this.getDebugInfo(s),C._add(32,v-14),w),zi.drawCross(l,p+_/2,m+v/2,2,w),l.restore()}d&&l.restore(),l.globalAlpha!==g&&(l.globalAlpha=g),this.setCanvasUpdated()}},e.getDebugInfo=function(t){var e=t.split("_"),i=e.length;return"x:"+e[i-2]+", y:"+e[i-3]+", z:"+e[i-1]},e._findChildTiles=function(t){var e=this._getLayerOfTile(t.layer);if(!e||!e.options.background)return[];for(var i=this.getMap(),n=[],r=t.res,o=t.extent2d.getMin(),s=t.extent2d.getMax(),a=e._project(i._pointToPrjAtRes(o,r,su),su),h=e._project(i._pointToPrjAtRes(s,r,au),au),l=1;l<3;l++)this._findChildTilesAt(n,a,h,e,t.z+l);return n},e._findChildTilesAt=function(t,e,i,n,r){var o=n.options.zoomOffset,s=n.getId(),a=n.getSpatialReference().getResolution(r+o);if(a)for(var h,l,u=n._getTileConfig().getTileIndex(e,a),c=n._getTileConfig().getTileIndex(i,a),d=Math.min(u.idx,c.idx),f=Math.max(u.idx,c.idx),g=Math.min(u.idy,c.idy),p=Math.max(u.idy,c.idy),m=d;m1.5*this._drawnRes&&this._geosToDraw.length109?t.setAttribute(e,n):t.addAttribute(e,n),t}function h(){return!s.VertexColors||s.VertexColors}console.log(`maptalks.three log: current three.js version is %c${a}`,"color:red;font-size: 16px;font-weight: bold;");class c extends s.InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),l(this,"position",new s.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),l(this,"uv",new s.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix(t){var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;return void 0!==e&&(t.applyToBufferAttribute(e),t.applyToBufferAttribute(n),e.data.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(t){var e;t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t));var n=new s.InstancedInterleavedBuffer(e,6,1);return l(this,"instanceStart",new s.InterleavedBufferAttribute(n,3,0)),l(this,"instanceEnd",new s.InterleavedBufferAttribute(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(t){var e;t instanceof Float32Array?e=t:Array.isArray(t)&&(e=new Float32Array(t));var n=new s.InstancedInterleavedBuffer(e,6,1);return l(this,"instanceColorStart",new s.InterleavedBufferAttribute(n,3,0)),l(this,"instanceColorEnd",new s.InterleavedBufferAttribute(n,3,3)),this}fromWireframeGeometry(t){return this.setPositions(t.attributes.position.array),this}fromEdgesGeometry(t){return this.setPositions(t.attributes.position.array),this}fromMesh(t){return this.fromWireframeGeometry(new s.WireframeGeometry(t.geometry)),this}fromLineSegements(t){var e=t.geometry;return e.isGeometry?this.setPositions(e.vertices):e.isBufferGeometry&&this.setPositions(e.position.array),this}computeBoundingBox(){var t=new s.Box3;null===this.boundingBox&&(this.boundingBox=new s.Box3);var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;void 0!==e&&void 0!==n&&(this.boundingBox.setFromBufferAttribute(e),t.setFromBufferAttribute(n),this.boundingBox.union(t))}computeBoundingSphere(){var t=new s.Vector3;null===this.boundingSphere&&(this.boundingSphere=new s.Sphere),null===this.boundingBox&&this.computeBoundingBox();var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(void 0!==e&&void 0!==n){var i=this.boundingSphere.center;this.boundingBox.getCenter(i);for(var r=0,o=0,a=e.count;o\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\n\t\tvarying vec2 vUv;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\n\t\t#endif\n\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#ifdef USE_COLOR\n\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t#endif\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\n\t\t\t#endif\n\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\tvUv = uv;\n\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\tif ( perspective ) {\n\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tdir = normalize( dir );\n\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\toffset += - dir;\n\n\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\toffset += dir;\n\n\t\t\t}\n\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\n\t\t\tclip.xy += offset;\n\n\t\t\tgl_Position = clip;\n\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashSize;\n\t\t\tuniform float gapSize;\n\n\t\t#endif\n\n\t\tvarying float vLineDistance;\n\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\t#include \n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\tif ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t#endif\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\tfloat a = vUv.x;\n\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t}\n\n\t\t\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\t\t\t#include \n\t\t\t#include \n\n\t\t\tgl_FragColor = vec4( diffuseColor.rgb, diffuseColor.a );\n\n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\n\t\t}\n\t\t"};class f extends s.ShaderMaterial{constructor(t){super({uniforms:s.UniformsUtils.clone(d.line.uniforms),vertexShader:d.line.vertexShader,fragmentShader:d.line.fragmentShader}),this.dashed=!0,this.isLineMaterial=!0,this.type="LineMaterial",Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(t){this.uniforms.diffuse.value=t}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(t){this.uniforms.linewidth.value=t}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(t){this.uniforms.dashScale.value=t}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(t){this.uniforms.dashSize.value=t}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(t){this.uniforms.gapSize.value=t}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(t){this.uniforms.resolution.value.copy(t)}}}),this.setValues(t)}}class p extends s.Mesh{constructor(t,e){super(t,e),this.isLineSegments2=!0,this.type="LineSegments2",this.geometry=void 0!==t?t:new c,this.material=void 0!==e?e:new f({color:16777215*Math.random()})}computeLineDistances(){var t=new s.Vector3,e=new s.Vector3,n=this.geometry,i=n.attributes.instanceStart,r=n.attributes.instanceEnd;if(!i||!r)return this;for(var o=new Float32Array(2*i.data.count),a=0,h=0,c=i.data.count;aa&&(r[t+2]=l);n.attributes.position.needsUpdate=!0,n.computeBoundingBox(),n.computeBoundingSphere(),this.getOptions().height=t}return this}show(){return this._zoomVisible&&(this.getObject3d().visible=!0,this._fire("show")),this._visible=!0,this}hide(){return this.getObject3d().visible=!1,this._fire("hide"),this._visible=!1,this._hideUI(),this}isVisible(){return!!this.getObject3d().visible}getSymbol(){return this.getObject3d().material}setSymbol(t){if(t&&t instanceof s.Material){t.needsUpdate=!0,t.vertexColors=this.getObject3d().material.vertexColors;const e=this.getObject3d().material.clone();this.getObject3d().material=t,this._fire("symbolchange",{old:e,new:t,target:this})}return this}setInfoWindow(t){return this.removeInfoWindow(),this.infoWindow=new o.ui.InfoWindow(t),this.infoWindow.addTo(this),this}getInfoWindow(){return this.infoWindow}openInfoWindow(t){return(t=t||this.getCenter())instanceof o.Coordinate||(t=new o.Coordinate(t)),t&&this.infoWindow&&this.infoWindow.show(t),this}closeInfoWindow(){return this.infoWindow&&this.infoWindow.hide(),this}removeInfoWindow(){return this.infoWindow&&(this.infoWindow.remove(),delete this.infoWindow),this}setToolTip(t,e){return this.removeToolTip(),this.toolTip=new o.ui.ToolTip(t,e),this.toolTip.addTo(this),this}getToolTip(){return this.toolTip}openToolTip(t){return(t=t||this.getCenter())instanceof o.Coordinate||(t=new o.Coordinate(t)),t&&this.toolTip&&this.toolTip.show(t),this}closeToolTip(){return this.toolTip&&this.toolTip.hide(),this}removeToolTip(){return this.toolTip&&(this.toolTip.remove(),delete this.toolTip),this}_hideUI(){return this.closeInfoWindow(),this.closeToolTip(),this}animateShow(t={},e){this._showPlayer&&this._showPlayer.cancel(),o.Util.isFunction(t)&&(e=t={});const n=t.duration||1e3,i=t.easing||"out",r=this._showPlayer=o.animation.Animation.animate({scale:1},{duration:n,easing:i},(t=>{const n=t.styles.scale;n>0&&(this.getObject3d().scale.z=n),e&&e(t,n)}));return r.play(),r}getMinZoom(){return this.getOptions().minZoom}getMaxZoom(){return this.getOptions().maxZoom}isAsynchronous(){return this.getOptions().asynchronous}get bloom(){return this.getOptions().bloom}fire(t,e){return this._fire(t,e),this._vt&&this._vt.onSelectMesh&&this._vt.onSelectMesh(t,e),this}config(){return this}setPickObject3d(t){return this.pickObject3d=t,this.pickObject3d.__parent=this,this}_initOptions(t){return this.options=o.Util.extend({},x,t),this}_createMesh(t,e){return this.object3d=new s.Mesh(t,e),this.object3d.__parent=this,this}_createInstancedMesh(t,e,n){return this.object3d=new s.InstancedMesh(t,e,n),this.object3d.__parent=this,this}_createGroup(){return this.object3d=new s.Group,this.object3d.__parent=this,this}_createLine(t,e){return this.object3d=new s.Line(t,e),this._computeLineDistances(t),this.object3d.__parent=this,this}_createLine2(t,e){return this.object3d=new y(t,e),this.object3d.computeLineDistances(),this.object3d.__parent=this,this}_createPoints(t,e){return this.object3d=new s.Points(t,e),this.object3d.__parent=this,this}_createLineSegments(t,e){return this.object3d=new s.LineSegments(t,e),this._computeLineDistances(t),this.object3d.__parent=this,this}_computeLineDistances(t){const e=t.attributes.position.array,n=t.attributes.position.count,i=new Float32Array(n);i[0]=0;const r=new s.Vector3(0,0,0),o=new s.Vector3(0,0,0);for(let t=1;t-1)}function S(t){return t.geometry?t.geometry.coordinates:[]}function T(t,e){const n=_(t);if(!n||!t.geometry)return null;const i=t.geometry.coordinates;if(!i)return null;let r=0,s=0,a=0;switch(n){case"Point":r=i[0],s=i[1],a++;break;case"MultiPoint":case"LineString":for(let t=0,e=i.length;t80*n){r=a=t[0],s=l=t[1];for(var x=n;xa&&(a=h),u>l&&(l=u);d=0!==(d=Math.max(a-r,l-s))?32767/d:0}return o(g,y,n,r,s,d,0),y}function i(t,e,n,i,r){var o,s;if(r===B(t,e,n,i)>0)for(o=e;o=e;o-=i)s=k(o,t[o],t[o+1],s);return s&&w(s,s.next)&&(P(s),s=s.next),s}function r(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!w(i,i.next)&&0!==_(i.prev,i,i.next))i=i.next;else{if(P(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function o(t,e,n,i,c,u,d){if(t){!d&&u&&g(t,i,c,u);for(var f,p,y=t;t.prev!==t.next;)if(f=t.prev,p=t.next,u?a(t,i,c,u):s(t))e.push(f.i/n|0),e.push(t.i/n|0),e.push(p.i/n|0),P(t),t=p.next,y=p.next;else if((t=p)===y){d?1===d?o(t=l(r(t),e,n),e,n,i,c,u,2):2===d&&h(t,e,n,i,c,u):o(r(t),e,n,i,c,u,1);break}}}function s(t){var e=t.prev,n=t,i=t.next;if(_(e,n,i)>=0)return!1;for(var r=e.x,o=n.x,s=i.x,a=e.y,l=n.y,h=i.y,c=ro?r>s?r:s:o>s?o:s,f=a>l?a>h?a:h:l>h?l:h,p=i.next;p!==e;){if(p.x>=c&&p.x<=d&&p.y>=u&&p.y<=f&&m(r,a,o,l,s,h,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function a(t,e,n,i){var r=t.prev,o=t,s=t.next;if(_(r,o,s)>=0)return!1;for(var a=r.x,l=o.x,h=s.x,c=r.y,u=o.y,d=s.y,f=al?a>h?a:h:l>h?l:h,y=c>u?c>d?c:d:u>d?u:d,v=x(f,p,e,n,i),b=x(g,y,e,n,i),w=t.prevZ,M=t.nextZ;w&&w.z>=v&&M&&M.z<=b;){if(w.x>=f&&w.x<=g&&w.y>=p&&w.y<=y&&w!==r&&w!==s&&m(a,c,l,u,h,d,w.x,w.y)&&_(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,M.x>=f&&M.x<=g&&M.y>=p&&M.y<=y&&M!==r&&M!==s&&m(a,c,l,u,h,d,M.x,M.y)&&_(M.prev,M,M.next)>=0)return!1;M=M.nextZ}for(;w&&w.z>=v;){if(w.x>=f&&w.x<=g&&w.y>=p&&w.y<=y&&w!==r&&w!==s&&m(a,c,l,u,h,d,w.x,w.y)&&_(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;M&&M.z<=b;){if(M.x>=f&&M.x<=g&&M.y>=p&&M.y<=y&&M!==r&&M!==s&&m(a,c,l,u,h,d,M.x,M.y)&&_(M.prev,M,M.next)>=0)return!1;M=M.nextZ}return!0}function l(t,e,n){var i=t;do{var o=i.prev,s=i.next.next;!w(o,s)&&M(o,i,i.next,s)&&S(o,s)&&S(s,o)&&(e.push(o.i/n|0),e.push(i.i/n|0),e.push(s.i/n|0),P(i),P(i.next),i=t=s),i=i.next}while(i!==t);return r(i)}function h(t,e,n,i,s,a){var l=t;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&b(l,h)){var c=C(l,h);return l=r(l,l.next),c=r(c,c.next),o(l,e,n,i,s,a,0),void o(c,e,n,i,s,a,0)}h=h.next}l=l.next}while(l!==t)}function c(t,e,n,r){var o,s,a,l=[];for(o=0,s=e.length;o=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=r&&a>s&&(s=a,n=i.x=i.x&&i.x>=c&&r!==i.x&&m(on.x||i.x===n.x&&p(n,i)))&&(n=i,d=l)),i=i.next}while(i!==h);return n}function p(t,e){return _(t.prev,t,e.prev)<0&&_(e.next,t,t.next)<0}function g(t,e,n,i){var r=t;do{0===r.z&&(r.z=x(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,y(r)}function y(t){var e,n,i,r,o,s,a,l,h=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,i=n,a=0,e=0;e0||l>0&&i;)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,h*=2}while(s>1);return t}function x(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function v(t){var e=t,n=t;do{(e.x=(t-s)*(o-a)&&(t-s)*(i-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(r-s)*(i-a)}function b(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!j(t,e)&&(S(t,e)&&S(e,t)&&T(t,e)&&(_(t.prev,t,e.prev)||_(t,e.prev,e))||w(t,e)&&_(t.prev,t,t.next)>0&&_(e.prev,e,e.next)>0)}function _(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function w(t,e){return t.x===e.x&&t.y===e.y}function M(t,e,n,i){var r=A(_(t,e,n)),o=A(_(t,e,i)),s=A(_(n,i,t)),a=A(_(n,i,e));return r!==o&&s!==a||!(0!==r||!O(t,n,e))||!(0!==o||!O(t,i,e))||!(0!==s||!O(n,t,i))||!(0!==a||!O(n,e,i))}function O(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function A(t){return t>0?1:t<0?-1:0}function j(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&M(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function S(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function T(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}function C(t,e){var n=new L(t.i,t.x,t.y),i=new L(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function k(t,e,n,i){var r=new L(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function P(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function L(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function B(t,e,n,i){for(var r=0,o=e,s=n-i;o0&&(i+=t[r-1].length,n.holes.push(i))}return n};var z=e.exports;function I(t){for(var e,n,i=0,r=1,o=t.length;r0}function E(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function U(t,e){var n=e[0],i=e[1],r=e[2],o=Math.sqrt(n*n+i*i+r*r)||1;return t[0]=n/o,t[1]=i/o,t[2]=r/o,t}function F(t,e,n){var i=e[0],r=e[1],o=e[2],s=n[0],a=n[1],l=n[2];return t[0]=r*l-o*a,t[1]=o*s-i*l,t[2]=i*a-r*s,t}function V(t,e){function n(t,e,n,i){t[0]=e,t[1]=n,t[2]=i}for(var i=[],r=[],o=[],s=[],a=[],l=[],h=t.length,c=new Float32Array(e.length),u=0;u0&&r.push(u/2);for(var y=0,x=g.length;y0&&(d=(d=d.map((function(t){return t}))).reverse());for(var f=0,p=d.length-1;f0}function st(t,e){void 0===e&&(e={}),e=Object.assign({},{radius:1,height:2,radialSegments:6},e);for(var n=Math.round(Math.max(4,e.radialSegments)),i=e,r=i.radius,o=i.height,s=360/n/360*Math.PI*2,a=n+1,l=new Float32Array(3*a*2),h=t[0],c=t[1],u=0,d=0,f=3*a,p=2*a,g=[],y=[],x=-1;x1&&g.push(0,x-1,x)}l[u-=3]=l[0],l[u+1]=l[1],l[u+2]=l[2];var M=l.length;l[M-3]=l[0],l[M-2]=l[1],l[M-1]=o;for(var O=g.length,A=0;Ae?(a[t]=R.r,a[t+1]=R.g,a[t+2]=R.b):(a[t]=G.r,a[t+1]=G.g,a[t+2]=G.b)}}else for(let t=0;ti?(a[t]=R.r,a[t+1]=R.g,a[t+2]=R.b):(a[t]=G.r,a[t+1]=G.g,a[t+2]=G.b)}return l(t,"color",new s.BufferAttribute(a,3,!0)),a}function Q(t,e,n,i,r=!1){if(!t)return null;let s=[];if(t instanceof o.MultiPolygon)s=t.getGeometries().map((o=>W(o,e,n||t.getCenter(),i,r)));else if(t instanceof o.Polygon){const o=W(t,e,n||t.getCenter(),i,r);s.push(o)}else if(M(t))if(j(t)){const o=C(t);for(let a=0,l=o.length;a0)for(let t=0,n=a.length;tq(t,!1)));else if(t instanceof o.Polygon){const n=q(t,!1);e.push(n)}else if(M(t))if(j(t)){const n=C(t);for(let t=0,i=n.length;t0)for(let t=0,e=i.length;t0&&i0&&nt.data))}function gt(t){return t.map((t=>t.option||t.baseObject.getOptions()))}o.worker&&(at=class extends o.worker.Actor{test(t,e){this.send(t,null,e)}pushQueue(t={}){const{type:e,data:n,callback:i,layer:r,key:o,center:s,lineStrings:a,options:l,id:h}=t;let c;e.indexOf("ExtrudePolygon")>-1?c=function(t=[],e,n,i=[]){const r=n.isMercator();let o,s,a;if(r){const t=n.getMap();o=t.getGLRes(),s=t.getSpatialReference().getTransformation().matrix}e&&(a=n.coordinateToVector3(e));const l=t.length,h=[],c=[],u={};for(let o=0;o{this.resultQueue.push(t)})),this}deQueue(){if(!this.resultQueue.length)return this;const t=this.deQueueCount;return(this.resultQueue.slice(0,t)||[]).forEach((t=>{const{id:e}=t;if(this.queueMap[e]){const{baseObject:n}=this.queueMap[e];n&&n._workerLoad&&n._workerLoad(t),delete this.queueMap[e]}})),this.resultQueue.splice(0,t),this}}const xt=new class extends yt{constructor(){super(),this.deQueueCount=100}loop(){if((this.getCurrentTime()-this.time>=32||this.tempQueue.length>=1e3)&&this.tempQueue.length){ht().pushQueue({type:"ExtrudePolygon",layer:this.tempQueue[0].layer,data:pt(this.tempQueue),options:gt(this.tempQueue),callback:t=>{this.pushResult(t)}}),this.reset()}super.loop()}},vt=new class extends yt{loop(){if(this.tempQueue.length){const t=ht();this.tempQueue.forEach((e=>{t.pushQueue({id:e.id,type:"ExtrudePolygons",layer:e.layer,data:e.data,key:e.key,center:e.center,callback:t=>{this.pushResult(t)}})})),this.reset()}super.loop()}},mt=new class extends yt{constructor(){super(),this.deQueueCount=100}loop(){if((this.getCurrentTime()-this.time>=32||this.tempQueue.length>=1e3)&&this.tempQueue.length){ht().pushQueue({type:"ExtrudeLine",layer:this.tempQueue[0].layer,data:pt(this.tempQueue),options:gt(this.tempQueue),lineStrings:this.tempQueue.map((t=>t.lineString)),callback:t=>{this.pushResult(t)}}),this.reset()}super.loop()}},bt=new class extends yt{loop(){if(this.tempQueue.length){const t=ht();this.tempQueue.forEach((e=>{t.pushQueue({id:e.id,type:"ExtrudeLines",layer:e.layer,data:e.data,key:e.key,lineStrings:e.lineStrings,center:e.center,callback:t=>{this.pushResult(t)}})})),this.reset()}super.loop()}},_t=new class extends yt{constructor(){super(),this.deQueueCount=200}loop(){if((this.getCurrentTime()-this.time>=32||this.tempQueue.length>=1e3)&&this.tempQueue.length){ht().pushQueue({type:"Line",layer:this.tempQueue[0].layer,data:pt(this.tempQueue),options:gt(this.tempQueue),lineStrings:this.tempQueue.map((t=>t.lineString)),callback:t=>{this.pushResult(t)}}),this.reset()}super.loop()}},wt=new class extends yt{loop(){if(this.tempQueue.length){const t=ht();this.tempQueue.forEach((e=>{t.pushQueue({id:e.id,type:"Lines",layer:e.layer,data:e.data,key:e.key,lineStrings:e.lineStrings,center:e.center,callback:t=>{this.pushResult(t)}})})),this.reset()}super.loop()}},Mt=new class extends yt{constructor(){super(),this.deQueueCount=100}loop(){if((this.getCurrentTime()-this.time>=32||this.tempQueue.length>=1e3)&&this.tempQueue.length){ht().pushQueue({type:"FatLine",layer:this.tempQueue[0].layer,data:pt(this.tempQueue),options:gt(this.tempQueue),lineStrings:this.tempQueue.map((t=>t.lineString)),callback:t=>{this.pushResult(t)}}),this.reset()}super.loop()}},Ot=new class extends yt{loop(){if(this.tempQueue.length){const t=ht();this.tempQueue.forEach((e=>{t.pushQueue({id:e.id,type:"FatLines",layer:e.layer,data:e.data,key:e.key,lineStrings:e.lineStrings,center:e.center,callback:t=>{this.pushResult(t)}})})),this.reset()}super.loop()}},At=new class extends yt{constructor(){super(),this.deQueueCount=100}loop(){if((this.getCurrentTime()-this.time>=32||this.tempQueue.length>=1e3)&&this.tempQueue.length){ht().pushQueue({type:"Bar",layer:this.tempQueue[0].layer,data:pt(this.tempQueue),options:gt(this.tempQueue),callback:t=>{this.pushResult(t)}}),this.reset()}super.loop()}},jt=new class extends yt{constructor(){super(),this.deQueueCount=1}loop(){if(this.tempQueue.length){const t=ht();this.tempQueue.forEach((e=>{t.pushQueue({id:e.id,type:"Bars",layer:e.layer,data:e.data,callback:t=>{this.pushResult(t)}})})),this.reset()}super.loop()}},St={isRunning:!1,tasks:[],addTask:t=>{t&&St.tasks.push(t)},removeTask:t=>{St.tasks.splice(St.tasks.indexOf(t),1)},loop(){xt.loop(),vt.loop(),mt.loop(),bt.loop(),_t.loop(),wt.loop(),Mt.loop(),Ot.loop(),At.loop(),jt.loop(),St.tasks.forEach((t=>{t&&t.loop&&t.loop()})),o.Util.requestAnimFrame(St.loop)},star(){St.isRunning||(St.isRunning=!0,St.loop())}};function Tt(t){const{position:e,normal:n,uv:i,indices:r}=Ct(t),o=new s.BufferGeometry,a=new Float32Array(e.length);return a.fill(1,0,e.length),l(o,"color",new s.BufferAttribute(a,3)),l(o,"normal",new s.BufferAttribute(n,3)),l(o,"position",new s.BufferAttribute(e,3)),i&&i.length&&l(o,"uv",new s.BufferAttribute(i,2)),o.setIndex(new s.BufferAttribute(r,1)),o}function Ct(t){const e={},n={};for(let i=0;ie?(c[t]=Ut.r,c[t+1]=Ut.g,c[t+2]=Ut.b):(c[t]=Ft.r,c[t+1]=Ft.g,c[t+2]=Ft.b)}}else for(let t=0;tr?(c[t]=Ut.r,c[t+1]=Ut.g,c[t+2]=Ut.b):(c[t]=Ft.r,c[t+1]=Ft.g,c[t+2]=Ft.b)}return l(t,"color",new s.BufferAttribute(c,3,!0)),c}function Gt(t){const e=[],n=t.length;let i=0;for(let e=0;e{t=t instanceof s.Color?t:new s.Color(t),e.push(t.r,t.g,t.b)})),e}const Wt={altitude:0,bottomHeight:0,colors:null};class Nt extends m{constructor(t,e,n,i){e=o.Util.extend({},Wt,e,{layer:i,lineString:t}),super(),this._initOptions(e);const{lineStrings:r,center:a}=tt(t),{asynchronous:c}=e;let u;if(c){u=ot();const n=o.Util.GUID();this.getOptions().id=n,this.getOptions().center=a,_t.push({id:n,data:r,layer:i,key:e.key,lineString:t,baseObject:this})}else{const t=[];for(let e=0,n=r.length;et.toArray()))}function ne(t){return t*te}function ie(t,e){if(!t||!e)return 0;Array.isArray(t)||(t=t.toArray()),Array.isArray(e)||(e=e.toArray());let n=ne(t[1]);const i=ne(e[1]),r=n-i,o=ne(t[0])-ne(e[0]);return n=2*Math.asin(Math.sqrt(Math.pow(Math.sin(r/2),2)+Math.cos(n)*Math.cos(i)*Math.pow(Math.sin(o/2),2))),n*=6378137,Math.round(1e5*n)/1e5}function re(t,e){const{len:n,c1:i,c2:r}=t,o=r[0]-i[0],s=r[1]-i[1],a=e/n;return[i[0]+a*o,i[1]+a*s]}function oe(t,e=10){e=Math.max(e,.1),Array.isArray(t)||(t=ee(t));const n=t.length;let i=[],r=0;for(let e=0;e[t.c1,t.c2]))}if(1===i.length&&i[0].len<=e)return[[i[0].c1,i[0].c2]];const o=i.length;let s,a=0,l=0;const h=[];let c=[i[0].c1];for(;ae){const n=t-l+e;s=re(i[a],n),c.push(s),h.push(c),l=0,i[a].c1=s,i[a].len=t-n,c=[],c.push(s)}}return h}var se=Object.freeze({__proto__:null,distance:ie,lineLength:function(t){let e=t;Array.isArray(t)||(e=ee(t));let n=0;for(let t=0,i=e.length;ti){this._params.idx++;let t=e[d];if(!t){t=X(Y(r.slice(d,d+o),h,0,u).positionsV,s,a,h),e[d]=t}const n=this.getObject3d();!function(t,e,n,i){const r=e.length;t.attributes.normal.count=r,t.attributes.position.count=r;const o=t.attributes.position.array,s=t.attributes.normal.array;for(let t=0;t=r.length-1&&(this._params.index=-1,this._params.idx=-1),this._params.index+=n}_workerLoad(t){if(!t)return this;const{id:e,indices:n,position:i,normal:r,uv:s}=t;if(!(e&&n&&i&&r&&s))return;let a=e.split("-")[1];if(a=parseInt(a),o.Util.isNumber(a)){this._params.geometries[a]={indices:new Uint32Array(n),position:new Float32Array(i),uv:new Float32Array(s),normal:new Float32Array(r)},this._params.workerInitCount++}this._params.workerInitCount===this._params.chunkLines.length&&(this._params.loaded=!0,this._fire("workerload",{target:this}))}}const ce=["click","mousemove","mousedown","mouseup","dblclick","contextmenu"].join(" ").toString(),ue=new s.MeshBasicMaterial;ue.vertexColors=h();const de=t=>class extends t{_initBaseObjectsEvent(t){if(t&&Array.isArray(t)&&t.length)for(let e=0,n=t.length;e{this._showGeometry(t.target,!0)})),t.on("remove",(t=>{this._showGeometry(t.target,!1)})),t.on("mouseout",(t=>{this._mouseover=!1,this.fire("mouseout",Object.assign({},t,{target:this,selectMesh:this.getSelectMesh?this.getSelectMesh():null}))})),t.on(ce,(t=>{this.fire(t.type,Object.assign({},t,{target:this,selectMesh:this.getSelectMesh?this.getSelectMesh():null}))}))}_getHideGeometryIndex(t){const e=[];let n=0;for(let i=0,r=this._geometriesAttributes.length;i{t.add(this.pickObject3d)})),this.on("remove",(()=>{t.remove(this.pickObject3d)}))}_setPickObject3d(){if(!this._colorMap)return;const t=this._geometryCache||this.getObject3d().geometry.clone(),e=this.getLayer().getPick(),{_geometriesAttributes:n}=this,i=n.length,r=F(n);let o=0;for(let t=0;t0&&(h+=I(e,n,r)),i.push(new s.Vector3(a,l,h))}return i}(t,i,r)),t.map((t=>ye(t,e,n)))},vector2Pixel:ye});const ve={altitude:0,height:0,color:null},me=new s.Vector3;class be extends m{constructor(t,e,n,i){e=o.Util.extend({},ve,e,{layer:i,coordinate:t}),super();let{height:r,altitude:a,color:h,size:c}=e;const u=[],d=[];h&&(h=h instanceof s.Color?h:new s.Color(h),d.push(h.r,h.g,h.b));const f=i.altitudeToVector3(r,r).x,p=i.coordinateToVector3(t,f);u.push(0,0,p.z);const g=new s.BufferGeometry;l(g,"position",new s.Float32BufferAttribute(u,3,!0)),d.length&&l(g,"color",new s.Float32BufferAttribute(d,3,!0)),void 0!==c&&l(g,"size",new s.Float32BufferAttribute([c],1,!0)),e.positions=p,this._initOptions(e),this._createPoints(g,n);const y=i.altitudeToVector3(a,a).x,x=new s.Vector3(p.x,p.y,y);this.getObject3d().position.copy(x),this.type="Point"}identify(t){const e=this.getLayer(),n=this.getMap().getSize(),i=this.getLayer().getCamera(),r=this.getOptions().positions,o=this.getOptions().altitude;let s=this.getObject3d().material.size;void 0===s&&(s=this.options.size||1);const a=this.getMap().coordToContainerPoint(t),l=e.altitudeToVector3(o,o).x;me.x=r.x,me.y=r.y,me.z=r.z+l;const h=ye(me,n,i);return Math.sqrt(Math.pow(a.x-h.x,2)+Math.pow(a.y-h.y,2))<=s/2}}function _e(t,e){const{minx:n,miny:i,maxx:r,maxy:o}=t,[s,a]=e;return n<=s&&s<=r&&i<=a&&a<=o}class we{constructor(t,e,n,i){this.minlng=t,this.minlat=e,this.maxlng=n,this.maxlat=i,this.minx=1/0,this.miny=1/0,this.maxx=-1/0,this.maxy=-1/0,this.coordinates=[],this.positions=[],this.indexs=[],this.key=null}updateBBoxPixel(t){let e=1/0,n=1/0,i=-1/0,r=-1/0;const{minlng:s,minlat:a,maxlng:l,maxlat:h}=this;return[[s,a],[s,h],[l,a],[l,h]].map((t=>new o.Coordinate(t))).map((e=>t.coordToContainerPoint(e))).forEach((t=>{e=Math.min(e,t.x),n=Math.min(n,t.y),i=Math.max(i,t.x),r=Math.max(r,t.y)})),this.minx=e,this.miny=n,this.maxx=i,this.maxy=r,this}containsCoordinate(t){let e,n;Array.isArray(t)?(e=t[0],n=t[1]):t instanceof o.Coordinate&&(e=t.x,n=t.y);const{minlng:i,minlat:r,maxlng:s,maxlat:a}=this;return i<=e&&e<=s&&r<=n&&n<=a}isRecCross(t,e){const{x:n,y:i}=t,r={minx:n-e/2,miny:i-e/2,maxx:n+e/2,maxy:i+e/2},{minx:o,miny:s,maxx:a,maxy:l}=r;return!!(_e(this,[o,s])||_e(this,[o,l])||_e(this,[a,s])||_e(this,[a,l])||_e(r,[this.minx,this.miny])||_e(r,[this.minx,this.maxy])||_e(r,[this.maxx,this.miny])||_e(r,[this.maxx,this.maxy]))}static initGrids(t,e,n,i){const r=[],o=(n-t)/30,s=(i-e)/30;let a=t,l=e;for(let n=0;n<30;n++){a=t+n*o;for(let t=0;t<30;t++){l=e+t*s;const i=new we(a,l,a+o,l+s);i.key=t+"-"+n,r.push(i)}}return{grids:r,averageX:o,averageY:s,ROWS:30,COLS:30}}}const Me={altitude:0},Oe=new s.Vector3;function Ae(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class je extends(de(m)){constructor(t,e,n,i){Array.isArray(t)||(t=[t]),e=o.Util.extend({},Me,e,{layer:i,points:t});let r=1/0,a=1/0,h=-1/0,c=-1/0;for(let e=0,n=t.length;e{this._updateGrids(),t.on(e,this._updateGrids,this)})),this.on("remove",(()=>{t.off(e,this._updateGrids,this)}))}_updateGrids(){const t=this.getMap();this._grids.forEach((e=>{e.indexs.length&&e.updateBBoxPixel(t)}))}getSelectMesh(){const t=this.faceIndex;if(null!=t){if(!this._baseObjects[t]){const e=this._datas[t],{coordinate:n,height:i,color:r,size:o}=e;this._baseObjects[t]=new be(n,{height:i,index:t,color:r,size:o},this.getObject3d().material,this.getLayer()),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}identify(t){const e=this.getLayer(),n=this.getMap().getSize(),i=this.getLayer().getCamera(),r=this.getOptions().altitude,o=this.getMap(),s=e.altitudeToVector3(r,r).x;let a=this.getObject3d().material.size;const l=void 0===a,h=o.coordToContainerPoint(t),c=[];if(this._grids.forEach((t=>{t.indexs.length&&t.isRecCross(h,l?this.maxSize:a)&&c.push(t)})),c.length<1)return!1;for(let t=0,e=c.length;t=0;e--){l&&(a=this._datas[c[t].indexs[e]].size||1);const r=c[t].positions[e];Oe.x=r.x,Oe.y=r.y,Oe.z=r.z+s;const o=ye(Oe,n,i);if(Math.sqrt(Math.pow(h.x-o.x,2)+Math.pow(h.y-o.y,2))<=a/2)return this.faceIndex=c[t].indexs[e],!0}return!1}}const Se={coordinate:"",radius:10,height:100,radialSegments:6,altitude:0,topColor:"",bottomColor:"#2d2f61"};class Te extends(de(m)){constructor(t,e,n,i){Array.isArray(t)||(t=[t]);const r=t.length,a=E(t),l=i.coordinateToVector3(a),c=[],u=[],d=[];let f=0;const p={},g={};let y;super(),e=o.Util.extend({},{altitude:0,layer:i,points:t},Se,e),this._initOptions(e);const x=new s.Vector3;if(e.asynchronous){y=zt();const e=o.Util.GUID();this.getOptions().id=e;const n=[];for(let e=0;e{a.push(t)}));if(a.length&&i.removeMesh(a,!1),o&&s)for(let t in e)if(!n[t])if(r[t]){const e=r[t];i.addMesh(e)}else{const{x:e,y:n,z:i}=this._getXYZOfIndex(t);this.getTileUrl(e,n,i)}this._loadTiles=Object.assign({},e),this._diffCache()}_init(){}_workerLoad(t){const e=t.target._img;e.currentCount++,e.currentCount===e.needCount&&(e.src=Ve(e._key,this._opts.debug))}_generateBaseObjects(t,e,n){if(e&&n){const{keysMap:i}=this._getCurentTileKeys();if(!i[t])return void(n.src=Ve(0,this._opts.debug));const r=this.formatBaseObjects(t,e);if(r.length){n.needCount=r.length,n.currentCount=0;for(let e=0,i=r.length;et.isAsynchronous())).forEach((t=>{t.on("workerload",this._workerLoad,this)})):n.src=Ve(0,this._opts.debug)}else n.src=Ve(0,this._opts.debug);this._loadTiles[t]=!0}else n&&(n.src=Ve(0,this._opts.debug))}_diffCache(){if(Object.keys(this._baseObjectKeys).length>this._renderer.tileCache.max){const t=this._renderer.tileCache.data,e=this._renderer.tilesInView,n=[];for(let i in this._baseObjectKeys)t[i]||e[i]||((this._baseObjectKeys[i]||[]).forEach((t=>{t.isAdd&&n.push(t)})),this._diposeBaseObject(i),delete this._baseObjectKeys[i]);n.length&&this._layer.removeMesh(n,!1)}}_diposeBaseObject(t){const e=this._baseObjectKeys[t];e&&e.length&&e.forEach((t=>{t.getObject3d().geometry.dispose(),t._geometryCache&&t._geometryCache.dispose();const e=t._baseObjects;e&&e.length&&e.forEach((t=>{t.getObject3d().geometry.dispose(),t=null})),t._datas=null,t._geometriesAttributes=null,t._faceMap=null,t._colorMap=null,t.pickObject3d&&t.pickObject3d.geometry.dispose(),t=null}))}_cachetile(t,e){this._baseObjectKeys[t]||(this._baseObjectKeys[t]=[]),this._baseObjectKeys[t].push(e)}_getXYZOfIndex(t){const e=t.indexOf("_")>-1?"_":"-";let[n,i,r]=t.split(e).slice(1,4);return{x:parseInt(i),y:parseInt(n),z:parseInt(r)}}_getTileExtent(t,e,n){const i=this.getMap()._getResolution(n);return this._getTileConfig().getTilePrjExtent(t,e,i)}_getTileLngLatExtent(t,e,n){const i=this._getTileExtent(t,e,n);let r=i.getMax(),s=i.getMin();const a=this.getMap().getProjection();return s=a.unproject(s),r=a.unproject(r),new o.Extent(s,r)}}const Ze={worker:!1};class De extends Ge{constructor(t,e={},n,i){super(o.Util.GUID(),o.Util.extend({urlTemplate:t},Ze,e)),this._opts=e,this._layer=i,this.getMaterial=n,this._baseObjectKeys={},this._loadTiles={},this._add=null,this._layerLaodTime=(new Date).getTime(),this._init()}formatBaseObjects(t,e){const n=this._opts,i=[],r=this.isAsynchronous();for(let a in e){const l=e[a]||{};let h;if(Array.isArray(l)?h=l:"FeatureCollection"===l.type&&(h=l.features),h&&h.length){const e=[],c=[],u=[];for(let t=0,n=h.length;t0&&this.getTileData(t)}_init(){this.on("layerload",this._layerOnLoad),this.on("add",(()=>{if(!1===this._add){const t=this.getBaseObjects();this._layer.addMesh(t)}this._add=!0,this.intervalId=setInterval((()=>{this._isLoad()&&!this._layer.getMap().isInteracting()&&this.fire("layerload")}),1e3)})),this.on("remove",(()=>{this._add=!1;const t=this.getBaseObjects();this._layer.removeMesh(t),clearInterval(this.intervalId)})),this.on("show",(()=>{this.getBaseObjects().forEach((t=>{t.show()}));for(let t in this._baseObjectKeys){(this._baseObjectKeys[t]||[]).forEach((t=>{t.show()}))}})),this.on("hide",(()=>{this.getBaseObjects().forEach((t=>{t.hide()}));for(let t in this._baseObjectKeys){(this._baseObjectKeys[t]||[]).forEach((t=>{t.hide()}))}})),this.on("renderercreate",(t=>{t.renderer.loadTile=function(t){var e=this.layer.getTileSize(),n=new Image;return n.width=e.width,n.height=e.height,n.onload=this.onTileLoad.bind(this,n,t),n.onerror=this.onTileError.bind(this,n,t),this.loadTileImage(n,t.url,t.id),n},t.renderer.deleteTile=function(t){if(!t||!t.image)return;t.image.onload=null,t.image.onerror=null;!function(t){const e=Ee(Be,t);e&&e(t)}((t.info||{}).id)},t.renderer.loadTileImage=(t,e,n)=>{t._key=n,function(t,e,n,i,r){const o={key:t,url:e,callback:n,img:i,vt:r};ze.length<10?(ze.push(o),r.loopMessage(o)):Be.push(o)}(n,e,((t,e,n)=>{this._generateBaseObjects(t,e,n),function(t,e){if(Ee(ze,t),Be.length){ze.push(Be[0]),Be.splice(0,1);const t=ze[ze.length-1];e.loopMessage(t)}}(t,this)}),t,this)}}))}_getMaterial(t,e,n,i){return this.getMaterial&&o.Util.isFunction(this.getMaterial)?this.getMaterial(t,e,n,i):null}}function He(t,e,n,i){const{position:r,uv:o,normal:a,indexs:h}=function(t,e,n,i){const r=t/n,o=e/i,s=-t/2,a=e/2,l=-e/2,h=(n+1)*(i+1),c=new Float32Array(3*h),u=new Float32Array(2*h),d=new Float32Array(3*h),f=new Uint32Array(10*h);let p=0,g=0,y=0;for(let h=0;h<=i;h++)for(let x=0;x<=n;x++){const v=s+r*x,m=a-o*h;c[p]=v,c[p+1]=m,c[p+2]=0,d[p]=0,d[p+1]=0,d[p+2]=1;const b=(v-s)/t,_=(m-l)/e;if(u[g]=b,u[g+1]=_,p+=3,g+=2,x{const e=i.coordinateToVector3(t),{x:n,y:r}=e;p=Math.min(n,p),g=Math.min(r,g),y=Math.max(n,y),x=Math.max(r,x)}));const v=(y-p)/h,m=(x-g)/l;p-=v,y+=v,g-=m,x+=m;const b=Math.abs(y-p),_=Math.abs(x-g),w=Ne(s),M=Ne(r),O=He(b,_,h-1,l-1);super(),this._initOptions(e),this._createMesh(O,n);const A=i.altitudeToVector3(a,a).x,j=i.coordinateToVector3(t.getCenter(),A);this.getObject3d().position.copy(j),n.transparent=!0,w&&(w.onload=()=>{Ke(w,O,i,{imageWidth:h,imageHeight:l})},w.onerror=function(){console.error(`not load ${w.src}`)}),M?(n.opacity=0,Qe.load(M.src,(t=>{n.map=t,n.opacity=1,n.needsUpdate=!0}))):n.opacity=1,this.type="Terrain"}updateData(t){return Ke(t,this.getObject3d().geometry,this.getLayer(),this.getOptions()),this}}const $e={scale:1,tileDivisor:4};class Xe extends Ge{constructor(t,e={},n,i){super(o.Util.GUID(),o.Util.extend({urlTemplate:t},$e,e)),this._opts=e,this._layer=i,this.material=n,this._baseObjectKeys={},this._loadTiles={},this._add=null,this._imgQueue={},this._layerLaodTime=(new Date).getTime(),this._init()}isAsynchronous(){return!1}formatBaseObjects(t,e){const n=this.options,i=[],{scale:r,tileDivisor:o}=n,{x:s,y:a,z:l}=this._getXYZOfIndex(t),h=this.getMap().getZoom(),c=this.getTileUrl(s,a,l),[u,d]=this.options.tileSize,f=this._getTileLngLatExtent(s,a,l),p=this.material.clone();if(l+1>=Math.round(h)){const t=new Ye(f,{image:e,imageWidth:u/o,imageHeight:d/o,texture:c},p,this._layer);t.getObject3d().scale.set(r,r,1),i.push(t)}return i}loopMessage(t){this.getTileData(t)}_init(){this.on("layerload",this._layerOnLoad),this.on("add",(()=>{if(!1===this._add){const t=this.getBaseObjects();this._layer.addMesh(t)}this._add=!0,this.intervalId=setInterval((()=>{this._isLoad()&&!this._layer.getMap().isInteracting()&&this.fire("layerload")}),1e3)})),this.on("remove",(()=>{this._add=!1;const t=this.getBaseObjects();this._layer.removeMesh(t),clearInterval(this.intervalId)})),this.on("show",(()=>{this.getBaseObjects().forEach((t=>{t.show()}));for(let t in this._baseObjectKeys){(this._baseObjectKeys[t]||[]).forEach((t=>{t.show()}))}})),this.on("hide",(()=>{this.getBaseObjects().forEach((t=>{t.hide()}));for(let t in this._baseObjectKeys){(this._baseObjectKeys[t]||[]).forEach((t=>{t.hide()}))}})),this.on("renderercreate",(t=>{t.renderer.loadTile=function(t){var e=this.layer.getTileSize(),n=new Image;return n.width=e.width,n.height=e.height,n.onload=this.onTileLoad.bind(this,n,t),n.onerror=this.onTileError.bind(this,n,t),this.loadTileImage(n,t.url,t.id),n},t.renderer.deleteTile=t=>{if(!t||!t.image)return;t.image.onload=null,t.image.onerror=null;const e=t.info||{},n=this._imgQueue[e.id];n&&(n.src="",n.onload=null,n.onerror=null,delete this._imgQueue[e.id])},t.renderer.loadTileImage=(t,e,n)=>{t._key=n;const i=new Image;this._imgQueue[n]=i;const r={key:n,url:e,rgbImage:i,callback:(t,e,n)=>{this._generateBaseObjects(t,e,n)},img:t,vt:this};this.loopMessage(r)}}))}} -/*! - * Code from baidu mapv - * License: BSD-3 - * https://github.com/huiyan-fe/mapv - * - */function tn(t){t=t||{},this.gradient=t.gradient||{.25:"rgba(0, 0, 255, 1)",.55:"rgba(0, 255, 0, 1)",.85:"rgba(255, 255, 0, 1)",1:"rgba(255, 0, 0, 1)"},this.maxSize=t.maxSize||35,this.minSize=t.minSize||0,this.max=t.max||100,this.min=t.min||0,this.initPalette()}function en(t,e,n){var i=nn(n),r=function(t){return t.min||0}(n),o=i-r,s=n.range||null,a=0,l=1024;s&&2===s.length&&(a=(s[0]-r)/o*1024),s&&2===s.length&&(l=(s[1]-r)/o*1024);for(var h,c=n.maxOpacity||.8,u=n.minOpacity||0,d=3,f=t.length;dc&&(t[d]=256*c),t[d]/256=a&&h<=l?(t[d-3]=e[h],t[d-2]=e[h+1],t[d-1]=e[h+2]):t[d]=0}function nn(t){return t.max||100}function rn(t,e,n){var i=nn(n),r= -/*! - * Code from baidu mapv - * License: BSD-3 - * https://github.com/huiyan-fe/mapv - * - */ -function(t){var e=t/2,n=t+e,i=1e4,r=Re(2*n,2*n),o=r.getContext("2d");return o.shadowBlur=e,o.shadowColor="black",o.shadowOffsetX=o.shadowOffsetY=i,o.beginPath(),o.arc(n-i,n-i,t,0,2*Math.PI,!0),o.closePath(),o.fill(),r}(n._size||n.size||13),o=r.width/2,s=r.height/2,a=e,l={};for(var h in a.forEach((function(t){var e=void 0===t.count?1:t.count,n=Math.min(1,e/i).toFixed(2);l[n]=l[n]||[],l[n].push(t)})),l)if(!isNaN(h)){var c=l[h];t.beginPath(),n.withoutAlpha||(t.globalAlpha=h),c.forEach((function(e){var n=e.coordinate,a=void 0===e.count?1:e.count;t.globalAlpha=a/i,t.drawImage(r,n[0]-o,n[1]-s)}))}}tn.prototype.setMax=function(t){this.max=t||100},tn.prototype.setMin=function(t){this.min=t||0},tn.prototype.setMaxSize=function(t){this.maxSize=t||35},tn.prototype.setMinSize=function(t){this.minSize=t||0},tn.prototype.initPalette=function(){var t=this.gradient,e=Re(256,1),n=this.paletteCtx=e.getContext("2d"),i=n.createLinearGradient(0,0,256,1);for(var r in t)i.addColorStop(parseFloat(r),t[r]);n.fillStyle=i,n.fillRect(0,0,256,1)},tn.prototype.getColor=function(t){var e=this.getImageData(t);return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]/256+")"},tn.prototype.getImageData=function(t){var e=this.paletteCtx.getImageData(0,0,256,1).data;if(void 0===t)return e;var n=this.max,i=this.min;t>n&&(t=n),te&&(t=e),tn?r+(t-n)/(e-n)*(i-r):i},tn.prototype.getLegend=function(t){var e=this.gradient,n=t.width||20,i=t.height||180,r=Re(n,i),o=r.getContext("2d"),s=o.createLinearGradient(0,i,0,0);for(var a in e)s.addColorStop(parseFloat(a),e[a]);return o.fillStyle=s,o.fillRect(0,0,n,i),r};var on={draw:function(t,e,n){if(!(t.canvas.width<=0||t.canvas.height<=0)){var i=n.strength||.3;t.strokeStyle="rgba(0,0,0,"+i+")";var r=Re(t.canvas.width,t.canvas.height),o=r.getContext("2d");o.scale(devicePixelRatio,devicePixelRatio),n=n||{},t.save();var s=new tn({gradient:n.gradient});if(rn(o,e,n),!n.absolute){var a=o.getImageData(0,0,t.canvas.width,t.canvas.height);en(a.data,s.getImageData(),n),t.putImageData(a,0,0),t.restore()}s=null,r=null}},drawGray:rn,colorize:en};const sn={altitude:0,interactive:!1,min:0,max:100,size:13,gradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},gridScale:.5},an=2048;class ln extends m{constructor(t,e,n,i){Array.isArray(t)||(t=[t]);let r=1/0,a=1/0,c=-1/0,u=-1/0;const d=[];for(let e=0,n=t.length;ean){console.warn(`gridScale: ${f} it's too big. I hope it's a smaller value,canvas max size is 2048* 2048`);f=an/(x/f)}const v=Math.ceil(g*f),m=Math.ceil(y*f),b=v/g,_=m/y,w=[];for(let e=0,n=d.length;e0&&(L[t+2]=e/j)}if(n{t.add(this.pickObject3d)})),this.on("remove",(()=>{t.remove(this.pickObject3d)}))}_setMaterialRes(t,e){const n=t.getMap().getSize(),i=n.width,r=n.height;e.resolution.set(i,r)}_setPickObject3d(t,e){const n=new g;n.setPositions(t);const i=this.getLayer().getPick().getColor(),r=[];for(let e=0,n=t.length/3;e80*n){i=o=t[0],r=s=t[1];for(var p=n;po&&(o=a),l>s&&(s=l);h=0!==(h=Math.max(o-i,s-r))?1/h:0}return On(d,f,n,i,r,h),f}function wn(t,e,n,i,r){var o,s;if(r===Wn(t,e,n,i)>0)for(o=e;o=e;o-=i)s=Dn(o,t[o],t[o+1],s);return s&&Un(s,s.next)&&(Hn(s),s=s.next),s}function Mn(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!Un(i,i.next)&&0!==En(i.prev,i,i.next))i=i.next;else{if(Hn(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function On(t,e,n,i,r,o,s){if(t){!s&&o&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=Ln(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,s,a,l,h=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,i=n,a=0,e=0;e0||l>0&&i;)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,h*=2}while(s>1)}(r)}(t,i,r,o);for(var a,l,h=t;t.prev!==t.next;)if(a=t.prev,l=t.next,o?jn(t,i,r,o):An(t))e.push(a.i/n),e.push(t.i/n),e.push(l.i/n),Hn(t),t=l.next,h=l.next;else if((t=l)===h){s?1===s?On(t=Sn(Mn(t),e,n),e,n,i,r,o,2):2===s&&Tn(t,e,n,i,r,o):On(Mn(t),e,n,i,r,o,1);break}}}function An(t){var e=t.prev,n=t,i=t.next;if(En(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(zn(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&En(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function jn(t,e,n,i){var r=t.prev,o=t,s=t.next;if(En(r,o,s)>=0)return!1;for(var a=r.xo.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,c=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,u=Ln(a,l,e,n,i),d=Ln(h,c,e,n,i),f=t.prevZ,p=t.nextZ;f&&f.z>=u&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&zn(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&En(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&zn(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&En(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=u;){if(f!==t.prev&&f!==t.next&&zn(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&En(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&zn(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&En(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Sn(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!Un(r,o)&&Fn(r,i,i.next,o)&&Gn(r,o)&&Gn(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),Hn(i),Hn(i.next),i=t=o),i=i.next}while(i!==t);return Mn(i)}function Tn(t,e,n,i,r,o){var s=t;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&In(s,a)){var l=Zn(s,a);return s=Mn(s,s.next),l=Mn(l,l.next),On(s,e,n,i,r,o),void On(l,e,n,i,r,o)}a=a.next}s=s.next}while(s!==t)}function Cn(t,e){return t.x-e.x}function kn(t,e){var n=function(t,e){var n,i=e,r=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=r&&a>s){if(s=a,a===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x=i.x&&i.x>=c&&r!==i.x&&zn(on.x||i.x===n.x&&Pn(n,i)))&&(n=i,d=l)),i=i.next}while(i!==h);return n}(t,e);if(!n)return e;var i=Zn(n,t),r=Mn(n,n.next);return Mn(i,i.next),e===n?r:e}function Pn(t,e){return En(t.prev,t,e.prev)<0&&En(e.next,t,t.next)<0}function Ln(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Bn(t){var e=t,n=t;do{(e.x=0&&(t-s)*(i-a)-(n-s)*(e-a)>=0&&(n-s)*(o-a)-(r-s)*(i-a)>=0}function In(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Fn(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(Gn(t,e)&&Gn(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(En(t.prev,t,e.prev)||En(t,e.prev,e))||Un(t,e)&&En(t.prev,t,t.next)>0&&En(e.prev,e,e.next)>0)}function En(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Un(t,e){return t.x===e.x&&t.y===e.y}function Fn(t,e,n,i){var r=Rn(En(t,e,n)),o=Rn(En(t,e,i)),s=Rn(En(n,i,t)),a=Rn(En(n,i,e));return r!==o&&s!==a||(!(0!==r||!Vn(t,n,e))||(!(0!==o||!Vn(t,i,e))||(!(0!==s||!Vn(n,t,i))||!(0!==a||!Vn(n,e,i)))))}function Vn(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Rn(t){return t>0?1:t<0?-1:0}function Gn(t,e){return En(t.prev,t,t.next)<0?En(t,e,t.next)>=0&&En(t,t.prev,e)>=0:En(t,e,t.prev)<0||En(t,t.next,e)<0}function Zn(t,e){var n=new Qn(t.i,t.x,t.y),i=new Qn(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function Dn(t,e,n,i){var r=new Qn(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Hn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Qn(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Wn(t,e,n,i){for(var r=0,o=e,s=n-i;o0&&(i+=t[r-1].length,n.holes.push(i))}return n};var Nn=bn.exports;function qn(t,e,n){var i=e[0],r=e[1],o=n[0]-i,s=n[1]-r;if(0!==o||0!==s){var a=((t[0]-i)*o+(t[1]-r)*s)/(o*o+s*s);a>1?(i=n[0],r=n[1]):a>0&&(i+=o*a,r+=s*a)}return(o=t[0]-i)*o+(s=t[1]-r)*s}function Kn(t,e,n,i,r){for(var o,s=i,a=e+1;as&&(o=a,s=l)}s>i&&(o-e>1&&Kn(t,e,o,i,r),r.push(t[o]),n-o>1&&Kn(t,o,n,i,r))}function Jn(t,e){var n=t.length-1,i=[t[0]];return Kn(t,0,n,e,i),i.push(t[n]),i}function Yn(t,e,n){if(t.length<=2)return t;var i=void 0!==e?e*e:1;return t=n?t:function(t,e){for(var n,i,r,o,s,a=t[0],l=[a],h=1,c=t.length;he&&(l.push(n),a=n);return a!==n&&l.push(n),l}(t,i),t=Jn(t,i)}function $n(t,e){return t[0]*e[0]+t[1]*e[1]}function Xn(t,e){const n=e[0],i=e[1],r=Math.sqrt(n*n+i*i);return t[0]=n/r,t[1]=i/r,t}function ti(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t}function ei(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ni(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function ii(t,e){const n=e[0],i=e[1],r=e[2],o=Math.sqrt(n*n+i*i+r*r);return t[0]=n/o,t[1]=i/o,t[2]=r/o,t}function ri(t,e,n){var i=e[0],r=e[1],o=e[2],s=n[0],a=n[1],l=n[2];return t[0]=r*l-o*a,t[1]=o*s-i*l,t[2]=i*a-r*s,t}const oi=[];function si(t,e,n,i){const r=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}(e,n),o=Math.acos(r)*i;return ti(oi,n,e,-r),function(t,e){const n=e[0],i=e[1],r=e[2],o=Math.sqrt(n*n+i*i+r*r);t[0]=n/o,t[1]=i/o,t[2]=r/o}(oi,oi),function(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}(t,e,Math.cos(o)),ti(t,t,oi,Math.sin(o)),t}function ai(t,e,n,i,r,o,s,a,l,h){const c=s-r,u=a-o,d=(c*(e-o)-u*(t-r))/(u*(n-t)-c*(i-e));return l&&(l[h=h||0]=t+d*(n-t),l[h+1]=e+d*(i-e)),d}function li(t,e,n){if(n-e<3)return 0;let i=0;for(let r=2*(n-1),o=2*e;o<2*n;){const e=t[r],n=t[r+1],s=t[o],a=t[o+1];r=o,o+=2,i+=e*a-s*n}return i}function hi(t,e,n=2){return Nn(t,e,n)}const ci=[],ui=[],di=[];function fi(t,e,n,i,r,o,s,a,l){const h=null!=s;let c,u,d,f=r,p=null;h&&(p=new Uint32Array(i-n));let g=[];for(let r=n;rs&&a){const t=b+di[0]*o,n=_+di[1]*o,r=Math.acos(i)/2,s=Math.tan(r)*Math.abs(o);e[2*f]=t+di[1]*s,e[2*f+1]=n-di[0]*s,f++,e[2*f]=t-di[1]*s,e[2*f+1]=n+di[0]*s,f++}else O=b+di[0]*r,A=_+di[1]*r,j=!0;if(j){if(l&&null!=c){const t=ai(v,m,c,u,b,_,O,A,g,0);t>=-.01&&t<=1.01&&(e[2*d]=O=g[0],e[2*d+1]=A=g[1])}c=e[2*f]=O,u=e[2*f+1]=A,d=f,f++}}else di[0]=ci[1],di[1]=-ci[0],Xn(di,di),O=b+di[0]*o,A=_+di[1]*o,j=!0;else di[0]=ui[1],di[1]=-ui[0],Xn(di,di),c=e[2*f]=b+di[0]*o,u=e[2*f+1]=_+di[1]*o,d=f,f++}return p}function pi(t,e,n,i,r,o,s,a){const l=null!=s;let h=r,c=null;l&&(c=new Uint32Array(i-n));for(let r=n;rs&&a){const t=g+di[0]*o,n=y+di[1]*o,r=Math.acos(i)/2,s=Math.tan(r)*Math.abs(o);e[2*h]=t+di[1]*s,e[2*h+1]=n-di[0]*s,h++,e[2*h]=t-di[1]*s,e[2*h+1]=n+di[0]*s,h++}else e[2*h]=g+di[0]*r,e[2*h+1]=y+di[1]*r,h++}else di[0]=ci[1],di[1]=-ci[0],Xn(di,di),e[2*h]=g+di[0]*o,e[2*h+1]=y+di[1]*o,h++;else di[0]=ui[1],di[1]=-ui[0],Xn(di,di),e[2*h]=g+di[0]*o,e[2*h+1]=y+di[1]*o,h++}return c}function gi(t,e,n,i,r){const o=null!=i?[]:new Float32Array(t.length);if(fi(t,o,0,e&&e.length?e[0]:t.length/2,0,n,i,r,!0),e)for(let s=0;s0&&yi(t,2,i,r);for(let o=1;o<(e?e.length:0)+1;o++)i=e[o-1],r=e[o]||n,li(t,i,r)<0&&yi(t,2,i,r)}function vi(t){t.depth=t.depth||1,t.bevelSize=t.bevelSize||0,t.bevelSegments=null==t.bevelSegments?2:t.bevelSegments,t.smoothBevel=t.smoothBevel||!1,t.simplify=t.simplify||0,null==t.smoothSide&&(t.smoothSide="auto"),null==t.smoothSideThreshold&&(t.smoothSideThreshold=.9),"number"==typeof t.depth&&(t.bevelSize=Math.min(t.bevelSegments>0?t.bevelSize:0,t.depth/2)),t.bevelSize>0||(t.bevelSegments=0),t.bevelSegments=Math.round(t.bevelSegments);const e=t.boundingRect;if(t.translate=t.translate||[0,0],t.scale=t.scale||[1,1],t.fitRect){let n=null==t.fitRect.x?e.x||0:t.fitRect.x,i=null==t.fitRect.y?e.y||0:t.fitRect.y,r=t.fitRect.width,o=t.fitRect.height;null==r?null!=o?r=o/e.height*e.width:(r=e.width,o=e.height):null==o&&(o=r/e.width*e.height),t.scale=[r/e.width,o/e.height],t.translate=[(n-e.x)*t.scale[0],(i-e.y)*t.scale[1]]}}const mi=[[0,0],[1,0],[1,1],[0,0],[1,1],[0,1]];function bi(t,e,n){let i=0,r=t[e],o=t[e+1];const s=r,a=o;for(let s=e+2;s0){const o=[0,0,1],a=[],h=[0,0,-1],g=[];let v=0,m=new Float32Array(c);for(let b=0;b<2;b++){const _=0===b?r-d:d;for(let r=0;r<=f*u;r++){let w,M,O=0;for(let A=0;A0&&(O+=Math.sqrt((w-z)*(w-z)+(M-I)*(M-I))),r>0||b>0){let e=3*(l.vertex-c),n=t.position[e],i=t.position[e+1],r=t.position[e+2];m[A]+=Math.sqrt((n-z)*(n-z)+(i-I)*(i-I)+(r-E)*(r-E))}if(t.uv[2*l.vertex]=O/y,t.uv[2*l.vertex+1]=m[A]/y,w=z,M=I,l.vertex++,!x(A)&&(u>1&&r%u||1===u&&r>=1))for(let e=0;e<6;e++){const n=(mi[e][0]+A)%c,i=mi[e][1]+v;t.indices[l.index++]=(i-1)*c+n+p}}v++}}}else for(let n=0;n<2;n++){const i=0===n?r-d:d;let o,a,h=0;for(let n=0;n0&&(h+=Math.sqrt((o-u)*(o-u)+(a-d)*(a-d))),t.uv[2*l.vertex]=h/y,t.uv[2*l.vertex+1]=i/y,o=u,a=d,l.vertex++}}const v=d>0?f*u+1:1;for(let e=0;ei?(o.push(n,s),c.push(e)):(o.push(n,s,n,s),c.push(e,e))}else o.push(n,s,n,s),c.push(e,e)}n0?e.bevelSegments:0,u=t[r].holes||[];n+=o.length*(e.excludeBottom?1:2),i+=l.length/2*(e.excludeBottom?1:2);const d=2+2*c;let f=0,p=0;for(let t=0;t65535?Uint32Array:Uint16Array)(n),uv:new Float32Array(2*i)},o={vertex:0,index:0,ringPerimeter:0};for(let n=0;n0&&Math.round(e)===e?r.uv[t]=1:r.uv[t]=e%1}return r.normal=function(t,e){function n(t,e,n,i){t[0]=e,t[1]=n,t[2]=i}const i=[],r=[],o=[],s=[],a=[],l=[],h=t.length,c=new Float32Array(e.length);for(let u=0;u65535?Uint32Array:Uint16Array)(3*(2*(r-1)+(f-2*r)));let v=0;for(let t=0;t0?gi(p,[],n.bevelSize,null,!0):p,b=n.boundingRect,_=Mi(p,null,n.smoothSide,n.smoothSideThreshold);return{vertices:_.vertices,rawVertices:m,splittedMap:_.splittedMap,indices:x,topVertices:m,rect:{x:b.x*a[0]+s[0],y:b.y*a[1]+s[1],width:b.width*a[0],height:b.height*a[1]},depth:"function"==typeof n.depth?n.depth(e):n.depth,holes:[]}}function ji(t,e){const n=[];for(let i=0;ie&&(o.push(r[t]),h=0),a=n,l=i}o.length>=3&&n.push(o)}return n.length>0?n:null}function Si(t,e){const n=[];for(let i=0;i=3&&n.push(r)}return n.length>0?n:null}function Ti(t,e){e=Object.assign({},e);const n=[1/0,1/0],i=[-1/0,-1/0];for(let e=0;e0&&(i=Si(i,a)),!i)continue;const{vertices:c,holes:u,dimensions:d}=Nn.flatten(i);for(let t=0;t0?gi(c,u,e.bevelSize,null,!0):c,p=hi(f,u,d),g=Mi(c,u,e.smoothSide,e.smoothSideThreshold);r.push({indices:p,vertices:g.vertices,rawVertices:c,topVertices:f,holes:g.holes,splittedMap:g.splittedMap,rect:l,depth:"function"==typeof e.depth?e.depth(n):e.depth})}return Oi(r,e)}function Ci(t,e){e=Object.assign({},e);const n=[1/0,1/0],i=[-1/0,-1/0];for(let e=0;e0&&(i=Yn(i,s,!0)),o.push(Ai(i,n,e))}return Oi(o,e)}function ki(t,e,n){for(let i=0;i0&&(n=-n),i?(i.x=n,i.y=n,i.z=0,i):new s.Vector3(n,n,0)}return this.distanceToVector3(t,t,n)}toShape(t){if(!t)return null;if(t instanceof o.MultiPolygon)return t.getGeometries().map((t=>this.toShape(t)));const e=t.getCenter(),n=this.coordinateToVector3(e),i=t.getShell().map((t=>{const e=this.coordinateToVector3(t).sub(n);return new s.Vector2(e.x,e.y)})),r=new s.Shape(i),a=t.getHoles();return a&&a.length>0&&(r.holes=a.map((t=>{const e=t.map((t=>{const e=this.coordinateToVector3(t).sub(n);return new s.Vector2(e.x,e.y)}));return new s.Shape(e)}))),r}toExtrudeMesh(t,e,n,i){if(!t)return null;if(t instanceof o.MultiPolygon)return t.getGeometries().map((t=>this.toExtrudeMesh(t,e,n,i)));const r=t.getCoordinates();r.forEach((t=>{for(let e=t.length-1;e>=1;e--)t[e].equals(t[e-1])&&t.splice(e,1)})),t.setCoordinates(r);const a=this.toShape(t),l=this.coordinateToVector3(t.getCenter());i=o.Util.isNumber(i)?i:e,i=this.altitudeToVector3(i,i).x;const h=this.altitudeToVector3(e,e).x,c={bevelEnabled:!1,bevelSize:1};c[parseInt(s.REVISION)>=93?"depth":"amount"]=i;const u=new s.ExtrudeGeometry(a,c);let d=u;s.BufferGeometry.prototype.fromGeometry&&(d=new s.BufferGeometry,d.fromGeometry(u));const f=new s.Mesh(d,n);return f.position.set(l.x,l.y,h-i),f}toExtrudePolygon(t,e,n){return new Yt(t,e,n,this)}toBar(t,e,n){return new Ht(t,e,n,this)}toLine(t,e,n){return new Nt(t,e,n,this)}toExtrudeLine(t,e,n){return new Kt(t,e,n,this)}toModel(t,e){return new Xt(t,e,this)}toExtrudeLineTrail(t,e,n){return new he(t,e,n,this)}toExtrudePolygons(t,e,n){return new ge(t,e,n,this)}toPoint(t,e,n){return new be(t,e,n,this)}toPoints(t,e,n){return new je(t,e,n,this)}toBars(t,e,n){return new Te(t,e,n,this)}toExtrudeLines(t,e,n){return new ke(t,e,n,this)}toLines(t,e,n){return new Le(t,e,n,this)}toThreeVectorTileLayer(t,e,n){return new De(t,e,n,this)}toTerrain(t,e,n){return new Ye(t,e,n,this)}toTerrainVectorTileLayer(t,e,n){return new Xe(t,e,n,this)}toHeatMap(t,e,n){return new ln(t,e,n,this)}toFatLine(t,e,n){return new fn(t,e,n,this)}toFatLines(t,e,n){return new gn(t,e,n,this)}toBox(t,e,n){return new xn(t,e,n,this)}toBoxs(t,e,n){return new mn(t,e,n,this)}getBaseObjects(){return this.getMeshes().filter((t=>t instanceof m))}getMeshes(){const t=this.getScene();if(!t)return[];const e=[];for(let n=0,i=t.children.length;n=0;e--){const n=t.children[e];if(n instanceof s.Object3D&&!(n instanceof s.Camera)){t.remove(n);const e=n.__parent;e&&e instanceof m&&(e.isAdd=!1,e.options.layer=null,e._fire("remove",{target:e}),delete this._animationBaseObjectMap[n.uuid],e._hideUI())}}return this}lookAt(t){const e=this._getRenderer();return e&&e.context.lookAt(t),this}getCamera(){const t=this._getRenderer();return t?t.camera:null}getScene(){const t=this._getRenderer();return t?t.scene:null}renderScene(t,e){const n=this._getRenderer();return n&&(n.clearCanvas(),n.renderScene(t),e||n.setToRedraw()),this}loop(t=!1){const e=this._delayMeshes;if(!e.length)return;const n=this.getMap();if(!n||n.isAnimating()||n.isInteracting())return;const i=this.options.loopRenderCount||50,r=e.slice(0,i);r&&this.addMesh(r,t),e.splice(0,i)}renderPickScene(){const t=this._getRenderer();if(t){const e=t.pick;e&&e.pick(this._containerPoint)}return this}getThreeRenderer(){const t=this._getRenderer();return t?t.context:null}getPick(){const t=this._getRenderer();return t?t.pick:null}delayAddMesh(t){if(!t)return this;Array.isArray(t)||(t=[t]);for(let e=0,n=t.length;e{t instanceof m?(n.add(t.getObject3d()),t.isAdd||(t.isAdd=!0,t.options.layer=this,t._fire("add",{target:t})),t._animation&&o.Util.isFunction(t._animation)&&(this._animationBaseObjectMap[t.getObject3d().uuid]=t)):t instanceof s.Object3D&&n.add(t)})),this._zoomend(),e){const t=this._getRenderer();t&&t.setToRedraw()}return this}removeMesh(t,e=!0){if(!t)return this;Array.isArray(t)||(t=[t]);const n=this.getScene();if(t.forEach((t=>{if(t instanceof m){n.remove(t.getObject3d()),t.isAdd&&(t.isAdd=!1,t.options.layer=null,t._fire("remove",{target:t}),t._hideUI()),t._animation&&o.Util.isFunction(t._animation)&&delete this._animationBaseObjectMap[t.getObject3d().uuid];const e=this._delayMeshes;if(e.length)for(let n=0,i=e.length;n113?t.params.Line.threshold=e:t.linePrecision=e}(l,this._getLinePrecision(this.getMap().getResolution()));const g=[],y=[];u.children.forEach((t=>{const e=t.__parent;if(e&&e.getOptions){const n=e;n.getOptions().interactive&&n.isVisible()&&(n.identify&&o.Util.isFunction(n.identify)?y.push(n):g.push(t))}else(t instanceof s.Mesh||t instanceof s.Group)&&g.push(t)}));let x=[];const v=l.intersectObjects(g,!0);v&&Array.isArray(v)&&v.length&&(x=v.map((t=>{let e=t.object;const n=t.instanceId;e=this._recursionMesh(e)||{};const i=e.__parent||e;return i.faceIndex=t.faceIndex,i.index=t.index,i.intersect=t,o.Util.isNumber(n)&&(i.instanceId=n),i}))),this.renderPickScene(),y.length&&y.forEach((e=>{e.identify(t)&&x.push(e)}));const m=x.length;for(let t=0;t0?x.slice(0,b):x}_recursionMesh(t){for(;t&&t.parent!==this.getScene();)t=t.parent;return t}_getLinePrecision(t=10){for(let e=0,n=Ii.length;en)return i}return.01}_identifyBaseObjectEvents(t){if(!this.options.geometryEvents)return this;const e=this.map||this.getMap();if(e.isInteracting()||!e.options.geometryEvents||e._ignoreEvent(t))return this;const n=t.type,i=e._getEventParams?e._getEventParams(t):this._getEventParams(t);i.type=n;const{type:r,coordinate:s}=i,a=o.Util.now();if(this._mousemoveTimeOut&&"mousemove"===r&&a-this._mousemoveTimeOut<64)return this;this._mousemoveTimeOut=a,"mousedown"!==r&&"touchstart"!==r||(this._mousedownTime=o.Util.now());let l=!1;if("click"===r||"touchend"===r){const t=e.options.clickTimeThreshold||280;l=o.Util.now()-this._mousedownTime{const e=[];this._baseObjects&&this._baseObjects.forEach((n=>{let i=!0;t.forEach((t=>{n===t&&(i=!1)})),i&&e.push(n)})),e.forEach((t=>{t&&t instanceof m&&(t.getSelectMesh?t.isHide||(t._mouseover=!1,t.fire("mouseout",Object.assign({},i,{target:t,type:"mouseout",selectMesh:null})),t.closeToolTip()):(t._mouseover=!1,t.fire("mouseout",Object.assign({},i,{target:t,type:"mouseout"})),t.closeToolTip()))}))};if("mouseout"===r)return u([]),this._baseObjects=[],this;const d=this.identify(s,{count:c}),f=this.getScene();if(0===d.length&&f)for(let t=0,e=f.children.length;t{if(t instanceof m){t._mouseover||(t.fire("mouseover",Object.assign({},i,{target:t,type:"mouseover",selectMesh:t.getSelectMesh?t.getSelectMesh():null})),t._mouseover=!0,p(t,"mouseover")),t.fire(r,Object.assign({},i,{target:t,selectMesh:t.getSelectMesh?t.getSelectMesh():null}));const e=t.getToolTip();e&&!e._owner&&e.addTo(t),t.openToolTip(s),p(t)}})),this._baseObjects=d):d.forEach((t=>{t instanceof m&&(t.fire(r,Object.assign({},i,{target:t,selectMesh:t.getSelectMesh?t.getSelectMesh():null})),p(t))})),"touchend"===r&&l){const e=o.Util.extend({},i,{domEvent:t});d.forEach((t=>{t instanceof m&&(t.fire("click",Object.assign({},e,{target:t,selectMesh:t.getSelectMesh?t.getSelectMesh():null})),p(t,"click"))}))}return this}_getEventParams(t){const e=this.getMap(),n={domEvent:t};if(!e)return n;const i=t.touches&&t.touches.length>0?t.touches[0]:t.changedTouches&&t.changedTouches.length>0?t.changedTouches[0]:t;if(i){const t=(0,o.DomUtil.getEventContainerPoint)(i,e._containerDOM);n.coordinate=e.containerPointToCoordinate(t),n.containerPoint=t,n.viewPoint=e.containerPointToViewPoint(t),n.pont2d=e._containerPointToPoint(t)}return n}_zoomend(){const t=this.getScene();if(!t)return;const e=this.getMap().getZoom();t.children.forEach((t=>{const n=t.__parent;if(n&&n.getOptions){const t=n;t.zoomChange&&o.Util.isFunction(t.zoomChange)&&t.zoomChange(e);const i=t.getMinZoom(),r=t.getMaxZoom();er?(t.isVisible()&&(t.getObject3d().visible=!1),t._zoomVisible=!1):i<=e&&e<=r&&(t._visible&&(t.getObject3d().visible=!0),t._zoomVisible=!0)}}))}_getGeometryEventMapPanel(){const t=this.map||this.getMap();return t._panels.allLayers||t._containerDOM}onAdd(){super.onAdd();const t=this.map||this.getMap();if(!t)return this;const e=this._getGeometryEventMapPanel();return this._identifyBaseObjectEventsThis||(this._identifyBaseObjectEventsThis=this._identifyBaseObjectEvents.bind(this)),this._zoomendThis||(this._zoomendThis=this._zoomend.bind(this)),o.DomUtil.on(e,Ei.join(" "),this._identifyBaseObjectEventsThis,this),this._needsUpdate=!0,this._animationBaseObjectMap||(this._animationBaseObjectMap={}),t.on("zooming zoomend",this._zoomendThis,this),this}onRemove(){super.onRemove();const t=this.map||this.getMap();if(!t)return this;const e=this._getGeometryEventMapPanel();return o.DomUtil.off(e,Ei.join(" "),this._identifyBaseObjectEventsThis,this),t.off("zooming zoomend",this._zoomendThis,this),this.clear(),this}_callbackBaseObjectAnimation(){const t=this;if(t._animationBaseObjectMap)for(const e in t._animationBaseObjectMap){t._animationBaseObjectMap[e]._animation()}return this}_getFovRatio(){const t=this.getMap().getFov();return Math.tan(t/2*zi)}}Ri.mergeOptions({renderer:"gl",doubleBuffer:!1,glOptions:null,geometryEvents:!0,identifyCountOnEvent:0,forceRenderOnZooming:!0,loopRenderCount:50});const Gi={bloom:!0};class Zi extends o.renderer.CanvasLayerRenderer{constructor(){super(...arguments),this._renderTime=0,this._renderTarget=null}getPrepareParams(){return[this.scene,this.camera]}getDrawParams(){return[this.scene,this.camera]}_drawLayer(){super._drawLayer.apply(this,arguments)}hitDetect(){return!1}createCanvas(){super.createCanvas(),this.createContext()}createContext(){if(this.canvas.gl&&this.canvas.gl.wrap)this.gl=this.canvas.gl.wrap();else{const t=this.layer.options.glOptions||{alpha:!0,depth:!0,antialias:!0,stencil:!0,preserveDrawingBuffer:!1};t.preserveDrawingBuffer=!0,this.gl=this.gl||this._createGLContext(this.canvas,t)}this._initThreeRenderer(),this.layer.onCanvasCreate(this.context,this.scene,this.camera)}_initThreeRenderer(){this.matrix4=new s.Matrix4;const t=new s.WebGLRenderer({context:this.gl,alpha:!0});t.autoClear=!1,t.setClearColor(new s.Color(1,1,1),0),t.setSize(this.canvas.width,this.canvas.height),t.clear(),this.context=t;const e=this.scene=new s.Scene,n=this.layer.getMap(),i=n.getFov()*Math.PI/180,r=this.camera=new s.PerspectiveCamera(i,n.width/n.height,n.cameraNear,n.cameraFar);r.matrixAutoUpdate=!1,this._syncCamera(),e.add(r),this.pick=new un(this.layer),St.star()}onCanvasCreate(){super.onCanvasCreate()}resizeCanvas(t){if(!this.canvas)return;let e,n=this.getMap();e=t||n.getSize();const i=n.getDevicePixelRatio?n.getDevicePixelRatio():o.Browser.retina?2:1,r=this.canvas,{width:s,height:a,cssWidth:l,cssHeight:h}=o.Util.calCanvasSize(e,i);if(!this.layer._canvas||r.style.width===l&&r.style.height===h||(r.style.width=l,r.style.height=h),r.width===s&&r.height===a)return this;r.width=s,r.height=a,this.context.setSize(r.width,r.height)}clearCanvas(){this.canvas&&this.context.clear()}prepareCanvas(){return this.canvas?this.clearCanvas():this.createCanvas(),this.layer.fire("renderstart",{context:this.context}),null}renderScene(t){if(this.layer._callbackBaseObjectAnimation(),this._syncCamera(),t&&t.renderTarget){const{width:e,height:n}=t.renderTarget.fbo;this._renderTarget?(this._renderTarget.viewport.set(0,0,e,n),this._renderTarget.scissor.set(0,0,e,n)):(this._renderTarget=new s.WebGLRenderTarget(e,n,{depthBuffer:!1}),this.context.setRenderTarget(this._renderTarget),this.context.render(this.scene,this.camera));const i=this.context.properties.get(this._renderTarget),r=i[Vi];i[Vi]=t.renderTarget.getFramebuffer(t.renderTarget.fbo),this.context.setRenderTarget(this._renderTarget);const o=1===t.bloom&&t.sceneFilter,a=this.scene.children||[];let l=!1;if(o){const e=t.sceneFilter;l=e(Gi);for(let t=0,n=a.length;t80*r){i=u=n[0],o=v=n[1];for(var m=r;mu&&(u=s),l>v&&(v=l);x=0!==(x=Math.max(u-i,v-o))?32767/x:0}return a(g,y,r,i,o,x,0),y}function e(n,t,r,e,i){var a,o;if(i===z(n,t,r,e)>0)for(a=t;a=t;a-=e)o=Z(a,n[a],n[a+1],o);return o&&y(o,o.next)&&(F(o),o=o.next),o}function i(n,t){if(!n)return n;t||(t=n);var r,e=n;do{if(r=!1,e.steiner||!y(e,e.next)&&0!==g(e.prev,e,e.next))e=e.next;else{if(F(e),(e=t=e.prev)===e.next)break;r=!0}}while(r||e!==t);return t}function a(n,t,r,e,h,f,l){if(n){!l&&f&&function(n,t,r,e){var i=n;do{0===i.z&&(i.z=x(i.x,i.y,t,r,e)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==n);i.prevZ.nextZ=null,i.prevZ=null,function(n){var t,r,e,i,a,o,u,v,s=1;do{for(r=n,n=null,a=null,o=0;r;){for(o++,e=r,u=0,t=0;t0||v>0&&e;)0!==u&&(0===v||!e||r.z<=e.z)?(i=r,r=r.nextZ,u--):(i=e,e=e.nextZ,v--),a?a.nextZ=i:n=i,i.prevZ=a,a=i;r=e}a.nextZ=null,s*=2}while(o>1)}(i)}(n,e,h,f);for(var p,c,d=n;n.prev!==n.next;)if(p=n.prev,c=n.next,f?u(n,e,h,f):o(n))t.push(p.i/r|0),t.push(n.i/r|0),t.push(c.i/r|0),F(n),n=c.next,d=c.next;else if((n=c)===d){l?1===l?a(n=v(i(n),t,r),t,r,e,h,f,2):2===l&&s(n,t,r,e,h,f):a(i(n),t,r,e,h,f,1);break}}}function o(n){var t=n.prev,r=n,e=n.next;if(g(t,r,e)>=0)return!1;for(var i=t.x,a=r.x,o=e.x,u=t.y,v=r.y,s=e.y,h=ia?i>o?i:o:a>o?a:o,x=u>v?u>s?u:s:v>s?v:s,p=e.next;p!==t;){if(p.x>=h&&p.x<=l&&p.y>=f&&p.y<=x&&c(i,u,a,v,o,s,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function u(n,t,r,e){var i=n.prev,a=n,o=n.next;if(g(i,a,o)>=0)return!1;for(var u=i.x,v=a.x,s=o.x,h=i.y,f=a.y,l=o.y,p=uv?u>s?u:s:v>s?v:s,m=h>f?h>l?h:l:f>l?f:l,w=x(p,d,t,r,e),M=x(y,m,t,r,e),b=n.prevZ,A=n.nextZ;b&&b.z>=w&&A&&A.z<=M;){if(b.x>=p&&b.x<=y&&b.y>=d&&b.y<=m&&b!==i&&b!==o&&c(u,h,v,f,s,l,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,A.x>=p&&A.x<=y&&A.y>=d&&A.y<=m&&A!==i&&A!==o&&c(u,h,v,f,s,l,A.x,A.y)&&g(A.prev,A,A.next)>=0)return!1;A=A.nextZ}for(;b&&b.z>=w;){if(b.x>=p&&b.x<=y&&b.y>=d&&b.y<=m&&b!==i&&b!==o&&c(u,h,v,f,s,l,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;A&&A.z<=M;){if(A.x>=p&&A.x<=y&&A.y>=d&&A.y<=m&&A!==i&&A!==o&&c(u,h,v,f,s,l,A.x,A.y)&&g(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function v(n,t,r){var e=n;do{var a=e.prev,o=e.next.next;!y(a,o)&&m(a,e,e.next,o)&&b(a,o)&&b(o,a)&&(t.push(a.i/r|0),t.push(e.i/r|0),t.push(o.i/r|0),F(e),F(e.next),e=n=o),e=e.next}while(e!==n);return i(e)}function s(n,t,r,e,o,u){var v=n;do{for(var s=v.next.next;s!==v.prev;){if(v.i!==s.i&&d(v,s)){var h=A(v,s);return v=i(v,v.next),h=i(h,h.next),a(v,t,r,e,o,u,0),void a(h,t,r,e,o,u,0)}s=s.next}v=v.next}while(v!==n)}function h(n,t){return n.x-t.x}function f(n,t){var r=function(n,t){var r,e=t,i=n.x,a=n.y,o=-1/0;do{if(a<=e.y&&a>=e.next.y&&e.next.y!==e.y){var u=e.x+(a-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(u<=i&&u>o&&(o=u,r=e.x=e.x&&e.x>=h&&i!==e.x&&c(ar.x||e.x===r.x&&l(r,e)))&&(r=e,x=v)),e=e.next}while(e!==s);return r}(n,t);if(!r)return t;var e=A(r,n);return i(e,e.next),i(r,r.next)}function l(n,t){return g(n.prev,n,t.prev)<0&&g(t.next,n,n.next)<0}function x(n,t,r,e,i){return(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=(n-r)*i|0)|n<<8))|n<<4))|n<<2))|n<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-e)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function p(n){var t=n,r=n;do{(t.x=(n-o)*(a-u)&&(n-o)*(e-u)>=(r-o)*(t-u)&&(r-o)*(a-u)>=(i-o)*(e-u)}function d(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!function(n,t){var r=n;do{if(r.i!==n.i&&r.next.i!==n.i&&r.i!==t.i&&r.next.i!==t.i&&m(r,r.next,n,t))return!0;r=r.next}while(r!==n);return!1}(n,t)&&(b(n,t)&&b(t,n)&&function(n,t){var r=n,e=!1,i=(n.x+t.x)/2,a=(n.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(e=!e),r=r.next}while(r!==n);return e}(n,t)&&(g(n.prev,n,t.prev)||g(n,t.prev,t))||y(n,t)&&g(n.prev,n,n.next)>0&&g(t.prev,t,t.next)>0)}function g(n,t,r){return(t.y-n.y)*(r.x-t.x)-(t.x-n.x)*(r.y-t.y)}function y(n,t){return n.x===t.x&&n.y===t.y}function m(n,t,r,e){var i=M(g(n,t,r)),a=M(g(n,t,e)),o=M(g(r,e,n)),u=M(g(r,e,t));return i!==a&&o!==u||(!(0!==i||!w(n,r,t))||(!(0!==a||!w(n,e,t))||(!(0!==o||!w(r,n,e))||!(0!==u||!w(r,t,e)))))}function w(n,t,r){return t.x<=Math.max(n.x,r.x)&&t.x>=Math.min(n.x,r.x)&&t.y<=Math.max(n.y,r.y)&&t.y>=Math.min(n.y,r.y)}function M(n){return n>0?1:n<0?-1:0}function b(n,t){return g(n.prev,n,n.next)<0?g(n,t,n.next)>=0&&g(n,n.prev,t)>=0:g(n,t,n.prev)<0||g(n,n.next,t)<0}function A(n,t){var r=new P(n.i,n.x,n.y),e=new P(t.i,t.x,t.y),i=n.next,a=t.prev;return n.next=t,t.prev=n,r.next=i,i.prev=r,e.next=r,r.prev=e,a.next=e,e.prev=a,e}function Z(n,t,r,e){var i=new P(n,t,r);return e?(i.next=e.next,i.prev=e,e.next.prev=i,e.next=i):(i.prev=i,i.next=i),i}function F(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function P(n,t,r){this.i=n,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function z(n,t,r,e){for(var i=0,a=t,o=r-e;a0&&(e+=n[i-1].length,r.holes.push(e))}return r};var I=t.exports;function E(n){for(var t,r,e=0,i=1,a=n.length;i0}function L(n,t,r){return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],n}function H(n,t){var r=t[0],e=t[1],i=t[2],a=Math.sqrt(r*r+e*e+i*i)||1;return n[0]=r/a,n[1]=e/a,n[2]=i/a,n}function U(n,t){function r(n,t,r,e){n[0]=t,n[1]=r,n[2]=e}for(var e,i,a,o,u,v,s,h,f,l=[],x=[],p=[],c=[],d=[],g=[],y=n.length,m=new Float32Array(t.length),w=0;w0&&i.push(f/2);for(var d=0,g=c.length;d0&&(l=(l=l.map((function(n){return n}))).reverse());for(var x=0,p=l.length-1;x0}function J(n,t){void 0===t&&(t={}),t=Object.assign({},{radius:1,height:2,radialSegments:6},t);for(var r=Math.round(Math.max(4,t.radialSegments)),e=t,i=e.radius,a=e.height,o=360/r/360*Math.PI*2,u=r+1,v=new Float32Array(3*u*2),s=n[0],h=n[1],f=0,l=0,x=3*u,p=2*u,c=[],d=[],g=-1;g1&&c.push(0,g-1,g)}v[f-=3]=v[0],v[f+1]=v[1],v[f+2]=v[2];var A=v.length;v[A-3]=v[0],v[A-2]=v[1],v[A-1]=a;for(var Z=c.length,F=0;F0&&et.text())).then((e=>{new Blob([e],{type:"application/json"}).arrayBuffer().then((e=>{t.postResponse(null,e,[e]),t.abort=!0,i(t)}))})).catch((e=>{console.error(e),t.abort=!0,i(t)}))}t.initialize=function(){},t.onmessage=function(t,e){i({url:t.data,postResponse:e,abort:!1})}}))),t.BaseObject=m,t.BaseObjectTask=yt,t.BaseObjectTaskManager=St,t.ExtrudeUtil=K,t.GeoJSONUtil=k,t.GeoUtil=se,t.IdentifyUtil=xe,t.LineMaterial=f,t.LineUtil=st,t.MergeGeometryUtil=It,t.MergedMixin=de,t.ThreeLayer=Ri,t.ThreeRenderer=Zi,t.geometryExtrude=Pi,t.getFetchDataActor=function(){return o.worker||console.error("maptalks.worker is not defined,You can't use"),Bi||(Bi=new o.worker.Actor(Li)),Bi},t.polyextrude=B,Object.defineProperty(t,"__esModule",{value:!0}),"undefined"!=typeof console&&console.log("maptalks.three v0.35.1")})); diff --git a/js/script.js b/js/script.js deleted file mode 100644 index 118e183..0000000 --- a/js/script.js +++ /dev/null @@ -1,255 +0,0 @@ -// TODO: Remove TailwindCSS -const modalScreen = document.getElementById("modalScreen"); -const closeModalBtn = document.getElementById("modal-close"); -const inputSearch = document.getElementById("searchInput"); - -/** - * Toggle the modal - */ -const toggleModal = () => - modalScreen.style.display === "block" - ? (modalScreen.style.display = "none") - : (modalScreen.style.display = "block"); - -modalScreen.style.display = "none"; -closeModalBtn.addEventListener("click", toggleModal); -inputSearch.addEventListener("input", (event) => { - const { value } = event.target; - const suggestionsContainer = document.getElementById("suggestions"); - - if (value.length >= 2) { - // Display suggestions - suggestionsContainer.style.display = "block"; - - // Only keep buildings with non undefined name - let suggestions = buildings.features.filter( - (feature) => feature.properties.name !== undefined - ); - suggestions = suggestions.filter((feature) => { - const { name, short_name } = feature.properties; - return ( - name.toLowerCase().includes(value.toLowerCase()) || - (short_name && short_name.toLowerCase().includes(value.toLowerCase())) - ); - }); - - // Inject suggestions into the DOM - suggestionsContainer.innerHTML = ""; - suggestions.forEach((suggestion) => { - const suggestionEl = document.createElement("li"); - suggestionEl.innerHTML = suggestion.properties.name; - suggestionEl.addEventListener("click", () => { - // Close suggestions - suggestionsContainer.style.display = "none"; - - const { name } = suggestion.properties; - inputSearch.value = name; - suggestionsContainer.innerHTML = ""; - - // Center the map to the building - const building2d = map - .getLayer("2d-buildings") - ._geoList.filter((feature) => feature.properties.name === name)[0]; - map.setCenter(building2d.getCenter()); - - // Focus on the building and flash the building - const building3D = map - .getLayer("3d-buildings") - .getMeshes() - .filter( - (mesh) => mesh.options?.polygon?.properties?.name === name - )[0]; - - building3D - .animateShow({ - duration: 1000, - easing: "out", - }) - .play(); - building2d.flash(150, 4); - }); - suggestionsContainer.appendChild(suggestionEl); - }); - } else { - suggestionsContainer.style.display = "none"; - suggestionsContainer.innerHTML = ""; - } -}); - -/** - * Change title and description of modal - * @param {string} title - * @param {string} content - */ -const injectModal = (title, content) => { - document.getElementById("modalTitle").innerText = title; - document.getElementById("modalContent").innerHTML = content; -}; - -// Tile services -const TILES = { - f43D: "https://tile.f4map.com/tiles/f4_3d/{z}/{x}/{y}.png", - osm: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", - cartoDbVoyager: - "https://cartodb-basemaps-{s}.global.ssl.fastly.net/rastertiles/voyager_labels_under/{z}/{x}/{y}.png", -}; - -const CENTER = [1.468, 43.5696]; -const ZOOM = 18; -const MINZOOM = ZOOM; -const MAXZOOM = 20; -const PITCH = 45; -const BEARING = 0; - -// Map -const map = new maptalks.Map("map", { - center: CENTER, - zoom: ZOOM, - minZoom: MINZOOM, - maxZoom: MAXZOOM, - pitch: PITCH, - bearing: BEARING, - - baseLayer: new maptalks.TileLayer("tile", { - urlTemplate: TILES.f43D, - subdomains: ["a", "b", "c", "d"], - }), - layers: [ - new maptalks.VectorLayer("bounds"), - new maptalks.VectorLayer("2d-buildings"), - ], - attribution: { - content: - '© OpenStreetMap contributors, © CARTO', - }, -}); - -// Bounds -const extent = map.getExtent(); -extent.xmin = 1.464; -extent.xmax = 1.4715; -extent.ymin = 43.567; -extent.ymax = 43.574; -map.setMaxExtent(extent); -map.getLayer("bounds").addGeometry( - new maptalks.Polygon(extent.toArray(), { - symbol: { polygonOpacity: 0, lineWidth: 0 }, - }) -); - -// 2D buildings Layer -buildings.features.forEach((feature) => { - const building2D = new maptalks.GeoJSON.toGeometry(feature); - building2D.setSymbol({ - polygonFill: "#f6efe4", - }); - building2D.addTo(map.getLayer("2d-buildings")); -}); - -// 3D Buildings Layer -const threeLayer = new maptalks.ThreeLayer("3d-buildings", { - forceRenderOnMoving: true, - forceRenderOnRotating: true, - animation: true, -}); -threeLayer.prepareToDraw = function (gl, scene, camera) { - const light = new THREE.DirectionalLight(0xf6efe4, 1); - light.position.set(1, 0, 1); - scene.add(light); - - buildings.features.forEach(function (building) { - const height = building.properties.height * 2; - - const meshBuilding = threeLayer.toExtrudePolygon( - building, - { - height: height, - bloom: true, - top: "#f00", - asynchronous: true, - }, - new THREE.MeshPhongMaterial({ - color: 0xffffff, - }) - ); - - meshBuilding.on("mouseover", (e) => e.target.setHeight(height * 1.25)); - meshBuilding.on("mouseout", (e) => e.target.setHeight(height)); - - // Extrude the building on 1st spawn - meshBuilding.animateShow({ - duration: 3000, - }); - - // Display a tooltip when hovering the building - building.properties.name && - meshBuilding.setToolTip(building.properties.name, { - showTimeout: 0, - eventsPropagation: true, - dx: 15, - dy: 15, - }); - - // Display a message box when clicking the building - building.properties.name && - meshBuilding.setInfoWindow({ - title: building.properties.name, - content: building.properties.description || "Pas de description", - }); - - threeLayer.addMesh(meshBuilding); - }); -}; -map.addLayer(threeLayer); - -// Controls -const up = () => map.panBy([0, 200]); -const down = () => map.panBy([0, -200]); -const left = () => map.panBy([200, 0]); -const right = () => map.panBy([-200, 0]); -const zoomIn = () => map.setZoom(map.getZoom() + 0.5); -const zoomOut = () => map.setZoom(map.getZoom() - 0.5); -const reset = () => { - map.setCenter(CENTER); - map.setZoom(ZOOM); - map.setPitch(PITCH); - map.setBearing(BEARING); -}; - -/** - * Change the base layer - * @param {string} tileService - */ -const changeTileService = (tileService) => { - const baseLayer = map.getBaseLayer(); - baseLayer.options.urlTemplate = tileService; - map.setBaseLayer(baseLayer); -}; - -// Show or Hide 3D layer based on pitch value -map.on("pitch", ({ from, to }) => { - const planeLayer = map.getLayer("2d-buildings"); - - // Convert to degrees - to = (to * 180) / Math.PI; - if (to <= 2) { - threeLayer.hide(); - planeLayer.show(); - changeTileService(TILES.cartoDbVoyager); - } else if (from <= 2) { - threeLayer.show(); - planeLayer.hide(); - changeTileService(TILES.f43D); - } -}); - -/** - * Toggle the about modal - */ -const showInfoModal = () => { - toggleModal(); - injectModal( - "A Propos", - "

Ce projet a été réalisé par des membres du Club Info de l'INSA Toulouse. Il a pour but de vous permettre de découvrir le campus de l'INSA Toulouse en 2D et 3D.

Pour plus d'informations, n'hésitez pas à contacter le Club Info.

Toute contribution est la bienvenue, vous pouvez retrouver le code source du site sur notre GitHub.

" - ); -}; diff --git a/json/map.geojson b/json/map.geojson index 1bdaefa..0e32701 100644 --- a/json/map.geojson +++ b/json/map.geojson @@ -1,6 +1,130 @@ { "type": "FeatureCollection", "features": [ + { + "type": "Feature", + "properties": { + "name": "Métro Faculté de Pharmacie", + "short_name": "Fac de Pharma", + "description": "La station de métro pour toutes tes sorties chez Tonton", + "height": 6 + }, + "geometry": { + "coordinates": [ + [ + [ + 1.464452343556701, + 43.56777715718127 + ], + [ + 1.4644553345412987, + 43.56777483785251 + ], + [ + 1.464506728324153, + 43.56777887487121 + ], + [ + 1.4645110943103248, + 43.567782091379 + ], + [ + 1.4645032146472374, + 43.567849479885695 + ], + [ + 1.4645072028919515, + 43.56785522098647 + ], + [ + 1.4646270237557815, + 43.56786431370577 + ], + [ + 1.4646279208922692, + 43.567858317788136 + ], + [ + 1.464637597218939, + 43.56785843930203 + ], + [ + 1.4646425403996943, + 43.56786074329409 + ], + [ + 1.4646364550079056, + 43.567916139888524 + ], + [ + 1.4646588092282968, + 43.567916937974644 + ], + [ + 1.464670002210113, + 43.56792164858874 + ], + [ + 1.4646839712513042, + 43.56793136651234 + ], + [ + 1.4646918533066469, + 43.56794347984726 + ], + [ + 1.464692178938094, + 43.56795308392006 + ], + [ + 1.4646376972343091, + 43.56804331209088 + ], + [ + 1.4646211939119382, + 43.5680416964656 + ], + [ + 1.4645969769299256, + 43.56821827295448 + ], + [ + 1.4645840051497316, + 43.56821661545561 + ], + [ + 1.464584529436081, + 43.56820133111387 + ], + [ + 1.4645394220914056, + 43.56819651079664 + ], + [ + 1.4645365100687684, + 43.5682071376381 + ], + [ + 1.464463528130068, + 43.568200127767454 + ], + [ + 1.4644654274187587, + 43.56819037921994 + ], + [ + 1.4643950693041177, + 43.56818644898584 + ], + [ + 1.464452343556701, + 43.56777715718127 + ] + ] + ], + "type": "Polygon" + } + }, { "type": "Feature", "properties": { @@ -12,11 +136,26 @@ "geometry": { "coordinates": [ [ - [1.4676592625429805, 43.57073829651577], - [1.4674780647123669, 43.57064287792443], - [1.4676815658123985, 43.5704355855697], - [1.467864406018066, 43.570532208093965], - [1.4676592625429805, 43.57073829651577] + [ + 1.4676592625429805, + 43.57073829651577 + ], + [ + 1.4674780647123669, + 43.57064287792443 + ], + [ + 1.4676815658123985, + 43.5704355855697 + ], + [ + 1.467864406018066, + 43.570532208093965 + ], + [ + 1.4676592625429805, + 43.57073829651577 + ] ] ], "type": "Polygon" @@ -33,11 +172,26 @@ "geometry": { "coordinates": [ [ - [1.467379912968994, 43.571017227831135], - [1.4671990115851088, 43.57092275499767], - [1.4674778779674114, 43.57064295549509], - [1.4676592020865087, 43.570738262285715], - [1.467379912968994, 43.571017227831135] + [ + 1.467379912968994, + 43.571017227831135 + ], + [ + 1.4671990115851088, + 43.57092275499767 + ], + [ + 1.4674778779674114, + 43.57064295549509 + ], + [ + 1.4676592020865087, + 43.570738262285715 + ], + [ + 1.467379912968994, + 43.571017227831135 + ] ] ], "type": "Polygon" @@ -46,32 +200,86 @@ { "type": "Feature", "properties": { - "name": "Amphithéâtre Joseph Fourrier", - "short_name": "Amphi Fourrier", - "description": "l'Amphi Fourier, c'est pour les réceptions, les pièces du CATIN, les concerts des Enfoiros et les spectacles de danse de tes camarades au second semestre !", + "name": "Amphi Sophie Germain", + "short_name": "Sophie Germain", + "description": "L'Amphi Sophie Germain accueille des cours magistraux, conférences et événements de la vie du campus.", "height": 6 }, "geometry": { "coordinates": [ [ - [1.4678468524896857, 43.57052283609585], - [1.4677011833898632, 43.57044592702479], - [1.4678775851044463, 43.57026765950977], - [1.4678875803107019, 43.57023839648619], - [1.4679075974240448, 43.57024333367687], - [1.4679314476015577, 43.57019735607216], - [1.4679552977790138, 43.570204144713955], - [1.4679787220596268, 43.57021155050424], - [1.467998313277235, 43.5702201905917], - [1.4680242929347003, 43.57023315072047], - [1.4680532538635873, 43.57025012231347], - [1.4680690120170539, 43.57025999669284], - [1.4680847701693835, 43.57027264823856], - [1.4681021292676633, 43.57028632321234], - [1.468047134277981, 43.57031598209579], - [1.468058897525765, 43.57032941636152], - [1.4680234084054007, 43.570344728531325], - [1.4678468524896857, 43.57052283609585] + [ + 1.4678468524896857, + 43.57052283609585 + ], + [ + 1.4677011833898632, + 43.57044592702479 + ], + [ + 1.4678775851044463, + 43.57026765950977 + ], + [ + 1.4678875803107019, + 43.57023839648619 + ], + [ + 1.4679075974240448, + 43.57024333367687 + ], + [ + 1.4679314476015577, + 43.57019735607216 + ], + [ + 1.4679552977790138, + 43.570204144713955 + ], + [ + 1.4679787220596268, + 43.57021155050424 + ], + [ + 1.467998313277235, + 43.5702201905917 + ], + [ + 1.4680242929347003, + 43.57023315072047 + ], + [ + 1.4680532538635873, + 43.57025012231347 + ], + [ + 1.4680690120170539, + 43.57025999669284 + ], + [ + 1.4680847701693835, + 43.57027264823856 + ], + [ + 1.4681021292676633, + 43.57028632321234 + ], + [ + 1.468047134277981, + 43.57031598209579 + ], + [ + 1.468058897525765, + 43.57032941636152 + ], + [ + 1.4680234084054007, + 43.570344728531325 + ], + [ + 1.4678468524896857, + 43.57052283609585 + ] ] ], "type": "Polygon" @@ -88,33 +296,114 @@ "geometry": { "coordinates": [ [ - [1.467653281743594, 43.57004069740114], - [1.4670415028592458, 43.57066217499488], - [1.4669756698693561, 43.57062517717097], - [1.466940107915434, 43.57065984597108], - [1.46622735694703, 43.57028887205203], - [1.4663392246969522, 43.57017602030086], - [1.466443936876317, 43.57023162326513], - [1.4664886186203034, 43.57018590527602], - [1.466596059455071, 43.57024299097634], - [1.4665533877516452, 43.570288099375176], - [1.466587271484741, 43.570305216636456], - [1.4666304810160113, 43.5702608468828], - [1.466738510988364, 43.57031738057947], - [1.466695129128226, 43.570361897162], - [1.4667271535057864, 43.57037889439357], - [1.466772024870977, 43.57033356843158], - [1.4668810721508123, 43.57039103544315], - [1.4668373647627675, 43.57043600963493], - [1.4668706102760325, 43.57045319077784], - [1.4669154800950537, 43.57040855348447], - [1.4670229562389636, 43.57046463347157], - [1.4669782893058425, 43.570509831589334], - [1.4670107058136637, 43.57052799275681], - [1.4671878945951278, 43.57034674297887], - [1.4667019645927724, 43.570094028827185], - [1.4670581233196174, 43.569730852590936], - [1.467653281743594, 43.57004069740114] + [ + 1.467653281743594, + 43.57004069740114 + ], + [ + 1.4670415028592458, + 43.57066217499488 + ], + [ + 1.4669756698693561, + 43.57062517717097 + ], + [ + 1.466940107915434, + 43.57065984597108 + ], + [ + 1.46622735694703, + 43.57028887205203 + ], + [ + 1.4663392246969522, + 43.57017602030086 + ], + [ + 1.466443936876317, + 43.57023162326513 + ], + [ + 1.4664886186203034, + 43.57018590527602 + ], + [ + 1.466596059455071, + 43.57024299097634 + ], + [ + 1.4665533877516452, + 43.570288099375176 + ], + [ + 1.466587271484741, + 43.570305216636456 + ], + [ + 1.4666304810160113, + 43.5702608468828 + ], + [ + 1.466738510988364, + 43.57031738057947 + ], + [ + 1.466695129128226, + 43.570361897162 + ], + [ + 1.4667271535057864, + 43.57037889439357 + ], + [ + 1.466772024870977, + 43.57033356843158 + ], + [ + 1.4668810721508123, + 43.57039103544315 + ], + [ + 1.4668373647627675, + 43.57043600963493 + ], + [ + 1.4668706102760325, + 43.57045319077784 + ], + [ + 1.4669154800950537, + 43.57040855348447 + ], + [ + 1.4670229562389636, + 43.57046463347157 + ], + [ + 1.4669782893058425, + 43.570509831589334 + ], + [ + 1.4670107058136637, + 43.57052799275681 + ], + [ + 1.4671878945951278, + 43.57034674297887 + ], + [ + 1.4667019645927724, + 43.570094028827185 + ], + [ + 1.4670581233196174, + 43.569730852590936 + ], + [ + 1.467653281743594, + 43.57004069740114 + ] ] ], "type": "Polygon" @@ -131,19 +420,58 @@ "geometry": { "coordinates": [ [ - [1.4666302397496338, 43.57108342638125], - [1.4658420665138863, 43.57067556736092], - [1.4658876311189317, 43.57062916843108], - [1.4658657429858977, 43.57061771530854], - [1.4658975234260936, 43.570586842843454], - [1.4659170807853457, 43.57059762202914], - [1.4659601813029326, 43.57055083907224], - [1.4667501574340918, 43.570960274736194], - [1.4667040446162503, 43.57100720445905], - [1.466724486801354, 43.57101782101293], - [1.46669225594502, 43.57104930321475], - [1.4666724958267139, 43.57103899311315], - [1.4666302397496338, 43.57108342638125] + [ + 1.4666302397496338, + 43.57108342638125 + ], + [ + 1.4658420665138863, + 43.57067556736092 + ], + [ + 1.4658876311189317, + 43.57062916843108 + ], + [ + 1.4658657429858977, + 43.57061771530854 + ], + [ + 1.4658975234260936, + 43.570586842843454 + ], + [ + 1.4659170807853457, + 43.57059762202914 + ], + [ + 1.4659601813029326, + 43.57055083907224 + ], + [ + 1.4667501574340918, + 43.570960274736194 + ], + [ + 1.4667040446162503, + 43.57100720445905 + ], + [ + 1.466724486801354, + 43.57101782101293 + ], + [ + 1.46669225594502, + 43.57104930321475 + ], + [ + 1.4666724958267139, + 43.57103899311315 + ], + [ + 1.4666302397496338, + 43.57108342638125 + ] ] ], "type": "Polygon" @@ -160,19 +488,58 @@ "geometry": { "coordinates": [ [ - [1.465539299222371, 43.570729520064106], - [1.465276543492223, 43.570593038739105], - [1.4653746419407128, 43.570495711774726], - [1.4655083556894226, 43.5705654605907], - [1.4655526502953649, 43.57052164345919], - [1.4652333074255353, 43.57035584060921], - [1.4653562909927018, 43.57023097388904], - [1.4657675226886795, 43.570446394635695], - [1.4656447542397188, 43.57057048507784], - [1.4655927148519936, 43.570543305689625], - [1.465548742062822, 43.57058638844336], - [1.4656351304645057, 43.5706315184529], - [1.465539299222371, 43.570729520064106] + [ + 1.465539299222371, + 43.570729520064106 + ], + [ + 1.465276543492223, + 43.570593038739105 + ], + [ + 1.4653746419407128, + 43.570495711774726 + ], + [ + 1.4655083556894226, + 43.5705654605907 + ], + [ + 1.4655526502953649, + 43.57052164345919 + ], + [ + 1.4652333074255353, + 43.57035584060921 + ], + [ + 1.4653562909927018, + 43.57023097388904 + ], + [ + 1.4657675226886795, + 43.570446394635695 + ], + [ + 1.4656447542397188, + 43.57057048507784 + ], + [ + 1.4655927148519936, + 43.570543305689625 + ], + [ + 1.465548742062822, + 43.57058638844336 + ], + [ + 1.4656351304645057, + 43.5706315184529 + ], + [ + 1.465539299222371, + 43.570729520064106 + ] ] ], "type": "Polygon" @@ -189,21 +556,66 @@ "geometry": { "coordinates": [ [ - [1.4677219252347982, 43.56976678188457], - [1.4677036309291793, 43.5696946142009], - [1.4676557587653747, 43.569698491038054], - [1.4676411723362435, 43.56964534737793], - [1.4676722660397843, 43.56964216600315], - [1.4676459387607679, 43.569543246669696], - [1.467797171815448, 43.56952368816877], - [1.46781801897302, 43.56960172227781], - [1.4677821860465485, 43.56960589917088], - [1.4677926425310375, 43.569652316776114], - [1.4678366695354441, 43.569646790884576], - [1.4678438742565731, 43.56969098807818], - [1.4677752729568283, 43.56969698582975], - [1.4677879657414223, 43.56975849306352], - [1.4677219252347982, 43.56976678188457] + [ + 1.4677219252347982, + 43.56976678188457 + ], + [ + 1.4677036309291793, + 43.5696946142009 + ], + [ + 1.4676557587653747, + 43.569698491038054 + ], + [ + 1.4676411723362435, + 43.56964534737793 + ], + [ + 1.4676722660397843, + 43.56964216600315 + ], + [ + 1.4676459387607679, + 43.569543246669696 + ], + [ + 1.467797171815448, + 43.56952368816877 + ], + [ + 1.46781801897302, + 43.56960172227781 + ], + [ + 1.4677821860465485, + 43.56960589917088 + ], + [ + 1.4677926425310375, + 43.569652316776114 + ], + [ + 1.4678366695354441, + 43.569646790884576 + ], + [ + 1.4678438742565731, + 43.56969098807818 + ], + [ + 1.4677752729568283, + 43.56969698582975 + ], + [ + 1.4677879657414223, + 43.56975849306352 + ], + [ + 1.4677219252347982, + 43.56976678188457 + ] ] ], "type": "Polygon" @@ -220,11 +632,26 @@ "geometry": { "coordinates": [ [ - [1.4681078444042441, 43.56949712041214], - [1.4679762621142913, 43.56942690555255], - [1.4682276756475972, 43.56917280241282], - [1.4683615298010295, 43.5692423979591], - [1.4681078444042441, 43.56949712041214] + [ + 1.4681078444042441, + 43.56949712041214 + ], + [ + 1.4679762621142913, + 43.56942690555255 + ], + [ + 1.4682276756475972, + 43.56917280241282 + ], + [ + 1.4683615298010295, + 43.5692423979591 + ], + [ + 1.4681078444042441, + 43.56949712041214 + ] ] ], "type": "Polygon" @@ -241,12 +668,30 @@ "geometry": { "coordinates": [ [ - [1.4697614649906825, 43.569916576788245], - [1.4690183998410475, 43.56952762638883], - [1.469907014415952, 43.568630088660655], - [1.4706247404661497, 43.569005230990626], - [1.4698230988696537, 43.569821749019894], - [1.4697614649906825, 43.569916576788245] + [ + 1.4697614649906825, + 43.569916576788245 + ], + [ + 1.4690183998410475, + 43.56952762638883 + ], + [ + 1.469907014415952, + 43.568630088660655 + ], + [ + 1.4706247404661497, + 43.569005230990626 + ], + [ + 1.4698230988696537, + 43.569821749019894 + ], + [ + 1.4697614649906825, + 43.569916576788245 + ] ] ], "type": "Polygon" @@ -263,13 +708,34 @@ "geometry": { "coordinates": [ [ - [1.470556803334489, 43.56894944082751], - [1.4702622470308029, 43.56879639254865], - [1.470292094840545, 43.56876639938457], - [1.4699890122965371, 43.568607757592815], - [1.4701988500968355, 43.568391445003016], - [1.4707975492769094, 43.56870220288644], - [1.470556803334489, 43.56894944082751] + [ + 1.470556803334489, + 43.56894944082751 + ], + [ + 1.4702622470308029, + 43.56879639254865 + ], + [ + 1.470292094840545, + 43.56876639938457 + ], + [ + 1.4699890122965371, + 43.568607757592815 + ], + [ + 1.4701988500968355, + 43.568391445003016 + ], + [ + 1.4707975492769094, + 43.56870220288644 + ], + [ + 1.470556803334489, + 43.56894944082751 + ] ] ], "type": "Polygon" @@ -286,15 +752,42 @@ "geometry": { "coordinates": [ [ - [1.4700863706350447, 43.56811032992499], - [1.469938736003968, 43.56803629755606], - [1.4702461799896298, 43.567720133227084], - [1.4699983670576842, 43.56759451133419], - [1.4700750115827077, 43.56751744629773], - [1.4703186051377486, 43.567647805551616], - [1.4703993614309923, 43.56756522558362], - [1.4705432554910374, 43.567643018671475], - [1.4700863706350447, 43.56811032992499] + [ + 1.4700863706350447, + 43.56811032992499 + ], + [ + 1.469938736003968, + 43.56803629755606 + ], + [ + 1.4702461799896298, + 43.567720133227084 + ], + [ + 1.4699983670576842, + 43.56759451133419 + ], + [ + 1.4700750115827077, + 43.56751744629773 + ], + [ + 1.4703186051377486, + 43.567647805551616 + ], + [ + 1.4703993614309923, + 43.56756522558362 + ], + [ + 1.4705432554910374, + 43.567643018671475 + ], + [ + 1.4700863706350447, + 43.56811032992499 + ] ] ], "type": "Polygon" @@ -310,25 +803,82 @@ "geometry": { "coordinates": [ [ - [1.4692172469972604, 43.56844023133817], - [1.4690302477964963, 43.568343321608324], - [1.4691585244984822, 43.568213675413745], - [1.4691538069450587, 43.56819776314714], - [1.4687662114447164, 43.5679946106105], - [1.4687419705240359, 43.567997690869504], - [1.4686134366209274, 43.5681284349875], - [1.468508716125143, 43.568073172546946], - [1.4684794321244965, 43.56810498156062], - [1.468395058864445, 43.568061308319955], - [1.4686427171261016, 43.5678115071091], - [1.4686713528855364, 43.56782580766637], - [1.468752451183235, 43.567817509782856], - [1.4687726292060006, 43.56779371972871], - [1.4694117091423777, 43.568127910768226], - [1.4693899130114971, 43.568148896988106], - [1.4694062572902737, 43.56820860815358], - [1.4694357235645725, 43.568220939079765], - [1.4692172469972604, 43.56844023133817] + [ + 1.4692172469972604, + 43.56844023133817 + ], + [ + 1.4690302477964963, + 43.568343321608324 + ], + [ + 1.4691585244984822, + 43.568213675413745 + ], + [ + 1.4691538069450587, + 43.56819776314714 + ], + [ + 1.4687662114447164, + 43.5679946106105 + ], + [ + 1.4687419705240359, + 43.567997690869504 + ], + [ + 1.4686134366209274, + 43.5681284349875 + ], + [ + 1.468508716125143, + 43.568073172546946 + ], + [ + 1.4684794321244965, + 43.56810498156062 + ], + [ + 1.468395058864445, + 43.568061308319955 + ], + [ + 1.4686427171261016, + 43.5678115071091 + ], + [ + 1.4686713528855364, + 43.56782580766637 + ], + [ + 1.468752451183235, + 43.567817509782856 + ], + [ + 1.4687726292060006, + 43.56779371972871 + ], + [ + 1.4694117091423777, + 43.568127910768226 + ], + [ + 1.4693899130114971, + 43.568148896988106 + ], + [ + 1.4694062572902737, + 43.56820860815358 + ], + [ + 1.4694357235645725, + 43.568220939079765 + ], + [ + 1.4692172469972604, + 43.56844023133817 + ] ] ], "type": "Polygon" @@ -345,30 +895,102 @@ "geometry": { "coordinates": [ [ - [1.469490912075429, 43.57022628346135], - [1.4695650174136858, 43.57026435684202], - [1.4695487877031894, 43.57028153135954], - [1.4695818213533016, 43.57029721156181], - [1.4695568346110974, 43.57032281739805], - [1.4695679564698025, 43.57032965808091], - [1.4696563915750858, 43.57031883685494], - [1.4696672199398222, 43.57038067130878], - [1.4696450333524922, 43.57037983852794], - [1.4696398671326847, 43.57042491012902], - [1.4696181711544511, 43.57048390416426], - [1.4696053033635792, 43.570479306744204], - [1.4695804750512877, 43.570519847456495], - [1.4695553157966685, 43.57054788273601], - [1.4695367791341312, 43.57053777619785], - [1.469477067419831, 43.57058171350067], - [1.4694556526648626, 43.570569719056806], - [1.4694185817452308, 43.570485125437955], - [1.469392406896361, 43.57048707603846], - [1.469324699411544, 43.5705543827423], - [1.4692952759448872, 43.57053993412438], - [1.4692806203900375, 43.570554891618485], - [1.4692046407515704, 43.570514976235074], - [1.469490912075429, 43.57022628346135] + [ + 1.469490912075429, + 43.57022628346135 + ], + [ + 1.4695650174136858, + 43.57026435684202 + ], + [ + 1.4695487877031894, + 43.57028153135954 + ], + [ + 1.4695818213533016, + 43.57029721156181 + ], + [ + 1.4695568346110974, + 43.57032281739805 + ], + [ + 1.4695679564698025, + 43.57032965808091 + ], + [ + 1.4696563915750858, + 43.57031883685494 + ], + [ + 1.4696672199398222, + 43.57038067130878 + ], + [ + 1.4696450333524922, + 43.57037983852794 + ], + [ + 1.4696398671326847, + 43.57042491012902 + ], + [ + 1.4696181711544511, + 43.57048390416426 + ], + [ + 1.4696053033635792, + 43.570479306744204 + ], + [ + 1.4695804750512877, + 43.570519847456495 + ], + [ + 1.4695553157966685, + 43.57054788273601 + ], + [ + 1.4695367791341312, + 43.57053777619785 + ], + [ + 1.469477067419831, + 43.57058171350067 + ], + [ + 1.4694556526648626, + 43.570569719056806 + ], + [ + 1.4694185817452308, + 43.570485125437955 + ], + [ + 1.469392406896361, + 43.57048707603846 + ], + [ + 1.469324699411544, + 43.5705543827423 + ], + [ + 1.4692952759448872, + 43.57053993412438 + ], + [ + 1.4692806203900375, + 43.570554891618485 + ], + [ + 1.4692046407515704, + 43.570514976235074 + ], + [ + 1.469490912075429, + 43.57022628346135 + ] ] ], "type": "Polygon" @@ -376,23 +998,66 @@ }, { "type": "Feature", - "properties": { "name": "Résidence 4", "short_name": "R4", "height": 12 }, + "properties": { + "name": "Résidence 4", + "short_name": "R4", + "height": 12 + }, "geometry": { "coordinates": [ [ - [1.4683613151439943, 43.57340993918521], - [1.468361577883087, 43.57327318969695], - [1.4682799241763007, 43.57327704724409], - [1.4682772647076945, 43.57283265588603], - [1.4683436029655184, 43.572832900845384], - [1.468343727633453, 43.57280281485572], - [1.4684094584671072, 43.5728031219607], - [1.4684098384879292, 43.572827321212316], - [1.468413266698036, 43.57284273924046], - [1.4684012842327547, 43.57286751247139], - [1.4684830504942568, 43.572867266700456], - [1.4684936149294856, 43.57341020714395], - [1.4683613151439943, 43.57340993918521] + [ + 1.4683613151439943, + 43.57340993918521 + ], + [ + 1.468361577883087, + 43.57327318969695 + ], + [ + 1.4682799241763007, + 43.57327704724409 + ], + [ + 1.4682772647076945, + 43.57283265588603 + ], + [ + 1.4683436029655184, + 43.572832900845384 + ], + [ + 1.468343727633453, + 43.57280281485572 + ], + [ + 1.4684094584671072, + 43.5728031219607 + ], + [ + 1.4684098384879292, + 43.572827321212316 + ], + [ + 1.468413266698036, + 43.57284273924046 + ], + [ + 1.4684012842327547, + 43.57286751247139 + ], + [ + 1.4684830504942568, + 43.572867266700456 + ], + [ + 1.4684936149294856, + 43.57341020714395 + ], + [ + 1.4683613151439943, + 43.57340993918521 + ] ] ], "type": "Polygon" @@ -400,30 +1065,94 @@ }, { "type": "Feature", - "properties": { "name": "Résidence 7", "short_name": "R7", "height": 18 }, + "properties": { + "name": "Résidence 7", + "short_name": "R7", + "height": 18 + }, "geometry": { "coordinates": [ [ - [1.4689928543222948, 43.57312947604245], - [1.4688448359259212, 43.57305569239307], - [1.468868620684873, 43.57303183375538], - [1.468840143600886, 43.57301703023137], - [1.4691218335423741, 43.572733347642526], - [1.4691031575494549, 43.5727249687811], - [1.4691242892160687, 43.572702227561535], - [1.4691555797349167, 43.572717033037605], - [1.4691625500768168, 43.57271271853318], - [1.4691623865501242, 43.572562506710284], - [1.4692920511163265, 43.572562942898855], - [1.4692938095093666, 43.572541623852516], - [1.4693370323238923, 43.57254217539153], - [1.4693370825661702, 43.57258976968353], - [1.4693714812144947, 43.57258942054119], - [1.4693752639166462, 43.572913281078684], - [1.4693011432382832, 43.57291147534528], - [1.4692893921677808, 43.57292278886598], - [1.4692292983016557, 43.57289065870734], - [1.4689928543222948, 43.57312947604245] + [ + 1.4689928543222948, + 43.57312947604245 + ], + [ + 1.4688448359259212, + 43.57305569239307 + ], + [ + 1.468868620684873, + 43.57303183375538 + ], + [ + 1.468840143600886, + 43.57301703023137 + ], + [ + 1.4691218335423741, + 43.572733347642526 + ], + [ + 1.4691031575494549, + 43.5727249687811 + ], + [ + 1.4691242892160687, + 43.572702227561535 + ], + [ + 1.4691555797349167, + 43.572717033037605 + ], + [ + 1.4691625500768168, + 43.57271271853318 + ], + [ + 1.4691623865501242, + 43.572562506710284 + ], + [ + 1.4692920511163265, + 43.572562942898855 + ], + [ + 1.4692938095093666, + 43.572541623852516 + ], + [ + 1.4693370323238923, + 43.57254217539153 + ], + [ + 1.4693370825661702, + 43.57258976968353 + ], + [ + 1.4693714812144947, + 43.57258942054119 + ], + [ + 1.4693752639166462, + 43.572913281078684 + ], + [ + 1.4693011432382832, + 43.57291147534528 + ], + [ + 1.4692893921677808, + 43.57292278886598 + ], + [ + 1.4692292983016557, + 43.57289065870734 + ], + [ + 1.4689928543222948, + 43.57312947604245 + ] ] ], "type": "Polygon" @@ -431,29 +1160,90 @@ }, { "type": "Feature", - "properties": { "name": "Résidence 3", "short_name": "R3", "height": 21 }, + "properties": { + "name": "Résidence 3", + "short_name": "R3", + "height": 21 + }, "geometry": { "coordinates": [ [ - [1.4691608915918835, 43.57229708999341], - [1.4691561548851269, 43.57200207774966], - [1.4690799025374872, 43.57200270800911], - [1.4690792749863988, 43.57198887640706], - [1.4690228635158746, 43.571958001165314], - [1.4692803101921186, 43.57169873091266], - [1.4693532985284605, 43.57173659114494], - [1.4693793719041253, 43.57173460091266], - [1.4693887522399223, 43.57172178385321], - [1.4694202088702468, 43.57173826393415], - [1.4694473608000749, 43.57171290915204], - [1.469496042815166, 43.57174048459365], - [1.4693534170344265, 43.57188161476901], - [1.469353363987949, 43.57191865816034], - [1.4693672640823365, 43.57192441548116], - [1.4693690158851211, 43.572270027035955], - [1.4693347473600227, 43.5722697466131], - [1.4693339861251502, 43.572297227737494], - [1.4691608915918835, 43.57229708999341] + [ + 1.4691608915918835, + 43.57229708999341 + ], + [ + 1.4691561548851269, + 43.57200207774966 + ], + [ + 1.4690799025374872, + 43.57200270800911 + ], + [ + 1.4690792749863988, + 43.57198887640706 + ], + [ + 1.4690228635158746, + 43.571958001165314 + ], + [ + 1.4692803101921186, + 43.57169873091266 + ], + [ + 1.4693532985284605, + 43.57173659114494 + ], + [ + 1.4693793719041253, + 43.57173460091266 + ], + [ + 1.4693887522399223, + 43.57172178385321 + ], + [ + 1.4694202088702468, + 43.57173826393415 + ], + [ + 1.4694473608000749, + 43.57171290915204 + ], + [ + 1.469496042815166, + 43.57174048459365 + ], + [ + 1.4693534170344265, + 43.57188161476901 + ], + [ + 1.469353363987949, + 43.57191865816034 + ], + [ + 1.4693672640823365, + 43.57192441548116 + ], + [ + 1.4693690158851211, + 43.572270027035955 + ], + [ + 1.4693347473600227, + 43.5722697466131 + ], + [ + 1.4693339861251502, + 43.572297227737494 + ], + [ + 1.4691608915918835, + 43.57229708999341 + ] ] ], "type": "Polygon" @@ -470,11 +1260,26 @@ "geometry": { "coordinates": [ [ - [1.469002517501707, 43.57136506361658], - [1.469001840671467, 43.57130848753036], - [1.4690207905523494, 43.57130841035115], - [1.4690204800837137, 43.57136495580852], - [1.469002517501707, 43.57136506361658] + [ + 1.469002517501707, + 43.57136506361658 + ], + [ + 1.469001840671467, + 43.57130848753036 + ], + [ + 1.4690207905523494, + 43.57130841035115 + ], + [ + 1.4690204800837137, + 43.57136495580852 + ], + [ + 1.469002517501707, + 43.57136506361658 + ] ] ], "type": "Polygon" @@ -490,11 +1295,26 @@ "geometry": { "coordinates": [ [ - [1.4689172550997682, 43.57139676716605], - [1.4689159169172683, 43.57130242920917], - [1.4690014553219157, 43.571302594997576], - [1.4690024538884359, 43.57139718699233], - [1.4689172550997682, 43.57139676716605] + [ + 1.4689172550997682, + 43.57139676716605 + ], + [ + 1.4689159169172683, + 43.57130242920917 + ], + [ + 1.4690014553219157, + 43.571302594997576 + ], + [ + 1.4690024538884359, + 43.57139718699233 + ], + [ + 1.4689172550997682, + 43.57139676716605 + ] ] ], "type": "Polygon" @@ -502,17 +1322,42 @@ }, { "type": "Feature", - "properties": { "name": "IDK", "short_name": "IDK", "height": 3 }, + "properties": { + "name": "IDK", + "short_name": "IDK", + "height": 3 + }, "geometry": { "coordinates": [ [ - [1.4687776865714, 43.571397140347244], - [1.4687775107247774, 43.57136586343131], - [1.4687586449291814, 43.57136572585071], - [1.468757879695005, 43.571302603553164], - [1.4689159626066726, 43.57130239448804], - [1.4689174250125063, 43.571397284204465], - [1.4687776865714, 43.571397140347244] + [ + 1.4687776865714, + 43.571397140347244 + ], + [ + 1.4687775107247774, + 43.57136586343131 + ], + [ + 1.4687586449291814, + 43.57136572585071 + ], + [ + 1.468757879695005, + 43.571302603553164 + ], + [ + 1.4689159626066726, + 43.57130239448804 + ], + [ + 1.4689174250125063, + 43.571397284204465 + ], + [ + 1.4687776865714, + 43.571397140347244 + ] ] ], "type": "Polygon" @@ -520,15 +1365,34 @@ }, { "type": "Feature", - "properties": { "name": "Résidence 1", "short_name": "R1", "height": 18 }, + "properties": { + "name": "Résidence 1", + "short_name": "R1", + "height": 18 + }, "geometry": { "coordinates": [ [ - [1.4681837881526008, 43.57135899232321], - [1.4680571728146674, 43.57129275812292], - [1.468509584538765, 43.57083607988034], - [1.4686369517816331, 43.570902808338616], - [1.4681837881526008, 43.57135899232321] + [ + 1.4681837881526008, + 43.57135899232321 + ], + [ + 1.4680571728146674, + 43.57129275812292 + ], + [ + 1.468509584538765, + 43.57083607988034 + ], + [ + 1.4686369517816331, + 43.570902808338616 + ], + [ + 1.4681837881526008, + 43.57135899232321 + ] ] ], "type": "Polygon" @@ -545,13 +1409,34 @@ "geometry": { "coordinates": [ [ - [1.4670511894526044, 43.572302073098655], - [1.4673566333027566, 43.57246484486697], - [1.4672776630942508, 43.57254280752565], - [1.467009402297009, 43.572399653256326], - [1.4670743956718013, 43.57233660342919], - [1.4670371510122493, 43.57231571030621], - [1.4670511894526044, 43.572302073098655] + [ + 1.4670511894526044, + 43.572302073098655 + ], + [ + 1.4673566333027566, + 43.57246484486697 + ], + [ + 1.4672776630942508, + 43.57254280752565 + ], + [ + 1.467009402297009, + 43.572399653256326 + ], + [ + 1.4670743956718013, + 43.57233660342919 + ], + [ + 1.4670371510122493, + 43.57231571030621 + ], + [ + 1.4670511894526044, + 43.572302073098655 + ] ] ], "type": "Polygon" @@ -568,21 +1453,66 @@ "geometry": { "coordinates": [ [ - [1.4673566282526735, 43.57246544274071], - [1.4670514684245006, 43.57230207560866], - [1.4671294141083706, 43.5722244751538], - [1.4671744516259366, 43.57224767993307], - [1.4671871334761022, 43.572233719556834], - [1.4672610385704274, 43.572271886700776], - [1.4673180405510209, 43.572213158161304], - [1.4672557494732246, 43.57218092297802], - [1.4675598355503894, 43.57186857826093], - [1.4677104486631265, 43.571944368709495], - [1.4674069056088967, 43.572255316794894], - [1.4675847978380148, 43.57234679360289], - [1.46744703472649, 43.57248521913513], - [1.4673738172621142, 43.57244698048967], - [1.4673566282526735, 43.57246544274071] + [ + 1.4673566282526735, + 43.57246544274071 + ], + [ + 1.4670514684245006, + 43.57230207560866 + ], + [ + 1.4671294141083706, + 43.5722244751538 + ], + [ + 1.4671744516259366, + 43.57224767993307 + ], + [ + 1.4671871334761022, + 43.572233719556834 + ], + [ + 1.4672610385704274, + 43.572271886700776 + ], + [ + 1.4673180405510209, + 43.572213158161304 + ], + [ + 1.4672557494732246, + 43.57218092297802 + ], + [ + 1.4675598355503894, + 43.57186857826093 + ], + [ + 1.4677104486631265, + 43.571944368709495 + ], + [ + 1.4674069056088967, + 43.572255316794894 + ], + [ + 1.4675847978380148, + 43.57234679360289 + ], + [ + 1.46744703472649, + 43.57248521913513 + ], + [ + 1.4673738172621142, + 43.57244698048967 + ], + [ + 1.4673566282526735, + 43.57246544274071 + ] ] ], "type": "Polygon" @@ -599,27 +1529,90 @@ "geometry": { "coordinates": [ [ - [1.465072797400751, 43.57145419260243], - [1.4652324177260994, 43.57153776555447], - [1.4653259375905918, 43.57144467594168], - [1.4651669865018846, 43.571360693600866], - [1.465254641349162, 43.571270806140944], - [1.4655260137253379, 43.57140963465892], - [1.4654372707269658, 43.57150121938216], - [1.4653638104554148, 43.57146363099028], - [1.4652693746901946, 43.57155643239324], - [1.465859911506442, 43.57186453276], - [1.4658058550215571, 43.57191799393411], - [1.4658280188068034, 43.57192889033519], - [1.465792669965964, 43.571961255379165], - [1.4657724113977224, 43.57195171752136], - [1.4657357140789031, 43.571990303726494], - [1.4649501962577176, 43.57158052845023], - [1.4649831460449434, 43.57154451675254], - [1.4649635856216037, 43.57153471415518], - [1.4649962671863932, 43.571500385239915], - [1.4650178243069547, 43.57150998355607], - [1.465072797400751, 43.57145419260243] + [ + 1.465072797400751, + 43.57145419260243 + ], + [ + 1.4652324177260994, + 43.57153776555447 + ], + [ + 1.4653259375905918, + 43.57144467594168 + ], + [ + 1.4651669865018846, + 43.571360693600866 + ], + [ + 1.465254641349162, + 43.571270806140944 + ], + [ + 1.4655260137253379, + 43.57140963465892 + ], + [ + 1.4654372707269658, + 43.57150121938216 + ], + [ + 1.4653638104554148, + 43.57146363099028 + ], + [ + 1.4652693746901946, + 43.57155643239324 + ], + [ + 1.465859911506442, + 43.57186453276 + ], + [ + 1.4658058550215571, + 43.57191799393411 + ], + [ + 1.4658280188068034, + 43.57192889033519 + ], + [ + 1.465792669965964, + 43.571961255379165 + ], + [ + 1.4657724113977224, + 43.57195171752136 + ], + [ + 1.4657357140789031, + 43.571990303726494 + ], + [ + 1.4649501962577176, + 43.57158052845023 + ], + [ + 1.4649831460449434, + 43.57154451675254 + ], + [ + 1.4649635856216037, + 43.57153471415518 + ], + [ + 1.4649962671863932, + 43.571500385239915 + ], + [ + 1.4650178243069547, + 43.57150998355607 + ], + [ + 1.465072797400751, + 43.57145419260243 + ] ] ], "type": "Polygon" @@ -636,19 +1629,58 @@ "geometry": { "coordinates": [ [ - [1.4661786623695434, 43.57154106530305], - [1.465393820853052, 43.571129259111586], - [1.4654297881850766, 43.57109307719986], - [1.4654095461499708, 43.57108234419434], - [1.4654427220348794, 43.571051611505794], - [1.4654598897787139, 43.57106127483709], - [1.4655145234096096, 43.571005853122216], - [1.4663002551394868, 43.57141784305563], - [1.4662467834557162, 43.57147128496052], - [1.4662668776566363, 43.57148101143275], - [1.4662348350665297, 43.571511186853314], - [1.4662170909517727, 43.57150178560221], - [1.4661786623695434, 43.57154106530305] + [ + 1.4661786623695434, + 43.57154106530305 + ], + [ + 1.465393820853052, + 43.571129259111586 + ], + [ + 1.4654297881850766, + 43.57109307719986 + ], + [ + 1.4654095461499708, + 43.57108234419434 + ], + [ + 1.4654427220348794, + 43.571051611505794 + ], + [ + 1.4654598897787139, + 43.57106127483709 + ], + [ + 1.4655145234096096, + 43.571005853122216 + ], + [ + 1.4663002551394868, + 43.57141784305563 + ], + [ + 1.4662467834557162, + 43.57147128496052 + ], + [ + 1.4662668776566363, + 43.57148101143275 + ], + [ + 1.4662348350665297, + 43.571511186853314 + ], + [ + 1.4662170909517727, + 43.57150178560221 + ], + [ + 1.4661786623695434, + 43.57154106530305 + ] ] ], "type": "Polygon" @@ -665,13 +1697,34 @@ "geometry": { "coordinates": [ [ - [1.465960900800411, 43.571066457818375], - [1.465687580105822, 43.57092479973218], - [1.4657902901498119, 43.570818363307524], - [1.466016688981199, 43.570933918036246], - [1.4660358273823135, 43.57091639770229], - [1.4660841229466257, 43.57094102461963], - [1.465960900800411, 43.571066457818375] + [ + 1.465960900800411, + 43.571066457818375 + ], + [ + 1.465687580105822, + 43.57092479973218 + ], + [ + 1.4657902901498119, + 43.570818363307524 + ], + [ + 1.466016688981199, + 43.570933918036246 + ], + [ + 1.4660358273823135, + 43.57091639770229 + ], + [ + 1.4660841229466257, + 43.57094102461963 + ], + [ + 1.465960900800411, + 43.571066457818375 + ] ] ], "type": "Polygon" @@ -687,11 +1740,26 @@ "geometry": { "coordinates": [ [ - [1.464991010881704, 43.57230903860378], - [1.4644883816052072, 43.57204853489469], - [1.4647051389781325, 43.57182657393898], - [1.4652084456861871, 43.572088684922875], - [1.464991010881704, 43.57230903860378] + [ + 1.464991010881704, + 43.57230903860378 + ], + [ + 1.4644883816052072, + 43.57204853489469 + ], + [ + 1.4647051389781325, + 43.57182657393898 + ], + [ + 1.4652084456861871, + 43.572088684922875 + ], + [ + 1.464991010881704, + 43.57230903860378 + ] ] ], "type": "Polygon" @@ -699,35 +1767,114 @@ }, { "type": "Feature", - "properties": { "name": "Hall bio5", "short_name": "", "height": 13.7 }, + "properties": { + "name": "Hall bio5", + "short_name": "", + "height": 13.7 + }, "geometry": { "coordinates": [ [ - [1.4649492956472159, 43.57243707743643], - [1.4648619019474154, 43.572389103116166], - [1.464887727070618, 43.57236341360826], - [1.4648756800157514, 43.57235684552532], - [1.4648815900826833, 43.57234950395073], - [1.4648420900841472, 43.572330143341986], - [1.4648296545994128, 43.572344180303304], - [1.4648504009018666, 43.572352694950695], - [1.4648011955259221, 43.57241410646904], - [1.4646856769663543, 43.57237132091237], - [1.4647316700565511, 43.5723059831104], - [1.464769465028695, 43.57232161785248], - [1.4647866421180424, 43.57230177714899], - [1.4647476952296472, 43.57228023248834], - [1.4647427448297492, 43.572287475886725], - [1.464727547735862, 43.572279811781556], - [1.4647031565985742, 43.57230783663374], - [1.4646134868048364, 43.57225956978334], - [1.464704769398054, 43.57216796914045], - [1.4650428363723051, 43.57234701890346], - [1.4650102203072777, 43.57237553065062], - [1.4650185019674495, 43.57238035652921], - [1.4650071616689786, 43.572394990577465], - [1.4649941439191423, 43.57239348584616], - [1.4649492956472159, 43.57243707743643] + [ + 1.4649492956472159, + 43.57243707743643 + ], + [ + 1.4648619019474154, + 43.572389103116166 + ], + [ + 1.464887727070618, + 43.57236341360826 + ], + [ + 1.4648756800157514, + 43.57235684552532 + ], + [ + 1.4648815900826833, + 43.57234950395073 + ], + [ + 1.4648420900841472, + 43.572330143341986 + ], + [ + 1.4648296545994128, + 43.572344180303304 + ], + [ + 1.4648504009018666, + 43.572352694950695 + ], + [ + 1.4648011955259221, + 43.57241410646904 + ], + [ + 1.4646856769663543, + 43.57237132091237 + ], + [ + 1.4647316700565511, + 43.5723059831104 + ], + [ + 1.464769465028695, + 43.57232161785248 + ], + [ + 1.4647866421180424, + 43.57230177714899 + ], + [ + 1.4647476952296472, + 43.57228023248834 + ], + [ + 1.4647427448297492, + 43.572287475886725 + ], + [ + 1.464727547735862, + 43.572279811781556 + ], + [ + 1.4647031565985742, + 43.57230783663374 + ], + [ + 1.4646134868048364, + 43.57225956978334 + ], + [ + 1.464704769398054, + 43.57216796914045 + ], + [ + 1.4650428363723051, + 43.57234701890346 + ], + [ + 1.4650102203072777, + 43.57237553065062 + ], + [ + 1.4650185019674495, + 43.57238035652921 + ], + [ + 1.4650071616689786, + 43.572394990577465 + ], + [ + 1.4649941439191423, + 43.57239348584616 + ], + [ + 1.4649492956472159, + 43.57243707743643 + ] ] ], "type": "Polygon" @@ -744,11 +1891,26 @@ "geometry": { "coordinates": [ [ - [1.465173231997511, 43.572405532318356], - [1.465390038759523, 43.57218393801651], - [1.4657930570455164, 43.57239471603663], - [1.4655750456870464, 43.57261469186835], - [1.465173231997511, 43.572405532318356] + [ + 1.465173231997511, + 43.572405532318356 + ], + [ + 1.465390038759523, + 43.57218393801651 + ], + [ + 1.4657930570455164, + 43.57239471603663 + ], + [ + 1.4655750456870464, + 43.57261469186835 + ], + [ + 1.465173231997511, + 43.572405532318356 + ] ] ], "type": "Polygon" @@ -763,15 +1925,42 @@ "geometry": { "coordinates": [ [ - [1.4660808755718904, 43.57289392700244], - [1.4660156694627915, 43.57286059317238], - [1.4660299212444556, 43.57284758019259], - [1.4657762063565656, 43.57271691446138], - [1.4659903828032839, 43.57249638110545], - [1.4662918272833565, 43.57265210051375], - [1.4661155344265069, 43.572832453009624], - [1.4661337904874472, 43.5728416597087], - [1.4660808755718904, 43.57289392700244] + [ + 1.4660808755718904, + 43.57289392700244 + ], + [ + 1.4660156694627915, + 43.57286059317238 + ], + [ + 1.4660299212444556, + 43.57284758019259 + ], + [ + 1.4657762063565656, + 43.57271691446138 + ], + [ + 1.4659903828032839, + 43.57249638110545 + ], + [ + 1.4662918272833565, + 43.57265210051375 + ], + [ + 1.4661155344265069, + 43.572832453009624 + ], + [ + 1.4661337904874472, + 43.5728416597087 + ], + [ + 1.4660808755718904, + 43.57289392700244 + ] ] ], "type": "Polygon" @@ -779,19 +1968,49 @@ }, { "type": "Feature", - "properties": { "name": "TWB", "height": 9.3 }, + "properties": { + "name": "TWB", + "height": 9.3 + }, "geometry": { "coordinates": [ [ - [1.4667790220126165, 43.573381554488236], - [1.4662402448018668, 43.57310027157504], - [1.4665555394401508, 43.57278650216381], - [1.466754680305968, 43.57289307062024], - [1.4667840988431067, 43.572861373355835], - [1.4668504791314092, 43.57289525663802], - [1.4668187976302818, 43.57292913990116], - [1.467089381210343, 43.57306820313613], - [1.4667790220126165, 43.573381554488236] + [ + 1.4667790220126165, + 43.573381554488236 + ], + [ + 1.4662402448018668, + 43.57310027157504 + ], + [ + 1.4665555394401508, + 43.57278650216381 + ], + [ + 1.466754680305968, + 43.57289307062024 + ], + [ + 1.4667840988431067, + 43.572861373355835 + ], + [ + 1.4668504791314092, + 43.57289525663802 + ], + [ + 1.4668187976302818, + 43.57292913990116 + ], + [ + 1.467089381210343, + 43.57306820313613 + ], + [ + 1.4667790220126165, + 43.573381554488236 + ] ] ], "type": "Polygon" @@ -808,11 +2027,26 @@ "geometry": { "coordinates": [ [ - [1.4660763534338344, 43.57210546251159], - [1.4662304004947657, 43.572182764900674], - [1.466074694559353, 43.572341349594296], - [1.4659222410874975, 43.572261324181], - [1.4660763534338344, 43.57210546251159] + [ + 1.4660763534338344, + 43.57210546251159 + ], + [ + 1.4662304004947657, + 43.572182764900674 + ], + [ + 1.466074694559353, + 43.572341349594296 + ], + [ + 1.4659222410874975, + 43.572261324181 + ], + [ + 1.4660763534338344, + 43.57210546251159 + ] ] ], "type": "Polygon" @@ -828,13 +2062,34 @@ "geometry": { "coordinates": [ [ - [1.4672750420205887, 43.57112508248565], - [1.4667116697185634, 43.57169718309038], - [1.4666678097752026, 43.57167255585233], - [1.4661885269652828, 43.5721623419351], - [1.466048479126556, 43.57208994194724], - [1.4670888906692028, 43.57102942553689], - [1.4672750420205887, 43.57112508248565] + [ + 1.4672750420205887, + 43.57112508248565 + ], + [ + 1.4667116697185634, + 43.57169718309038 + ], + [ + 1.4666678097752026, + 43.57167255585233 + ], + [ + 1.4661885269652828, + 43.5721623419351 + ], + [ + 1.466048479126556, + 43.57208994194724 + ], + [ + 1.4670888906692028, + 43.57102942553689 + ], + [ + 1.4672750420205887, + 43.57112508248565 + ] ] ], "type": "Polygon" @@ -842,33 +2097,106 @@ }, { "type": "Feature", - "properties": { "name": "Résidence 2", "short_name": "R2", "height": 21 }, + "properties": { + "name": "Résidence 2", + "short_name": "R2", + "height": 21 + }, "geometry": { "coordinates": [ [ - [1.4691548261369292, 43.57151204154812], - [1.469151020125281, 43.571215127557906], - [1.4690738125439395, 43.571215384155465], - [1.4690734583809615, 43.571202297671505], - [1.4690139589609714, 43.571170222942584], - [1.469273257353251, 43.57090994629286], - [1.4693519017169194, 43.57094893229717], - [1.469371414980003, 43.570948075462155], - [1.4693850151326728, 43.57093479451825], - [1.4694193111712934, 43.570952359637204], - [1.4694417809891434, 43.57092922508923], - [1.4694890858697818, 43.57095450172437], - [1.4693474251876637, 43.57109719104517], - [1.469348500686607, 43.571134074141355], - [1.4693617651821285, 43.571140567642146], - [1.4693639576852604, 43.57149868257383], - [1.4693940415750149, 43.571497627918035], - [1.4693916154538442, 43.57156618051741], - [1.469246952206987, 43.57157010053592], - [1.469246048251165, 43.57152645517428], - [1.4692994228922203, 43.571526806726354], - [1.4692994228922203, 43.571512393099795], - [1.4691548261369292, 43.57151204154812] + [ + 1.4691548261369292, + 43.57151204154812 + ], + [ + 1.469151020125281, + 43.571215127557906 + ], + [ + 1.4690738125439395, + 43.571215384155465 + ], + [ + 1.4690734583809615, + 43.571202297671505 + ], + [ + 1.4690139589609714, + 43.571170222942584 + ], + [ + 1.469273257353251, + 43.57090994629286 + ], + [ + 1.4693519017169194, + 43.57094893229717 + ], + [ + 1.469371414980003, + 43.570948075462155 + ], + [ + 1.4693850151326728, + 43.57093479451825 + ], + [ + 1.4694193111712934, + 43.570952359637204 + ], + [ + 1.4694417809891434, + 43.57092922508923 + ], + [ + 1.4694890858697818, + 43.57095450172437 + ], + [ + 1.4693474251876637, + 43.57109719104517 + ], + [ + 1.469348500686607, + 43.571134074141355 + ], + [ + 1.4693617651821285, + 43.571140567642146 + ], + [ + 1.4693639576852604, + 43.57149868257383 + ], + [ + 1.4693940415750149, + 43.571497627918035 + ], + [ + 1.4693916154538442, + 43.57156618051741 + ], + [ + 1.469246952206987, + 43.57157010053592 + ], + [ + 1.469246048251165, + 43.57152645517428 + ], + [ + 1.4692994228922203, + 43.571526806726354 + ], + [ + 1.4692994228922203, + 43.571512393099795 + ], + [ + 1.4691548261369292, + 43.57151204154812 + ] ] ], "type": "Polygon" @@ -885,17 +2213,50 @@ "geometry": { "coordinates": [ [ - [1.4688460220451702, 43.5703509645102], - [1.468819917214546, 43.570336501092754], - [1.468794580172613, 43.57036209021345], - [1.4686074233084696, 43.5702657197472], - [1.468631964221231, 43.570239674890985], - [1.4685763151086348, 43.57020987355162], - [1.4687688200070852, 43.57001522213778], - [1.4685045108459178, 43.569877426330976], - [1.4686761655047462, 43.56970147122678], - [1.469211611000759, 43.569981303199114], - [1.4688460220451702, 43.5703509645102] + [ + 1.4688460220451702, + 43.5703509645102 + ], + [ + 1.468819917214546, + 43.570336501092754 + ], + [ + 1.468794580172613, + 43.57036209021345 + ], + [ + 1.4686074233084696, + 43.5702657197472 + ], + [ + 1.468631964221231, + 43.570239674890985 + ], + [ + 1.4685763151086348, + 43.57020987355162 + ], + [ + 1.4687688200070852, + 43.57001522213778 + ], + [ + 1.4685045108459178, + 43.569877426330976 + ], + [ + 1.4686761655047462, + 43.56970147122678 + ], + [ + 1.469211611000759, + 43.569981303199114 + ], + [ + 1.4688460220451702, + 43.5703509645102 + ] ] ], "type": "Polygon" @@ -911,11 +2272,26 @@ "geometry": { "coordinates": [ [ - [1.468658722773597, 43.57218777216994], - [1.4686611289760663, 43.572041334011914], - [1.4689763414799017, 43.57204656395203], - [1.4689727321769226, 43.57219125878862], - [1.468658722773597, 43.57218777216994] + [ + 1.468658722773597, + 43.57218777216994 + ], + [ + 1.4686611289760663, + 43.572041334011914 + ], + [ + 1.4689763414799017, + 43.57204656395203 + ], + [ + 1.4689727321769226, + 43.57219125878862 + ], + [ + 1.468658722773597, + 43.57218777216994 + ] ] ], "type": "Polygon" @@ -931,15 +2307,42 @@ "geometry": { "coordinates": [ [ - [1.4686543650473425, 43.57232454804637], - [1.4686552539396587, 43.57229943179183], - [1.4686356983220037, 43.57230007579855], - [1.4686365872131546, 43.572229879032705], - [1.4689548104477694, 43.57223116704753], - [1.4689530326642455, 43.57229621175833], - [1.468935254830086, 43.57229621175833], - [1.468935254830086, 43.57232519205277], - [1.4686543650473425, 43.57232454804637] + [ + 1.4686543650473425, + 43.57232454804637 + ], + [ + 1.4686552539396587, + 43.57229943179183 + ], + [ + 1.4686356983220037, + 43.57230007579855 + ], + [ + 1.4686365872131546, + 43.572229879032705 + ], + [ + 1.4689548104477694, + 43.57223116704753 + ], + [ + 1.4689530326642455, + 43.57229621175833 + ], + [ + 1.468935254830086, + 43.57229621175833 + ], + [ + 1.468935254830086, + 43.57232519205277 + ], + [ + 1.4686543650473425, + 43.57232454804637 + ] ] ], "type": "Polygon" @@ -955,15 +2358,42 @@ "geometry": { "coordinates": [ [ - [1.4687611325545618, 43.57254032042974], - [1.4687601453008483, 43.572513855542326], - [1.4687404002407334, 43.572514570809744], - [1.4687413874931963, 43.57244733563914], - [1.469059282965219, 43.572444474566254], - [1.469058295711477, 43.572513855542326], - [1.46904052515751, 43.57251242500749], - [1.46904052515751, 43.57254032042974], - [1.4687611325545618, 43.57254032042974] + [ + 1.4687611325545618, + 43.57254032042974 + ], + [ + 1.4687601453008483, + 43.572513855542326 + ], + [ + 1.4687404002407334, + 43.572514570809744 + ], + [ + 1.4687413874931963, + 43.57244733563914 + ], + [ + 1.469059282965219, + 43.572444474566254 + ], + [ + 1.469058295711477, + 43.572513855542326 + ], + [ + 1.46904052515751, + 43.57251242500749 + ], + [ + 1.46904052515751, + 43.57254032042974 + ], + [ + 1.4687611325545618, + 43.57254032042974 + ] ] ], "type": "Polygon" @@ -980,11 +2410,26 @@ "geometry": { "coordinates": [ [ - [1.470777021160444, 43.568315847164854], - [1.4704135681352284, 43.56812823860483], - [1.4706756783485844, 43.56786640931284], - [1.4710373868683178, 43.568056596472786], - [1.470777021160444, 43.568315847164854] + [ + 1.470777021160444, + 43.568315847164854 + ], + [ + 1.4704135681352284, + 43.56812823860483 + ], + [ + 1.4706756783485844, + 43.56786640931284 + ], + [ + 1.4710373868683178, + 43.568056596472786 + ], + [ + 1.470777021160444, + 43.568315847164854 + ] ] ], "type": "Polygon" @@ -1000,21 +2445,66 @@ "geometry": { "coordinates": [ [ - [1.4659815568585657, 43.57015445162551], - [1.4653614974729123, 43.56983170088213], - [1.4654827629952933, 43.569708893674544], - [1.4655928712043078, 43.56976650661821], - [1.4657090064875717, 43.56964793008876], - [1.4655630587222959, 43.569572089387464], - [1.4658916187624413, 43.56923880029953], - [1.465990987165128, 43.569290174569886], - [1.465964316873908, 43.569317500240174], - [1.4664466341962736, 43.56956829820601], - [1.4664708824838897, 43.569542005137265], - [1.4666176133629847, 43.56961781170179], - [1.4664726690363636, 43.569764820977696], - [1.4664009642860947, 43.569727926506545], - [1.4659815568585657, 43.57015445162551] + [ + 1.4659815568585657, + 43.57015445162551 + ], + [ + 1.4653614974729123, + 43.56983170088213 + ], + [ + 1.4654827629952933, + 43.569708893674544 + ], + [ + 1.4655928712043078, + 43.56976650661821 + ], + [ + 1.4657090064875717, + 43.56964793008876 + ], + [ + 1.4655630587222959, + 43.569572089387464 + ], + [ + 1.4658916187624413, + 43.56923880029953 + ], + [ + 1.465990987165128, + 43.569290174569886 + ], + [ + 1.465964316873908, + 43.569317500240174 + ], + [ + 1.4664466341962736, + 43.56956829820601 + ], + [ + 1.4664708824838897, + 43.569542005137265 + ], + [ + 1.4666176133629847, + 43.56961781170179 + ], + [ + 1.4664726690363636, + 43.569764820977696 + ], + [ + 1.4664009642860947, + 43.569727926506545 + ], + [ + 1.4659815568585657, + 43.57015445162551 + ] ] ], "type": "Polygon" @@ -1031,25 +2521,82 @@ "geometry": { "coordinates": [ [ - [1.4652059312881534, 43.56927817758316], - [1.4652771673482192, 43.568758514443786], - [1.4652755558664978, 43.56872840618527], - [1.4652544334708466, 43.56870350650166], - [1.465223420429254, 43.56867909265526], - [1.4646255192470505, 43.56839084533405], - [1.464712314320849, 43.56829975883787], - [1.4653006789741596, 43.56860675768283], - [1.465345160733733, 43.56862148311032], - [1.4653789055171274, 43.56862148311032], - [1.4654214699606314, 43.56861453715484], - [1.46607538873522, 43.56839810804419], - [1.466127932900008, 43.56848780947897], - [1.4654728965006427, 43.56870471964285], - [1.4654398971509863, 43.568723550434584], - [1.4654222191203132, 43.568746804851486], - [1.465410664955641, 43.568773267547044], - [1.4653414365754713, 43.569288422369], - [1.4652059312881534, 43.56927817758316] + [ + 1.4652059312881534, + 43.56927817758316 + ], + [ + 1.4652771673482192, + 43.568758514443786 + ], + [ + 1.4652755558664978, + 43.56872840618527 + ], + [ + 1.4652544334708466, + 43.56870350650166 + ], + [ + 1.465223420429254, + 43.56867909265526 + ], + [ + 1.4646255192470505, + 43.56839084533405 + ], + [ + 1.464712314320849, + 43.56829975883787 + ], + [ + 1.4653006789741596, + 43.56860675768283 + ], + [ + 1.465345160733733, + 43.56862148311032 + ], + [ + 1.4653789055171274, + 43.56862148311032 + ], + [ + 1.4654214699606314, + 43.56861453715484 + ], + [ + 1.46607538873522, + 43.56839810804419 + ], + [ + 1.466127932900008, + 43.56848780947897 + ], + [ + 1.4654728965006427, + 43.56870471964285 + ], + [ + 1.4654398971509863, + 43.568723550434584 + ], + [ + 1.4654222191203132, + 43.568746804851486 + ], + [ + 1.465410664955641, + 43.568773267547044 + ], + [ + 1.4653414365754713, + 43.569288422369 + ], + [ + 1.4652059312881534, + 43.56927817758316 + ] ] ], "type": "Polygon" @@ -1066,48 +2613,174 @@ "geometry": { "coordinates": [ [ - [1.4660884641955931, 43.56818945308683], - [1.466104826801086, 43.568061086312355], - [1.4662136127645624, 43.56806870683005], - [1.4662085438606312, 43.56811158752487], - [1.4662950720631898, 43.56811711608097], - [1.4663518059319074, 43.567656057446555], - [1.4663389515439178, 43.56763399603204], - [1.4663103818369336, 43.567609291603134], - [1.4657264140986683, 43.567307131467174], - [1.4658083877701813, 43.567225436994505], - [1.4658738492346686, 43.56726049947389], - [1.4659239711075998, 43.56721086960954], - [1.465856324727639, 43.56717703405087], - [1.465923595978694, 43.56711073511656], - [1.4660674528012407, 43.56718260848436], - [1.466000185333968, 43.5672504945866], - [1.4659509497322176, 43.567224337511504], - [1.4658997105244964, 43.567272987631725], - [1.466391051942992, 43.567529341536044], - [1.466421349302749, 43.56754073057445], - [1.4664574964445762, 43.56754790037698], - [1.466491712936886, 43.56754242881479], - [1.4670391792810733, 43.56735551119297], - [1.4670046821341884, 43.56730053080719], - [1.466953646072085, 43.5673171448928], - [1.4669052024668758, 43.56724309292099], - [1.4670690050857047, 43.56718633987646], - [1.4671164215722001, 43.5672634019449], - [1.467037479687491, 43.56728988157391], - [1.467070578416724, 43.56734506929624], - [1.4671494059136592, 43.56731835274954], - [1.4672068818071864, 43.56741201543883], - [1.4665552336251721, 43.567628078660476], - [1.4665177353948593, 43.567652692913924], - [1.4664994087501668, 43.56767440518411], - [1.4664885026903107, 43.567705321286894], - [1.4664202579607206, 43.56821112285948], - [1.4662840888136373, 43.56820222809634], - [1.4662913051841429, 43.56814203989572], - [1.4662053724041755, 43.568136075368585], - [1.4661975243632241, 43.56819663093211], - [1.4660884641955931, 43.56818945308683] + [ + 1.4660884641955931, + 43.56818945308683 + ], + [ + 1.466104826801086, + 43.568061086312355 + ], + [ + 1.4662136127645624, + 43.56806870683005 + ], + [ + 1.4662085438606312, + 43.56811158752487 + ], + [ + 1.4662950720631898, + 43.56811711608097 + ], + [ + 1.4663518059319074, + 43.567656057446555 + ], + [ + 1.4663389515439178, + 43.56763399603204 + ], + [ + 1.4663103818369336, + 43.567609291603134 + ], + [ + 1.4657264140986683, + 43.567307131467174 + ], + [ + 1.4658083877701813, + 43.567225436994505 + ], + [ + 1.4658738492346686, + 43.56726049947389 + ], + [ + 1.4659239711075998, + 43.56721086960954 + ], + [ + 1.465856324727639, + 43.56717703405087 + ], + [ + 1.465923595978694, + 43.56711073511656 + ], + [ + 1.4660674528012407, + 43.56718260848436 + ], + [ + 1.466000185333968, + 43.5672504945866 + ], + [ + 1.4659509497322176, + 43.567224337511504 + ], + [ + 1.4658997105244964, + 43.567272987631725 + ], + [ + 1.466391051942992, + 43.567529341536044 + ], + [ + 1.466421349302749, + 43.56754073057445 + ], + [ + 1.4664574964445762, + 43.56754790037698 + ], + [ + 1.466491712936886, + 43.56754242881479 + ], + [ + 1.4670391792810733, + 43.56735551119297 + ], + [ + 1.4670046821341884, + 43.56730053080719 + ], + [ + 1.466953646072085, + 43.5673171448928 + ], + [ + 1.4669052024668758, + 43.56724309292099 + ], + [ + 1.4670690050857047, + 43.56718633987646 + ], + [ + 1.4671164215722001, + 43.5672634019449 + ], + [ + 1.467037479687491, + 43.56728988157391 + ], + [ + 1.467070578416724, + 43.56734506929624 + ], + [ + 1.4671494059136592, + 43.56731835274954 + ], + [ + 1.4672068818071864, + 43.56741201543883 + ], + [ + 1.4665552336251721, + 43.567628078660476 + ], + [ + 1.4665177353948593, + 43.567652692913924 + ], + [ + 1.4664994087501668, + 43.56767440518411 + ], + [ + 1.4664885026903107, + 43.567705321286894 + ], + [ + 1.4664202579607206, + 43.56821112285948 + ], + [ + 1.4662840888136373, + 43.56820222809634 + ], + [ + 1.4662913051841429, + 43.56814203989572 + ], + [ + 1.4662053724041755, + 43.568136075368585 + ], + [ + 1.4661975243632241, + 43.56819663093211 + ], + [ + 1.4660884641955931, + 43.56818945308683 + ] ] ], "type": "Polygon" @@ -1123,30 +2796,102 @@ "geometry": { "coordinates": [ [ - [1.464329854169904, 43.571950139444], - [1.4640449063722087, 43.571801420025395], - [1.46397134881812, 43.571876327236964], - [1.4638249399895642, 43.57179942737292], - [1.463898645992856, 43.57172486372917], - [1.4638502579955173, 43.57169902119804], - [1.4642098225365316, 43.571335377347964], - [1.4644283262586555, 43.57144993399976], - [1.4645197190804424, 43.571358043022485], - [1.464139107766755, 43.57115980320398], - [1.4640928396617028, 43.57120668556615], - [1.4638877957212628, 43.5710998492529], - [1.4640599679144373, 43.5709254151011], - [1.464110061065071, 43.570952915896584], - [1.4641451779136787, 43.570955722099825], - [1.464176938004158, 43.5709654502686], - [1.4641983696093064, 43.570983409961485], - [1.4642099891544262, 43.571003427529774], - [1.4647907343973259, 43.57130767498563], - [1.4646671934806363, 43.5714330625207], - [1.464640539028693, 43.57141945940299], - [1.4645497318657874, 43.571512679100124], - [1.4646902903338912, 43.57158643434937], - [1.464329854169904, 43.571950139444] + [ + 1.464329854169904, + 43.571950139444 + ], + [ + 1.4640449063722087, + 43.571801420025395 + ], + [ + 1.46397134881812, + 43.571876327236964 + ], + [ + 1.4638249399895642, + 43.57179942737292 + ], + [ + 1.463898645992856, + 43.57172486372917 + ], + [ + 1.4638502579955173, + 43.57169902119804 + ], + [ + 1.4642098225365316, + 43.571335377347964 + ], + [ + 1.4644283262586555, + 43.57144993399976 + ], + [ + 1.4645197190804424, + 43.571358043022485 + ], + [ + 1.464139107766755, + 43.57115980320398 + ], + [ + 1.4640928396617028, + 43.57120668556615 + ], + [ + 1.4638877957212628, + 43.5710998492529 + ], + [ + 1.4640599679144373, + 43.5709254151011 + ], + [ + 1.464110061065071, + 43.570952915896584 + ], + [ + 1.4641451779136787, + 43.570955722099825 + ], + [ + 1.464176938004158, + 43.5709654502686 + ], + [ + 1.4641983696093064, + 43.570983409961485 + ], + [ + 1.4642099891544262, + 43.571003427529774 + ], + [ + 1.4647907343973259, + 43.57130767498563 + ], + [ + 1.4646671934806363, + 43.5714330625207 + ], + [ + 1.464640539028693, + 43.57141945940299 + ], + [ + 1.4645497318657874, + 43.571512679100124 + ], + [ + 1.4646902903338912, + 43.57158643434937 + ], + [ + 1.464329854169904, + 43.571950139444 + ] ] ], "type": "Polygon" @@ -1154,21 +2899,56 @@ }, { "type": "Feature", - "properties": { "height": 4.4 }, + "properties": { + "height": 4.4 + }, "geometry": { "coordinates": [ [ - [1.4685297264329904, 43.568859980621994], - [1.468407708647021, 43.56879754124512], - [1.4685133113986524, 43.56868798409482], - [1.4684678814834342, 43.568664541938006], - [1.4685119228338692, 43.56861871343267], - [1.4686209763518434, 43.56867408236974], - [1.4686528275841226, 43.568641044708414], - [1.4687001272454552, 43.56866551690638], - [1.468582063040202, 43.56878789381349], - [1.4685941329814511, 43.568793845437455], - [1.4685297264329904, 43.568859980621994] + [ + 1.4685297264329904, + 43.568859980621994 + ], + [ + 1.468407708647021, + 43.56879754124512 + ], + [ + 1.4685133113986524, + 43.56868798409482 + ], + [ + 1.4684678814834342, + 43.568664541938006 + ], + [ + 1.4685119228338692, + 43.56861871343267 + ], + [ + 1.4686209763518434, + 43.56867408236974 + ], + [ + 1.4686528275841226, + 43.568641044708414 + ], + [ + 1.4687001272454552, + 43.56866551690638 + ], + [ + 1.468582063040202, + 43.56878789381349 + ], + [ + 1.4685941329814511, + 43.568793845437455 + ], + [ + 1.4685297264329904, + 43.568859980621994 + ] ] ], "type": "Polygon" @@ -1176,18 +2956,44 @@ }, { "type": "Feature", - "properties": { "height": 4.7 }, + "properties": { + "height": 4.7 + }, "geometry": { "coordinates": [ [ - [1.4680022742402628, 43.56907660293419], - [1.4679957660217724, 43.56903165404211], - [1.4682370711949773, 43.56901733435373], - [1.468232712605328, 43.568979438426936], - [1.4683740314924876, 43.56898211057671], - [1.4683703161872188, 43.569064153302946], - [1.4682955496109287, 43.5690573514766], - [1.4680022742402628, 43.56907660293419] + [ + 1.4680022742402628, + 43.56907660293419 + ], + [ + 1.4679957660217724, + 43.56903165404211 + ], + [ + 1.4682370711949773, + 43.56901733435373 + ], + [ + 1.468232712605328, + 43.568979438426936 + ], + [ + 1.4683740314924876, + 43.56898211057671 + ], + [ + 1.4683703161872188, + 43.569064153302946 + ], + [ + 1.4682955496109287, + 43.5690573514766 + ], + [ + 1.4680022742402628, + 43.56907660293419 + ] ] ], "type": "Polygon" @@ -1195,16 +3001,36 @@ }, { "type": "Feature", - "properties": { "height": 4.1 }, + "properties": { + "height": 4.1 + }, "geometry": { "coordinates": [ [ - [1.4679232079615474, 43.56908754093999], - [1.4677339028045822, 43.56910888923693], - [1.4677045661434533, 43.56903747007894], - [1.4677689391599245, 43.56905994040113], - [1.4679141161652751, 43.569041610489336], - [1.4679232079615474, 43.56908754093999] + [ + 1.4679232079615474, + 43.56908754093999 + ], + [ + 1.4677339028045822, + 43.56910888923693 + ], + [ + 1.4677045661434533, + 43.56903747007894 + ], + [ + 1.4677689391599245, + 43.56905994040113 + ], + [ + 1.4679141161652751, + 43.569041610489336 + ], + [ + 1.4679232079615474, + 43.56908754093999 + ] ] ], "type": "Polygon" @@ -1212,25 +3038,72 @@ }, { "type": "Feature", - "properties": { "height": 5.3 }, + "properties": { + "height": 5.3 + }, "geometry": { "coordinates": [ [ - [1.4675318979190592, 43.568724093009536], - [1.46748876607964, 43.568656761828265], - [1.4675063680763003, 43.5686511745765], - [1.467498321449682, 43.56863817814093], - [1.4675328964582093, 43.5686266645032], - [1.4675166355661418, 43.56860042869397], - [1.4676458845129332, 43.568556702320194], - [1.4676740625050684, 43.56860054780867], - [1.467658304526907, 43.56860637798914], - [1.4676968507753827, 43.568665518433875], - [1.4676589645729337, 43.56867839340171], - [1.4676482357371015, 43.56866284627009], - [1.467590906517188, 43.56868218865483], - [1.4676028088195494, 43.56870065086676], - [1.4675318979190592, 43.568724093009536] + [ + 1.4675318979190592, + 43.568724093009536 + ], + [ + 1.46748876607964, + 43.568656761828265 + ], + [ + 1.4675063680763003, + 43.5686511745765 + ], + [ + 1.467498321449682, + 43.56863817814093 + ], + [ + 1.4675328964582093, + 43.5686266645032 + ], + [ + 1.4675166355661418, + 43.56860042869397 + ], + [ + 1.4676458845129332, + 43.568556702320194 + ], + [ + 1.4676740625050684, + 43.56860054780867 + ], + [ + 1.467658304526907, + 43.56860637798914 + ], + [ + 1.4676968507753827, + 43.568665518433875 + ], + [ + 1.4676589645729337, + 43.56867839340171 + ], + [ + 1.4676482357371015, + 43.56866284627009 + ], + [ + 1.467590906517188, + 43.56868218865483 + ], + [ + 1.4676028088195494, + 43.56870065086676 + ], + [ + 1.4675318979190592, + 43.568724093009536 + ] ] ], "type": "Polygon" @@ -1238,15 +3111,32 @@ }, { "type": "Feature", - "properties": { "height": 6 }, + "properties": { + "height": 6 + }, "geometry": { "coordinates": [ [ - [1.4663325230153816, 43.571268895183806], - [1.4660092832303633, 43.57109860984849], - [1.4661271742887436, 43.570986630418645], - [1.4664508007951724, 43.57115204837379], - [1.4663325230153816, 43.571268895183806] + [ + 1.4663325230153816, + 43.571268895183806 + ], + [ + 1.4660092832303633, + 43.57109860984849 + ], + [ + 1.4661271742887436, + 43.570986630418645 + ], + [ + 1.4664508007951724, + 43.57115204837379 + ], + [ + 1.4663325230153816, + 43.571268895183806 + ] ] ], "type": "Polygon" @@ -1254,19 +3144,48 @@ }, { "type": "Feature", - "properties": { "height": 5.2 }, + "properties": { + "height": 5.2 + }, "geometry": { "coordinates": [ [ - [1.4675987812041171, 43.57276806327212], - [1.4675059990602222, 43.572720328369684], - [1.4677417617085098, 43.57247603458134], - [1.4678361923023715, 43.57252399287108], - [1.4677399030951221, 43.572624379867165], - [1.4677717543265487, 43.572640654699484], - [1.4677279198514839, 43.57268650285485], - [1.4676952304293707, 43.57267010658046], - [1.4675987812041171, 43.57276806327212] + [ + 1.4675987812041171, + 43.57276806327212 + ], + [ + 1.4675059990602222, + 43.572720328369684 + ], + [ + 1.4677417617085098, + 43.57247603458134 + ], + [ + 1.4678361923023715, + 43.57252399287108 + ], + [ + 1.4677399030951221, + 43.572624379867165 + ], + [ + 1.4677717543265487, + 43.572640654699484 + ], + [ + 1.4677279198514839, + 43.57268650285485 + ], + [ + 1.4676952304293707, + 43.57267010658046 + ], + [ + 1.4675987812041171, + 43.57276806327212 + ] ] ], "type": "Polygon" @@ -1274,15 +3193,32 @@ }, { "type": "Feature", - "properties": { "height": 3 }, + "properties": { + "height": 3 + }, "geometry": { "coordinates": [ [ - [1.4679769806022023, 43.57276038349872], - [1.4679190305363647, 43.57273101455678], - [1.4679619458803757, 43.572686926819756], - [1.468018890118401, 43.5727173888674], - [1.4679769806022023, 43.57276038349872] + [ + 1.4679769806022023, + 43.57276038349872 + ], + [ + 1.4679190305363647, + 43.57273101455678 + ], + [ + 1.4679619458803757, + 43.572686926819756 + ], + [ + 1.468018890118401, + 43.5727173888674 + ], + [ + 1.4679769806022023, + 43.57276038349872 + ] ] ], "type": "Polygon" @@ -1290,15 +3226,32 @@ }, { "type": "Feature", - "properties": { "height": 3 }, + "properties": { + "height": 3 + }, "geometry": { "coordinates": [ [ - [1.4679072142182008, 43.57283009875559], - [1.4678503925950395, 43.572801071634444], - [1.4678923299995006, 43.57275696207341], - [1.467950464838168, 43.57278722562762], - [1.4679072142182008, 43.57283009875559] + [ + 1.4679072142182008, + 43.57283009875559 + ], + [ + 1.4678503925950395, + 43.572801071634444 + ], + [ + 1.4678923299995006, + 43.57275696207341 + ], + [ + 1.467950464838168, + 43.57278722562762 + ], + [ + 1.4679072142182008, + 43.57283009875559 + ] ] ], "type": "Polygon" @@ -1315,19 +3268,58 @@ "geometry": { "coordinates": [ [ - [1.465104347028955, 43.57064183282944], - [1.4646308509144603, 43.570400991657465], - [1.4646509674823278, 43.57038070808889], - [1.4646107343465644, 43.57035920992794], - [1.4651053877867923, 43.5698546242825], - [1.4652814505043352, 43.56994714703927], - [1.4648133986282517, 43.57042040381751], - [1.4648926315285848, 43.57046107665741], - [1.4649027270359625, 43.57045010494983], - [1.464943374739363, 43.570472625821225], - [1.4649957119767407, 43.57043836329561], - [1.465199752982926, 43.57054703612661], - [1.465104347028955, 43.57064183282944] + [ + 1.465104347028955, + 43.57064183282944 + ], + [ + 1.4646308509144603, + 43.570400991657465 + ], + [ + 1.4646509674823278, + 43.57038070808889 + ], + [ + 1.4646107343465644, + 43.57035920992794 + ], + [ + 1.4651053877867923, + 43.5698546242825 + ], + [ + 1.4652814505043352, + 43.56994714703927 + ], + [ + 1.4648133986282517, + 43.57042040381751 + ], + [ + 1.4648926315285848, + 43.57046107665741 + ], + [ + 1.4649027270359625, + 43.57045010494983 + ], + [ + 1.464943374739363, + 43.570472625821225 + ], + [ + 1.4649957119767407, + 43.57043836329561 + ], + [ + 1.465199752982926, + 43.57054703612661 + ], + [ + 1.465104347028955, + 43.57064183282944 + ] ] ], "type": "Polygon" @@ -1343,23 +3335,74 @@ "geometry": { "coordinates": [ [ - [1.4645941262868405, 43.57091036281443], - [1.4642428059379426, 43.57072739589549], - [1.4644944971766165, 43.57047423440625], - [1.464535655140594, 43.570497137439276], - [1.4645585743076595, 43.57047455789461], - [1.4645327580464027, 43.57046107601869], - [1.464574599613968, 43.5704193369759], - [1.464600080599297, 43.57043294031885], - [1.4646307929768057, 43.570401185149024], - [1.4651046854580727, 43.57064214136577], - [1.4650174434226244, 43.570731421298575], - [1.4648104739361543, 43.57062564752317], - [1.4648319021075622, 43.570577490207484], - [1.4647983744956434, 43.57056048606847], - [1.4647276677315801, 43.57063318244428], - [1.4648189699796035, 43.57068167012869], - [1.4645941262868405, 43.57091036281443] + [ + 1.4645941262868405, + 43.57091036281443 + ], + [ + 1.4642428059379426, + 43.57072739589549 + ], + [ + 1.4644944971766165, + 43.57047423440625 + ], + [ + 1.464535655140594, + 43.570497137439276 + ], + [ + 1.4645585743076595, + 43.57047455789461 + ], + [ + 1.4645327580464027, + 43.57046107601869 + ], + [ + 1.464574599613968, + 43.5704193369759 + ], + [ + 1.464600080599297, + 43.57043294031885 + ], + [ + 1.4646307929768057, + 43.570401185149024 + ], + [ + 1.4651046854580727, + 43.57064214136577 + ], + [ + 1.4650174434226244, + 43.570731421298575 + ], + [ + 1.4648104739361543, + 43.57062564752317 + ], + [ + 1.4648319021075622, + 43.570577490207484 + ], + [ + 1.4647983744956434, + 43.57056048606847 + ], + [ + 1.4647276677315801, + 43.57063318244428 + ], + [ + 1.4648189699796035, + 43.57068167012869 + ], + [ + 1.4645941262868405, + 43.57091036281443 + ] ] ], "type": "Polygon" @@ -1367,15 +3410,32 @@ }, { "type": "Feature", - "properties": { "height": 10.4 }, + "properties": { + "height": 10.4 + }, "geometry": { "coordinates": [ [ - [1.4646001572163527, 43.57043296507533], - [1.4645746918624525, 43.57041914970716], - [1.4646271625765337, 43.570367772765536], - [1.4646509515490322, 43.57038073793643], - [1.4646001572163527, 43.57043296507533] + [ + 1.4646001572163527, + 43.57043296507533 + ], + [ + 1.4645746918624525, + 43.57041914970716 + ], + [ + 1.4646271625765337, + 43.570367772765536 + ], + [ + 1.4646509515490322, + 43.57038073793643 + ], + [ + 1.4646001572163527, + 43.57043296507533 + ] ] ], "type": "Polygon" @@ -1391,53 +3451,182 @@ "geometry": { "coordinates": [ [ - [1.4670812267973474, 43.568834057309914], - [1.4668420260681216, 43.568709255639845], - [1.4668570628054454, 43.568694808349534], - [1.4668200147928019, 43.56867525297764], - [1.4668104594236127, 43.5686852128575], - [1.466783235252592, 43.568670625243726], - [1.466792416319663, 43.5686617138972], - [1.4667555188230779, 43.568642385056734], - [1.466724164613538, 43.56867351201791], - [1.466599183137447, 43.56860853909828], - [1.4667754482590283, 43.56843039597965], - [1.466793050255717, 43.56843926273814], - [1.466863777383395, 43.56836739906316], - [1.46684516955807, 43.56835671035563], - [1.4669227282407178, 43.56827844641953], - [1.4669416713419139, 43.568288527827036], - [1.4670258711840916, 43.56820096736422], - [1.4670086044633592, 43.56819234349703], - [1.4670849961336785, 43.568113327946406], - [1.467103939234903, 43.568123166455536], - [1.4671879434825428, 43.56803870235777], - [1.4671698385720333, 43.56802825651826], - [1.4672474405099933, 43.56794933448171], - [1.4672770315489458, 43.56796376293167], - [1.4674511740026048, 43.567786900063], - [1.4679049736688228, 43.56802329760109], - [1.4677409536147934, 43.5681886094487], - [1.4676792146088644, 43.56815556835687], - [1.4676094224368512, 43.568226603798564], - [1.4673143278903638, 43.56807323223049], - [1.466968687621005, 43.56842487650562], - [1.4668949742725488, 43.56838603631019], - [1.4668267668076282, 43.56845574775858], - [1.466900900516947, 43.568493653590565], - [1.4668414609245986, 43.56855394738048], - [1.4669426813666462, 43.568606169489215], - [1.466964401782576, 43.56858477629564], - [1.4671123289102184, 43.56866256377626], - [1.4670936806951715, 43.568682465911905], - [1.467274613795496, 43.5687761976738], - [1.4671993608742184, 43.56885350264096], - [1.4671081317373762, 43.56880573847684], - [1.4670812267973474, 43.568834057309914] + [ + 1.4670812267973474, + 43.568834057309914 + ], + [ + 1.4668420260681216, + 43.568709255639845 + ], + [ + 1.4668570628054454, + 43.568694808349534 + ], + [ + 1.4668200147928019, + 43.56867525297764 + ], + [ + 1.4668104594236127, + 43.5686852128575 + ], + [ + 1.466783235252592, + 43.568670625243726 + ], + [ + 1.466792416319663, + 43.5686617138972 + ], + [ + 1.4667555188230779, + 43.568642385056734 + ], + [ + 1.466724164613538, + 43.56867351201791 + ], + [ + 1.466599183137447, + 43.56860853909828 + ], + [ + 1.4667754482590283, + 43.56843039597965 + ], + [ + 1.466793050255717, + 43.56843926273814 + ], + [ + 1.466863777383395, + 43.56836739906316 + ], + [ + 1.46684516955807, + 43.56835671035563 + ], + [ + 1.4669227282407178, + 43.56827844641953 + ], + [ + 1.4669416713419139, + 43.568288527827036 + ], + [ + 1.4670258711840916, + 43.56820096736422 + ], + [ + 1.4670086044633592, + 43.56819234349703 + ], + [ + 1.4670849961336785, + 43.568113327946406 + ], + [ + 1.467103939234903, + 43.568123166455536 + ], + [ + 1.4671879434825428, + 43.56803870235777 + ], + [ + 1.4671698385720333, + 43.56802825651826 + ], + [ + 1.4672474405099933, + 43.56794933448171 + ], + [ + 1.4672770315489458, + 43.56796376293167 + ], + [ + 1.4674511740026048, + 43.567786900063 + ], + [ + 1.4679049736688228, + 43.56802329760109 + ], + [ + 1.4677409536147934, + 43.5681886094487 + ], + [ + 1.4676792146088644, + 43.56815556835687 + ], + [ + 1.4676094224368512, + 43.568226603798564 + ], + [ + 1.4673143278903638, + 43.56807323223049 + ], + [ + 1.466968687621005, + 43.56842487650562 + ], + [ + 1.4668949742725488, + 43.56838603631019 + ], + [ + 1.4668267668076282, + 43.56845574775858 + ], + [ + 1.466900900516947, + 43.568493653590565 + ], + [ + 1.4668414609245986, + 43.56855394738048 + ], + [ + 1.4669426813666462, + 43.568606169489215 + ], + [ + 1.466964401782576, + 43.56858477629564 + ], + [ + 1.4671123289102184, + 43.56866256377626 + ], + [ + 1.4670936806951715, + 43.568682465911905 + ], + [ + 1.467274613795496, + 43.5687761976738 + ], + [ + 1.4671993608742184, + 43.56885350264096 + ], + [ + 1.4671081317373762, + 43.56880573847684 + ], + [ + 1.4670812267973474, + 43.568834057309914 + ] ] ], "type": "Polygon" } } ] -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..3108a3d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1091 @@ +{ + "name": "map-insa", + "version": "2.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "map-insa", + "version": "2.0.0", + "dependencies": { + "maptalks": "^1.12.1", + "maptalks.three": "^0.42.0", + "three": "^0.183.2" + }, + "devDependencies": { + "@types/geojson": "^7946.0.16", + "@types/three": "^0.183.1", + "typescript": "^6.0.2", + "vite": "^8.0.3" + } + }, + "node_modules/@dimforge/rapier3d-compat": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@dimforge/rapier3d-compat/-/rapier3d-compat-0.12.0.tgz", + "integrity": "sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@maptalks/feature-filter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@maptalks/feature-filter/-/feature-filter-1.3.0.tgz", + "integrity": "sha512-O6GcFzPuCbz6bO4TNBnmP8VunS0GexTzZ4m36A4HbYQICY1cplpFgntX2fyB/TY3cZrFRGoeMePBeMZFMOOhcQ==" + }, + "node_modules/@maptalks/function-type": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@maptalks/function-type/-/function-type-1.4.1.tgz", + "integrity": "sha512-Z78FdI8mZ4vdcBqxlMDV6HP6WE/njZ9PhlM5JwbURxW1DnQK7R1GP+fubkGJPP6hVSv0Y52/dK8cZE/HuXVZ3A==", + "dependencies": { + "colorin": "^0.5.0" + } + }, + "node_modules/@maptalks/function-type/node_modules/colorin": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/colorin/-/colorin-0.5.0.tgz", + "integrity": "sha512-gN6fIMCehYUonAhbmm5+ZHeFunG75u77hI2tRlVndNthO6v0wZMV2G2FwYSi8Ws4b4lpFJK1ql2a/MlW9z/Vhg==", + "license": "MIT" + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.2.tgz", + "integrity": "sha512-sNXv5oLJ7ob93xkZ1XnxisYhGYXfaG9f65/ZgYuAu3qt7b3NadcOEhLvx28hv31PgX8SZJRYrAIPQilQmFpLVw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.122.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.122.0.tgz", + "integrity": "sha512-oLAl5kBpV4w69UtFZ9xqcmTi+GENWOcPF7FCrczTiBbmC0ibXxCwyvZGbO39rCVEuLGAZM84DH0pUIyyv/YJzA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.12.tgz", + "integrity": "sha512-pv1y2Fv0JybcykuiiD3qBOBdz6RteYojRFY1d+b95WVuzx211CRh+ytI/+9iVyWQ6koTh5dawe4S/yRfOFjgaA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.12.tgz", + "integrity": "sha512-cFYr6zTG/3PXXF3pUO+umXxt1wkRK/0AYT8lDwuqvRC+LuKYWSAQAQZjCWDQpAH172ZV6ieYrNnFzVVcnSflAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.12.tgz", + "integrity": "sha512-ZCsYknnHzeXYps0lGBz8JrF37GpE9bFVefrlmDrAQhOEi4IOIlcoU1+FwHEtyXGx2VkYAvhu7dyBf75EJQffBw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.12.tgz", + "integrity": "sha512-dMLeprcVsyJsKolRXyoTH3NL6qtsT0Y2xeuEA8WQJquWFXkEC4bcu1rLZZSnZRMtAqwtrF/Ib9Ddtpa/Gkge9Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.12.tgz", + "integrity": "sha512-YqWjAgGC/9M1lz3GR1r1rP79nMgo3mQiiA+Hfo+pvKFK1fAJ1bCi0ZQVh8noOqNacuY1qIcfyVfP6HoyBRZ85Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.12.tgz", + "integrity": "sha512-/I5AS4cIroLpslsmzXfwbe5OmWvSsrFuEw3mwvbQ1kDxJ822hFHIx+vsN/TAzNVyepI/j/GSzrtCIwQPeKCLIg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.12.tgz", + "integrity": "sha512-V6/wZztnBqlx5hJQqNWwFdxIKN0m38p8Jas+VoSfgH54HSj9tKTt1dZvG6JRHcjh6D7TvrJPWFGaY9UBVOaWPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.12.tgz", + "integrity": "sha512-AP3E9BpcUYliZCxa3w5Kwj9OtEVDYK6sVoUzy4vTOJsjPOgdaJZKFmN4oOlX0Wp0RPV2ETfmIra9x1xuayFB7g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.12.tgz", + "integrity": "sha512-nWwpvUSPkoFmZo0kQazZYOrT7J5DGOJ/+QHHzjvNlooDZED8oH82Yg67HvehPPLAg5fUff7TfWFHQS8IV1n3og==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.12.tgz", + "integrity": "sha512-RNrafz5bcwRy+O9e6P8Z/OCAJW/A+qtBczIqVYwTs14pf4iV1/+eKEjdOUta93q2TsT/FI0XYDP3TCky38LMAg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.12.tgz", + "integrity": "sha512-Jpw/0iwoKWx3LJ2rc1yjFrj+T7iHZn2JDg1Yny1ma0luviFS4mhAIcd1LFNxK3EYu3DHWCps0ydXQ5i/rrJ2ig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.12.tgz", + "integrity": "sha512-vRugONE4yMfVn0+7lUKdKvN4D5YusEiPilaoO2sgUWpCvrncvWgPMzK00ZFFJuiPgLwgFNP5eSiUlv2tfc+lpA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.12.tgz", + "integrity": "sha512-ykGiLr/6kkiHc0XnBfmFJuCjr5ZYKKofkx+chJWDjitX+KsJuAmrzWhwyOMSHzPhzOHOy7u9HlFoa5MoAOJ/Zg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^1.1.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.12.tgz", + "integrity": "sha512-5eOND4duWkwx1AzCxadcOrNeighiLwMInEADT0YM7xeEOOFcovWZCq8dadXgcRHSf3Ulh1kFo/qvzoFiCLOL1Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.12.tgz", + "integrity": "sha512-PyqoipaswDLAZtot351MLhrlrh6lcZPo2LSYE+VDxbVk24LVKAGOuE4hb8xZQmrPAuEtTZW8E6D2zc5EUZX4Lw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.12.tgz", + "integrity": "sha512-HHMwmarRKvoFsJorqYlFeFRzXZqCt2ETQlEDOb9aqssrnVBB1/+xgTGtuTrIk5vzLNX1MjMtTf7W9z3tsSbrxw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.1.tgz", + "integrity": "sha512-haZ7hJ1JT4e9hqkoT9R/19XW2QKqjfJVv+i5AGg57S+nLk9lQnJ1F/eZloRO3o9Scy9CM3wQ9l+dkXtcBgN5Ew==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.1.tgz", + "integrity": "sha512-77PpsFQUCOiZR9+LQEFg9GClyfkNXj1MP6wRnzYs0EeWbPcHs02AXu4xuUbM1zhwn3wqaizle3AEYg5aeoohhg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@tweenjs/tween.js": { + "version": "23.1.3", + "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz", + "integrity": "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/stats.js": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/stats.js/-/stats.js-0.17.4.tgz", + "integrity": "sha512-jIBvWWShCvlBqBNIZt0KAshWpvSjhkwkEu4ZUcASoAvhmrgAUI2t1dXrjSL4xXVLB4FznPrIsX3nKXFl/Dt4vA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/three": { + "version": "0.183.1", + "resolved": "https://registry.npmjs.org/@types/three/-/three-0.183.1.tgz", + "integrity": "sha512-f2Pu5Hrepfgavttdye3PsH5RWyY/AvdZQwIVhrc4uNtvF7nOWJacQKcoVJn0S4f0yYbmAE6AR+ve7xDcuYtMGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@dimforge/rapier3d-compat": "~0.12.0", + "@tweenjs/tween.js": "~23.1.3", + "@types/stats.js": "*", + "@types/webxr": ">=0.5.17", + "@webgpu/types": "*", + "fflate": "~0.8.2", + "meshoptimizer": "~1.0.1" + } + }, + "node_modules/@types/webxr": { + "version": "0.5.24", + "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.24.tgz", + "integrity": "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webgpu/types": { + "version": "0.1.69", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.69.tgz", + "integrity": "sha512-RPmm6kgRbI8e98zSD3RVACvnuktIja5+yLgDAkTmxLr90BEwdTXRQWNLF3ETTTyH/8mKhznZuN5AveXYFEsMGQ==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/colorin": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/colorin/-/colorin-0.6.0.tgz", + "integrity": "sha512-huI54MwKNMP6eypurqzxGf7rvTA3pNWdXZopQbN7v3TDxXYWyyGQ3CtQndNZ2Z0Gy6HDWqA7sRYxbjRDO2FZMA==", + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/deyihu-geometry-extrude": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/deyihu-geometry-extrude/-/deyihu-geometry-extrude-0.1.10.tgz", + "integrity": "sha512-qvX/TbA7aELZOwYOlhp2+gJILRGiUPGyErJDgTV8sooyocKERSxYWJxvwCT5bySnrVoJAd9Juh6jF8MvXzVbxA==", + "license": "MIT", + "dependencies": { + "earcut": "^2.1.3" + } + }, + "node_modules/earcut": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", + "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==", + "license": "ISC" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "dev": true, + "license": "MIT" + }, + "node_modules/frustum-intersects": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/frustum-intersects/-/frustum-intersects-0.1.0.tgz", + "integrity": "sha512-W0S6dmX5LJLtamimyuKhvbkpDTm5eVfMgk4X9yXNyWQ1zZ/cMm0PZoeX9Pm0tL302l+erQVrdfRGhV3ILfeTeQ==", + "license": "MIT" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lineclip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/lineclip/-/lineclip-1.1.5.tgz", + "integrity": "sha512-KlA/wRSjpKl7tS9iRUdlG72oQ7qZ1IlVbVgHwoO10TBR/4gQ86uhKow6nlzMAJJhjCWKto8OeoAzzIzKSmN25A==", + "license": "ISC" + }, + "node_modules/maptalks": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/maptalks/-/maptalks-1.12.1.tgz", + "integrity": "sha512-Vvr6Ikp3GRtPToUhPD0FzyA+tLLp8dsakJdNvp6N6ScPnQw9gfS+bpZP7Apc0kEjGBK55mHzJmuyNaQxYuhLlw==", + "license": "BSD-3-Clause", + "dependencies": { + "@maptalks/feature-filter": "^1.3.0", + "@maptalks/function-type": "^1.4.1", + "colorin": "^0.6.0", + "frustum-intersects": "^0.1.0", + "lineclip": "^1.1.5", + "rbush": "^2.0.2", + "simplify-js": "^1.2.1" + }, + "optionalDependencies": { + "@rollup/rollup-darwin-x64": "^4.13.0", + "@rollup/rollup-linux-x64-gnu": "^4.13.0" + } + }, + "node_modules/maptalks.three": { + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/maptalks.three/-/maptalks.three-0.42.0.tgz", + "integrity": "sha512-Ru5/X/oRMvlLRQ7GB0HW2xeDOy2k5ZgLisrQF2/UhAqlKJBJZ/vKQXo2qAER8kQTtmwBB+S54N/y7b0waSAICQ==", + "license": "MIT", + "dependencies": { + "deyihu-geometry-extrude": "0.1.10", + "poly-extrude": "^0.16.0" + } + }, + "node_modules/meshoptimizer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-1.0.1.tgz", + "integrity": "sha512-Vix+QlA1YYT3FwmBBZ+49cE5y/b+pRrcXKqGpS5ouh33d3lSp2PoTpCw19E0cKDFWalembrHnIaZetf27a+W2g==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/poly-extrude": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/poly-extrude/-/poly-extrude-0.16.0.tgz", + "integrity": "sha512-zZVn8mbCkYS9chcvZI82tbdj4Xsth0tvYiOOqtdAjCgzgD8DkEnY3qCbdUUdSKGCqF86VlfMy+Gd7WDF4HGnjQ==", + "license": "ISC", + "dependencies": { + "earcut": "^3.0.1" + } + }, + "node_modules/poly-extrude/node_modules/earcut": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.2.tgz", + "integrity": "sha512-X7hshQbLyMJ/3RPhyObLARM2sNxxmRALLKx1+NVFFnQ9gKzmCrxm9+uLIAdBcvc8FNLpctqlQ2V6AE92Ol9UDQ==", + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.5.8", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", + "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/quickselect": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-1.1.1.tgz", + "integrity": "sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==", + "license": "ISC" + }, + "node_modules/rbush": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/rbush/-/rbush-2.0.2.tgz", + "integrity": "sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA==", + "license": "MIT", + "dependencies": { + "quickselect": "^1.0.1" + } + }, + "node_modules/rolldown": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.12.tgz", + "integrity": "sha512-yP4USLIMYrwpPHEFB5JGH1uxhcslv6/hL0OyvTuY+3qlOSJvZ7ntYnoWpehBxufkgN0cvXxppuTu5hHa/zPh+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.122.0", + "@rolldown/pluginutils": "1.0.0-rc.12" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.0.0-rc.12", + "@rolldown/binding-darwin-arm64": "1.0.0-rc.12", + "@rolldown/binding-darwin-x64": "1.0.0-rc.12", + "@rolldown/binding-freebsd-x64": "1.0.0-rc.12", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.12", + "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.12", + "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.12", + "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.12", + "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.12", + "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.12", + "@rolldown/binding-linux-x64-musl": "1.0.0-rc.12", + "@rolldown/binding-openharmony-arm64": "1.0.0-rc.12", + "@rolldown/binding-wasm32-wasi": "1.0.0-rc.12", + "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.12", + "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.12" + } + }, + "node_modules/simplify-js": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/simplify-js/-/simplify-js-1.2.4.tgz", + "integrity": "sha512-vITfSlwt7h/oyrU42R83mtzFpwYk3+mkH9bOHqq/Qw6n8rtR7aE3NZQ5fbcyCUVVmuMJR6ynsAhOfK2qoah8Jg==", + "license": "BSD-2-Clause" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/three": { + "version": "0.183.2", + "resolved": "https://registry.npmjs.org/three/-/three-0.183.2.tgz", + "integrity": "sha512-di3BsL2FEQ1PA7Hcvn4fyJOlxRRgFYBpMTcyOgkwJIaDOdJMebEFPA+t98EvjuljDx4hNulAGwF6KIjtwI5jgQ==", + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/typescript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.2.tgz", + "integrity": "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/vite": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.3.tgz", + "integrity": "sha512-B9ifbFudT1TFhfltfaIPgjo9Z3mDynBTJSUYxTjOQruf/zHH+ezCQKcoqO+h7a9Pw9Nm/OtlXAiGT1axBgwqrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.4", + "postcss": "^8.5.8", + "rolldown": "1.0.0-rc.12", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.1.0", + "esbuild": "^0.27.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c501118 --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "name": "map-insa", + "version": "2.0.0", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc --noEmit && vite build", + "preview": "vite preview", + "typecheck": "tsc --noEmit", + "start": "npx serve ./dist" + }, + "dependencies": { + "maptalks": "^1.12.1", + "maptalks.three": "^0.42.0", + "three": "^0.183.2" + }, + "devDependencies": { + "@types/geojson": "^7946.0.16", + "@types/three": "^0.183.1", + "typescript": "^6.0.2", + "vite": "^8.0.3" + } +} diff --git a/src/config.ts b/src/config.ts new file mode 100644 index 0000000..7dd8358 --- /dev/null +++ b/src/config.ts @@ -0,0 +1,26 @@ +export const MAP_CONFIG = { + center: [1.468, 43.5696] as [number, number], + zoom: 18, + minZoom: 18, + maxZoom: 20, + pitch: 45, + bearing: 0, +}; + +export const CAMPUS_EXTENT = { + xmin: 1.464, + xmax: 1.4715, + ymin: 43.567, + ymax: 43.574, +}; + +export const TILE_SERVICE = { + urlTemplate: "https://tile.f4map.com/tiles/f4_3d/{z}/{x}/{y}.png", + subdomains: ["a", "b", "c", "d"], +}; + +export const ABOUT_MODAL = { + title: "A Propos", + content: + "

Ce projet a été réalisé par des membres du Club Info de l'INSA Toulouse. Il a pour but de vous permettre de découvrir le campus de l'INSA Toulouse en 3D.

Pour plus d'informations, n'hésitez pas à contacter le Club Info.

Toute contribution est la bienvenue, vous pouvez retrouver le code source du site sur notre GitHub.

", +}; diff --git a/src/data.ts b/src/data.ts new file mode 100644 index 0000000..0ae3e3f --- /dev/null +++ b/src/data.ts @@ -0,0 +1,11 @@ +import type { BuildingFeature, BuildingsGeoJson } from "./types"; + +export async function getBuildings(): Promise { + const response = await fetch(`${import.meta.env.BASE_URL}map.geojson`); + if (!response.ok) { + throw new Error("Unable to load map.geojson"); + } + + const payload = (await response.json()) as BuildingsGeoJson; + return payload.features; +} diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..adcfbd5 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,40 @@ +import "maptalks/dist/maptalks.css"; + +import "./styles/main.css"; + +import { ABOUT_MODAL } from "./config"; +import { getBuildings } from "./data"; +import { createBuildingsLayer } from "./map/buildings3d"; +import { createCampusMap } from "./map/createMap"; +import { setupControls } from "./ui/controls"; +import { createModalController } from "./ui/modal"; +import { setupSearch } from "./ui/search"; +import { getElementById } from "./utils/dom"; + +async function bootstrap(): Promise { + const buildings = await getBuildings(); + const map = createCampusMap("map"); + const buildingsLayer = createBuildingsLayer(map, buildings); + + const modal = createModalController(); + + setupControls({ + map, + onAboutClick: () => { + modal.open(ABOUT_MODAL.title, ABOUT_MODAL.content); + }, + }); + + setupSearch({ + input: getElementById("searchInput"), + suggestions: getElementById("suggestions"), + searchableBuildings: buildingsLayer.searchableBuildings, + onSelect: (buildingName) => { + buildingsLayer.focusBuilding(buildingName); + }, + }); +} + +bootstrap().catch((error) => { + console.error(error); +}); diff --git a/src/map/buildings3d.ts b/src/map/buildings3d.ts new file mode 100644 index 0000000..238a6bb --- /dev/null +++ b/src/map/buildings3d.ts @@ -0,0 +1,210 @@ +import * as maptalks from "maptalks"; +import { BaseObject, ThreeLayer } from "maptalks.three"; +import * as THREE from "three"; + +import type { BuildingFeature } from "../types"; + +type GeoCoordinate = [number, number]; + +export interface SearchableBuilding { + name: string; + shortName?: string; +} + +export interface BuildingsLayerController { + searchableBuildings: SearchableBuilding[]; + focusBuilding: (name: string) => boolean; +} + +interface BuildingEntry { + mesh: BaseObject; + height: number; +} + +export function createBuildingsLayer( + map: maptalks.Map, + buildings: BuildingFeature[], +): BuildingsLayerController { + const searchableBuildings: SearchableBuilding[] = []; + const centersByName = new Map(); + const entriesByName = new Map(); + let openedInfoWindow: BaseObject | null = null; + + const showInfoWindow = (mesh: BaseObject, center: GeoCoordinate) => { + if (openedInfoWindow && openedInfoWindow !== mesh) { + openedInfoWindow.closeInfoWindow(); + } + + const infoWindow = mesh.getInfoWindow(); + if (!infoWindow) { + return; + } + + infoWindow.show(new maptalks.Coordinate(center[0], center[1])); + openedInfoWindow = mesh; + }; + + const closeInfoWindow = () => { + if (!openedInfoWindow) { + return; + } + openedInfoWindow.closeInfoWindow(); + openedInfoWindow = null; + }; + + const animateSelection = (mesh: BaseObject, height: number) => { + mesh.animateShow({ duration: 800 }, () => undefined); + mesh.setHeight(height * 1.2); + window.setTimeout(() => { + mesh.setHeight(height); + }, 250); + }; + + const animateMapTo = (center: GeoCoordinate) => { + map.animateTo( + { center: new maptalks.Coordinate(center[0], center[1]) }, + { duration: 500 }, + ); + }; + + for (const feature of buildings) { + const name = feature.properties?.name?.trim(); + if (!name) { + continue; + } + + centersByName.set(name, getFeatureCenter(feature)); + searchableBuildings.push({ + name, + shortName: feature.properties?.short_name, + }); + } + + const threeLayer = new ThreeLayer("3d-buildings", { + forceRenderOnMoving: true, + forceRenderOnRotating: true, + }); + + threeLayer.prepareToDraw = (_gl, scene) => { + const light = new THREE.DirectionalLight(0xf6efe4, 1); + light.position.set(1, 0, 1); + scene.add(light); + + const material = new THREE.MeshPhongMaterial({ color: 0xffffff }); + + for (const building of buildings) { + const height = getExtrusionHeight(building); + const center = getFeatureCenter(building); + const name = building.properties?.name?.trim(); + const mesh = threeLayer.toExtrudePolygon( + building as unknown as maptalks.Polygon, + { + height, + bloom: true, + }, + material, + ); + + mesh.on("mouseover", (event: { target: BaseObject }) => + event.target.setHeight(height * 1.25), + ); + mesh.on("mouseout", (event: { target: BaseObject }) => + event.target.setHeight(height), + ); + mesh.on("click", () => { + animateMapTo(center); + animateSelection(mesh, height); + if (name) { + showInfoWindow(mesh, center); + } else { + closeInfoWindow(); + } + }); + + if (name) { + mesh.setToolTip(name, { + showTimeout: 0, + eventsPropagation: true, + dx: 15, + dy: 15, + }); + mesh.setInfoWindow({ + title: name, + content: building.properties?.description || "Pas de description", + }); + + entriesByName.set(name, { mesh, height }); + } + + threeLayer.addMesh(mesh); + } + + return []; + }; + + map.addLayer(threeLayer as unknown as maptalks.Layer); + threeLayer.redraw(); + + return { + searchableBuildings, + focusBuilding: (name) => { + const center = centersByName.get(name); + if (!center) { + return false; + } + + animateMapTo(center); + + const entry = entriesByName.get(name); + if (!entry) { + return true; + } + + animateSelection(entry.mesh, entry.height); + showInfoWindow(entry.mesh, center); + + return true; + }, + }; +} + +function getExtrusionHeight(building: BuildingFeature): number { + const height = Number(building.properties?.height ?? 0); + if (!Number.isFinite(height) || height < 0) { + return 0; + } + return height * 2; +} + +function getFeatureCenter(building: BuildingFeature): GeoCoordinate { + let minLng = Number.POSITIVE_INFINITY; + let minLat = Number.POSITIVE_INFINITY; + let maxLng = Number.NEGATIVE_INFINITY; + let maxLat = Number.NEGATIVE_INFINITY; + + const geometry = building.geometry; + + if (geometry.type === "Polygon") { + for (const ring of geometry.coordinates) { + for (const [lng, lat] of ring) { + minLng = Math.min(minLng, lng); + minLat = Math.min(minLat, lat); + maxLng = Math.max(maxLng, lng); + maxLat = Math.max(maxLat, lat); + } + } + } else { + for (const polygon of geometry.coordinates) { + for (const ring of polygon) { + for (const [lng, lat] of ring) { + minLng = Math.min(minLng, lng); + minLat = Math.min(minLat, lat); + maxLng = Math.max(maxLng, lng); + maxLat = Math.max(maxLat, lat); + } + } + } + } + + return [(minLng + maxLng) / 2, (minLat + maxLat) / 2]; +} diff --git a/src/map/createMap.ts b/src/map/createMap.ts new file mode 100644 index 0000000..35923f1 --- /dev/null +++ b/src/map/createMap.ts @@ -0,0 +1,31 @@ +import * as maptalks from "maptalks"; + +import { CAMPUS_EXTENT, MAP_CONFIG, TILE_SERVICE } from "../config"; + +export function createCampusMap(containerId: string): maptalks.Map { + const map = new maptalks.Map(containerId, { + center: MAP_CONFIG.center, + zoom: MAP_CONFIG.zoom, + minZoom: MAP_CONFIG.minZoom, + maxZoom: MAP_CONFIG.maxZoom, + pitch: MAP_CONFIG.pitch, + bearing: MAP_CONFIG.bearing, + baseLayer: new maptalks.TileLayer("tile", { + urlTemplate: TILE_SERVICE.urlTemplate, + subdomains: TILE_SERVICE.subdomains, + }), + attribution: { + content: + '© OpenStreetMap contributors, © CARTO', + }, + }); + + const extent = map.getExtent(); + extent.xmin = CAMPUS_EXTENT.xmin; + extent.xmax = CAMPUS_EXTENT.xmax; + extent.ymin = CAMPUS_EXTENT.ymin; + extent.ymax = CAMPUS_EXTENT.ymax; + map.setMaxExtent(extent); + + return map; +} diff --git a/css/styles.css b/src/styles/main.css similarity index 90% rename from css/styles.css rename to src/styles/main.css index fd3d4ff..e33aa0b 100644 --- a/css/styles.css +++ b/src/styles/main.css @@ -1,19 +1,14 @@ * { + box-sizing: border-box; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; } html, body { - margin: 0px; + margin: 0; height: 100%; } -.heading { - background-color: #34495e; - color: #fff; - padding: 8px 8px; - font: 24px sans-serif; -} #map { width: 100%; @@ -113,7 +108,7 @@ body { } .control:hover { - background-color: rgb(229 231 235) !important; + background-color: rgb(229 231 235); } .control > svg { @@ -131,10 +126,6 @@ body { flex-direction: column; } -#zoomControls > button:hover { - background-color: white; -} - #zoomControls > button:first-child { border-radius: 6px 6px 0 0; } @@ -152,7 +143,7 @@ body { #modalOverlay { position: fixed; inset: 0; - background-color: rgba(107, 114, 128, 0.75); + background-color: rgb(107 114 128 / 0.75); } #modalContainer { @@ -170,7 +161,7 @@ body { @media (min-width: 640px) { #modalContainer { align-items: center; - padding: 0px; + padding: 0; } } @@ -191,13 +182,13 @@ body { #modalBody { background-color: white; - padding: 20px 16px 0px 16px; + padding: 20px 16px 0; text-align: center; } @media (min-width: 640px) { #modalBody { - padding: 24px 24px 0px 24px; + padding: 24px 24px 0; text-align: left; } } diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..f603dd8 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,22 @@ +import type { + Feature, + FeatureCollection, + MultiPolygon, + Polygon, +} from "geojson"; + +export interface BuildingProperties { + name?: string; + short_name?: string; + description?: string; + height: number; +} + +export type BuildingGeometry = Polygon | MultiPolygon; + +export type BuildingFeature = Feature; + +export type BuildingsGeoJson = FeatureCollection< + BuildingGeometry, + BuildingProperties +>; diff --git a/src/ui/controls.ts b/src/ui/controls.ts new file mode 100644 index 0000000..469e724 --- /dev/null +++ b/src/ui/controls.ts @@ -0,0 +1,37 @@ +import * as maptalks from "maptalks"; + +import { MAP_CONFIG } from "../config"; +import { getElementById } from "../utils/dom"; + +interface ControlsOptions { + map: maptalks.Map; + onAboutClick: () => void; +} + +export function setupControls(options: ControlsOptions): void { + const { map, onAboutClick } = options; + + const resetButton = getElementById("resetControl"); + const zoomInButton = getElementById("zoomInControl"); + const zoomOutButton = getElementById("zoomOutControl"); + const aboutButton = getElementById("aboutControl"); + + resetButton.addEventListener("click", () => { + map.setCenter( + new maptalks.Coordinate(MAP_CONFIG.center[0], MAP_CONFIG.center[1]), + ); + map.setZoom(MAP_CONFIG.zoom); + map.setPitch(MAP_CONFIG.pitch); + map.setBearing(MAP_CONFIG.bearing); + }); + + zoomInButton.addEventListener("click", () => { + map.setZoom(map.getZoom() + 0.5); + }); + + zoomOutButton.addEventListener("click", () => { + map.setZoom(map.getZoom() - 0.5); + }); + + aboutButton.addEventListener("click", onAboutClick); +} diff --git a/src/ui/modal.ts b/src/ui/modal.ts new file mode 100644 index 0000000..e5bd6b3 --- /dev/null +++ b/src/ui/modal.ts @@ -0,0 +1,29 @@ +import { getElementById } from "../utils/dom"; + +export interface ModalController { + open: (title: string, content: string) => void; + close: () => void; +} + +export function createModalController(): ModalController { + const modalScreen = getElementById("modalScreen"); + const overlay = getElementById("modalOverlay"); + const closeButton = getElementById("modal-close"); + const titleElement = getElementById("modalTitle"); + const contentElement = getElementById("modalContent"); + + const close = () => { + modalScreen.style.display = "none"; + }; + + const open = (title: string, content: string) => { + titleElement.innerText = title; + contentElement.innerHTML = content; + modalScreen.style.display = "block"; + }; + + closeButton.addEventListener("click", close); + overlay.addEventListener("click", close); + + return { open, close }; +} diff --git a/src/ui/search.ts b/src/ui/search.ts new file mode 100644 index 0000000..578e594 --- /dev/null +++ b/src/ui/search.ts @@ -0,0 +1,84 @@ +import type { SearchableBuilding } from "../map/buildings3d"; + +interface SearchOptions { + input: HTMLInputElement; + suggestions: HTMLUListElement; + searchableBuildings: SearchableBuilding[]; + onSelect: (buildingName: string) => void; +} + +export function setupSearch(options: SearchOptions): void { + const { input, suggestions, searchableBuildings, onSelect } = options; + let currentMatches: SearchableBuilding[] = []; + + const hideSuggestions = () => { + currentMatches = []; + suggestions.style.display = "none"; + suggestions.innerHTML = ""; + }; + + const renderSuggestions = (matches: SearchableBuilding[]) => { + currentMatches = matches; + suggestions.innerHTML = ""; + + if (matches.length === 0) { + suggestions.style.display = "none"; + return; + } + + for (const match of matches) { + const item = document.createElement("li"); + item.textContent = match.name; + + item.addEventListener("click", () => { + input.value = match.name; + hideSuggestions(); + onSelect(match.name); + }); + + suggestions.appendChild(item); + } + + suggestions.style.display = "block"; + }; + + input.addEventListener("input", (event) => { + const query = ((event.target as HTMLInputElement).value || "").trim(); + + if (query.length < 2) { + hideSuggestions(); + return; + } + + const normalizedQuery = query.toLowerCase(); + const matches = searchableBuildings.filter((building) => { + const inName = building.name.toLowerCase().includes(normalizedQuery); + const inShortName = (building.shortName || "") + .toLowerCase() + .includes(normalizedQuery); + return inName || inShortName; + }); + + renderSuggestions(matches); + }); + + input.addEventListener("keydown", (event) => { + if (event.key !== "Enter") { + return; + } + + if (currentMatches.length === 0) { + return; + } + + event.preventDefault(); + const selected = currentMatches[0]; + input.value = selected.name; + hideSuggestions(); + onSelect(selected.name); + }); + + input.addEventListener("blur", () => { + window.setTimeout(hideSuggestions, 100); + }); +} diff --git a/src/utils/dom.ts b/src/utils/dom.ts new file mode 100644 index 0000000..76f487f --- /dev/null +++ b/src/utils/dom.ts @@ -0,0 +1,7 @@ +export function getElementById(id: string): T { + const element = document.getElementById(id); + if (!element) { + throw new Error(`Element with id '${id}' is missing.`); + } + return element as T; +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..1759d70 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "Bundler", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "types": ["vite/client"], + "strict": true, + "noEmit": true, + "isolatedModules": true, + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "useDefineForClassFields": true + }, + "include": ["src", "vite.config.ts"] +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..f7b9682 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from "vite"; + +export default defineConfig({ + base: "./", + publicDir: "json", +});