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){a=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,a];for(var b=0;bthis.callbacks[a].length&&delete this.callbacks[a]}else delete this.callbacks[a]}; netgis.Client.prototype.invoke=function(a,b){console.info("EVENT:",a,b);if(netgis.util.isDefined(this.callbacks[a]))for(var c=0;c=g;g++)for(c=0;c";a.title="Hineinzoomen";a.addEventListener("click",this.onZoomIn.bind(this));this.root.appendChild(a);a=document.createElement("button");a.innerHTML="";a.title="Herauszoomen";a.addEventListener("click",this.onZoomOut.bind(this));this.root.appendChild(a);this.client.root.appendChild(this.root)}; netgis.Controls.prototype.onZoomIn=function(a){this.client.invoke(netgis.Events.MAP_CHANGE_ZOOM,1)};netgis.Controls.prototype.onZoomOut=function(a){this.client.invoke(netgis.Events.MAP_CHANGE_ZOOM,-1)};netgis.Controls.prototype.onSettings=function(a){alert("TODO: settings dialog")};netgis=netgis||{}; netgis.Events=Object.freeze({CONTEXT_UPDATE:"CONTEXT_UPDATE",SET_MODE:"SET_MODE",LAYER_LIST_TOGGLE:"LAYER_LIST_TOGGLE",PANEL_TOGGLE:"PANEL_TOGGLE",PANEL_SHOW:"PANEL_SHOW",PANEL_HIDE:"PANEL_HIDE",LAYER_SHOW:"LAYER_SHOW",LAYER_HIDE:"LAYER_HIDE",LAYER_CREATED:"LAYER_CREATED",MAP_SET_EXTENT:"MAP_SET_EXTENT",MAP_CHANGE_ZOOM:"MAP_CHANGE_ZOOM",MAP_MODE_POINTS:"MAP_MODE_POINTS",MAP_MODE_LINES:"MAP_MODE_LINES",MAP_MODE_POLYGONS:"MAP_MODE_POLYGONS",EDIT_FEATURES_CHANGE:"EDIT_FEATURES_CHANGE",SEARCH_PLACE_REQUEST:"SEARCH_PLACE_REQUEST", SEARCH_PLACE_RESPONSE:"SEARCH_PLACE_RESPONSE",BUFFER_CHANGE:"BUFFER_CHANGE",BUFFER_ACCEPT:"BUFFER_ACCEPT",BUFFER_CANCEL:"BUFFER_CANCEL",SNAP_ON:"SNAP_ON",SNAP_OFF:"SNAP_OFF",IMPORT_SHAPEFILE_SHOW:"IMPORT_SHAPEFILE_SHOW",IMPORT_GEOJSON_SHOW:"IMPORT_GEOJSON_SHOW",IMPORT_GML_SHOW:"IMPORT_GML_SHOW",IMPORT_SHAPEFILE:"IMPORT_SHAPEFILE",IMPORT_GEOJSON:"IMPORT_GEOJSON",IMPORT_GML:"IMPORT_GML"});netgis=netgis||{};netgis.Head=function(){this.root=this.client=null;this.sections=[]}; netgis.Head.prototype.load=function(){this.root=document.createElement("header");this.root.className="netgis-head netgis-primary netgis-shadow";var a=this.createButton('Ebenen',!0);a.addEventListener("click",this.onToggleClick.bind(this));this.root.appendChild(a);a=this.createButton('Suche',!0);a.addEventListener("click",this.onSearchPlaceClick.bind(this));this.root.appendChild(a);if(this.client.editable){a= this.createMenu('Zeichnen');var b=a.getElementsByTagName("ul")[0];this.root.appendChild(a);b.appendChild(this.createMenuItem('Punkte',this.onDrawPointClick.bind(this)));b.appendChild(this.createMenuItem('Linien',this.onDrawLineClick.bind(this)));b.appendChild(this.createMenuItem('Polygone',this.onDrawPolygonClick.bind(this)));a=this.createMenu('Bearbeiten'); b=a.getElementsByTagName("ul")[0];this.root.appendChild(a);b.appendChild(this.createMenuItem('Ausschneiden',this.onCutFeatureClick.bind(this)));b.appendChild(this.createMenuItem('Verschieben',this.onModifyFeaturesClick.bind(this)));b.appendChild(this.createMenuItem('L\u00f6schen',this.onDeleteFeaturesClick.bind(this)));b.appendChild(this.createMenuItem('Puffern',this.onBufferFeatureClick.bind(this)))}a= this.createMenu('Import');b=a.getElementsByTagName("ul")[0];this.root.appendChild(a);b.appendChild(this.createMenuItem('GeoJSON',this.onImportGeoJSONClick.bind(this)));b.appendChild(this.createMenuItem('GML',this.onImportGMLClick.bind(this)));b.appendChild(this.createMenuItem('Shapefile',this.onImportShapefileClick.bind(this)));this.client.root.appendChild(this.root)}; netgis.Head.prototype.createButton=function(a,b){var c=document.createElement("button");c.className="netgis-primary netgis-hover-primary";b&&(c.className+=" netgis-right");c.innerHTML=a;return c}; netgis.Head.prototype.createMenu=function(a){var b=document.createElement("div");b.className="netgis-dropdown";var c=document.createElement("button");c.className="netgis-primary netgis-hover-primary";c.innerHTML=a;b.appendChild(c);a=document.createElement("ul");a.className="netgis-dropdown-content netgis-dialog netgis-shadow";b.appendChild(a);return b}; netgis.Head.prototype.createMenuItem=function(a,b){var c=document.createElement("li");c.className="netgis-hover-light";var d=document.createElement("button");d.innerHTML=a;d.addEventListener("click",b);c.appendChild(d);return c};netgis.Head.prototype.onToggleClick=function(a){this.client.invoke(netgis.Events.LAYER_LIST_TOGGLE,null)};netgis.Head.prototype.onDrawPointClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DRAW_POINTS)}; netgis.Head.prototype.onDrawLineClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DRAW_LINES)};netgis.Head.prototype.onDrawPolygonClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DRAW_POLYGONS)};netgis.Head.prototype.onCutFeatureClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.CUT_FEATURE_BEGIN)};netgis.Head.prototype.onModifyFeaturesClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.MODIFY_FEATURES)}; netgis.Head.prototype.onDeleteFeaturesClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DELETE_FEATURES)};netgis.Head.prototype.onBufferFeatureClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.BUFFER_FEATURE_BEGIN)};netgis.Head.prototype.onSearchPlaceClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.SEARCH_PLACE)};netgis.Head.prototype.onSearchDataClick=function(a){alert("TODO: data search interface")}; netgis.Head.prototype.onImportOWSClick=function(a){alert("TODO: ows import interface, try setting url parameter '?ows='")};netgis.Head.prototype.onImportShapefileClick=function(a){this.client.invoke(netgis.Events.IMPORT_SHAPEFILE_SHOW,null)};netgis.Head.prototype.onImportGeoJSONClick=function(a){this.client.invoke(netgis.Events.IMPORT_GEOJSON_SHOW,null)};netgis.Head.prototype.onImportKMLClick=function(a){alert("TODO: kml import interface")}; netgis.Head.prototype.onImportGMLClick=function(a){this.client.invoke(netgis.Events.IMPORT_GML_SHOW,null)};netgis=netgis||{};netgis.LayerTree=function(){this.folderDraw=this.folderImport=this.list=this.root=this.client=null}; netgis.LayerTree.prototype.load=function(){this.root=document.createElement("section");this.root.className="netgis-layer-list netgis-dialog netgis-shadow netgis-hide";this.list=document.createElement("ul");this.list.className="root";this.root.appendChild(this.list);this.client.root.appendChild(this.root);this.client.on(netgis.Events.CONTEXT_UPDATE,this.onContextUpdate.bind(this));this.client.on(netgis.Events.LAYER_LIST_TOGGLE,this.onLayerListToggle.bind(this));this.client.on(netgis.Events.LAYER_CREATED, this.onLayerCreated.bind(this))}; netgis.LayerTree.prototype.createFolder=function(a){var b=document.createElement("li");b.className="netgis-folder netgis-hover-light";b.setAttribute("title",a);var c=document.createElement("label");c.className="netgis-icon";b.appendChild(c);var d=document.createElement("input");d.setAttribute("type","checkbox");d.addEventListener("change",this.onFolderChange.bind(this));c.appendChild(d);c=document.createElement("button");c.className="netgis-clip-text netgis-hover-text-primary";c.innerHTML=''+ a;c.addEventListener("click",this.onFolderClick.bind(this));b.appendChild(c);a=document.createElement("ul");b.appendChild(a);return b}; netgis.LayerTree.prototype.createLayer=function(a,b,c){var d=document.createElement("li");d.setAttribute("title",b);d.className="netgis-folder-item netgis-hover-text-primary";var e=document.createElement("label");e.className="netgis-label netgis-clip-text";d.appendChild(e);var f=document.createElement("span");f.className="netgis-icon";e.appendChild(f);var g=document.createElement("input");g.setAttribute("type","checkbox");g.dataset.id=a;g.checked=c;g.addEventListener("change",this.onItemChange.bind(this)); f.appendChild(g);a=document.createElement("i");a.className="fas fa-th-large";e.appendChild(a);b=document.createTextNode(b);e.appendChild(b);return d};netgis.LayerTree.prototype.addToFolder=function(a,b,c){a?(a=a.getElementsByTagName("ul")[0],a.appendChild(b)):a=this.list;c?a.insertBefore(b,a.firstChild):a.appendChild(b)};netgis.LayerTree.prototype.onFolderClick=function(a){a.currentTarget.parentElement.classList.toggle("netgis-active")}; netgis.LayerTree.prototype.onFolderChange=function(a){var b=a.currentTarget;a=b.checked;b=b.parentElement.parentElement;for(var c=b.getElementsByTagName("input"),d=1;d
  • World Geodetic System 1984 (EPSG:4326)
  • ETRS89 / UTM zone 32N (EPSG:25832)
  • ");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:",".geojson,.json",this.onImportGeoJSONChange.bind(this));this.createSpace(a);this.createButton(a,"Importieren",this.onImportGeoJSONAccept.bind(this));return a}; netgis.Modal.prototype.createImportGML=function(){var a=this.createContainer("Import GML");this.createText(a,"Unterst\u00fctzte Koordinatensysteme:","
    • World Geodetic System 1984 (EPSG:4326)
    • ETRS89 / UTM zone 32N (EPSG:25832)
    ");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:",".gml,.xml",this.onImportGMLChange.bind(this));this.createSpace(a);this.createButton(a,"Importieren",this.onImportGMLAccept.bind(this));return a}; netgis.Modal.prototype.createImportShapefile=function(){var a=this.createContainer("Import Shapefile");this.createText(a,"Unterst\u00fctzte Koordinatensysteme:","
    • World Geodetic System 1984 (EPSG:4326)
    • ETRS89 / UTM zone 32N (EPSG:25832)
    ");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:","application/zip",this.onImportShapefileChange.bind(this));this.createSpace(a);this.createButton(a,"Importieren",this.onImportShapefileAccept.bind(this)); return a};netgis.Modal.prototype.show=function(a){this.root.classList.add("netgis-show");for(var b=this.root.getElementsByClassName("netgis-dialog"),c=0;c";d.addEventListener("click",this.onHeaderClick.bind(this));c.appendChild(d);a=document.createElement("span");a.innerHTML="";d.appendChild(a);b.appendChild(c);c=document.createElement("div"); c.className="netgis-modal-content";b.appendChild(c);d=document.createElement("table");c.appendChild(d);return b};netgis.Modal.prototype.createSpace=function(a){var b=document.createElement("tr");b.className="netgis-space";var c=document.createElement("td");c.setAttribute("colspan",100);b.appendChild(c);a.getElementsByClassName("netgis-modal-content")[0].getElementsByTagName("table")[0].appendChild(b);return c}; netgis.Modal.prototype.createButton=function(a,b,c){var d=document.createElement("tr"),e=document.createElement("td");e.setAttribute("colspan",100);d.appendChild(e);var f=document.createElement("button");f.className="netgis-primary netgis-hover-primary";f.innerHTML=b;c&&f.addEventListener("click",c);e.appendChild(f);a.getElementsByClassName("netgis-modal-content")[0].getElementsByTagName("table")[0].appendChild(d);return f}; netgis.Modal.prototype.createInputText=function(a,b){var c=document.createElement("tr"),d=document.createElement("th");d.className="netgis-padding";var e=document.createElement("label");e.innerHTML=b;d.appendChild(e);c.appendChild(d);b=document.createElement("td");b.className="netgis-padding";d=document.createElement("input");d.setAttribute("type","text");b.appendChild(d);c.appendChild(b);e.htmlFor=d;a.getElementsByClassName("netgis-modal-content")[0].getElementsByTagName("table")[0].appendChild(c); return d}; netgis.Modal.prototype.createInputFile=function(a,b,c,d){var e=document.createElement("tr"),f=document.createElement("th");f.className="netgis-padding";var g=document.createElement("label");g.innerHTML=b;f.appendChild(g);e.appendChild(f);b=document.createElement("td");b.className="netgis-padding";f=document.createElement("input");f.setAttribute("type","file");f.setAttribute("accept",c);d&&f.addEventListener("change",d);b.appendChild(f);e.appendChild(b);a.getElementsByClassName("netgis-modal-content")[0].getElementsByTagName("table")[0].appendChild(e);return f}; netgis.Modal.prototype.createText=function(a,b,c){var d=document.createElement("tr"),e=document.createElement("th");e.className="netgis-padding";e.innerHTML=b;d.appendChild(e);b=document.createElement("td");b.className="netgis-padding";b.innerHTML=c;d.appendChild(b);a.getElementsByClassName("netgis-modal-content")[0].getElementsByTagName("table")[0].appendChild(d);return b};netgis.Modal.prototype.onHeaderClick=function(a){this.hide()}; netgis.Modal.prototype.onImportGeoJSONShow=function(a){a=this.importGeoJSON.getElementsByTagName("input")[0];var b=this.importGeoJSON.getElementsByTagName("button")[1];a.value="";b.disabled=!0;this.show(this.importGeoJSON)};netgis.Modal.prototype.onImportGeoJSONChange=function(a){a=this.importGeoJSON.getElementsByTagName("input")[0];this.importGeoJSON.getElementsByTagName("button")[1].disabled=a.value&&0Punkte zeichnen:',this.onToolbarClose.bind(this))),this.toolbars[netgis.Modes.DRAW_POINTS].appendChild(this.createToolbarCheckbox("Einrasten",this.onSnapChange.bind(this))),this.root.appendChild(this.toolbars[netgis.Modes.DRAW_POINTS]), this.toolbars[netgis.Modes.DRAW_LINES]=this.createToolbar(),this.toolbars[netgis.Modes.DRAW_LINES].appendChild(this.createToolbarButton('Linien zeichnen:',this.onToolbarClose.bind(this))),this.toolbars[netgis.Modes.DRAW_LINES].appendChild(this.createToolbarCheckbox("Einrasten",this.onSnapChange.bind(this))),this.root.appendChild(this.toolbars[netgis.Modes.DRAW_LINES]),this.toolbars[netgis.Modes.DRAW_POLYGONS]=this.createToolbar(),this.toolbars[netgis.Modes.DRAW_POLYGONS].appendChild(this.createToolbarButton('Polygone zeichnen:', this.onToolbarClose.bind(this))),this.toolbars[netgis.Modes.DRAW_POLYGONS].appendChild(this.createToolbarCheckbox("Einrasten",this.onSnapChange.bind(this))),this.root.appendChild(this.toolbars[netgis.Modes.DRAW_POLYGONS]),this.toolbars[netgis.Modes.CUT_FEATURE_BEGIN]=this.createToolbar(),this.toolbars[netgis.Modes.CUT_FEATURE_BEGIN].appendChild(this.createToolbarButton('Feature zum Ausschneiden w\u00e4hlen:',this.onToolbarClose.bind(this))),this.root.appendChild(this.toolbars[netgis.Modes.CUT_FEATURE_BEGIN]), this.toolbars[netgis.Modes.CUT_FEATURE_DRAW]=this.createToolbar(),this.toolbars[netgis.Modes.CUT_FEATURE_DRAW].appendChild(this.createToolbarButton('Fl\u00e4che zum Ausschneiden zeichnen:',this.onToolbarClose.bind(this))),this.root.appendChild(this.toolbars[netgis.Modes.CUT_FEATURE_DRAW]),this.toolbars[netgis.Modes.MODIFY_FEATURES]=this.createToolbar(),this.toolbars[netgis.Modes.MODIFY_FEATURES].appendChild(this.createToolbarButton('Features verschieben:', this.onToolbarClose.bind(this))),this.root.appendChild(this.toolbars[netgis.Modes.MODIFY_FEATURES]),this.toolbars[netgis.Modes.DELETE_FEATURES]=this.createToolbar(),this.toolbars[netgis.Modes.DELETE_FEATURES].appendChild(this.createToolbarButton('Features l\u00f6schen:',this.onToolbarClose.bind(this))),this.root.appendChild(this.toolbars[netgis.Modes.DELETE_FEATURES]),this.toolbars[netgis.Modes.BUFFER_FEATURE_BEGIN]=this.createToolbar(),this.toolbars[netgis.Modes.BUFFER_FEATURE_BEGIN].appendChild(this.createToolbarButton('Feature zum Puffern w\u00e4hlen:', this.onToolbarClose.bind(this))),this.root.appendChild(this.toolbars[netgis.Modes.BUFFER_FEATURE_BEGIN]),this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT]=this.createToolbar(),this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT].appendChild(this.createToolbarButton('Feature puffern:',this.onBufferCancel.bind(this))),this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT].appendChild(this.createToolbarInput("Radius in Meter:",1E3,this.onBufferChange.bind(this))),this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT].getElementsByTagName("input")[0].addEventListener("keyup", this.onBufferKeyUp.bind(this)),this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT].appendChild(this.createToolbarButton('OK',this.onBufferAccept.bind(this))),this.root.appendChild(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT]));this.toolbars[netgis.Modes.SEARCH_PLACE]=this.createToolbar();this.toolbars[netgis.Modes.SEARCH_PLACE].appendChild(this.createToolbarButton('Suche:',this.onToolbarClose.bind(this)));var a=this.createToolbarInputText("Adresse...", "",null);a.style.position="relative";this.searchInput=a.getElementsByTagName("input")[0];this.searchInput.addEventListener("keyup",this.onSearchKeyUp.bind(this));this.searchInput.addEventListener("focus",this.onSearchFocus.bind(this));this.searchInput.addEventListener("blur",this.onSearchBlur.bind(this));this.toolbars[netgis.Modes.SEARCH_PLACE].appendChild(a);this.searchList=document.createElement("ul");this.searchList.className="netgis-dropdown-content netgis-search-list netgis-dialog netgis-shadow netgis-hide"; a.appendChild(this.searchList);this.toolbars[netgis.Modes.SEARCH_PLACE].appendChild(this.createToolbarButton('',this.onSearchClear.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.SEARCH_PLACE]);this.client.root.appendChild(this.root);this.client.on(netgis.Events.SET_MODE,this.onSetMode.bind(this));this.client.on(netgis.Events.SEARCH_PLACE_RESPONSE,this.onSearchPlaceResponse.bind(this))}; netgis.Toolbar.prototype.createToolbar=function(){var a=document.createElement("div");a.className="netgis-toolbar netgis-dialog netgis-shadow netgis-hide";return a};netgis.Toolbar.prototype.createToolbarButton=function(a,b){var c=document.createElement("button");c.className="netgis-hover-light";c.innerHTML=a;c.addEventListener("click",b);return c}; netgis.Toolbar.prototype.createToolbarCheckbox=function(a,b){var c=document.createElement("label");c.className="netgis-hover-light";var d=document.createElement("input");d.setAttribute("type","checkbox");d.addEventListener("change",b);c.appendChild(d);a=document.createTextNode(a);c.appendChild(a);return c}; netgis.Toolbar.prototype.createToolbarInput=function(a,b,c){var d=document.createElement("label");d.className="netgis-hover-light";a=document.createTextNode(a);d.appendChild(a);a=document.createElement("input");a.setAttribute("type","number");a.setAttribute("min",0);a.value=b;a.addEventListener("change",c);d.appendChild(a);return d}; netgis.Toolbar.prototype.createToolbarInputText=function(a,b,c){var d=document.createElement("label");d.className="netgis-hover-light";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("placeholder",a);e.value=b;c&&e.addEventListener("change",c);d.appendChild(e);return d}; netgis.Toolbar.prototype.onSetMode=function(a){var b=!this.toolbars[netgis.Modes.SEARCH_PLACE].classList.contains("netgis-hide");netgis.util.foreach(this.toolbars,function(b,d){b===a?d.classList.remove("netgis-hide"):d.classList.add("netgis-hide")});switch(a){case netgis.Modes.SEARCH_PLACE:b?this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.VIEW):this.searchInput.focus();break;case netgis.Modes.BUFFER_FEATURE_EDIT:this.updateBuffer()}}; netgis.Toolbar.prototype.onToolbarClose=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.VIEW)};netgis.Toolbar.prototype.searchRequest=function(a){a=a.trim();a!==this.searchValue&&(this.searchValue=a,0")},create:function(a){var b=document.createElement("tbody");b.innerHTML= a;return b.children[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,c){var b=new XMLHttpRequest;b.onload=function(){c(this.responseText)};b.open("GET",a,!0);b.send()},padstr:function(a,c){for(a=a.toString();a.length