var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this); $jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;dZeichnungsfl\u00e4che: "+netgis.util.formatArea(a,!0)+"":null;this.update()};netgis=netgis||{};netgis.Client=function(a,b){this.container=this.initContainer(a);this.logEvents=!1;netgis.util.isString(b)?(this.showLoader(!0),netgis.util.request(b,this.onConfigResponse.bind(this))):this.init(this.container,b)}; netgis.Client.prototype.init=function(a,b){this.config=b;this.initParams(b);this.initConfig(b);this.initElements(a);this.initModules(b);this.initEvents();this.initOutput(b);a=new netgis.ContextMenu;a.attachTo(this.container);this.modules.contextmenu=a;this.popup=new netgis.Popup;this.popup.attachTo(this.container)};netgis.Client.prototype.initContainer=function(a){netgis.util.isString(a)&&(a=document.getElementById(a));a.classList.add("netgis-client","netgis-font");return a}; netgis.Client.prototype.initParams=function(a){var b=window.location.search.substr(1);b=b.split("&");this.params={};for(var c=0;c"),this.container.appendChild(this.loader));!1===a?(this.loader.classList.add("netgis-fade"),this.loaderTimeout=window.setTimeout(function(){this.loader.classList.add("netgis-hide"); this.loaderTimeout=null}.bind(this),600)):(this.loader.classList.remove("netgis-hide"),this.loader.classList.remove("netgis-fade"),this.loaderTimeout&&(window.clearTimeout(this.loaderTimeout),this.loaderTimeout=null))};netgis.Client.prototype.handleEvent=function(a){var b=a.type;a=a.detail;!0===this.logEvents&&console.info("EVENT:",b,a)};netgis.Client.prototype.addModule=function(a,b){b=new b(this.config);b.attachTo&&b.attachTo(this.container);return this.modules[a]=b}; netgis.Client.prototype.isMobile=function(){return netgis.util.isMobile(this.container)};netgis.Client.prototype.onConfigResponse=function(a){a=JSON.parse(a);this.init(this.container,a);this.showLoader(!1)};netgis.Client.prototype.requestContextWMC=function(a,b){if(-1c.width&&(a-=d.width);b+d.height>c.height&&(b-=d.height);this.container.style.left=a+"px";this.container.style.top=b+"px"}; netgis.ContextMenu.prototype.onContextMenuShow=function(a){a=a.detail;this.clear();for(var b=0;bExportieren",this.onExportClickPDF.bind(this)); this.sections.jpeg=this.tabs.getContentSection(a);a+=1;this.addInputNumber(this.sections.jpeg,"Breite (Pixel):",1600,0);this.addInputNumber(this.sections.jpeg,"H\u00f6he (Pixel):",900,0);this.addCheckbox(this.sections.jpeg,"Querformat",!0);this.addButton(this.sections.jpeg,"Exportieren",this.onExportClickJPEG.bind(this));this.sections.png=this.tabs.getContentSection(a);a+=1;this.addInputNumber(this.sections.png,"Breite (Pixel):",1600,0);this.addInputNumber(this.sections.png, "H\u00f6he (Pixel):",900,0);this.addCheckbox(this.sections.png,"Querformat",!0);this.addButton(this.sections.png,"Exportieren",this.onExportClickPNG.bind(this));this.sections.gif=this.tabs.getContentSection(a);a+=1;this.addInputNumber(this.sections.gif,"Breite (Pixel):",1600,0);this.addInputNumber(this.sections.gif,"H\u00f6he (Pixel):",900,0);this.addCheckbox(this.sections.gif,"Querformat",!0);this.addButton(this.sections.gif,"Exportieren", this.onExportClickGIF.bind(this));this.sections.geojson=this.tabs.getContentSection(a);this.addCheckbox(this.sections.geojson,"Nicht-Editierbare Geometrien einbeziehen",!1);this.addButton(this.sections.geojson,"Exportieren",this.onExportClickGeoJSON.bind(this))}; netgis.Export.prototype.attachTo=function(a){a.appendChild(this.modal.container);a.addEventListener(netgis.Events.EXPORT_SHOW,this.onExportShow.bind(this));a.addEventListener(netgis.Events.EXPORT_END,this.onExportEnd.bind(this))};netgis.Export.prototype.addText=function(a,b){var c=document.createElement("div");c.innerHTML=b;a.appendChild(c);return c}; netgis.Export.prototype.addButton=function(a,b,c){var d=document.createElement("button");d.className="netgis-button netgis-center netgis-color-a netgis-hover-c netgis-shadow";d.setAttribute("type","button");d.innerHTML=b;c&&(d.onclick=c);a.appendChild(d);return d}; netgis.Export.prototype.addInputText=function(a,b,c){var d=document.createElement("label");d.innerHTML=b;var e=document.createElement("input");e.setAttribute("type","text");d.appendChild(e);if(c){b="list-"+netgis.util.stringToID(b);var f=document.createElement("datalist");f.setAttribute("id",b);for(var g=0;gHinzuf\u00fcgen",this.onGeoportalSubmit.bind(this)));this.sections.wms=this.tabs.getContentSection(a);a+=1;this.addInputText(this.sections.wms,"WMS-URL:",this.config["import"].wms_options);this.addButton(this.sections.wms,"Dienst laden",this.onWMSLoadClick.bind(this)); this.addInputText(this.sections.wms,"Bezeichnung:");this.addInputSelect(this.sections.wms,"Ebene:");this.addInputSelect(this.sections.wms,"Format:");this.addButton(this.sections.wms,"Hinzuf\u00fcgen",this.onWMSAcceptClick.bind(this));this.showDetailsWMS(!1);this.sections.wfs=this.tabs.getContentSection(a);a+=1;this.addInputText(this.sections.wfs,"WFS-URL:",this.config["import"].wfs_options);this.addButton(this.sections.wfs,"Dienst laden", this.onWFSLoadClick.bind(this));this.addInputText(this.sections.wfs,"Bezeichnung:");this.addInputSelect(this.sections.wfs,"Ebene:");this.addInputSelect(this.sections.wfs,"Format:");this.addButton(this.sections.wfs,"Hinzuf\u00fcgen",this.onWFSAcceptClick.bind(this));this.showDetailsWFS(!1);this.sections.geojson=this.tabs.getContentSection(a);a+=1;this.addInputFile(this.sections.geojson,"GeoJSON-Datei:",".geojson,.json");this.addText(this.sections.geojson, "

Unterst\u00fctzte Koordinatensysteme:

  • Web Mercator (EPSG:3857)
  • WGS84 / Lon-Lat (EPSG:4326)
  • ETRS89 / UTM Zone 32N (EPSG:25832)
");this.addButton(this.sections.geojson,"Datei laden",this.onGeoJSONAcceptClick.bind(this));this.sections.gml=this.tabs.getContentSection(a);a+=1;this.addInputFile(this.sections.gml,"GML-Datei:",".gml,.xml");this.addText(this.sections.gml,"

Unterst\u00fctzte Koordinatensysteme:

  • Web Mercator (EPSG:3857)
  • WGS84 / Lon-Lat (EPSG:4326)
  • ETRS89 / UTM Zone 32N (EPSG:25832)
"); this.addButton(this.sections.gml,"Datei laden",this.onGMLAcceptClick.bind(this));this.sections.geopackage=this.tabs.getContentSection(a);a+=1;this.addInputFile(this.sections.geopackage,"GeoPackage-Datei:",".gpkg");this.addText(this.sections.geopackage,"

Unterst\u00fctzte Koordinatensysteme:

  • Web Mercator (EPSG:3857)
  • WGS84 / Lon-Lat (EPSG:4326)
  • ETRS89 / UTM Zone 32N (EPSG:25832)
");this.addButton(this.sections.geopackage, "Datei laden",this.onGeoPackageAcceptClick.bind(this));this.sections.spatialite=this.tabs.getContentSection(a);a+=1;this.addInputFile(this.sections.spatialite,"Spatialite-Datei:",".sqlite");this.addText(this.sections.spatialite,"

Unterst\u00fctzte Koordinatensysteme:

  • Web Mercator (EPSG:3857)
  • WGS84 / Lon-Lat (EPSG:4326)
  • ETRS89 / UTM Zone 32N (EPSG:25832)
");this.addButton(this.sections.spatialite,"Datei laden", this.onSpatialiteAcceptClick.bind(this));this.sections.shapefile=this.tabs.getContentSection(a);this.addInputFile(this.sections.shapefile,"Shapefile-Zip-Datei:",".zip");this.addText(this.sections.shapefile,"

Unterst\u00fctzte Koordinatensysteme:

  • Web Mercator (EPSG:3857)
  • WGS84 / Lon-Lat (EPSG:4326)
  • ETRS89 / UTM Zone 32N (EPSG:25832)
");this.addButton(this.sections.shapefile,"Datei laden",this.onShapefileAcceptClick.bind(this))}; netgis.Import.prototype.initPreview=function(){this.preview=new netgis.Modal("Vorschau");this.preview.attachTo(this.modal.content);this.previewMapContainer=document.createElement("div");this.previewMapContainer.className="netgis-preview-map";this.preview.content.appendChild(this.previewMapContainer);if(ol){var a=this.config.map;a={projection:a.projection,center:a.centerLonLat?ol.proj.fromLonLat(a.centerLonLat):a.center,zoom:a.zoom};this.previewMap=new ol.Map({target:this.previewMapContainer,view:new ol.View(a), pixelRatio:1,moveTolerance:3,controls:[]});this.previewMap.getView().padding=[10,10,10,10];this.previewMap.addLayer(new ol.layer.Tile({source:new ol.source.OSM}))}this.previewTree=new netgis.Tree;this.previewTree.container.classList.add("netgis-preview-tree");this.previewTree.attachTo(this.preview.content);this.previewTree.container.addEventListener(netgis.Events.TREE_ITEM_CHANGE,this.onPreviewTreeItemChange.bind(this));this.previewSubmit=document.createElement("button");this.previewSubmit.setAttribute("type", "button");this.previewSubmit.className="netgis-import-submit netgis-button netgis-center netgis-color-a netgis-hover-c netgis-shadow";this.previewSubmit.innerHTML="Hinzuf\u00fcgen";this.previewSubmit.addEventListener("click",this.onPreviewSubmitClick.bind(this));this.preview.content.appendChild(this.previewSubmit)}; netgis.Import.prototype.attachTo=function(a){a.appendChild(this.modal.container);a.addEventListener(netgis.Events.IMPORT_LAYER_SHOW,this.onImportShow.bind(this));a.addEventListener(netgis.Events.IMPORT_LAYER_PREVIEW_FEATURES,this.onImportPreviewFeatures.bind(this))};netgis.Import.prototype.addText=function(a,b){var c=document.createElement("div");c.innerHTML=b;a.appendChild(c);return c}; netgis.Import.prototype.addButton=function(a,b,c){var d=document.createElement("button");d.className="netgis-button netgis-center netgis-color-a netgis-hover-c netgis-shadow";d.setAttribute("type","button");d.innerHTML=b;c&&(d.onclick=c);a.appendChild(d);return d}; netgis.Import.prototype.addInputText=function(a,b,c){var d=document.createElement("label");d.innerHTML=b;var e=document.createElement("input");e.setAttribute("type","text");d.appendChild(e);if(c){b="list-"+netgis.util.stringToID(b);var f=document.createElement("datalist");f.setAttribute("id",b);for(var g=0;gb.length)){var c=b.indexOf("?");a=-1b.length)){var c=b.indexOf("?");a=-1":"
","",a,"
",b,"
"].join(""))};netgis.Info.prototype.onClientContextResponse=function(a){this.initConfig(a.detail.context.config)}; netgis.Info.prototype.onMapLayerToggle=function(a){var b=a.detail;a=b.id;if(b.on){b=this.config.layers;for(var c=null,d=0;d"}this.popup.hideLoader();this.addSection(b,a,!1)}; netgis.Info.prototype.onMapFeatureClick=function(a){var b=a.detail,c=b.properties;a=null;var d=[],e="geometry fill fill-opacity stroke stroke-opacity stroke-width styleUrl".split(" ");for(g in c)if(!(-1");for(c=0;c");b.push(""+g+"");b.push(""+f+"");b.push("")}b.push("")}else b.push("Keine Eigenschaften vorhanden...");b=b.join("");this.addSection(a,b,!1);!this.popup.isVisible()&&this.popup.show()};netgis=netgis||{};netgis.LayerID=Object.freeze({EDITABLE:"editable-layer",NON_EDITABLE:"non-editable-layer"});netgis=netgis||{};netgis.LayerTree=function(a){this.config=a;this.importFolder=null;this.initElements();this.initFolders();this.initConfig(a)};netgis.LayerTree.prototype.initElements=function(){this.panel=new netgis.Panel("Layers");this.tree=new netgis.Tree;this.tree.attachTo(this.panel.content);this.tree.container.addEventListener(netgis.Events.TREE_ITEM_CHANGE,this.onTreeItemChange.bind(this));this.tree.container.addEventListener(netgis.Events.TREE_ITEM_SLIDER_CHANGE,this.onTreeItemSliderChange.bind(this))}; netgis.LayerTree.prototype.initFolders=function(){this.editFolder=this.tree.addFolder(null,"edit-folder","Zeichnung",!0);this.tree.addCheckbox(this.editFolder,netgis.LayerID.EDITABLE,"Editierbar");this.tree.setItemChecked(netgis.LayerID.EDITABLE,!0);this.tree.addCheckbox(this.editFolder,netgis.LayerID.NON_EDITABLE,"Nicht-Editierbar");this.tree.setItemChecked(netgis.LayerID.NON_EDITABLE,!0);this.editFolder.classList.add("netgis-hide")}; netgis.LayerTree.prototype.initConfig=function(a,b){a.layertree&&a.layertree.title&&this.panel.setTitle(a.layertree.title);for(var c=a.folders,d={},e=0;e';a.layertree&&a.layertree.query_icon&&(m=a.layertree.query_icon);(!0===h.query||h.query_url&&""!==h.query_url)&&m&&""!==m&&(l+=''+m+"");g=!0===k?this.tree.addRadioButton(f,g,l,h.active,this.createDefaultDetails(h)):this.tree.addCheckbox(f,g,l,h.active,!1,this.createDefaultDetails(h));g.addEventListener("contextmenu", this.onTreeItemMenu.bind(this));!0===h.hidden&&g.classList.add("netgis-hide")}this.tree.updateFolderChecks();if(a.layertree&&a.layertree.buttons)for(c=a.layertree.buttons,e=0;e';config.layertree&&config.layertree.query_icon&&(c=config.layertree.query_icon);(!0===a.query||a.query_url&&""!==a.query_url)&&c&&""!==c&&(b+=''+c+"");this.tree.addCheckbox(this.importFolder,a.id,b,!0,!0,this.createDefaultDetails(a)).addEventListener("contextmenu", this.onTreeItemMenu.bind(this));this.tree.updateFolderChecks()}; netgis.LayerTree.prototype.onImportGeoportalSubmit=function(a){a=a.detail;var b=a.folder.id,c=this.tree.getFolder(b);c||(c=this.tree.addFolder(null,b,a.folder.title,!0,!1));var d=a.layer.id;b={id:d,folder:b,title:a.layer.title,active:!0,type:netgis.LayerTypes.WMS,url:a.layer.url,name:a.layer.name,order:1E4,transparency:0};this.config.layers.push(b);this.tree.addCheckbox(c,d,a.layer.title,!1,!1,this.createDefaultDetails(b));this.tree.setItemChecked(d,!0,!1)}; netgis.LayerTree.prototype.onTreeItemMenu=function(a){a.preventDefault();return!1};netgis.LayerTree.prototype.onContextMenuSliderChange=function(a){var b=a.detail;a=.01*b.val;var c=null;0===b.id.indexOf("layer_trans_")&&(c=b.id.split("layer_trans_")[1]);b=this.config.layers;for(var d=0;dLegende");this.panel.content.classList.add("netgis-legend")};netgis.Legend.prototype.initConfig=function(a){var b=a.legend;b&&!0===b.open&&this.show();a=a.layers;for(b=0;b":"
","",b,"
",c,"
"].join("")+this.panel.content.innerHTML}; netgis.Legend.prototype.addLayerLegend=function(a){for(var b=null,c=this.config.layers,d=0;d",!0)}; netgis.Legend.prototype.removeLayerLegend=function(a){for(var b=this.panel.content.getElementsByTagName("details"),c=0;c=e)return c;!0===b.viewport_labels&&(b=this.view.calculateExtent(this.map.getSize()),f=ol.geom.Polygon.fromExtent(b),b=new jsts.io.OL3Parser,d=b.read(d),f=b.read(f),d=d.intersection(f),d=b.write(d),c.setGeometry(d));e=netgis.util.formatArea(e,!0);(a=a.getProperties().title)&&(e=a+"\n"+e);c.setText(new ol.style.Text({text:e,font:"4mm Arial, sans-serif",fill:new ol.style.Fill({color:g}),backgroundFill:new ol.style.Fill({color:"rgba( 255, 255, 255, 0.5 )"}),padding:[2,4,2,4]}))}return c}; netgis.Map.prototype.styleNonEdit=function(a){var b=this.config.styles.non_edit,c=this.config.styles.select,d=a.getGeometry(),e=this.hoverFeature===a;-1=e)return c;!0===b.viewport_labels&&(b=this.map.getView().calculateExtent(this.map.getSize()),f=ol.geom.Polygon.fromExtent(b),b=new jsts.io.OL3Parser,d=b.read(d),f=b.read(f),d=d.intersection(f),d=b.write(d),c.setGeometry(d));e=netgis.util.formatArea(e,!0);(a=a.getProperties().title)&&(e=a+"\n"+e);c.setText(new ol.style.Text({text:e,font:"4mm Arial, sans-serif",fill:new ol.style.Fill({color:g}),backgroundFill:new ol.style.Fill({color:"rgba( 255, 255, 255, 0.5 )"}),padding:[2,4,2,4]}))}return c}; netgis.Map.prototype.styleSketch=function(a){var b=this.config.styles[this.drawError?"error":"sketch"],c=a.getGeometry(),d=new ol.style.Style({image:new ol.style.Circle({radius:b.radius,fill:new ol.style.Fill({color:b.fill})}),fill:new ol.style.Fill({color:b.fill}),stroke:new ol.style.Stroke({color:b.stroke,width:b.width})});c instanceof ol.geom.Polygon&&(c=c.getArea(),d.setText(new ol.style.Text({text:[netgis.util.formatArea(c,!0),"4mm sans-serif"],font:"Arial",fill:new ol.style.Fill({color:b.stroke}), backgroundFill:new ol.style.Fill({color:"rgba( 255, 255, 255, 0.5 )"}),padding:[2,4,2,4]})));a=new ol.style.Style({image:new ol.style.Circle({radius:b.radius,fill:new ol.style.Fill({color:b.stroke})}),geometry:this.getGeometryPoints(a)});return[d,a]}; netgis.Map.prototype.styleModify=function(a){var b=this.config.styles.modify,c=new ol.style.Style({image:new ol.style.Circle({radius:b.radius,fill:new ol.style.Fill({color:b.stroke})}),fill:new ol.style.Fill({color:b.fill}),stroke:new ol.style.Stroke({color:b.stroke,width:b.width})}),d=new ol.style.Style({image:new ol.style.Circle({radius:b.radius,fill:new ol.style.Fill({color:b.stroke})}),geometry:this.getGeometryPoints(a)});a=a.getGeometry();a instanceof ol.geom.Polygon&&(a=a.getArea(),c.setText(new ol.style.Text({text:[netgis.util.formatArea(a, !0),"4mm sans-serif"],font:"Arial",fill:new ol.style.Fill({color:b.stroke}),backgroundFill:new ol.style.Fill({color:"rgba( 255, 255, 255, 0.5 )"}),padding:[2,4,2,4]})));return[c,d]};netgis.Map.prototype.styleHover=function(a){a=this.config.styles.select;return new ol.style.Style({image:new ol.style.Circle({radius:a.radius,fill:new ol.style.Fill({color:a.stroke})}),fill:new ol.style.Fill({color:a.fill}),stroke:new ol.style.Stroke({color:a.stroke,width:a.width}),zIndex:1})}; netgis.Map.prototype.getGeometryPoints=function(a){var b=a.getGeometry();if(b instanceof ol.geom.LineString)return new ol.geom.MultiPoint(b.getCoordinates());if(b instanceof ol.geom.Polygon){a=[];b=b.getCoordinates();for(var c=0;cg;++g)e[g]=d/Math.pow(2,g),f[g]=g;source=new ol.source.WMTS({url:a,params:{LAYER:b,FORMAT:"image/png",TRANSPARENT:"true",VERSION:"1.1.1"},layer:b,format:"image/jpeg",matrixSet:"UTM32",tileGrid:new ol.tilegrid.WMTS({origin:ol.extent.getTopLeft(c),resolutions:e,matrixIds:f})})}; netgis.Map.prototype.createLayerGeoJSON=function(a){if(netgis.util.isObject(a)){var b=new ol.format.GeoJSON,c=b.readProjection(a);a=b.readFeatures(a,{featureProjection:this.view.getProjection()});c=c.getCode();switch(c){case "EPSG:3857":case "EPSG:4326":case this.view.getProjection().getCode():break;default:console.warn("unsupported import projection '"+c+"'")}var d=new ol.layer.Vector({source:new ol.source.Vector({features:a})});return d}if(netgis.util.isString(a)){d=new ol.layer.Vector({source:new ol.source.Vector({features:[]})}); var e=this;netgis.util.request(a,function(a){a=JSON.parse(a);a=e.createLayerGeoJSON(a);d.getSource().addFeatures(a.getSource().getFeatures())});return d}}; netgis.Map.prototype.createLayerGML=function(a){console.warn("GML support is experimental!");var b=[];a=(new DOMParser).parseFromString(a,"text/xml").getElementsByTagName("gml:featureMember");for(var c=0;ca.length)){var b=this.previewLayer.getSource().getFeatures()[0];b&&(a=a[0].getGeometry(),a=this.createBufferGeometry(a,this.drawBufferRadius,this.drawBufferSegments),b.setGeometry(a))}}}; netgis.Map.prototype.isPointInsideLayer=function(a,b){a=a.getSource().getFeatures();for(var c=0;cc.length)return!1}else if(b instanceof ol.geom.Polygon&&(c=c[0],4>c.length||0>=b.getArea()))return!1;c=new jsts.io.OL3Parser;b=c.read(b);a=a.getSource().getFeatures();for(var d=0;da.length)){for(var b=a[0].getGeometry().getExtent(),c=1;cthis.viewHistoryMax&&this.viewHistory.shift();this.viewIndex=this.viewHistory.length-1}; netgis.Map.prototype.gotoViewHistory=function(a){if(!(1>this.viewHistory.length)){var b=this.viewHistory.length-1;0>a&&(a=b);a>b&&(a=0);a!==this.viewIndex&&(b=this.viewHistory[a],this.viewIndex=a,this.viewFromHistory=!0,this.view.setCenter(b.center),this.view.setZoom(b.zoom))}};netgis.Map.prototype.setPadding=function(a,b,c,d){var e=this.paddingBuffer;this.view.padding=[a+e,b+e,c+e,d+e]}; netgis.Map.prototype.exportImage=function(a,b,c,d,e){var f=this,g=this.container,h=this.map,k=this.config["export"],l=new Image;l.onload=function(){var m=document.createElement("div");m.style.position="fixed";m.style.top="0px";m.style.left="0px";m.style.width=b+"px";m.style.height=c+"px";m.style.background="white";m.style.zIndex=-1;m.style.opacity=0;m.style.pointerEvents="none";g.appendChild(m);h.setTarget(m);h.once("rendercomplete",function(){var n=document.createElement("canvas");n.width=b;n.height= c;var q=n.getContext("2d");q.webkitImageSmoothingEnabled=!1;q.mozImageSmoothingEnabled=!1;q.imageSmoothingEnabled=!1;Array.prototype.forEach.call(document.querySelectorAll(".ol-layer canvas"),function(a){if(0n.width){var u=v;w=u*t;w>r&&(w=r,u=w/t)}else w=r,u=w/t,u>v&&(u=v,w=u*t);t=new jsPDF(d?"l":"p");var x=e;x+=(r-w)/2;r=e;r+=(v-u)/2;t.addImage(n.toDataURL("image/png,1.0",1),"PNG",x,r,w,u);t.setFillColor(255,255,255);t.rect(x,r+u-11,80,11,"F");t.setFontSize(8); t.text("Datum: "+netgis.util.getTimeStamp(),x+2,r+u-2-4);t.text("Quelle: "+window.location.href,x+2,r+u-2);n=t.output("bloburl",{filename:k.default_filename+".pdf"});window.open(n,"_blank");break;case "jpeg":window.navigator.msSaveBlob?window.navigator.msSaveBlob(n.msToBlob(),k.default_filename+".jpg"):(p.setAttribute("download",k.default_filename+".jpg"),p.setAttribute("href",n.toDataURL("image/jpeg",1)),p.click());break;case "png":window.navigator.msSaveBlob?window.navigator.msSaveBlob(n.msToBlob(), k.default_filename+".png"):(p.setAttribute("download",k.default_filename+".png"),p.setAttribute("href",n.toDataURL("image/png",1)),p.click());break;case "gif":p.setAttribute("download",k.default_filename+".gif"),v=new GIF({workerScript:k.gif_worker,quality:1}),v.addFrame(n),v.on("finished",function(a){p.setAttribute("href",window.URL.createObjectURL(a));p.click()}),v.render()}h.setTarget(g);g.removeChild(m);netgis.util.invoke(f.container,netgis.Events.EXPORT_END,null)});h.renderSync()};l.src=k.logo}; netgis.Map.prototype.exportFeatures=function(a){var b=this.editLayer.getSource().getFeatures();!0===a&&(a=this.nonEditLayer.getSource().getFeatures(),b=b.concat(a));b=(new ol.format.GeoJSON).writeFeaturesObject(b,{featureProjection:this.view.getProjection(),dataProjection:"EPSG:4326"});a=this.config["export"].default_filename+".geojson";b.name=a;netgis.util.downloadJSON(b,a);netgis.util.invoke(this.container,netgis.Events.EXPORT_END,null)};netgis.Map.prototype.onClientContextResponse=function(a){this.initConfig(a.detail.context.config)}; netgis.Map.prototype.onEditLayerLoaded=function(a){a=a.detail.geojson;var b=new ol.format.GeoJSON;b.readProjection(a);a=b.readFeatures(a,{featureProjection:this.view.getProjection().getCode()});var c=this,d=a.slice();window.setTimeout(function(){c.zoomFeatures(d)},10);b=[];for(var e=0;ea[0].length)for(var d=0;d";d.setAttribute("type","button");c&&(d.onclick=c);a&&a.appendChild(d);return d};netgis.Modal.prototype.onHeaderClick=function(a){this.hide()};netgis.Modal.prototype.onContainerClick=function(a){a.target===this.container&&this.hide()};netgis=netgis||{}; netgis.Modes=Object.freeze({VIEW:"view",ZOOM_BOX:"zoom-box",MEASURE_LINE:"measure-line",MEASURE_AREA:"measure-area",DRAW_POINTS:"draw-points",DRAW_LINES:"draw-lines",DRAW_POLYGONS:"draw-polygons",MODIFY_FEATURES:"modify-features",DELETE_FEATURES:"delete-features",BUFFER_FEATURES:"buffer-features",BUFFER_FEATURES_EDIT:"buffer-features-edit",BUFFER_FEATURES_DYNAMIC:"buffer-features-dynamic",CUT_FEATURES:"cut-features",CUT_FEATURES_DRAW:"cut-features-draw",CUT_FEATURES_DYNAMIC:"cut-features-dynamic",SEARCH_PARCEL:"search-parcel"});netgis=netgis||{}; netgis.OWS=function(){return{read:function(a,b){b={layers:[],folders:[]};netgis.util.isDefined(a.properties)&&(b.bbox=a.properties.bbox);a=a.features;for(var c=0;c";d.setAttribute("type","button");c&&(d.onpointerdown=c);a&&a.appendChild(d);return d}; netgis.Panel.prototype.show=function(){this.container.classList.contains("netgis-show")||(this.container.classList.add("netgis-show"),netgis.util.invoke(this.container,netgis.Events.PANEL_TOGGLE,{visible:!0,width:this.container.getBoundingClientRect().width}))};netgis.Panel.prototype.hide=function(){this.container.classList.contains("netgis-show")&&(this.container.classList.remove("netgis-show"),netgis.util.invoke(this.container,netgis.Events.PANEL_TOGGLE,{visible:!1}))}; netgis.Panel.prototype.toggle=function(){this.container.classList.toggle("netgis-show");var a=this.container.classList.contains("netgis-show");netgis.util.invoke(this.container,netgis.Events.PANEL_TOGGLE,{visible:a,width:a?this.container.getBoundingClientRect().width:void 0})};netgis.Panel.prototype.visible=function(){return this.container.classList.contains("netgis-show")};netgis.Panel.prototype.width=function(){return this.container.getBoundingClientRect().width}; netgis.Panel.prototype.setTitle=function(a){this.header.getElementsByTagName("span")[0].innerHTML=a};netgis.Panel.prototype.onHeaderClick=function(a){this.hide()};netgis.Panel.prototype.onResize=function(a){this.container.classList.contains("netgis-show")&&(a=this.container.getBoundingClientRect(),netgis.util.invoke(this.container,netgis.Events.PANEL_RESIZE,{width:a.width}))};netgis=netgis||{};netgis.Popup=function(a){a||(a={direction:"down"});this.options=a;this.initElements()}; netgis.Popup.prototype.initElements=function(){document.body.addEventListener("pointerdown",this.onDocumentPointerDown.bind(this));this.container=document.createElement("div");this.container.className="netgis-popup";this.container.addEventListener("pointerdown",this.onPointerDown.bind(this));this.content=document.createElement("div");this.content.className="netgis-content netgis-color-e netgis-round";this.container.appendChild(this.content);switch(this.options.direction){default:case "down":this.container.classList.add("netgis-dir-down"); break;case "right":this.container.classList.add("netgis-dir-right")}this.arrow=document.createElement("div");this.arrow.className="netgis-arrow";this.container.appendChild(this.arrow);this.closer=document.createElement("button");this.closer.setAttribute("type","button");this.closer.className="netgis-closer netgis-color-e netgis-text-a";this.closer.innerHTML="";this.closer.onclick=this.onCloserClick.bind(this);this.content.appendChild(this.closer);this.loader= document.createElement("div");this.loader.className="netgis-loader netgis-color-e netgis-text-a";this.loader.innerHTML="";this.wrapper=document.createElement("div");this.wrapper.className="netgis-wrapper";this.content.appendChild(this.wrapper)};netgis.Popup.prototype.attachTo=function(a){a.appendChild(this.container)}; netgis.Popup.prototype.show=function(){this.container.classList.add("netgis-show");netgis.util.isMobile()&&(this.container.style.width=document.body.getBoundingClientRect().width-10+"px")};netgis.Popup.prototype.hide=function(){this.container.classList.remove("netgis-show")};netgis.Popup.prototype.isVisible=function(){return this.container.classList.contains("netgis-show")};netgis.Popup.prototype.showLoader=function(){this.content.appendChild(this.loader)}; netgis.Popup.prototype.hideLoader=function(){this.loader.parentNode===this.content&&this.content.removeChild(this.loader)}; netgis.Popup.prototype.setPosition=function(a,b){var c=this.container.parentNode.getBoundingClientRect(),d=this.arrow.getBoundingClientRect();a>c.width-d.width&&(a=c.width-d.width);aa.x?this.content.style.left= -a.x+"px":a.x+a.width>c.width&&(this.content.style.left=-(a.x+a.width-c.width)+"px")};netgis.Popup.prototype.setHeader=function(a){this.closer.getElementsByTagName("span")[0].innerHTML=a};netgis.Popup.prototype.setContent=function(a){this.wrapper.innerHTML=a};netgis.Popup.prototype.clearContent=function(){this.wrapper.innerHTML=""};netgis.Popup.prototype.addContent=function(a){this.wrapper.innerHTML+=a};netgis.Popup.prototype.onDocumentPointerDown=function(a){}; netgis.Popup.prototype.onPointerDown=function(a){a.stopPropagation()};netgis.Popup.prototype.onCloserClick=function(a){this.hide()};netgis=netgis||{};netgis.Search=function(a){this.debounce=400;this.initElements(a);this.initEvents()}; netgis.Search.prototype.initElements=function(a){var b=document.createElement("div");b.className="netgis-search";this.container=b;var c=document.createElement("label");b.appendChild(c);this.label=c;var d=document.createElement("input");d.className="netgis-round netgis-shadow";d.setAttribute("type","text");d.setAttribute("placeholder",a);c.appendChild(d);this.input=d;a=document.createElement("button");a.setAttribute("type","button");a.innerHTML="";c.appendChild(a);this.button= a;a=document.createElement("button");a.setAttribute("type","button");a.className="netgis-hide";a.innerHTML="";c.appendChild(a);this.closer=a;c=document.createElement("ul");b.appendChild(c);this.results=c}; netgis.Search.prototype.initEvents=function(){this.input.addEventListener("change",this.onInputChange.bind(this));this.input.addEventListener("keydown",this.onInputKeyDown.bind(this));this.input.addEventListener("keyup",this.onInputKeyUp.bind(this));this.button.addEventListener("click",this.onButtonClick.bind(this));this.closer.addEventListener("click",this.onCloserClick.bind(this))};netgis.Search.prototype.attachTo=function(a){a.appendChild(this.container)};netgis.Search.prototype.show=function(){this.container.classList.remove("netgis-hide")}; netgis.Search.prototype.hide=function(){this.container.classList.add("netgis-hide")};netgis.Search.prototype.toggle=function(){this.container.classList.toggle("netgis-hide")};netgis.Search.prototype.isVisible=function(){return!this.container.classList.contains("netgis-hide")};netgis.Search.prototype.minimize=function(){this.container.classList.remove("netgis-color-e","netgis-shadow");this.input.classList.add("netgis-shadow")}; netgis.Search.prototype.maximize=function(){this.container.classList.add("netgis-color-e","netgis-shadow");this.input.classList.remove("netgis-shadow")};netgis.Search.prototype.setTitle=function(a){this.input.setAttribute("placeholder",a)}; netgis.Search.prototype.addResult=function(a,b){var c=document.createElement("li"),d=document.createElement("button");d.className="netgis-button netgis-clip-text netgis-color-e netgis-hover-a";d.innerHTML=a;d.setAttribute("type","button");d.setAttribute("title",d.innerText);d.setAttribute("data-result",b);d.addEventListener("click",this.onResultClick.bind(this));c.appendChild(d);0===this.results.childNodes.length&&(this.button.classList.add("netgis-hide"),this.closer.classList.remove("netgis-hide")); this.results.appendChild(c);this.maximize();return c};netgis.Search.prototype.clearResults=function(){this.results.innerHTML="";this.minimize();netgis.util.invoke(this.container,netgis.Events.SEARCH_CLEAR,null)};netgis.Search.prototype.clearAll=function(){this.clearResults();this.lastQuery=null;this.input.value="";this.button.classList.remove("netgis-hide");this.closer.classList.add("netgis-hide")}; netgis.Search.prototype.requestSearch=function(a){this.lastQuery&&this.lastQuery===a||(this.lastQuery=a,netgis.util.invoke(this.container,netgis.Events.SEARCH_CHANGE,{query:a}))};netgis.Search.prototype.onInputKeyDown=function(a){if(13===a.keyCode)return a.preventDefault(),!1};netgis.Search.prototype.onInputKeyUp=function(a){switch(a.keyCode){case 13:a=this.results.getElementsByTagName("button");0Flurst\u00fccksnummer (Z\u00e4hler/Nenner):");this.parcelInputA=b.children[1];this.parcelInputA.style.width="48%";this.parcelInputB=this.parcelInputA.cloneNode(!0);this.parcelInputB.style.marginLeft="4%";b.appendChild(this.parcelInputB); a.appendChild(b);b=document.createElement("button");b.setAttribute("type","button");b.addEventListener("click",this.onParcelSearchClick.bind(this));b.className="netgis-color-a netgis-hover-c";b.innerHTML="Flurst\u00fccke suchen";b.style.marginTop="4mm";a.appendChild(b);b=document.createElement("section");b.className="netgis-hide";this.bottom=b;this.container.appendChild(b);var c=document.createElement("button");c.className="netgis-button netgis-clip-text netgis-color-c";c.innerHTML="Flurst\u00fccke "; c.setAttribute("type","button");c.addEventListener("click",this.onBottomHeaderClick.bind(this));b.appendChild(c);this.parcelCount=c.getElementsByTagName("span")[1];this.parcelInfo=document.createElement("p");this.parcelTable=this.createTable(";Flur;Z\u00e4hler;Nenner;FKZ;Fl\u00e4che (qm)".split(";"));this.parcelTable.classList.add("netgis-hide");this.parcelTable.style.position="absolute";this.parcelTable.style.width="100%";this.parcelTable.style.top="12mm";this.parcelTable.style.bottom="0mm";this.parcelTable.style.margin= "0mm";this.parcelTable.style.overflow="auto";b.appendChild(this.parcelTable);this.parcelList=this.parcelTable.getElementsByTagName("tbody")[0];this.parcelReset=document.createElement("button");this.parcelReset.setAttribute("type","button");this.parcelReset.addEventListener("click",this.onResetClick.bind(this));this.parcelReset.className="netgis-color-a netgis-hover-c";this.parcelReset.innerHTML="Zur\u00fccksetzen";this.parcelReset.style.marginTop="4mm";a.appendChild(this.parcelReset)}; netgis.SearchParcel.prototype.initEvents=function(){this.resizeObserver=(new ResizeObserver(this.onTopResize.bind(this))).observe(this.top)}; netgis.SearchParcel.prototype.initConfig=function(a){this.districtsLayer=a.searchparcel.districts_service;this.districtsLayer.id=this.districtsLayerID;this.districtsLayer.style=a.styles.parcel;this.districtsLayer.order=99999;a.layers.push(this.districtsLayer);this.fieldsLayer={id:this.fieldsLayerID,type:netgis.LayerTypes.GEOJSON,style:a.styles.parcel,order:99999,data:null};a.layers.push(this.fieldsLayer);this.parcelsLayer={id:this.parcelsLayerID,type:netgis.LayerTypes.WKT,style:a.styles.parcel,order:99999, data:null};a.layers.push(this.parcelsLayer);if(!0===a.searchparcel.open){var b=this;window.setTimeout(function(){b.panel.show()},100)}}; netgis.SearchParcel.prototype.attachTo=function(a){this.panel.attachTo(a);a.addEventListener(netgis.Events.CLIENT_SET_MODE,this.onClientSetMode.bind(this));a.addEventListener(netgis.Events.SEARCHPARCEL_TOGGLE,this.onSearchParcelToggle.bind(this));a.addEventListener(netgis.Events.LAYERTREE_TOGGLE,this.onLayerTreeToggle.bind(this));a.addEventListener(netgis.Events.TOOLBOX_TOGGLE,this.onToolboxToggle.bind(this));a.addEventListener(netgis.Events.LEGEND_TOGGLE,this.onLegendToggle.bind(this));a.addEventListener(netgis.Events.MAP_FEATURE_ENTER, this.onMapFeatureEnter.bind(this));a.addEventListener(netgis.Events.MAP_FEATURE_CLICK,this.onMapFeatureClick.bind(this));a.addEventListener(netgis.Events.MAP_FEATURE_LEAVE,this.onMapFeatureLeave.bind(this))};netgis.SearchParcel.prototype.createInput=function(a){var b=document.createElement("label");b.className="netgis-hover-text-primary";b.innerHTML=a;a=document.createElement("input");a.setAttribute("type","text");b.appendChild(a);return b}; netgis.SearchParcel.prototype.createNameItem=function(a){var b=document.createElement("li"),c=document.createElement("button");c.setAttribute("type","button");c.addEventListener("click",this.onNameItemClick.bind(this));c.className="netgis-color-e netgis-hover-a netgis-text-a netgis-hover-text-e";c.innerHTML=a;b.appendChild(c);return b}; netgis.SearchParcel.prototype.createTable=function(a){var b=document.createElement("div");b.className="netgis-table-wrapper";var c=document.createElement("table");b.appendChild(c);var d=document.createElement("thead");c.appendChild(d);var e=document.createElement("tr");e.className="netgis-color-d netgis-shadow";d.appendChild(e);for(d=0;d"+(b.filter_property+"");netgis.util.request(c+(""+a+""),this.onFieldsResponse.bind(this))}; netgis.SearchParcel.prototype.onFieldsResponse=function(a){a=JSON.parse(a);this.showDistricts(!1);this.showFields(!0,a);this.showParcels(!1)};netgis.SearchParcel.prototype.selectFirstName=function(){var a=this.nameList.getElementsByTagName("button");0b?this.container.classList.add("netgis-scroll"):this.container.classList.remove("netgis-scroll")}; netgis.Tabs.prototype.onHeaderButtonClick=function(a){a=a.currentTarget;for(var b=this.header.getElementsByClassName("netgis-button"),c=0,d=0;d=a;a++);var b=this;window.setTimeout(function(){b.container.scrollLeft=0},1)}; netgis.TimeSlider.prototype.initElements=function(){this.container=document.createElement("section");this.container.className="netgis-timeslider netgis-footer netgis-noselect netgis-color-e netgis-hide";document.addEventListener("pointermove",this.onPointerMove.bind(this));document.addEventListener("pointerup",this.onPointerUp.bind(this));this.header=document.createElement("button");this.header.className="netgis-header netgis-button netgis-clip-text netgis-color-a netgis-hover-c netgis-shadow";this.header.innerHTML= "TimeSlider";this.header.setAttribute("type","button");this.header.addEventListener("click",this.onHeaderClick.bind(this));this.container.appendChild(this.header);this.wrapper=document.createElement("div");this.wrapper.className="netgis-wrapper";this.wrapper.addEventListener("pointerdown",this.onPointerDown.bind(this));this.container.appendChild(this.wrapper);this.table=document.createElement("table");this.wrapper.appendChild(this.table); this.top=document.createElement("tr");this.table.appendChild(this.top);this.bottom=document.createElement("tr")};netgis.TimeSlider.prototype.attachTo=function(a){a.appendChild(this.container);a.addEventListener(netgis.Events.TIMESLIDER_SHOW,this.onTimeSliderShow.bind(this));a.addEventListener(netgis.Events.TIMESLIDER_HIDE,this.onTimeSliderHide.bind(this))}; netgis.TimeSlider.prototype.setVisible=function(a){a?(this.container.classList.remove("netgis-hide"),this.container.parentNode.classList.add("netgis-footer")):(this.container.classList.add("netgis-hide"),this.container.parentNode.classList.remove("netgis-footer"))};netgis.TimeSlider.prototype.setTitle=function(a){this.header.getElementsByTagName("span")[0].innerHTML=a};netgis.TimeSlider.prototype.clearTimeSteps=function(){this.top.innerHTML=""}; netgis.TimeSlider.prototype.addTimeStep=function(a,b){var c=document.createElement("td");c.setAttribute("data-id",a);a=document.createElement("button");a.className="netgis-button netgis-color-e netgis-hover-d";a.innerHTML=""+b+"";a.setAttribute("type","button");a.addEventListener("click",this.onTimeStepClick.bind(this));c.appendChild(a);this.top.appendChild(c)}; netgis.TimeSlider.prototype.addTimeStep_01=function(a,b){a=document.createElement("td");var c=document.createElement("td");this.insertTop?a.innerHTML=b:c.innerHTML=b;this.top.appendChild(a);this.bottom.appendChild(c);this.insertTop=!this.insertTop}; netgis.TimeSlider.prototype.setActiveTimeStep=function(a){var b=this.top.getElementsByTagName("td"),c=b[a],d=c.getAttribute("data-id");console.info("Set Active Step:",a,d);for(var e=0;ea.length||(-1===a.indexOf("GetCapabilities")&&(a+="&REQUEST=GetCapabilities"),netgis.util.request(a,this.onServiceResponseWMST.bind(this),{id:b}))}; netgis.TimeSlider.prototype.onServiceResponseWMST=function(a,b){for(var c=(new DOMParser).parseFromString(a,"text/xml").documentElement.getElementsByTagName("Layer"),d,e=0;eAkzeptieren",this.onBufferFeaturesAccept.bind(this)),this.bottom.appendChild(this.bottomPanels.bufferFeatures), this.bottomPanels.modifyFeatures=document.createElement("div"),b.push(this.addCheckbox(this.bottomPanels.modifyFeatures,"Einrasten",this.onDrawSnapToggle.bind(this))),this.bottom.appendChild(this.bottomPanels.modifyFeatures));if(a&&a.snapping){if(!1===a.snapping.show)for(c=0;c";b.appendChild(g);c=document.createElement("label"); g.appendChild(c);g=document.createElement("input");g.setAttribute("type","checkbox");g.onchange=this.onFolderChange.bind(this);c.appendChild(g);!0===e&&f.classList.add("netgis-nocheck");e=document.createElement("ul");b.appendChild(e);a=a?a.getElementsByTagName("ul")[0]:this.container;d?a.insertBefore(f,a.firstChild):a.appendChild(f);return f}; netgis.Tree.prototype.addCheckbox=function(a,b,c,d,e,f){var g=document.createElement("li");g.className="netgis-item";var h=document.createElement("label");h.className="netgis-button netgis-noselect netgis-clip-text netgis-color-e netgis-hover-d";h.innerHTML=""+c+"";g.appendChild(h);c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("data-id",b);d&&(c.checked=d);c.onchange=this.onItemChange.bind(this);h.insertBefore(c,h.firstChild);f&&this.addItemDetails(g, b,f);a=a?a.getElementsByTagName("ul")[0]:this.container;e?a.insertBefore(g,a.firstChild):a.appendChild(g);return g}; netgis.Tree.prototype.addRadioButton=function(a,b,c,d,e){var f=document.createElement("li");f.className="netgis-item";var g=document.createElement("label");g.className="netgis-button netgis-noselect netgis-clip-text netgis-color-e netgis-hover-d";g.innerHTML=""+c+"";f.appendChild(g);c=a?"radio-"+a.getAttribute("data-id"):"radio-noname";var h=document.createElement("input");h.setAttribute("type","radio");h.setAttribute("name",c);h.setAttribute("value","radio-"+b);h.setAttribute("data-id", b);d&&(h.checked=d);h.onchange=this.onItemChange.bind(this);g.insertBefore(h,g.firstChild);e&&this.addItemDetails(f,b,e);a?a.getElementsByTagName("ul")[0].appendChild(f):this.container.appendChild(f);return f}; netgis.Tree.prototype.addButton=function(a,b,c,d){var e=document.createElement("li"),f=document.createElement("button");f.innerHTML=c;f.className="netgis-button netgis-color-e netgis-hover-d netgis-clip-text";f.setAttribute("type","button");e.appendChild(f);b&&f.setAttribute("data-id",b);d&&(f.onclick=d);f.addEventListener("click",this.onButtonClick.bind(this));a?a.getElementsByTagName("ul")[0].appendChild(e):this.container.appendChild(e);return e}; netgis.Tree.prototype.addSpace=function(a){var b=document.createElement("li");b.className="netgis-space";a?a.getElementsByTagName("ul")[0].appendChild(b):this.container.appendChild(b);return b}; netgis.Tree.prototype.addItemDetails=function(a,b,c){var d=document.createElement("details");d.className="netgis-noselect";var e=document.createElement("summary");e.className="netgis-clickable netgis-hover-d";e.innerHTML="";d.appendChild(e);e=document.createElement("div");d.appendChild(e);for(var f=0;fa.getBoundingClientRect().width:600>document.body.getBoundingClientRect().width},clone:function(a){return JSON.parse(JSON.stringify(a))},stringToID:function(a, b){b||(b="-");a=a.trim();a=a.toLowerCase();a=this.replace(a," ",b);a=this.replace(a,"\n",b);a=this.replace(a,"\t",b);a=this.replace(a,"\\.",b);a=this.replace(a,"\\,",b);a=this.replace(a,"\\!",b);a=this.replace(a,"\\?",b);a=this.replace(a,":",b);a=this.replace(a,";",b);a=this.replace(a,'"',b);a=this.replace(a,"'",b);a=this.replace(a,"\\\u00a7",b);a=this.replace(a,"\\$",b);a=this.replace(a,"\\%",b);a=this.replace(a,"\\&",b);a=this.replace(a,"\\/",b);a=this.replace(a,"\\\\",b);a=this.replace(a,"\\(", b);a=this.replace(a,"\\)",b);a=this.replace(a,"\\{",b);a=this.replace(a,"\\}",b);a=this.replace(a,"\\[",b);a=this.replace(a,"\\]",b);a=this.replace(a,"=",b);a=this.replace(a,"\\+",b);a=this.replace(a,"\\*",b);a=this.replace(a,"\\~",b);a=this.replace(a,"\\^",b);a=this.replace(a,"\\\u00b0",b);a=this.replace(a,"\u00b2",b);a=this.replace(a,"\u00b3",b);a=this.replace(a,"\\#",b);a=this.replace(a,"\\<",b);a=this.replace(a,"\\>",b);a=this.replace(a,"\\|",b);a=this.replace(a,"\\@",b);a=this.replace(a,"\u20ac", b);a=this.replace(a,"\u00b5",b);a=this.trim(a,b);a=this.replace(a,"\u00e4","ae");a=this.replace(a,"\u00f6","oe");a=this.replace(a,"\u00fc","ue");a=this.replace(a,"\u00df","ss");a=this.replace(a,"\u00e1","a");a=this.replace(a,"\u00e0","a");a=this.replace(a,"\u00e2","a");a=this.replace(a,"\u00e9","e");a=this.replace(a,"\u00e8","e");a=this.replace(a,"\u00ea","e");a=this.replace(a,"\u00ed","i");a=this.replace(a,"\u00ec","i");a=this.replace(a,"\u00ee","i");a=this.replace(a,"\u00f3","o");a=this.replace(a, "\u00f2","o");a=this.replace(a,"\u00f4","o");a=this.replace(a,"\u00fa","u");a=this.replace(a,"\u00f9","u");return a=this.replace(a,"\u00fb","u")},replace:function(a,b,e){return a.replace(new RegExp(b,"g"),e)},trim:function(a,b){a=a.replace(new RegExp("^"+b+"+"),"");return a=a.replace(new RegExp(b+"+$"),"")},foreach:a,template:function(b,d){a(d,function(a,c){b=b.replace(new RegExp("{"+a+"}","g"),c)});return b},newlines:function(a){return a.replace(/\n/g,"
")},create:function(a){var b=document.createElement("tbody"); b.innerHTML=a;return b.children[0]},insideElement:function(a,b,e){a=a.getBoundingClientRect();return ba.right||e>a.bottom?!1:!0},size:function(a){a=(new TextEncoder).encode(JSON.stringify(a)).length;var b=a/1024;return{bytes:a,kilobytes:b,megabytes:b/1024}},request:function(a,b,e,f){f=new XMLHttpRequest;e&&(f._requestData=e);f.onload=function(){b(this.responseText,this._requestData,this)};f.withCredentials=!1;f.open("GET",a,!0);f.send();return f},downloadJSON:function(a,b){a="data:text/json;charset=utf-8,"+ encodeURIComponent(JSON.stringify(a));var c=document.createElement("a");c.setAttribute("href",a);c.setAttribute("download",b);document.body.appendChild(c);c.click();c.remove()},padstr:function(a,b){for(a=a.toString();a.lengthc&&(c="0"+c);10>f&&(f="0"+f);10>g&&(g="0"+g);10>h&& (h="0"+h);10>b&&(b="0"+b);a=[a,c,f,"_",g,h,b].join("")}else a=b.getDate()+"."+(b.getMonth()+1)+"."+b.getFullYear(),a+=" "+b.getHours()+":"+b.getMinutes();return a},getUserLanguage:b,getFileExtension:function(a){a=a.split(".");return 1>=a.length?"":a[a.length-1]},formatDistance:function(a){return 100(e||1E5))?d?Math.round(a/1E6*1E3)/1E3:Math.round(a/1E6):d?Math.round(100*a)/100:Math.round(a);0===a&&(e=!1);a=a.toLocaleString(b());return a+(e?" km\u00b2":" m\u00b2")},hexToRGB:function(a){"#"===a.charAt(0)&&(a=a.substr(1));a=Number.parseInt(a,16);return[a>>16&255,a>>8&255,a&255]},invoke:function(a,b,e){a.dispatchEvent(new CustomEvent(b,{bubbles:!0,detail:e}))},handler:function(a,b){return function(c){b||(b=c);netgis.util.invoke(this,a, b)}}}}();netgis=netgis||{};netgis.WMC=function(){};netgis.WMC.prototype.requestContext=function(a,b){this.callback=b;netgis.util.request(a,this.onContextResponse.bind(this))};netgis.WMC.prototype.onContextResponse=function(a){var b=JSON.parse(a);this.data=b;a=[];b=b.layerList;for(var c=0;c