=0;h--)l.call(this,o[h]);this.viewChange(),e===this.panel_&&this.overflow()}getLayerClass(e){return e?e.getLayers?"ol-layer-group":e instanceof ol.layer.Vector?"ol-layer-vector":e instanceof ol.layer.VectorTile?"ol-layer-vectortile":e instanceof ol.layer.Tile?"ol-layer-tile":e instanceof ol.layer.Image?"ol-layer-image":e instanceof ol.layer.Heatmap?"ol-layer-heatmap":e.getFeatures?"ol-layer-vectorimage":"unknown":"none"}selectLayer(e,t){if(!e){if(!this.getMap())return;e=this.getMap().getLayers().item(this.getMap().getLayers().getLength()-1)}this._selectedLayer=e,this.drawPanel(),t||this.dispatchEvent({type:"select",layer:e})}getSelection(){return this._selectedLayer}setprogress_(e){if(!e.layerswitcher_progress){var t=0,i=0,o=function(){i===t?(i=t=0,ol.ext.element.setStyle(e.layerswitcher_progress,{width:0})):ol.ext.element.setStyle(e.layerswitcher_progress,{width:(t/i*100).toFixed(1)+"%"})};e.getSource().on("tileloadstart",function(){i++,o()}),e.getSource().on("tileloadend",function(){t++,o()}),e.getSource().on("tileloaderror",function(){t++,o()})}}},ol.control.LayerSwitcher.prototype.tip={up:"up/down",down:"down",info:"informations...",extent:"zoom to extent",trash:"remove layer",plus:"expand/shrink"},ol.control.Bar=class extends ol.control.Control{constructor(e){e=e||{};var t=document.createElement("DIV");if(t.classList.add("ol-unselectable","ol-control","ol-bar"),e.className){var i=e.className.split(" ").filter(function(e){return e.length>0});t.classList.add.apply(t.classList,i)}if(e.group&&t.classList.add("ol-group"),super({element:t,target:e.target}),this.set("toggleOne",e.toggleOne),this.set("autoDeactivate",e.autoDeactivate),this.controls_=[],e.controls instanceof Array)for(var o=0;o =0;h--)l.call(this,o[h]);this.viewChange(),e===this.panel_&&this.overflow()}getLayerClass(e){return e?e.getLayers?"ol-layer-group":e instanceof ol.layer.Vector?"ol-layer-vector":e instanceof ol.layer.VectorTile?"ol-layer-vectortile":e instanceof ol.layer.Tile?"ol-layer-tile":e instanceof ol.layer.Image?"ol-layer-image":e instanceof ol.layer.Heatmap?"ol-layer-heatmap":e.getFeatures?"ol-layer-vectorimage":"unknown":"none"}selectLayer(e,t){if(!e){if(!this.getMap())return;e=this.getMap().getLayers().item(this.getMap().getLayers().getLength()-1)}this._selectedLayer=e,this.drawPanel(),t||this.dispatchEvent({type:"select",layer:e})}getSelection(){return this._selectedLayer}setprogress_(e){if(!e.layerswitcher_progress){var t=0,i=0,o=function(){i===t?(i=t=0,ol.ext.element.setStyle(e.layerswitcher_progress,{width:0})):ol.ext.element.setStyle(e.layerswitcher_progress,{width:(t/i*100).toFixed(1)+"%"})};e.getSource().on("tileloadstart",function(){i++,o()}),e.getSource().on("tileloadend",function(){t++,o()}),e.getSource().on("tileloaderror",function(){t++,o()})}}},ol.control.LayerSwitcher.prototype.tip={up:"up/down",down:"down",info:"informations...",extent:"zoom to extent",trash:"remove layer",plus:"expand/shrink"},ol.control.Bar=class extends ol.control.Control{constructor(e){e=e||{};var t=document.createElement("DIV");if(t.classList.add("ol-unselectable","ol-control","ol-bar"),e.className){var i=e.className.split(" ").filter(function(e){return e.length>0});t.classList.add.apply(t.classList,i)}if(e.group&&t.classList.add("ol-group"),super({element:t,target:e.target}),this.set("toggleOne",e.toggleOne),this.set("autoDeactivate",e.autoDeactivate),this.controls_=[],e.controls instanceof Array)for(var o=0;o
- ol.layer.DBPedia is a tile vector layer that use RDF of the french DBpedia project.
+ ol.layer.DBPedia is a tile vector layer that use RDF of the french DBpedia project.
=e));t++);if(o){var a=(o[0]*this.scale_[0]+this.margin_.left)/this.ratio;return this._drawAt(o,a),o[3]}return null}showAtTime(e,t){var i,o,s;if(e instanceof Date?e=e.getTime()/1e3:t&&(e+=this.tab_[0][3][3]),void 0===e)this.bar_.parentElement.classList.contains("over")&&this._drawAt();else for(i=0;(o=this.tab_[i])&&(s=o,!(o[3][3]>=e));i++);if(s){var r=(s[0]*this.scale_[0]+this.margin_.left)/this.ratio;return this._drawAt(s,r),s[3]}return null}pointAtTime(e){var t,i;for(t=1;i=this.tab_[t];t++){var o=i[3][3];if(o>=e){var s=this.tab_[t-1][3];return(s[3]+o)/2"+i+": "+e[i]+"
";ol.ext.element.setHTML(this.element,t)}else ol.ext.element.hide(this.element)}setPosition(e){this.element.classList.remove("ol-left"),this.element.classList.remove("ol-right"),this.element.classList.remove("ol-bottom"),this.element.classList.remove("ol-center"),/^left$|^right$|^bottom$|^center$/.test(e)&&this.element.classList.add("ol-"+e)}show(e){!1===e?ol.ext.element.hide(this.element):ol.ext.element.show(this.element)}hide(){ol.ext.element.hide(this.element)}toggle(){ol.ext.element.toggle(this.element)}isShown(){return"none"===this.element.style.display}},ol.control.Storymap=class extends ol.control.Control{constructor(e){e.target&&(e.html?e.html instanceof Element&&(e.html=e.html.innerHTML):e.html=e.target.innerHTML,e.target.innerHTML="");var t=ol.ext.element.create("DIV",{className:(e.className||"")+" ol-storymap"+(e.target?"":" ol-unselectable ol-control")});super({element:t,target:e.target}),this.content=ol.ext.element.create("DIV",{parent:t}),ol.ext.element.scrollDiv(this.content,{vertical:!0,mousewheel:!0,minibar:e.minibar}),this.setStory(e.html)}setChapter(e){for(var t,i=this.content.querySelectorAll(".chapter"),o=0;t=i[o];o++)t.getAttribute("name")===e&&(this.content.scrollTop=t.offsetTop-30)}setStory(e){e instanceof Element?(this.content.innerHTML="",this.content.appendChild(e)):this.content.innerHTML=e,this.content.querySelectorAll(".chapter").forEach(function(e){e.addEventListener("click",function(t){e.classList.contains("ol-select")?"IMG"===t.target.tagName&&t.target.dataset.title&&this.dispatchEvent({coordinate:this.getMap()?this.getMap().getCoordinateFromPixel([t.layerX,t.layerY]):null,type:"clickimage",img:t.target,title:t.target.dataset.title,element:e,name:e.getAttribute("name"),originalEvent:t}):(this.content.scrollTop=e.offsetTop-30,t.preventDefault())}.bind(this))}.bind(this));var t=this.content.querySelectorAll(".ol-scroll-next");t.forEach(function(e){e.addEventListener("click",function(t){if(e.parentElement.classList.contains("ol-select")){for(var i,o=this.content.querySelectorAll(".chapter"),s=e.offsetTop,r=0;i=o[r];r++)if(i.offsetTop>s){s=i.offsetTop;break}this.content.scrollTop=s-30,t.stopPropagation(),t.preventDefault()}}.bind(this))}.bind(this)),(t=this.content.querySelectorAll(".ol-scroll-top")).forEach(function(e){e.addEventListener("click",function(e){this.content.scrollTop=0,e.stopPropagation(),e.preventDefault()}.bind(this))}.bind(this));var i=function(e){var t=[parseFloat(e.getAttribute("data-lon")),parseFloat(e.getAttribute("data-lat"))],i=ol.proj.fromLonLat(t,this.getMap().getView().getProjection()),o=parseFloat(e.getAttribute("data-zoom"));return{type:"scrollto",element:e,name:e.getAttribute("name"),coordinate:i,lon:t,zoom:o}}.bind(this),o=this.content.querySelectorAll(".chapter")[0];setTimeout(function(){o.classList.add("ol-select"),this.dispatchEvent(i(o))}.bind(this)),this.content.addEventListener("scroll",function(){var e,t=this.content.querySelectorAll(".chapter"),s=ol.ext.element.getStyle(this.content,"height");if(this.content.scrollTop)for(var r,a=0;r=t[a];a++){if(r.offsetTop-this.content.scrollTop>s/3)break;e=r}else e=t[0];if(e&&e!==o){o&&o.classList.remove("ol-select"),(o=e).classList.add("ol-select");var n=i(o),l=this.getMap().getView();switch(l.cancelAnimations(),o.getAttribute("data-animation")){case"flyto":l.flyTo({center:n.coordinate,zoomAt:Math.min(l.getZoom(),n.zoom)-1,zoom:n.zoom})}this.dispatchEvent(n)}}.bind(this))}},ol.control.Swipe=class extends ol.control.Control{constructor(e){e=e||{};var t=document.createElement("div");super({element:t}),t.className=(e.className||"ol-swipe")+" ol-unselectable ol-control";var i=document.createElement("button");t.appendChild(i),t.addEventListener("mousedown",this.move.bind(this)),t.addEventListener("touchstart",this.move.bind(this)),this.precomposeRight_=this.precomposeRight.bind(this),this.precomposeLeft_=this.precomposeLeft.bind(this),this.postcompose_=this.postcompose.bind(this),this.layers=[],e.layers&&this.addLayer(e.layers,!1),e.rightLayers&&this.addLayer(e.rightLayers,!0),this.on("propertychange",function(e){if(this.getMap())try{this.getMap().renderSync()}catch(e){}"horizontal"===this.get("orientation")?(this.element.style.top=100*this.get("position")+"%",this.element.style.left=""):("vertical"!==this.get("orientation")&&this.set("orientation","vertical"),this.element.style.left=100*this.get("position")+"%",this.element.style.top=""),"orientation"===e.key&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this.isMoving||this.layers.forEach(function(e){e.layer.getImageRatio&&e.layer.changed()})}.bind(this)),this.set("position",e.position||.5),this.set("orientation",e.orientation||"vertical")}setMap(e){var t,i;if(this.getMap()){for(t=0;t
"+t:""):t||""}setInfo(e){e?setTimeout(function(){this.set("info",e),this.show(this._coord,this.get("info"))}.bind(this)):(this.set("info",""),this.hide())}removeFeature(){this.setFeature()}formatArea(e){return e>Math.pow(10,-1*this.get("maximumFractionDigits"))?e>1e4?(e/1e6).toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits)")})+" km²":e.toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" m²":""}formatLength(e){return e>Math.pow(10,-1*this.get("maximumFractionDigits"))?e>100?(e/1e3).toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" km":e.toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" m":""}setFeature(e){e&&e.feature&&(e=e.feature),this._feature=e,this._listener&&this._listener.forEach(function(e){ol.Observable.unByKey(e)}),this._listener=[],this.set("measure",""),e&&this._listener.push(e.getGeometry().on("change",function(e){var t,i=e.target;i.getArea?t=this.formatArea(ol.sphere.getArea(i,{projection:this.getMap().getView().getProjection()})):i.getLength&&(t=this.formatLength(ol.sphere.getLength(i,{projection:this.getMap().getView().getProjection()}))),this.set("measure",t)}.bind(this)))}},ol.coordinate.convexHull,function(){var e=function(e,t,i){return(e[0]-i[0])*(t[1]-i[1])-(e[1]-i[1])*(t[0]-i[0])<=0};ol.coordinate.convexHull=function(t){var i;t.sort(function(e,t){return e[0]==t[0]?e[1]-t[1]:e[0]-t[0]});var o=[];for(i=0;i1&&(l[0]>t[0]?t[0]+=360:t[0]-=360),n.push(t),n},ol.sphere.getMapScale=function(e,t){var i=e.getView(),o=i.getProjection(),s=i.getCenter(),r=e.getPixelFromCoordinate(s);r[1]+=1;var a=e.getCoordinateFromPixel(r),n=ol.sphere.getDistance(ol.proj.transform(s,o,"EPSG:4326"),ol.proj.transform(a,o,"EPSG:4326"));return n*=(t||96)/.0254},ol.sphere.setMapScale=function(e,t,i){if(e&&t){var o=t;if("string"==typeof t&&((o=(t=t.replace(":","/").split("/"))[1])||(o=t[0]||""),o=o.replace(/[^\d]/g,""),o=parseInt(o),t[1])){var s=parseInt(t[0]);s&&(o/=s)}if(!o)return;var r=e.getView(),a=r.getProjection(),n=r.getCenter(),l=e.getPixelFromCoordinate(n);l[1]+=1;var h=e.getCoordinateFromPixel(l),c=ol.sphere.getDistance(ol.proj.transform(n,a,"EPSG:4326"),ol.proj.transform(h,a,"EPSG:4326"));return c*=(i||96)/.0254,r.setResolution(r.getResolution()*o/c),o}},function(){function e(e,t){return e[1][2]-t[1][2]}function t(e){return Math.abs((e[0][0]-e[2][0])*(e[1][1]-e[0][1])-(e[0][0]-e[1][0])*(e[2][1]-e[0][1]))}ol.geom.LineString.prototype.simplifyVisvalingam=function(i){var o=this.getCoordinates();if(i.minPoints&&i.minPoints>=o.length)return new ol.geom.LineString(o);for(var s,r=function(){var t={},i=[];function o(t){for(var o=i[t];t>0;){var s=(t+1>>1)-1,r=i[s];if(e(o,r)>=0)break;i[r.index=t]=r,i[o.index=t=s]=o}}function s(t){for(var o=i[t];;){var s=2*(t+1),r=s-1,a=t,n=i[a];if(rt?s-1:s,e),this._reorder=!1,this.dispatchEvent({type:"item:order",position:s>t?s-1:s,oldPosition:t,item:e}),this.refresh())}.bind(this);o.addEventListener("pointerdown",function(){this.select(e),document.addEventListener("pointermove",r),document.addEventListener("pointerup",a),document.addEventListener("pointercancel",a)}.bind(this))})}},ol.ext.input.Color=class extends ol.ext.input.PopupBase{constructor(e){(e=e||{}).hidden=!1!==e.hidden,e.className=("ol-ext-colorpicker "+(e.hastab?"ol-tab ":"")+(e.className||"")).trim(),super(e),this.input.disabled=!0,!1===e.opacity&&this.element.classList.add("ol-nopacity"),this._cursor={};var t=this._hsv={};this._elt.vignet=ol.ext.element.create("DIV",{className:"ol-vignet",parent:this.element});var i=ol.ext.element.create("DIV",{className:"ol-tabbar",parent:this._elt.popup});ol.ext.element.create("DIV",{className:"ol-tab",html:e.paletteLabel||"palette",click:function(){this.element.classList.remove("ol-picker-tab")}.bind(this),parent:i}),ol.ext.element.create("DIV",{className:"ol-tab",html:e.pickerLabel||"picker",click:function(){this.element.classList.add("ol-picker-tab")}.bind(this),parent:i});var o=ol.ext.element.create("DIV",{className:"ol-container",parent:this._elt.popup}),s=this._elt.picker=ol.ext.element.create("DIV",{className:"ol-picker",parent:o}),r=this._cursor.picker=ol.ext.element.create("DIV",{className:"ol-cursor",parent:s});this._listenDrag(s,function(e){var i=Math.max(0,Math.min(e.offsetX/s.clientWidth,1)),o=Math.max(0,Math.min(e.offsetY/s.clientHeight,1));r.style.left=Math.round(100*i)+"%",r.style.top=Math.round(100*o)+"%",t.s=100*i,t.v=100-100*o,this.setColor()}.bind(this));var a=ol.ext.element.create("DIV",{className:"ol-slider",parent:o});this._elt.slider=ol.ext.element.create("DIV",{parent:a});var n=this._cursor.slide=ol.ext.element.create("DIV",{className:"ol-cursor",parent:a});this._listenDrag(a,function(e){var i=Math.max(0,Math.min(e.offsetX/a.clientWidth,1));t.a=100*i,n.style.left=Math.round(100*i)+"%",this.setColor()}.bind(this));var l=ol.ext.element.create("DIV",{className:"ol-tint",parent:o}),h=this._cursor.tint=ol.ext.element.create("DIV",{className:"ol-cursor",parent:l});this._listenDrag(l,function(e){var i=Math.max(0,Math.min(e.offsetY/l.clientHeight,1));t.h=360*i,h.style.top=Math.round(100*i)+"%",this.setColor()}.bind(this)),ol.ext.element.create("DIV",{className:"ol-clear",click:function(){this.setColor([0,0,0,0])}.bind(this),parent:o});var c,u=ol.ext.element.create("DIV",{className:"ol-rgb",parent:o}),d=function(){var e=Math.max(0,Math.min(255,parseInt(this._elt.r.value))),t=Math.max(0,Math.min(255,parseInt(this._elt.g.value))),i=Math.max(0,Math.min(255,parseInt(this._elt.b.value))),o=Math.max(0,Math.min(1,parseFloat(this._elt.a.value)));this.setColor([e,t,i,o])}.bind(this);for(this._elt.r=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:d,min:0,max:255,parent:u}),this._elt.g=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:d,min:0,max:255,parent:u}),this._elt.b=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:d,min:0,max:255,parent:u}),this._elt.a=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:d,min:0,max:1,step:.1,parent:u}),this._elt.txtColor=ol.ext.element.create("INPUT",{type:"text",className:"ol-txt-color",change:function(){var e;this._elt.txtColor.classList.remove("ol-error");try{e=ol.color.asArray(this._elt.txtColor.value)}catch(e){this._elt.txtColor.classList.add("ol-error")}e&&this.setColor(e)}.bind(this),parent:o}),ol.ext.element.create("BUTTON",{html:"OK",click:function(){this._addCustomColor(this.getColor()),this.collapse(!0)}.bind(this),parent:o}),this._paletteColor={},this._elt.palette=ol.ext.element.create("DIV",{className:"ol-palette",parent:this._elt.popup}),c=0;c<8;c++){var g=Math.round(255-255*c/7);this.addPaletteColor([g,g,g],g)}var p=["#f00","#f90","#ff0","#0f0","#0ff","#48e","#00f","#f0f"];for(p.forEach(function(e){this.addPaletteColor(e,ol.color.toHexa(ol.color.asArray(e)))}.bind(this)),c=0;c<5;c++)p.forEach(function(e){e=[(e=ol.color.toHSV(ol.color.asArray(e)))[0],c/4*80+20,100-c/4*60],e=ol.color.fromHSV(e,1),this.addPaletteColor(e,ol.color.toHexa(e))}.bind(this));(ol.ext.element.create("HR",{parent:this._elt.palette}),ol.ext.input.Color.customColorList)||(ol.ext.input.Color.customColorList=new ol.Collection,JSON.parse(localStorage.getItem("ol-ext@colorpicker")||"[]").forEach(function(e){ol.ext.input.Color.customColorList.push(e)}),ol.ext.input.Color.customColorList.on(["add","remove"],function(){localStorage.setItem("ol-ext@colorpicker",JSON.stringify(ol.ext.input.Color.customColorList.getArray()))}));ol.ext.input.Color.customColorList.on("add",function(e){this.addPaletteColor(this.getColorFromID(e.element))}.bind(this)),ol.ext.input.Color.customColorList.on("remove",function(e){this._paletteColor[e.element]&&this._paletteColor[e.element].element.remove(),delete this._paletteColor[e.element]}.bind(this)),ol.ext.input.Color.customColorList.forEach(function(e){this._addCustomColor(this.getColorFromID(e))}.bind(this)),this.setColor(e.color||[0,0,0,0]),this._currentColor=this.getColorID(this.getColor()),this.on("color",function(){this._addCustomColor(this.getColor()),this._currentColor=this.getColorID(this.getColor()),this.setColor()}.bind(this)),this.on("collapse",function(e){if(e.visible)this._currentColor=this.getColorID(this.getColor());else{var t=this.getColor();this._currentColor!==this.getColorID(t)&&this.dispatchEvent({type:"color",color:t})}}.bind(this))}addPaletteColor(e,t,i){try{e=ol.color.asArray(e)}catch(e){return}var o=this.getColorID(e);!this._paletteColor[o]&&e[3]&&(this._paletteColor[o]={color:e,element:ol.ext.element.create("DIV",{title:t||"",className:e[3]<1?"ol-alpha":"",style:{color:"rgb("+e.join(",")+")"},click:function(){this.setColor(e),this.get("autoClose")&&this.collapse(!0)}.bind(this),parent:this._elt.palette})}),i&&this._selectPalette(e)}showTab(e){"palette"===e?this.element.classList.remove("ol-picker-tab"):this.element.classList.add("ol-picker-tab")}getTab(){return this.element.classList.contains("ol-picker-tab")?"picker":"palette"}_selectPalette(e){var t=this.getColorID(e);Object.keys(this._paletteColor).forEach(function(e){this._paletteColor[e].element.classList.remove("ol-select")}.bind(this)),this._paletteColor[t]&&this._paletteColor[t].element.classList.add("ol-select")}setColor(e){var t=this._hsv;if(e){e=ol.color.asArray(e);var i=ol.color.toHSV(e);t.h=i[0],t.s=i[1],t.v=i[2],i.length>3?t.a=100*i[3]:t.a=100,this._cursor.picker.style.left=t.s+"%",this._cursor.picker.style.top=100-t.v+"%",this._cursor.tint.style.top=t.h/360*100+"%",this._cursor.slide.style.left=t.a+"%",this.isCollapsed()&&this.dispatchEvent({type:"color",color:e})}else t.a=Math.round(t.a),e=this.getColor();var o="rgba("+e.join(", ")+")";this._elt.picker.style.color="hsl("+t.h+", 100%, 50%)",this._elt.slider.style.backgroundImage="linear-gradient(45deg, transparent, rgba("+this.getColor(!1).join(",")+"))",this._elt.vignet.style.color=o,this._elt.r.value=e[0],this._elt.g.value=e[1],this._elt.b.value=e[2],this._elt.a.value=e[3],this._elt.txtColor.classList.remove("ol-error"),1===e[3]?this._elt.txtColor.value=ol.color.toHexa(e):this._elt.txtColor.value=o,this._selectPalette(e),this.input.value!==o&&(this.input.value=o,this.input.dispatchEvent(new Event("change")))}getColor(e){return ol.color.fromHSV([this._hsv.h,this._hsv.s,this._hsv.v,!1!==e?this._hsv.a/100:1],1)}_addCustomColor(e){var t=this.getColorID(e);this._paletteColor[t]||e[3]&&(ol.ext.input.Color.customColorList.getArray().indexOf(t)<0&&(ol.ext.input.Color.customColorList.push(t),ol.ext.input.Color.customColorList.getLength()>24&&ol.ext.input.Color.customColorList.removeAt(0)),this.addPaletteColor(e))}clearCustomColor(){ol.ext.input.Color.customColorList.clear()}getColorID(e){return void 0===(e=ol.color.asArray(e))[3]&&(e[3]=1),e.join("-")}getColorFromID(e){var t=e.split("-");return[parseFloat(t[0]),parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3])]}},ol.ext.input.Color.customColorList=null,ol.ext.input.List=class extends ol.ext.input.Base{constructor(e){switch(super(e=e||{}),this._content=ol.ext.element.create("DIV"),(e.hidden||e.disabled)&&(e.hover=!0),this.element=ol.ext.element.create("DIV",{html:this._content,className:"ol-input-popup"+(e.hover?" ol-hover":"")}),this.set("hideOnClick",!1!==e.hideOnClick),e.className&&this.element.classList.add(e.className),e.fixed&&(this.element.classList.add("ol-fixed"),this.set("hideOnClick",!1)),e.align){case"middle":this.set("hideOnClick",!1);case"rigth":this.element.classList.add("ol-"+e.align)}var t=this.input;t.parentNode&&t.parentNode.insertBefore(this.element,t),this.element.appendChild(t);var i=this.popup=ol.ext.element.create("UL",{className:"ol-popup",parent:this.element}),o=[];e.options.forEach(e=>{o.push({value:e.value,element:ol.ext.element.create("LI",{html:e.html,title:e.title||e.value,className:"ol-option",on:{pointerdown:function(){this.setValue(e.value),this.get("hideOnClick")&&(i.style.display="none",setTimeout(function(){i.style.display=""},200))}.bind(this)},parent:this.popup})})}),this.input.addEventListener("change",function(){var e,t=this.input.value;o.forEach(function(i){i.value==t?(i.element.classList.add("ol-selected"),e=i.element):i.element.classList.remove("ol-selected")}),this.dispatchEvent({type:"change:value",value:this.getValue()}),this._content.innerHTML=e?e.innerHTML:""}.bind(this));var s=new Event("change");setTimeout(function(){this.input.dispatchEvent(s)}.bind(this))}},ol.ext.input.Radio=class extends ol.ext.input.Checkbox{constructor(e){super(e=e||{}),this.element.className=("ol-ext-check ol-ext-radio "+(e.className||"")).trim()}},ol.ext.input.Range=class extends ol.ext.input.Base{constructor(e){super(e=e||{}),this.set("overflow",!!e.overflow),this.element=ol.ext.element.create("DIV",{className:"ol-input-slider ol-input-range"+(e.className?" "+e.className:"")});var t=this.input;t.parentNode&&t.parentNode.insertBefore(this.element,t),this.element.appendChild(t);var i=this.slider=ol.ext.element.create("DIV",{className:"ol-slider",parent:this.element}),o=ol.ext.element.create("DIV",{className:"ol-back",parent:this.slider}),s=this.input2=e.input2;s&&this.element.appendChild(s);var r=ol.ext.element.create("DIV",{className:"ol-cursor",parent:i}),a=ol.ext.element.create("DIV",{className:"ol-cursor",parent:s?i:void 0}),n=r;function l(e){n=e.target}r.addEventListener("mousedown",l,!1),r.addEventListener("touchstart",l,!1),a.addEventListener("mousedown",l,!1),a.addEventListener("touchstart",l,!1);var h=void 0!==e.min?e.min:parseFloat(t.min)||0,c=void 0!==e.max?e.max:parseFloat(t.max)||1,u=1/(void 0!==e.step?e.step:parseFloat(t.step)||1);function d(){if(s){var e=parseFloat(r.style.left)||0,t=parseFloat(a.style.left)||0;o.style.left=Math.min(e,t)+"%",o.style.right=100-Math.max(e,t)+"%"}else o.style.left=0,o.style.right=(100-parseFloat(r.style.left)||0)+"%"}function g(){if(s&&parseFloat(t.value)>parseFloat(s.value)){var e=t.value;t.value=s.value,s.value=e,p({target:t}),s&&p({target:s})}}this._listenDrag(i,function(e){var o=n===r?t:s,a=Math.max(0,Math.min(e.offsetX/i.clientWidth,1));n.style.left=Math.max(0,Math.min(100,Math.round(100*a)))+"%";var l=o.value=Math.round((a*(c-h)+h)*u)/u;d(),this.dispatchEvent({type:"change:value",value:l}),"pointerup"===e.type&&g()}.bind(this));var p=function(e){var i=e.target,o=i===t?r:a,s=parseFloat(i.value)||0;this.get("overflow")||(s=Math.max(h,Math.min(c,s))),s!=i.value&&(i.value=s);var n=(s-h)/(c-h);o.style.left=Math.max(0,Math.min(100,Math.round(100*n)))+"%",d(),this.dispatchEvent({type:"change:value",value:s}),g()}.bind(this);t.addEventListener("change",p),s&&s.addEventListener("change",p),p({target:t}),s&&p({target:s})}setValue2(e){this.input2&&(void 0!==e&&(this.input2.value=e),this.input2.dispatchEvent(new Event("change")))}getValue2(){return this.input2?this.input2.value:null}getMin(){return Math.min(parseFloat(this.getValue()),parseFloat(this.getValue2()))}getMax(){return Math.max(parseFloat(this.getValue()),parseFloat(this.getValue2()))}},ol.ext.input.Size=class extends ol.ext.input.List{constructor(e){(e=e||{}).options=[],(e.size||[0,2,3,5,8,13,21,34,55]).forEach(function(t){e.options.push({value:t,html:ol.ext.element.create("DIV",{className:"ol-option-"+t,style:{fontSize:t?t+"px":void 0}})})}),super(e),this._content.remove(),this.element.classList.add("ol-size")}getValue(){return parseFloat(super.getValue())}},ol.ext.input.Switch=class extends ol.ext.input.Checkbox{constructor(e){super(e=e||{}),this.element.className=("ol-ext-toggle-switch "+(e.className||"")).trim()}},ol.ext.input.Width=class extends ol.ext.input.List{constructor(e){(e=e||{}).options=[],(e.size||[0,1,2,3,5,10,15,20]).forEach(function(t){e.options.push({value:t,html:ol.ext.element.create("DIV",{className:"ol-option-"+t,style:{height:t||void 0}})})}),super(e),this._content.remove(),this.element.classList.add("ol-width")}getValue(){return parseFloat(super.getValue())}},ol.legend.Legend=class extends ol.Object{constructor(e){super(),e=e||{},this._items=new ol.Collection;var t,i=[];this._items.on("add",function(e){i.push({item:e.element,on:e.element.on("change",function(){this.refresh()}.bind(this))}),t&&(clearTimeout(t),t=null),t=setTimeout(function(){this.refresh()}.bind(this),0)}.bind(this)),this._items.on("remove",function(e){for(var o=0;o":return o>t.val;case">=":return o>=t.val;case"contain":return new RegExp(this._escape(t.val),i?"":"i").test(o);case"!contain":return!new RegExp(this._escape(t.val),i?"":"i").test(o);case"regexp":return new RegExp(t.val,i?"":"i").test(o);case"!regexp":return!new RegExp(t.val,i?"":"i").test(o);default:return!1}}_selectFeatures(e,t,i,o,s){var r;i=i||[];for(var a=t.length-1;r=t[a];a--){for(var n,l=o,h=0;n=i[h];h++)n.attr&&(l=o?l&&this._checkCondition(r,n,s):l||this._checkCondition(r,n,s));l?e.push(r):this._features&&this._features.removeAt(a)}return e}getSources(){if(this.get("source"))return this.get("source");var e=[];return this.getMap()&&function t(i){i.forEach(function(i){i.getLayers?t(i.getLayers()):i.getSource&&i.getSource()instanceof ol.source.Vector&&e.push(i.getSource())})}(this.getMap().getLayers()),e}doSelect(e){var t=[];if((e=e||{}).features)this._selectFeatures(t,e.features,e.conditions,e.matchAll,e.useCase);else if(this._features)this._selectFeatures(t,this._features.getArray(),e.conditions,e.matchAll,e.useCase);else{(e.sources||this.getSources()).forEach(function(i){this._selectFeatures(t,i.getFeatures(),e.conditions,e.matchAll,e.useCase)}.bind(this))}return this.dispatchEvent({type:"select",features:t}),t}},ol.control.SelectBase.prototype.operationsList={"=":"=","!=":"≠","<":"<","<=":"≤",">=":"≥",">":">",contain:"⊂","!contain":"⊄",regexp:"≃","!regexp":"≄"},ol.control.Button=class extends ol.control.Control{constructor(e){e=e||{};var t=document.createElement("div");t.className=(e.className||"")+" ol-button ol-unselectable ol-control",super({element:t,target:e.target});var i=this,o=this.button_=document.createElement(/ol-text-button/.test(e.className)?"div":"button");o.type="button",e.title&&(o.title=e.title),e.name&&(o.name=e.name),e.html instanceof Element?o.appendChild(e.html):o.innerHTML=e.html||"";o.addEventListener("click",function(t){t&&t.preventDefault&&(t.preventDefault(),t.stopPropagation()),e.handleClick&&e.handleClick.call(i,t)}),t.appendChild(o),!e.title&&o.firstElementChild&&(o.title=o.firstElementChild.title),e.title&&this.set("title",e.title),e.title&&this.set("title",e.title),e.name&&this.set("name",e.name)}setVisible(e){e?ol.ext.element.show(this.element):ol.ext.element.hide(this.element)}setTitle(e){this.button_.setAttribute("title",e)}setHtml(e){ol.ext.element.setHTML(this.button_,e)}getButtonElement(){return this.button_}},ol.control.Toggle=class extends ol.control.Button{constructor(e){(e=e||{}).toggleFn&&(e.onToggle=e.toggleFn),e.handleClick=function(){t.toggle(),e.onToggle&&e.onToggle.call(t,t.getActive())},e.className=(e.className||"")+" ol-toggle",super(e);var t=this;this.interaction_=e.interaction,this.interaction_&&(this.interaction_.setActive(e.active),this.interaction_.on("change:active",function(){t.setActive(t.interaction_.getActive())})),this.set("title",e.title),this.set("autoActivate",e.autoActivate),e.bar&&this.setSubBar(e.bar),this.setActive(e.active),this.setDisable(e.disable)}setMap(e){!e&&this.getMap()&&(this.interaction_&&this.getMap().removeInteraction(this.interaction_),this.subbar_&&this.getMap().removeControl(this.subbar_)),super.setMap(e),e&&(this.interaction_&&e.addInteraction(this.interaction_),this.subbar_&&e.addControl(this.subbar_))}getSubBar(){return this.subbar_}setSubBar(e){var t=this.getMap();t&&this.subbar_&&t.removeControl(this.subbar_),this.subbar_=e,e&&(this.subbar_.setTarget(this.element),this.subbar_.element.classList.add("ol-option-bar"),t&&t.addControl(this.subbar_))}getDisable(){var e=this.element.querySelector("button");return e&&e.disabled}setDisable(e){this.getDisable()!=e&&(this.element.querySelector("button").disabled=e,e&&this.getActive()&&this.setActive(!1),this.dispatchEvent({type:"change:disable",key:"disable",oldValue:!e,disable:e}))}getActive(){return this.element.classList.contains("ol-active")}toggle(){this.getActive()?this.setActive(!1):this.setActive(!0)}setActive(e){this.interaction_&&this.interaction_.setActive(e),this.subbar_&&this.subbar_.setActive(e),this.getActive()!==e&&(e?this.element.classList.add("ol-active"):this.element.classList.remove("ol-active"),this.dispatchEvent({type:"change:active",key:"active",oldValue:!e,active:e}))}setInteraction(e){this.interaction_=e}getInteraction(){return this.interaction_}},ol.control.Search=class extends ol.control.Control{constructor(e){var t=((e=e||{}).className||"")+" ol-search"+(e.target?"":" ol-unselectable ol-control"),i=ol.ext.element.create("DIV",{className:t});super({element:i,target:e.target});var o=this;if(null==e.typing&&(e.typing=300),this._classname=e.className||"search",!1!==e.collapsed&&i.classList.add("ol-collapsed"),e.target||(this.button=document.createElement("BUTTON"),this.button.setAttribute("type","button"),this.button.setAttribute("title",e.title||e.label||"Search"),this.button.addEventListener("click",function(){if(i.classList.toggle("ol-collapsed"),!i.classList.contains("ol-collapsed")){i.querySelector("input.search").focus();for(var e=i.querySelectorAll("li"),t=0;t=200&&e.status<400?"function"==typeof this._callback&&this._callback(e.response):("function"==typeof this._callback&&this._callback(!1,"error"),console.log("AJAX ERROR",arguments))}.bind(this)),this._ajax.on("error",function(){"function"==typeof this._callback&&this._callback(!1,"error"),console.log("AJAX ERROR",arguments)}.bind(this)),this._ajax.on("loadstart",function(){this.element.classList.add("searching")}.bind(this)),this._ajax.on("loadend",function(){this.element.classList.remove("searching")}.bind(this)),"function"==typeof e.handleResponse&&(this.handleResponse=e.handleResponse)}ajax(e,t,i,o){o=o||{},this._callback=i,this._ajax.set("dataType",o.dataType||"JSON"),this._ajax.send(e,t,o)}autocomplete(e,t){var i=this.requestData(e),o=encodeURI(this.get("url"));this.ajax(o,i,function(e){"function"==typeof t&&t(this.handleResponse(e))})}requestData(e){return{q:e}}handleResponse(e){return e}},ol.control.SearchPhoton=class extends ol.control.SearchJSON{constructor(e){(e=e||{}).className=e.className||"photon",e.url=e.url||"https://photon.komoot.io/api/",e.copy=e.copy||'© OpenStreetMap contributors',super(e),this.set("lang",e.lang),this.set("position",e.position)}getTitle(e){var t=e.properties;return(t.housenumber||"")+" "+(t.street||t.name||"")+" "+(t.postcode||"")+" "+(t.city||"")+" ("+t.country+")"}requestData(e){var t={q:e,lang:this.get("lang"),limit:this.get("maxItems")};if(this.get("position")){var i=this.getMap().getView(),o=new ol.geom.Point(i.getCenter());o=o.transform(i.getProjection(),"EPSG:4326").getCoordinates(),t.lon=o[0],t.lat=o[1]}return t}handleResponse(e){return e.features}equalFeatures(e,t){return this.getTitle(e)===this.getTitle(t)&&e.geometry.coordinates[0]===t.geometry.coordinates[0]&&e.geometry.coordinates[1]===t.geometry.coordinates[1]}select(e){var t=e.geometry.coordinates;try{t=ol.proj.transform(e.geometry.coordinates,"EPSG:4326",this.getMap().getView().getProjection())}catch(e){}this.dispatchEvent({type:"select",search:e,coordinate:t})}reverseData(e){var t=ol.proj.transform(e,this.getMap().getView().getProjection(),"EPSG:4326");return{lon:t[0],lat:t[1]}}reverseGeocode(e,t){this.ajax(this.get("url").replace("/api/","/reverse/").replace("/search/","/reverse/"),this.reverseData(e),function(e){e.features&&(e=e.features),e instanceof Array||(e=[e]),t?t.call(this,e):this._handleSelect(e[0],!0)}.bind(this))}},ol.control.SearchGeoportail=class extends ol.control.SearchJSON{constructor(e){(e=e||{}).className=e.className||"IGNF",e.typing=e.typing||500,"gpf"==e.version?e.url="https://data.geopf.fr/geocodage/completion":1==e.version?e.url="https://wxs.ign.fr/"+(e.apiKey||"essentiels")+"/ols/apis/completion":e.url="https://wxs.ign.fr/"+(e.apiKey||"essentiels")+"/geoportail/geocodage/rest/0.1/completion",e.copy='© IGN-Géoportail',super(e),this.set("position",e.position),this.set("useExtent",e.useExtent),this.set("bbox",e.bbox),this.set("type",e.type||"StreetAddress,PositionOfInterest"),this.set("terr",e.terr),this.set("timeout",e.timeout||2e3)}reverseGeocode(e,t){var i=ol.proj.transform(e,this.getMap().getView().getProjection(),"EPSG:4326");this._handleSelect({x:i[0],y:i[1],fulltext:i[0].toFixed(6)+","+i[1].toFixed(6)},!0,t);var o="Commune"===this.get("type")?"PositionOfInterest":this.get("type")||"StreetAddress";/,/.test(o)&&(o="StreetAddress");var s=this.get("url").replace("ols/apis/completion","geoportail/ols").replace("completion","reverse");if(/ols/.test(s)){var r='=e));t++);if(o){var a=(o[0]*this.scale_[0]+this.margin_.left)/this.ratio;return this._drawAt(o,a),o[3]}return null}showAtTime(e,t){var i,o,s;if(e instanceof Date?e=e.getTime()/1e3:t&&(e+=this.tab_[0][3][3]),void 0===e)this.bar_.parentElement.classList.contains("over")&&this._drawAt();else for(i=0;(o=this.tab_[i])&&(s=o,!(o[3][3]>=e));i++);if(s){var r=(s[0]*this.scale_[0]+this.margin_.left)/this.ratio;return this._drawAt(s,r),s[3]}return null}pointAtTime(e){var t,i;for(t=1;i=this.tab_[t];t++){var o=i[3][3];if(o>=e){var s=this.tab_[t-1][3];return(s[3]+o)/2"+i+": "+e[i]+"
";ol.ext.element.setHTML(this.element,t)}else ol.ext.element.hide(this.element)}setPosition(e){this.element.classList.remove("ol-left"),this.element.classList.remove("ol-right"),this.element.classList.remove("ol-bottom"),this.element.classList.remove("ol-center"),/^left$|^right$|^bottom$|^center$/.test(e)&&this.element.classList.add("ol-"+e)}show(e){!1===e?ol.ext.element.hide(this.element):ol.ext.element.show(this.element)}hide(){ol.ext.element.hide(this.element)}toggle(){ol.ext.element.toggle(this.element)}isShown(){return"none"===this.element.style.display}},ol.control.Storymap=class extends ol.control.Control{constructor(e){e.target&&(e.html?e.html instanceof Element&&(e.html=e.html.innerHTML):e.html=e.target.innerHTML,e.target.innerHTML="");var t=ol.ext.element.create("DIV",{className:(e.className||"")+" ol-storymap"+(e.target?"":" ol-unselectable ol-control")});super({element:t,target:e.target}),this.content=ol.ext.element.create("DIV",{parent:t}),ol.ext.element.scrollDiv(this.content,{vertical:!0,mousewheel:!0,minibar:e.minibar}),this.setStory(e.html)}setChapter(e){for(var t,i=this.content.querySelectorAll(".chapter"),o=0;t=i[o];o++)t.getAttribute("name")===e&&(this.content.scrollTop=t.offsetTop-30)}setStory(e){e instanceof Element?(this.content.innerHTML="",this.content.appendChild(e)):this.content.innerHTML=e,this.content.querySelectorAll(".chapter").forEach(function(e){e.addEventListener("click",function(t){e.classList.contains("ol-select")?"IMG"===t.target.tagName&&t.target.dataset.title&&this.dispatchEvent({coordinate:this.getMap()?this.getMap().getCoordinateFromPixel([t.layerX,t.layerY]):null,type:"clickimage",img:t.target,title:t.target.dataset.title,element:e,name:e.getAttribute("name"),originalEvent:t}):(this.content.scrollTop=e.offsetTop-30,t.preventDefault())}.bind(this))}.bind(this));var t=this.content.querySelectorAll(".ol-scroll-next");t.forEach(function(e){e.addEventListener("click",function(t){if(e.parentElement.classList.contains("ol-select")){for(var i,o=this.content.querySelectorAll(".chapter"),s=e.offsetTop,r=0;i=o[r];r++)if(i.offsetTop>s){s=i.offsetTop;break}this.content.scrollTop=s-30,t.stopPropagation(),t.preventDefault()}}.bind(this))}.bind(this)),(t=this.content.querySelectorAll(".ol-scroll-top")).forEach(function(e){e.addEventListener("click",function(e){this.content.scrollTop=0,e.stopPropagation(),e.preventDefault()}.bind(this))}.bind(this));var i=function(e){var t=[parseFloat(e.getAttribute("data-lon")),parseFloat(e.getAttribute("data-lat"))],i=ol.proj.fromLonLat(t,this.getMap().getView().getProjection()),o=parseFloat(e.getAttribute("data-zoom"));return{type:"scrollto",element:e,name:e.getAttribute("name"),coordinate:i,lon:t,zoom:o}}.bind(this),o=this.content.querySelectorAll(".chapter")[0];setTimeout(function(){o.classList.add("ol-select"),this.dispatchEvent(i(o))}.bind(this)),this.content.addEventListener("scroll",function(){var e,t=this.content.querySelectorAll(".chapter"),s=ol.ext.element.getStyle(this.content,"height");if(this.content.scrollTop)for(var r,a=0;r=t[a];a++){if(r.offsetTop-this.content.scrollTop>s/3)break;e=r}else e=t[0];if(e&&e!==o){o&&o.classList.remove("ol-select"),(o=e).classList.add("ol-select");var n=i(o),l=this.getMap().getView();switch(l.cancelAnimations(),o.getAttribute("data-animation")){case"flyto":l.flyTo({center:n.coordinate,zoomAt:Math.min(l.getZoom(),n.zoom)-1,zoom:n.zoom})}this.dispatchEvent(n)}}.bind(this))}},ol.control.Swipe=class extends ol.control.Control{constructor(e){e=e||{};var t=document.createElement("div");super({element:t}),t.className=(e.className||"ol-swipe")+" ol-unselectable ol-control";var i=document.createElement("button");t.appendChild(i),t.addEventListener("mousedown",this.move.bind(this)),t.addEventListener("touchstart",this.move.bind(this)),this.precomposeRight_=this.precomposeRight.bind(this),this.precomposeLeft_=this.precomposeLeft.bind(this),this.postcompose_=this.postcompose.bind(this),this.layers=[],e.layers&&this.addLayer(e.layers,!1),e.rightLayers&&this.addLayer(e.rightLayers,!0),this.on("propertychange",function(e){if(this.getMap())try{this.getMap().renderSync()}catch(e){}"horizontal"===this.get("orientation")?(this.element.style.top=100*this.get("position")+"%",this.element.style.left=""):("vertical"!==this.get("orientation")&&this.set("orientation","vertical"),this.element.style.left=100*this.get("position")+"%",this.element.style.top=""),"orientation"===e.key&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this.isMoving||this.layers.forEach(function(e){e.layer.getImageRatio&&e.layer.changed()})}.bind(this)),this.set("position",e.position||.5),this.set("orientation",e.orientation||"vertical")}setMap(e){var t,i;if(this.getMap()){for(t=0;t
"+t:""):t||""}setInfo(e){e?setTimeout(function(){this.set("info",e),this.show(this._coord,this.get("info"))}.bind(this)):(this.set("info",""),this.hide())}removeFeature(){this.setFeature()}formatArea(e){return e>Math.pow(10,-1*this.get("maximumFractionDigits"))?e>1e4?(e/1e6).toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits)")})+" km²":e.toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" m²":""}formatLength(e){return e>Math.pow(10,-1*this.get("maximumFractionDigits"))?e>100?(e/1e3).toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" km":e.toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" m":""}setFeature(e){e&&e.feature&&(e=e.feature),this._feature=e,this._listener&&this._listener.forEach(function(e){ol.Observable.unByKey(e)}),this._listener=[],this.set("measure",""),e&&this._listener.push(e.getGeometry().on("change",function(e){var t,i=e.target;i.getArea?t=this.formatArea(ol.sphere.getArea(i,{projection:this.getMap().getView().getProjection()})):i.getLength&&(t=this.formatLength(ol.sphere.getLength(i,{projection:this.getMap().getView().getProjection()}))),this.set("measure",t)}.bind(this)))}},ol.coordinate.convexHull,function(){var e=function(e,t,i){return(e[0]-i[0])*(t[1]-i[1])-(e[1]-i[1])*(t[0]-i[0])<=0};ol.coordinate.convexHull=function(t){var i;t.sort(function(e,t){return e[0]==t[0]?e[1]-t[1]:e[0]-t[0]});var o=[];for(i=0;i1&&(l[0]>t[0]?t[0]+=360:t[0]-=360),n.push(t),n},ol.sphere.getMapScale=function(e,t){var i=e.getView(),o=i.getProjection(),s=i.getCenter(),r=e.getPixelFromCoordinate(s);r[1]+=1;var a=e.getCoordinateFromPixel(r),n=ol.sphere.getDistance(ol.proj.transform(s,o,"EPSG:4326"),ol.proj.transform(a,o,"EPSG:4326"));return n*=(t||96)/.0254},ol.sphere.setMapScale=function(e,t,i){if(e&&t){var o=t;if("string"==typeof t&&((o=(t=t.replace(":","/").split("/"))[1])||(o=t[0]||""),o=o.replace(/[^\d]/g,""),o=parseInt(o),t[1])){var s=parseInt(t[0]);s&&(o/=s)}if(!o)return;var r=e.getView(),a=r.getProjection(),n=r.getCenter(),l=e.getPixelFromCoordinate(n);l[1]+=1;var h=e.getCoordinateFromPixel(l),c=ol.sphere.getDistance(ol.proj.transform(n,a,"EPSG:4326"),ol.proj.transform(h,a,"EPSG:4326"));return c*=(i||96)/.0254,r.setResolution(r.getResolution()*o/c),o}},function(){function e(e,t){return e[1][2]-t[1][2]}function t(e){return Math.abs((e[0][0]-e[2][0])*(e[1][1]-e[0][1])-(e[0][0]-e[1][0])*(e[2][1]-e[0][1]))}ol.geom.LineString.prototype.simplifyVisvalingam=function(i){var o=this.getCoordinates();if(i.minPoints&&i.minPoints>=o.length)return new ol.geom.LineString(o);for(var s,r=function(){var t={},i=[];function o(t){for(var o=i[t];t>0;){var s=(t+1>>1)-1,r=i[s];if(e(o,r)>=0)break;i[r.index=t]=r,i[o.index=t=s]=o}}function s(t){for(var o=i[t];;){var s=2*(t+1),r=s-1,a=t,n=i[a];if(rol-ext: DBPedia layer
Symbolisation use Fontawesome with an ol.style.Font.