From 0dd60f8b402b9c75d8be6a05c6266ff41b366629 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 21 Nov 2023 09:01:59 +0100 Subject: [PATCH] Map update --- templates/map/client/config.json | 6 + templates/map/client/netgis.min.css | 2 +- templates/map/client/netgis.min.js | 241 ++++++++++++---------------- 3 files changed, 113 insertions(+), 136 deletions(-) diff --git a/templates/map/client/config.json b/templates/map/client/config.json index 8ef4f35e..b55279e4 100644 --- a/templates/map/client/config.json +++ b/templates/map/client/config.json @@ -164,6 +164,12 @@ "fill": "rgba( 127, 255, 255, 0.5 )", "stroke": "#7fffff", "strokeWidth": 3 + }, + "import": + { + "fill": "rgba( 0, 127, 255, 0.2 )", + "stroke": "rgba( 0, 127, 255, 1.0 )", + "width": 1.5 } } } \ No newline at end of file diff --git a/templates/map/client/netgis.min.css b/templates/map/client/netgis.min.css index 4c75d437..a110aeec 100644 --- a/templates/map/client/netgis.min.css +++ b/templates/map/client/netgis.min.css @@ -1 +1 @@ -.netgis-attribution{position:absolute;right:0;bottom:0;padding:1mm;background:rgba(255,255,255,0.5);font-size:2.5mm;z-index:100}.netgis-client{position:absolute;width:100%;height:100%;overflow:hidden;background:#aaa}.netgis-client *{box-sizing:border-box}.netgis-client .netgis-loader{position:absolute;width:100%;height:100%;z-index:9999;text-align:center;font-size:12mm}.netgis-client .netgis-hide{display:none}.netgis-client .netgis-loader i{position:absolute;top:50%;transform:translateY(-50%);animation:netgis-spin 2s linear infinite}@keyframes netgis-spin{0%{transform:rotate(0deg)}to{transform:rotate(360deg)}}.netgis-controls{position:absolute;width:12mm;right:4mm;bottom:8mm;overflow:hidden;z-index:100}.netgis-controls button{font-size:5mm!important;color:inherit;width:100%;height:12mm;padding:0;border:none;background-color:inherit;cursor:pointer}.netgis-layer-list{position:absolute;right:0;width:100%;max-width:100mm;top:12mm;bottom:0;overflow:auto;z-index:200;-webkit-transform:none;transform:none;transition:transform 150ms ease}.netgis-layer-list.netgis-hide{display:initial;-webkit-transform:translateX(110%);transform:translateX(110%);transition:transform 150ms ease;will-change:transform}.netgis-layer-list ul{list-style-type:none}.netgis-layer-list>ul{display:block;position:relative;width:100%;margin:0;padding:0}.netgis-folder{position:relative;overflow:hidden;list-style:none;padding:0;margin:0;min-height:12mm;width:100%;white-space:nowrap}.netgis-folder label{cursor:pointer}.netgis-folder input[type=checkbox]{cursor:pointer}.netgis-folder>button{display:inline-block;width:100%;padding:0;padding-right:16mm;margin:0;line-height:12mm;text-align:left}.netgis-folder>ul{display:none;padding-left:8mm}.netgis-folder.netgis-active>ul{display:block}.netgis-folder-item{height:12mm;line-height:12mm}.netgis-folder-item>label{display:block;padding-right:4mm}.netgis-layer-list .netgis-icon{display:inline-block;width:12mm;line-height:12mm;text-align:center}.netgis-layer-list i{margin-right:4mm}.netgis-folder i{color:#eab000}.netgis-folder-item i{color:#bbb}.netgis-folder .netgis-partial{opacity:.5}.netgis-layer-tools{padding:4mm;padding-top:0;text-align:center}.netgis-layer-tools hr{margin:4mm 0;color:#eee;border-color:#eee}.netgis-layer-tools button{padding:2mm 4mm}.netgis-layer-tools button i{margin-right:1mm}.netgis-map{position:absolute;left:0;right:0;top:12mm;bottom:0;background:#f2efe9}.netgis-drop-target{position:absolute;left:0;right:0;top:0;bottom:0;line-height:40mm;text-align:center;z-index:1;pointer-events:none;background:rgba(0,0,0,0.5);color:#fff}.netgis-drop-target.netgis-hide{display:none}.netgis-map{cursor:grab}.netgis-map:active:hover:not(.netgis-clickable){cursor:grabbing}.netgis-map.netgis-cursor-draw,.netgis-map.netgis-cursor-draw:active:hover{cursor:crosshair}.netgis-map .ol-scale-bar{right:24mm;bottom:10mm;left:auto}.netgis-menu{position:absolute;left:0;right:0;top:0;height:12mm;line-height:12mm;white-space:nowrap;font-size:0;z-index:10000;background:lightsalmon}.netgis-menu>div{height:12mm;white-space:nowrap}.netgis-menu>div>*{display:inline-block;height:100%;margin:0;font-size:4mm}.netgis-menu .netgis-right{float:right}.netgis-menu span{padding:0 4mm 0 0}.netgis-menu button{position:relative}.netgis-menu button i{display:inline-block;font-size:5mm;width:12mm;line-height:12mm;text-align:center}.netgis-menu button span{display:inline-block;position:relative;top:-2px;line-height:12mm;padding:0;margin-right:4mm}.netgis-dropdown{position:relative;padding:0}.netgis-dropdown .netgis-dropdown-content{display:none;position:absolute;min-width:100%;padding:0;margin:0;margin-top:-1px;z-index:1;font-size:4mm;list-style-type:none}.netgis-dropdown:hover .netgis-dropdown-content{display:block}.netgis-dropdown .netgis-dropdown-content i{font-size:4mm;color:#bbb}.netgis-dropdown button{width:100%;padding:0 4mm 0 0;white-space:nowrap;text-align:left}.netgis-modal{display:none;position:absolute;width:100%;height:100%;top:0;left:0;padding:6mm;z-index:110000;background:rgba(0,0,0,0.6)}.netgis-modal.netgis-show{display:block}.netgis-modal .netgis-dialog{display:none;max-width:160mm;max-height:160mm;margin:auto;border-radius:1mm;border:1mm solid #a7233f;overflow:hidden;overflow-y:auto;cursor:default}.netgis-modal .netgis-dialog.netgis-show{display:block}.netgis-modal header{width:100%;height:12mm;line-height:12mm;text-align:center}.netgis-modal header button{position:relative;width:100%;min-height:12mm}.netgis-modal header button span{display:block;position:absolute;right:0;top:0;line-height:12mm;padding:0 4mm;text-align:center}.netgis-modal-content{padding:6mm;overflow:auto}.netgis-modal-content>table{width:100%;border:none;border-spacing:0}.netgis-modal-content>table td,.netgis-modal-content>table th{width:50%;overflow:hidden;vertical-align:top;text-align:left}.netgis-modal-content .netgis-padding{padding:4mm}.netgis-modal-content .netgis-space{height:6mm}.netgis-modal-content button,.netgis-modal-content label{width:100%;min-height:12mm}.netgis-modal-content button i{margin-right:4mm}.netgis-modal-content button[disabled]{opacity:.5;cursor:not-allowed}.netgis-modal-content input,.netgis-modal-content select{width:100%}.netgis-modal-content input[type=file]{cursor:pointer}.netgis-modal-content ul{margin:0;padding:0;padding-left:4mm;list-style-type:square}.netgis-modal-content li:not(:last-child){margin-bottom:4mm}.netgis-modal h3{margin:0}.netgis-panel{position:absolute;left:0;width:80mm;top:12mm;bottom:0;z-index:5000;-webkit-transform:translateX(-110%);transform:translateX(-110%);transition:transform 150ms ease;will-change:transform}.netgis-panel.netgis-show{-webkit-transform:none;transform:none}.netgis-panel h2{margin:0 4mm;font-size:1em}.netgis-panel .netgis-button,.netgis-panel label{display:block;width:100%;min-height:12mm;text-align:left}.netgis-panel input[type=text]{margin-top:3mm}.netgis-panel .netgis-half{display:inline-block;width:50%!important;padding-right:1mm}.netgis-panel .netgis-half+.netgis-half{padding-left:1mm;padding-right:0}.netgis-panel .netgis-anim-bottom{transition:transform 150ms ease;will-change:transform;-webkit-transform:none;transform:none}.netgis-panel .netgis-anim-bottom.netgis-hide{display:initial;-webkit-transform:translateY(110%);transform:translateY(110%)}.netgis-panel .netgis-resize-bottom{max-height:80%}.netgis-search-parcel{position:absolute;top:12mm;bottom:0;width:100%;overflow:hidden;padding:4mm}.netgis-search-parcel section{position:absolute;left:0;right:0;overflow:auto}.netgis-search-parcel section:first-of-type{top:0;bottom:0;padding:6mm}.netgis-search-parcel section:last-of-type{top:50%;bottom:0}.netgis-search-parcel h3{margin:0;margin-bottom:4mm}.netgis-search-parcel label{display:block;margin:3mm 0;margin-bottom:0;cursor:pointer}.netgis-search-parcel label:first-child{margin-top:0}.netgis-search-parcel label span:first-child{display:block}.netgis-search-parcel input{width:100%;height:12mm;margin:3mm 0;padding:0 3mm}.netgis-search-parcel .netgis-loader{width:6mm;height:6mm;top:8mm;right:6mm;font-size:6mm}.netgis-search-parcel ul{margin:0;padding:0;list-style-type:none}.netgis-search-parcel li button{text-align:left}.netgis-search-parcel button{display:block;width:100%;height:12mm;padding:0 3mm;margin:0}.netgis-search-parcel .netgis-table-wrapper{width:100%;margin-top:4mm;overflow:auto}.netgis-search-parcel table{min-width:100%;border-collapse:collapse;white-space:nowrap}.netgis-search-parcel table thead{position:-webkit-sticky;position:sticky;top:0;z-index:10}.netgis-search-parcel tr{height:12mm}.netgis-search-parcel th{text-align:left;padding:0 3mm}.netgis-search-parcel td{text-align:left;padding:0 3mm;cursor:pointer}.netgis-search-parcel td:first-child{padding:0}.netgis-search-parcel table button{display:inline-block;width:12mm;height:12mm;background:none}.netgis-search-parcel p{margin:4mm 3mm;font-style:italic}.netgis-search-place{position:absolute;left:4mm;right:4mm;max-width:90mm;min-height:12mm;top:16mm;margin-left:auto;z-index:4000;-webkit-transform:translateY(-300%);transform:translateY(-300%);transition:transform 150ms ease;will-change:transform}.netgis-search-place.netgis-show{-webkit-transform:none;transform:none}.netgis-search-place>input{position:relative;width:100%;height:12mm!important;padding:0 3mm!important;z-index:1}.netgis-search-place>button{position:absolute;width:12mm;height:12mm;right:0;top:0;background:none;z-index:2}.netgis-search-place>ul{max-height:60mm;overflow-y:auto;margin:0;padding:0;list-style-type:none}.netgis-search-place li .netgis-button{width:100%;height:12mm;padding:0 3mm;text-align:left}.netgis-client,.netgis-client button{font-family:Verdana,sans-serif;font-size:4mm}.netgis-color-a{background-color:#900;color:#fff}.netgis-color-b{background-color:#430433;color:#fff}.netgis-color-c{background-color:#470f1b;color:#fff}.netgis-color-d{background-color:#f6f5f5;color:#000}.netgis-color-e{background-color:#fff;color:#000}.netgis-hover-a:hover{background-color:#900;color:#fff}.netgis-hover-b:hover{background-color:#430433;color:#fff}.netgis-hover-c:hover{background-color:#470f1b;color:#fff}.netgis-hover-d:hover{background-color:#f6f5f5;color:#000}.netgis-hover-e:hover{background-color:#fff;color:#000}.netgis-text-a{color:#900}.netgis-text-b{color:#430433}.netgis-text-c{color:#470f1b}.netgis-text-d{color:#f6f5f5}.netgis-text-e{color:#fff}.netgis-hover-text-a:hover{color:#900}.netgis-hover-text-b:hover{color:#430433}.netgis-hover-text-c:hover{color:#470f1b}.netgis-hover-text-d:hover{color:#f6f5f5}.netgis-hover-text-e:hover{color:#fff}.netgis-primary{background-color:#a7233f!important;color:white!important}.netgis-hover-primary:hover{background-color:#c82a4b!important;color:white!important}.netgis-light,.netgis-hover-light:hover{background-color:#f4f4f4!important}.netgis-text-primary{color:#a7233f!important}.netgis-hover-text-primary:hover{color:#c82a4b!important}.netgis-dialog{background:#fff;color:#000}.netgis-dropdown:hover>button{background-color:#c82a4b!important}.netgis-shadow{box-shadow:0 .5mm 1mm 0 rgba(0,0,0,0.2),0 1mm 2.5mm 0 rgba(0,0,0,0.1)!important}.netgis-shadow-large{box-shadow:0 1mm 2mm 0 rgba(0,0,0,0.3),0 2mm 5mm 0 rgba(0,0,0,0.15)!important}.netgis-text-shadow{text-shadow:0 0 1mm rgba(0,0,0,1.0)}.netgis-round{border-radius:2mm}.netgis-client a{color:inherit}.netgis-button{position:relative;padding:0 4mm;font:inherit;text-decoration:none;outline:none;border:none;cursor:pointer}.netgis-button .netgis-icon{display:inline-block;position:absolute;width:12mm;left:0;top:0;bottom:0;line-height:12mm;text-align:center;font-size:1.2em}.netgis-button .netgis-icon:last-child{left:auto;right:0}.netgis-button .netgis-icon+*:not(.netgis-icon){margin-left:8mm}.netgis-client button{border:none;cursor:pointer}.netgis-resize-right{resize:horizontal;overflow-x:auto;min-width:40mm;max-width:100%}.netgis-resize-bottom{resize:vertical;overflow-y:auto;min-height:24mm;max-height:100%}.netgis-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.netgis-clickable{cursor:pointer}.netgis-clip-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.netgis-bold{font-weight:bold}.netgis-toolbars{position:absolute;left:0;right:0;top:0}.netgis-toolbar{position:absolute;left:0;right:0;top:12mm;min-height:12mm;line-height:12mm;font-size:0;white-space:nowrap;z-index:1;-webkit-transform:none;transform:none;transition:transform 150ms ease}.netgis-toolbar.netgis-hide{-webkit-transform:translateY(-24mm);transform:translateY(-24mm);transition:transform 150ms ease;will-change:transform}.netgis-toolbar>div{height:12mm;white-space:nowrap}.netgis-toolbar>div>*{display:inline-block;font-size:4mm}.netgis-toolbar button{padding:0 4mm 0 0}.netgis-toolbar>div>button{line-height:12mm}.netgis-toolbar button i{width:12mm}.netgis-toolbar button:last-child{padding-right:0}.netgis-toolbar button:last-child span{margin-right:4mm}.netgis-toolbar label{display:inline-block;height:12mm;padding:0 4mm;cursor:pointer}.netgis-toolbar input[type=checkbox]{margin-right:2mm}.netgis-toolbar input[type=number]{margin-left:2mm;width:20mm}.netgis-toolbar input[type=text]{width:60mm}.netgis-toolbar .netgis-search-list{position:absolute;min-width:68mm;padding:0;margin:0;margin-left:-4mm;z-index:1;list-style-type:none;overflow:hidden;box-shadow:0 .5mm .5mm 0 rgba(0,0,0,0.2)!important}.netgis-toolbar .netgis-search-list.netgis-hide{display:none}.netgis-toolbar .netgis-search-list li{width:100%;padding:0;margin:0}.netgis-toolbar .netgis-search-list li button{width:100%;height:12mm;padding:0 4mm;white-space:nowrap;text-align:left}.netgis-toolbox{position:absolute;top:12mm;bottom:0;width:100%;overflow:hidden}.netgis-toolbox section{position:absolute;left:0;right:0;overflow:auto}.netgis-toolbox section:first-of-type{top:0;bottom:0}.netgis-toolbox section:last-of-type{top:50%;bottom:0}.netgis-toolbox section:last-of-type>div{position:absolute;width:100%;top:12mm;bottom:0;overflow:auto}.netgis-toolbox button:hover i{color:inherit!important}.netgis-toolbox label{display:block;width:100%;min-height:12mm;text-align:left;position:relative;padding:4mm;cursor:pointer}.netgis-toolbox input[type=checkbox]{width:4mm;height:4mm;margin:0 4mm 0 0}.netgis-toolbox input[type=checkbox]:last-child{float:right;margin-right:0}.netgis-toolbox input[type=text]{width:100%;height:10mm;padding:0 2mm;margin-top:3mm}.netgis-toolbox input[type=number]{position:absolute;right:2mm;width:24mm;top:2.5mm;height:8mm;padding:0 1mm}.netgis-tree{display:block;line-height:12mm;padding:0;margin:0;list-style-type:none}.netgis-tree ul{padding:0;margin:0;padding-left:9mm;list-style-type:none}.netgis-tree .netgis-folder{position:relative}.netgis-tree summary{display:block}.netgis-tree summary label{text-align:center}.netgis-tree .netgis-folder .netgis-icon{width:6mm;left:12mm;color:#eab000}.netgis-tree .netgis-folder .netgis-partial{opacity:.5}.netgis-tree details[open]>summary>.netgis-hide-open,.netgis-tree details>summary>.netgis-show-open{display:none}.netgis-tree details[open]>summary>.netgis-show-open{display:initial}.netgis-tree .netgis-folder>details>summary>label{position:absolute;width:12mm;top:0;left:0}.netgis-tree .netgis-folder>details>summary>span{margin-left:17mm!important}.netgis-tree .netgis-item label{padding:0 4mm;padding-left:3mm}.netgis-tree .netgis-item label input{margin-right:4mm} \ No newline at end of file +.netgis-attribution{position:absolute;right:0;bottom:0;padding:1mm;background:rgba(255,255,255,0.5);font-size:2.5mm;z-index:100}.netgis-client{position:absolute;width:100%;height:100%;overflow:hidden;background:#aaa}.netgis-client *{box-sizing:border-box}.netgis-client .netgis-loader{position:absolute;width:100%;height:100%;z-index:999999;text-align:center;font-size:12mm}.netgis-client .netgis-hide{display:none}.netgis-client .netgis-loader *{position:absolute;width:100%;left:0;top:50%;transform:translateY(-50%);animation:netgis-spin 2s linear infinite}@keyframes netgis-spin{0%{transform:rotate(0deg)}to{transform:rotate(360deg)}}.netgis-controls{position:absolute;width:12mm;right:4mm;bottom:8mm;overflow:hidden;z-index:100}.netgis-controls button{font-size:5mm!important;color:inherit;width:100%;height:12mm;padding:0;border:none;background-color:inherit;cursor:pointer}.netgis-layer-list{position:absolute;right:0;width:100%;max-width:100mm;top:12mm;bottom:0;overflow:auto;z-index:200;-webkit-transform:none;transform:none;transition:transform 150ms ease}.netgis-layer-list.netgis-hide{display:initial;-webkit-transform:translateX(110%);transform:translateX(110%);transition:transform 150ms ease;will-change:transform}.netgis-layer-list ul{list-style-type:none}.netgis-layer-list>ul{display:block;position:relative;width:100%;margin:0;padding:0}.netgis-folder{position:relative;overflow:hidden;list-style:none;padding:0;margin:0;min-height:12mm;width:100%;white-space:nowrap}.netgis-folder label{cursor:pointer}.netgis-folder input[type=checkbox]{cursor:pointer}.netgis-folder>button{display:inline-block;width:100%;padding:0;padding-right:16mm;margin:0;line-height:12mm;text-align:left}.netgis-folder>ul{display:none;padding-left:8mm}.netgis-folder.netgis-active>ul{display:block}.netgis-folder-item{height:12mm;line-height:12mm}.netgis-folder-item>label{display:block;padding-right:4mm}.netgis-layer-list .netgis-icon{display:inline-block;width:12mm;line-height:12mm;text-align:center}.netgis-layer-list i{margin-right:4mm}.netgis-folder i{color:#eab000}.netgis-folder-item i{color:#bbb}.netgis-folder .netgis-partial{opacity:.5}.netgis-layer-tools{padding:4mm;padding-top:0;text-align:center}.netgis-layer-tools hr{margin:4mm 0;color:#eee;border-color:#eee}.netgis-layer-tools button{padding:2mm 4mm}.netgis-layer-tools button i{margin-right:1mm}.netgis-map{position:absolute;left:0;right:0;top:12mm;bottom:0;background:#f2efe9}.netgis-drop-target{position:absolute;left:0;right:0;top:0;bottom:0;line-height:40mm;text-align:center;z-index:1;pointer-events:none;background:rgba(0,0,0,0.5);color:#fff}.netgis-drop-target.netgis-hide{display:none}.netgis-map{cursor:grab}.netgis-map:active:hover:not(.netgis-clickable){cursor:grabbing}.netgis-map.netgis-cursor-draw,.netgis-map.netgis-cursor-draw:active:hover{cursor:crosshair}.netgis-map .ol-scale-bar{right:24mm;bottom:10mm;left:auto}.netgis-menu{position:absolute;left:0;right:0;top:0;height:12mm;line-height:12mm;white-space:nowrap;font-size:0;z-index:10000;background:lightsalmon}.netgis-menu>div{height:12mm;white-space:nowrap}.netgis-menu>div>*{display:inline-block;height:100%;margin:0;font-size:4mm}.netgis-menu .netgis-right{float:right}.netgis-menu span{padding:0 4mm 0 0}.netgis-menu button{position:relative}.netgis-menu button i{display:inline-block;font-size:5mm;width:12mm;line-height:12mm;text-align:center}.netgis-menu button span{display:inline-block;position:relative;top:-2px;line-height:12mm;padding:0;margin-right:4mm}.netgis-dropdown{position:relative;padding:0}.netgis-dropdown .netgis-dropdown-content{display:none;position:absolute;min-width:100%;padding:0;margin:0;margin-top:-1px;z-index:1;font-size:4mm;list-style-type:none}.netgis-dropdown:hover .netgis-dropdown-content{display:block}.netgis-dropdown .netgis-dropdown-content i{font-size:4mm;color:#bbb}.netgis-dropdown button{width:100%;padding:0 4mm 0 0;white-space:nowrap;text-align:left}.netgis-modal{display:none;position:absolute;width:100%;height:100%;top:0;left:0;padding:6mm;z-index:110000;background:rgba(0,0,0,0.6)}.netgis-modal.netgis-show{display:block}.netgis-modal>*{position:relative;width:100%;height:100%;max-width:150mm;margin:0 auto}.netgis-modal .netgis-button{display:block;width:100%;min-height:12mm;text-align:left}.netgis-panel{position:absolute;left:0;width:80mm;top:12mm;bottom:0;z-index:5000;-webkit-transform:translateX(-110%);transform:translateX(-110%);transition:transform 150ms ease;will-change:transform}.netgis-panel.netgis-show{-webkit-transform:none;transform:none}.netgis-panel h2{margin:0 4mm;font-size:1em}.netgis-panel .netgis-button,.netgis-panel label{display:block;width:100%;min-height:12mm;text-align:left}.netgis-panel input[type=text]{margin-top:3mm}.netgis-panel .netgis-half{display:inline-block;width:50%!important;padding-right:1mm}.netgis-panel .netgis-half+.netgis-half{padding-left:1mm;padding-right:0}.netgis-panel .netgis-anim-bottom{transition:transform 150ms ease;will-change:transform;-webkit-transform:none;transform:none}.netgis-panel .netgis-anim-bottom.netgis-hide{display:initial;-webkit-transform:translateY(110%);transform:translateY(110%)}.netgis-panel .netgis-resize-bottom{max-height:80%}.netgis-search-parcel{position:absolute;top:12mm;bottom:0;width:100%;overflow:hidden;padding:4mm}.netgis-search-parcel section{position:absolute;left:0;right:0;overflow:auto}.netgis-search-parcel section:first-of-type{top:0;bottom:0;padding:6mm}.netgis-search-parcel section:last-of-type{top:50%;bottom:0}.netgis-search-parcel h3{margin:0;margin-bottom:4mm}.netgis-search-parcel label{display:block;margin:3mm 0;margin-bottom:0;cursor:pointer}.netgis-search-parcel label:first-child{margin-top:0}.netgis-search-parcel label span:first-child{display:block}.netgis-search-parcel input{width:100%;height:12mm;margin:3mm 0;padding:0 3mm}.netgis-search-parcel .netgis-loader{width:6mm;height:6mm;top:8mm;right:6mm;font-size:6mm}.netgis-search-parcel ul{margin:0;padding:0;list-style-type:none}.netgis-search-parcel li button{text-align:left}.netgis-search-parcel button{display:block;width:100%;height:12mm;padding:0 3mm;margin:0}.netgis-search-parcel .netgis-table-wrapper{width:100%;margin-top:4mm;overflow:auto}.netgis-search-parcel table{min-width:100%;border-collapse:collapse;white-space:nowrap}.netgis-search-parcel table thead{position:-webkit-sticky;position:sticky;top:0;z-index:10}.netgis-search-parcel tr{height:12mm}.netgis-search-parcel th{text-align:left;padding:0 3mm}.netgis-search-parcel td{text-align:left;padding:0 3mm;cursor:pointer}.netgis-search-parcel td:first-child{padding:0}.netgis-search-parcel table button{display:inline-block;width:12mm;height:12mm;background:none}.netgis-search-parcel p{margin:4mm 3mm;font-style:italic}.netgis-search-place{position:absolute;left:4mm;right:4mm;max-width:90mm;min-height:12mm;top:16mm;margin-left:auto;z-index:4000;-webkit-transform:translateY(-300%);transform:translateY(-300%);transition:transform 150ms ease;will-change:transform}.netgis-search-place.netgis-show{-webkit-transform:none;transform:none}.netgis-search-place>input{position:relative;width:100%;height:12mm!important;padding:0 3mm!important;z-index:1}.netgis-search-place>button{position:absolute;width:12mm;height:12mm;right:0;top:0;background:none;z-index:2}.netgis-search-place>ul{max-height:60mm;overflow-y:auto;margin:0;padding:0;list-style-type:none}.netgis-search-place li .netgis-button{width:100%;height:12mm;padding:0 3mm;text-align:left}.netgis-tabs{position:relative;background:lightblue}.netgis-tabs>.netgis-header{position:absolute;width:100%;height:12mm;left:0;top:0;white-space:nowrap;overflow-x:auto;overflow-y:hidden}.netgis-tabs>.netgis-content{position:absolute;width:100%;left:0;top:12mm;bottom:0}.netgis-tabs.netgis-scroll>.netgis-header{height:17mm}.netgis-tabs.netgis-scroll>.netgis-content{top:17mm}.netgis-tabs>.netgis-header .netgis-button{display:inline-block;width:auto}.netgis-tabs>.netgis-content section{position:absolute;width:100%;height:100%;left:0;top:0;padding:12mm;overflow:auto}.netgis-tabs>.netgis-content section.netgis-hide{display:none}.netgis-import .netgis-tabs{position:absolute;width:100%;left:0;top:12mm;bottom:0}.netgis-import .netgis-tabs .netgis-header .netgis-button{width:50%;text-align:center}.netgis-client,.netgis-client button{font-family:Verdana,sans-serif;font-size:4mm}.netgis-color-a{background-color:#900;color:#fff}.netgis-color-b{background-color:#430433;color:#fff}.netgis-color-c{background-color:#470f1b;color:#fff}.netgis-color-d{background-color:#f6f5f5;color:#000}.netgis-color-e{background-color:#fff;color:#000}.netgis-hover-a:hover{background-color:#900;color:#fff}.netgis-hover-b:hover{background-color:#430433;color:#fff}.netgis-hover-c:hover{background-color:#470f1b;color:#fff}.netgis-hover-d:hover{background-color:#f6f5f5;color:#000}.netgis-hover-e:hover{background-color:#fff;color:#000}.netgis-text-a{color:#900}.netgis-text-b{color:#430433}.netgis-text-c{color:#470f1b}.netgis-text-d{color:#f6f5f5}.netgis-text-e{color:#fff}.netgis-hover-text-a:hover{color:#900}.netgis-hover-text-b:hover{color:#430433}.netgis-hover-text-c:hover{color:#470f1b}.netgis-hover-text-d:hover{color:#f6f5f5}.netgis-hover-text-e:hover{color:#fff}.netgis-bar-a{box-shadow:0 1.5mm 0 0 #900 inset}.netgis-primary{background-color:#a7233f!important;color:white!important}.netgis-hover-primary:hover{background-color:#c82a4b!important;color:white!important}.netgis-light,.netgis-hover-light:hover{background-color:#f4f4f4!important}.netgis-text-primary{color:#a7233f!important}.netgis-hover-text-primary:hover{color:#c82a4b!important}.netgis-dialog{background:#fff;color:#000}.netgis-dropdown:hover>button{background-color:#c82a4b!important}.netgis-shadow{box-shadow:0 .5mm 1mm 0 rgba(0,0,0,0.2),0 1mm 2.5mm 0 rgba(0,0,0,0.1)!important}.netgis-shadow-large{box-shadow:0 1mm 2mm 0 rgba(0,0,0,0.3),0 2mm 5mm 0 rgba(0,0,0,0.15)!important}.netgis-text-shadow{text-shadow:0 0 1mm rgba(0,0,0,1.0)}.netgis-round{border-radius:2mm}.netgis-client a{color:inherit}.netgis-button{position:relative;padding:0 4mm;font:inherit;text-decoration:none;outline:none;border:none;cursor:pointer}.netgis-button .netgis-icon{display:inline-block;position:absolute;width:12mm;left:0;top:0;bottom:0;line-height:12mm;text-align:center;font-size:1.2em}.netgis-button.netgis-center .netgis-icon:first-child{position:static}.netgis-button .netgis-icon:last-child{left:auto;right:0}.netgis-button:not(.netgis-center) .netgis-icon+*:not(.netgis-icon){margin-left:8mm}.netgis-client button{border:none;cursor:pointer}.netgis-resize-right{resize:horizontal;overflow-x:auto;min-width:40mm;max-width:100%}.netgis-resize-bottom{resize:vertical;overflow-y:auto;min-height:24mm;max-height:100%}.netgis-noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.netgis-clickable{cursor:pointer}.netgis-form h3{font-size:1em;margin-top:0;margin-bottom:6mm}.netgis-form ul{padding:0;padding-left:12mm;margin-top:0;margin-bottom:6mm;list-style-type:square}.netgis-form li{padding-left:2mm}.netgis-form label{display:block;margin-bottom:6mm;font-weight:bold;cursor:pointer}.netgis-form input,.netgis-form select{display:block;width:100%;margin-top:6mm;padding:2mm}.netgis-form input[type=file]{padding:6mm;cursor:pointer}.netgis-form input[type=checkbox]{display:inline-block;width:12mm;margin:0}.netgis-form button{display:block;width:100%;height:12mm}.netgis-clip-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.netgis-bold{font-weight:bold}.netgis-center{text-align:center!important}.netgis-toolbars{position:absolute;left:0;right:0;top:0}.netgis-toolbar{position:absolute;left:0;right:0;top:12mm;min-height:12mm;line-height:12mm;font-size:0;white-space:nowrap;z-index:1;-webkit-transform:none;transform:none;transition:transform 150ms ease}.netgis-toolbar.netgis-hide{-webkit-transform:translateY(-24mm);transform:translateY(-24mm);transition:transform 150ms ease;will-change:transform}.netgis-toolbar>div{height:12mm;white-space:nowrap}.netgis-toolbar>div>*{display:inline-block;font-size:4mm}.netgis-toolbar button{padding:0 4mm 0 0}.netgis-toolbar>div>button{line-height:12mm}.netgis-toolbar button i{width:12mm}.netgis-toolbar button:last-child{padding-right:0}.netgis-toolbar button:last-child span{margin-right:4mm}.netgis-toolbar label{display:inline-block;height:12mm;padding:0 4mm;cursor:pointer}.netgis-toolbar input[type=checkbox]{margin-right:2mm}.netgis-toolbar input[type=number]{margin-left:2mm;width:20mm}.netgis-toolbar input[type=text]{width:60mm}.netgis-toolbar .netgis-search-list{position:absolute;min-width:68mm;padding:0;margin:0;margin-left:-4mm;z-index:1;list-style-type:none;overflow:hidden;box-shadow:0 .5mm .5mm 0 rgba(0,0,0,0.2)!important}.netgis-toolbar .netgis-search-list.netgis-hide{display:none}.netgis-toolbar .netgis-search-list li{width:100%;padding:0;margin:0}.netgis-toolbar .netgis-search-list li button{width:100%;height:12mm;padding:0 4mm;white-space:nowrap;text-align:left}.netgis-toolbox{position:absolute;top:12mm;bottom:0;width:100%;overflow:hidden}.netgis-toolbox section{position:absolute;left:0;right:0;overflow:auto}.netgis-toolbox section:first-of-type{top:0;bottom:0}.netgis-toolbox section:last-of-type{top:50%;bottom:0}.netgis-toolbox section:last-of-type>div{position:absolute;width:100%;top:12mm;bottom:0;overflow:auto}.netgis-toolbox button:hover i{color:inherit!important}.netgis-toolbox label{display:block;width:100%;min-height:12mm;text-align:left;position:relative;padding:4mm;cursor:pointer}.netgis-toolbox input[type=checkbox]{width:4mm;height:4mm;margin:0 4mm 0 0}.netgis-toolbox input[type=checkbox]:last-child{float:right;margin-right:0}.netgis-toolbox input[type=text]{width:100%;height:10mm;padding:0 2mm;margin-top:3mm}.netgis-toolbox input[type=number]{position:absolute;right:2mm;width:24mm;top:2.5mm;height:8mm;padding:0 1mm}.netgis-tree{display:block;line-height:12mm;padding:0;margin:0;list-style-type:none}.netgis-tree ul{padding:0;margin:0;padding-left:9mm;list-style-type:none}.netgis-tree .netgis-folder{position:relative}.netgis-tree summary{display:block}.netgis-tree summary label{text-align:center}.netgis-tree .netgis-folder .netgis-icon{width:6mm;left:12mm;color:#eab000}.netgis-tree .netgis-folder .netgis-partial{opacity:.5}.netgis-tree details[open]>summary>.netgis-hide-open,.netgis-tree details>summary>.netgis-show-open{display:none}.netgis-tree details[open]>summary>.netgis-show-open{display:initial}.netgis-tree .netgis-folder>details>summary>label{position:absolute;width:12mm;top:0;left:0}.netgis-tree .netgis-folder>details>summary>span{margin-left:17mm!important}.netgis-tree .netgis-item label{padding:0 4mm;padding-left:3mm}.netgis-tree .netgis-item label input{margin-right:4mm} \ No newline at end of file diff --git a/templates/map/client/netgis.min.js b/templates/map/client/netgis.min.js index faf870f6..4516c251 100644 --- a/templates/map/client/netgis.min.js +++ b/templates/map/client/netgis.min.js @@ -1,5 +1,4 @@ -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;bc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);cZeichnungsfl\u00e4che: "+netgis.util.formatArea(a.area,!0)+"":null;this.update()};netgis=netgis||{}; -netgis.Client=function(a,b){this.build="20220826";this.debug=!1;netgis.util.isString(a)&&(a=document.getElementById(a));this.container=a;this.editable=!0;this.root=null;this.modules=[];this.callbacks={};this.config=this.createDefaultConfig();this.create();if(netgis.util.isDefined(b))if(netgis.util.isString(b)){var c=this;netgis.util.request(b,function(a){a=JSON.parse(a);netgis.util.merge(c.config,a);c.applyConfig(c.config)})}else netgis.util.merge(this.config,b),this.applyConfig(this.config);else this.applyConfig(this.config)}; -netgis.Client.Layers=Object.freeze({PARCEL_DISTRICTS:"parcel-districts",PARCEL_FIELDS:"parcel-fields",PARCEL_FEATURES:"parcel-features",EDIT_LAYER:"edit-layer",PREVIEW_LAYER:"preview-layer"});netgis.Client.prototype.applyConfig=function(a){this.createModules();this.load();this.invoke(netgis.Events.CONTEXT_UPDATE,a);this.hideLoader();this.initModules(a);this.initConfig(a);this.initEvents();this.setMode(netgis.Modes.VIEW)};netgis.Client.prototype.initElements=function(){}; +netgis.Client=function(a,b){this.build="20220826";this.debug=!1;netgis.util.isString(a)&&(a=document.getElementById(a));this.container=a;this.editable=!0;this.root=null;this.modules=[];this.callbacks={};this.config=this.createDefaultConfig();this.create();if(netgis.util.isDefined(b))if(netgis.util.isString(b)){var c=this;netgis.util.request(b,function(a){a=JSON.parse(a);netgis.util.merge(c.config,a);c.applyConfig(c.config)})}else netgis.util.merge(this.config,b),this.applyConfig(this.config);else this.applyConfig(this.config); +this.hideLoader()};netgis.Client.Layers=Object.freeze({PARCEL_DISTRICTS:"parcel-districts",PARCEL_FIELDS:"parcel-fields",PARCEL_FEATURES:"parcel-features",EDIT_LAYER:"edit-layer",PREVIEW_LAYER:"preview-layer"});netgis.Client.prototype.applyConfig=function(a){this.createModules();this.load();this.invoke(netgis.Events.CONTEXT_UPDATE,a);this.initModules(a);this.initConfig(a);this.initOutput(a);this.initEvents();this.importLayers={};this.setMode(netgis.Modes.VIEW)}; +netgis.Client.prototype.initElements=function(){}; netgis.Client.prototype.initModules=function(a){this.map=new netgis.MapOpenLayers(a);this.map.attach(this.root);this.controls=new netgis.Controls;this.controls.attach(this.root);this.layerPanel=new netgis.Panel("Inhalte");this.layerPanel.attach(this.root);this.layerTree=new netgis.Tree;this.layerTree.container.style.position="absolute";this.layerTree.container.style.width="100%";this.layerTree.container.style.top="12mm";this.layerTree.container.style.bottom="6mm";this.layerTree.container.style.overflow= -"auto";this.layerTree.attach(this.layerPanel.container);this.toolboxPanel=new netgis.Panel("Werkzeuge");this.toolboxPanel.attach(this.root);this.toolbox=new netgis.Toolbox(a);this.toolbox.attach(this.toolboxPanel.container);this.searchPlace=new netgis.SearchPlace(a);this.searchPlace.attach(this.root);this.parcelPanel=new netgis.Panel("Flurst\u00fccks-Suche");this.parcelPanel.container.style.minWidth="92mm";this.parcelPanel.attach(this.root);this.searchParcel=new netgis.SearchParcel(a);this.searchParcel.attach(this.parcelPanel.container)}; -netgis.Client.prototype.initConfig=function(a){var b=[],c=a.folders;if(c){for(var d=0;dUnterst\u00fctzte Koordinatensysteme:
  • World Geodetic System 1984 (EPSG:4326)
  • ETRS89 / UTM zone 32N (EPSG:25832)
"; +a.appendChild(b);b=document.createElement("label");b.innerHTML="Datei ausw\u00e4hlen/ablegen:";a.appendChild(b);var c=document.createElement("input");c.className="netgis-color-d";c.setAttribute("type","file");c.setAttribute("accept",".geojson,.gml,.gpkg,.shp.zip,.sqlite");b.appendChild(c);this.importFileInput=c;b=document.createElement("button");b.setAttribute("type","button");b.className="netgis-button netgis-center netgis-color-a netgis-hover-c netgis-shadow";b.innerHTML="Hinzuf\u00fcgen"; +b.addEventListener("click",this.onImportFileClick.bind(this));a.appendChild(b);b=this.importTabs.getContentSection(1);b.classList.add("netgis-noselect");a=document.createElement("label");a.innerHTML="WMS/WFS URL:";b.appendChild(a);c=document.createElement("input");c.setAttribute("type","text");a.appendChild(c);this.importServiceInput=c;a=document.createElement("button");a.setAttribute("type","button");a.className="netgis-button netgis-center netgis-color-a netgis-hover-c netgis-shadow";a.innerHTML= +"Dienst laden";a.style.marginBottom="6mm";a.addEventListener("click",this.onImportServiceClick.bind(this));b.appendChild(a);a=document.createElement("div");a.className="netgis-hide";b.appendChild(a);this.importServiceDetails=a;b=document.createElement("label");b.innerHTML="Bezeichnung:";a.appendChild(b);c=document.createElement("input");c.setAttribute("type","text");b.appendChild(c);this.importServiceNameInput=c;b=document.createElement("label"); +b.innerHTML="Kartenebene:";a.appendChild(b);c=document.createElement("select");b.appendChild(c);this.importServiceLayerSelect=c;b=document.createElement("label");b.innerHTML="Format:";a.appendChild(b);c=document.createElement("select");b.appendChild(c);this.importServiceFormatSelect=c;b=document.createElement("button");b.setAttribute("type","button");b.className="netgis-button netgis-center netgis-color-a netgis-hover-c netgis-shadow";b.innerHTML="Hinzuf\u00fcgen"; +b.addEventListener("click",this.onImportServiceAccept.bind(this));a.appendChild(b);this.exportModal=new netgis.Modal("Exportieren");this.exportModal.container.classList.add("netgis-export");this.exportModal.attach(this.root);a=document.createElement("div");a.className="netgis-form netgis-noselect";a.style.position="absolute";a.style.width="100%";a.style.top="12mm";a.style.bottom="0mm";a.style.overflow="auto";a.style.padding="12mm";this.exportModal.content.appendChild(a);b=document.createElement("label"); +b.innerHTML="Format:";a.appendChild(b);c=document.createElement("select");c.innerHTML="";c.addEventListener("change",this.onExportFormatChange.bind(this));b.appendChild(c);this.exportFormatSelect=c;b=document.createElement("label");b.innerHTML="Breite (Pixel):";a.appendChild(b);c=document.createElement("input");c.setAttribute("type","number");c.setAttribute("min",0);b.appendChild(c); +this.exportWidthInput=c;b=document.createElement("label");b.innerHTML="H\u00f6he (Pixel):";a.appendChild(b);c=document.createElement("input");c.setAttribute("type","number");c.setAttribute("min",0);b.appendChild(c);this.exportHeightInput=c;b=document.createElement("label");b.innerHTML="Seitenr\u00e4nder (Millimeter):";a.appendChild(b);c=document.createElement("input");c.setAttribute("type","number");c.setAttribute("min",0);c.value=10;b.appendChild(c);this.exportPaddingInput=c;b=document.createElement("label"); +b.innerHTML="Querformat:";a.appendChild(b);c=document.createElement("input");c.setAttribute("type","checkbox");b.appendChild(c);this.exportLandscapeInput=c;b=document.createElement("button");b.setAttribute("type","button");b.className="netgis-button netgis-center netgis-color-a netgis-hover-c netgis-shadow";b.innerHTML="Exportieren";b.addEventListener("click",this.onExportButtonClick.bind(this));a.appendChild(b)}; +netgis.Client.prototype.initConfig=function(a){var b=[],c=a.folders;if(c){for(var d=0;dEbene hinzuf\u00fcgen...",this.onLayerTreeImportClick.bind(this)); +this.attribution.onContextUpdate(a)};netgis.Client.prototype.initOutput=function(a){netgis.util.isDefined(a.output)?netgis.util.isDefined(a.output.id)&&(this.output=document.getElementById(a.output.id),this.output.value&&0this.callbacks[a].length&&delete this.callbacks[a]}else delete this.callbacks[a]};netgis.Client.prototype.invoke=function(a,b){this.debug&&console.info("EVENT:",a,b);if(netgis.util.isDefined(this.callbacks[a]))for(var c=0;cthis.callbacks[a].length&&delete this.callbacks[a]}else delete this.callbacks[a]}; +netgis.Client.prototype.invoke=function(a,b){this.debug&&console.info("EVENT:",a,b);if(netgis.util.isDefined(this.callbacks[a]))for(var c=0;cb.length)){var c=b.indexOf("?");this.importServiceBaseURL=a=-1this.exportHeightInput.value;this.toolboxPanel.hide();this.exportModal.show()}; +netgis.Client.prototype.onExportFormatChange=function(a){"pdf"===this.exportFormatSelect.value?(this.exportPaddingInput.parentNode.classList.remove("netgis-hide"),this.exportLandscapeInput.parentNode.classList.remove("netgis-hide")):(this.exportPaddingInput.parentNode.classList.add("netgis-hide"),this.exportLandscapeInput.parentNode.classList.add("netgis-hide"))}; +netgis.Client.prototype.onExportButtonClick=function(a){a=this.exportFormatSelect.value;var b=Number.parseInt(this.exportWidthInput.value),c=Number.parseInt(this.exportHeightInput.value),d=Number.parseInt(this.exportPaddingInput.value);this.map.exportImage(a,b,c,this.exportLandscapeInput.checked,d)};netgis=netgis||{};netgis.Controls=function(){this.initElements()}; netgis.Controls.prototype.initElements=function(){this.container=document.createElement("section");this.container.className="netgis-controls netgis-color-e netgis-text-a netgis-shadow netgis-round";this.zoomIn=this.createButton("","Zoom +");this.zoomIn.addEventListener("click",this.onZoomInClick.bind(this));this.container.appendChild(this.zoomIn);this.zoomOut=this.createButton("","Zoom -");this.zoomOut.addEventListener("click",this.onZoomOutClick.bind(this)); this.container.appendChild(this.zoomOut);this.zoomAll=this.createButton("","Zoom auf Anfangsausdehung");this.zoomAll.addEventListener("click",this.onZoomAllClick.bind(this));this.container.appendChild(this.zoomAll)};netgis.Controls.prototype.attach=function(a){a.appendChild(this.container)};netgis.Controls.prototype.createButton=function(a,b){var c=document.createElement("button");c.setAttribute("type","button");c.innerHTML=a;c.title=b;c.className="netgis-hover-a";return c}; netgis.Controls.prototype.load=function(){this.root=document.createElement("section");this.root.className="netgis-controls netgis-color-e netgis-text-a netgis-hover-a netgis-shadow netgis-round";var a=document.createElement("button");a.setAttribute("type","button");a.innerHTML="";a.title="Hineinzoomen";a.addEventListener("click",this.onZoomInClick.bind(this));this.root.appendChild(a);a=document.createElement("button");a.setAttribute("type","button");a.innerHTML=""; a.title="Herauszoomen";a.addEventListener("click",this.onZoomOutClick.bind(this));this.root.appendChild(a);this.client.root.appendChild(this.root)};netgis.Controls.prototype.onZoomInClick=function(a){netgis.util.invoke(this.container,netgis.Events.CONTROLS_ZOOM,1)};netgis.Controls.prototype.onZoomOutClick=function(a){netgis.util.invoke(this.container,netgis.Events.CONTROLS_ZOOM,-1)}; netgis.Controls.prototype.onZoomAllClick=function(a){netgis.util.invoke(this.container,netgis.Events.CONTROLS_ZOOM_ALL,null)};netgis.Controls.prototype.onSettings=function(a){alert("TODO: settings dialog")};netgis=netgis||{}; netgis.Events=Object.freeze({PANEL_RESIZE:"panel-resize",PANEL_TOGGLE:"panel-toggle",LAYERS_TOGGLE:"layers-toggle",TOOLBOX_TOGGLE:"toolbox-toggle",CONTROLS_ZOOM:"controls-zoom",CONTROLS_ZOOM_ALL:"controls-zoom-all",MAP_FEATURE_ENTER:"map-feature-enter",MAP_FEATURE_HOVER:"map-feature-hover",MAP_FEATURE_CLICK:"map-feature-click",MAP_FEATURE_LEAVE:"map-feature-leave",PARCELS_RESET:"parcels-reset",PARCELS_FIELDS_RESPONSE:"parcels-fields-response",PARCELS_RESPONSE:"parcels-response",PARCELS_ITEM_ENTER:"parcels-item-enter", -PARCELS_ITEM_LEAVE:"parcels-item-leave",PARCELS_ITEM_CLICK:"parcels-item-click",PARCELS_ITEM_IMPORT_CLICK:"parcels-item-import-click",SNAP_TOGGLE:"snap-toggle",BUFFER_TOGGLE:"buffer-toggle",TRACING_TOGGLE:"tracing-toggle",CONTEXT_UPDATE:"CONTEXT_UPDATE",SET_MODE:"SET_MODE",LAYER_LIST_TOGGLE:"LAYER_LIST_TOGGLE",PANEL_SHOW:"PANEL_SHOW",PANEL_HIDE:"PANEL_HIDE",LAYER_SHOW:"LAYER_SHOW",LAYER_HIDE:"LAYER_HIDE",LAYER_CREATED:"LAYER_CREATED",MAP_ZOOM_WKT:"MAP_ZOOM_WKT",MAP_SET_EXTENT:"MAP_SET_EXTENT",MAP_CHANGE_ZOOM:"MAP_CHANGE_ZOOM", -MAP_UPDATE_STYLE:"MAP_UPDATE_STYLE",MAP_MODE_POINTS:"MAP_MODE_POINTS",MAP_MODE_LINES:"MAP_MODE_LINES",MAP_MODE_POLYGONS:"MAP_MODE_POLYGONS",EDIT_FEATURES_LOADED:"EDIT_FEATURES_LOADED",EDIT_FEATURES_CHANGE:"EDIT_FEATURES_CHANGE",SEARCH_PLACE_REQUEST:"SEARCH_PLACE_REQUEST",SEARCH_PLACE_RESPONSE:"SEARCH_PLACE_RESPONSE",PARCEL_SHOW_PREVIEW:"PARCEL_SHOW_PREVIEW",PARCEL_HIDE_PREVIEW:"PARCEL_HIDE_PREVIEW",BUFFER_CHANGE:"BUFFER_CHANGE",BUFFER_ACCEPT:"BUFFER_ACCEPT",BUFFER_CANCEL:"BUFFER_CANCEL",DRAW_BUFFER_ON:"DRAW_BUFFER_ON", -DRAW_BUFFER_OFF:"DRAW_BUFFER_OFF",DRAW_BUFFER_RADIUS_CHANGE:"DRAW_BUFFER_RADIUS_CHANGE",DRAW_BUFFER_SEGMENTS_CHANGE:"DRAW_BUFFER_SEGMENTS_CHANGE",SNAP_ON:"SNAP_ON",SNAP_OFF:"SNAP_OFF",TRACING_ON:"TRACING_ON",TRACING_OFF:"TRACING_OFF",IMPORT_SHAPEFILE_SHOW:"IMPORT_SHAPEFILE_SHOW",IMPORT_GEOJSON_SHOW:"IMPORT_GEOJSON_SHOW",IMPORT_GML_SHOW:"IMPORT_GML_SHOW",IMPORT_SPATIALITE_SHOW:"IMPORT_SPATIALITE_SHOW",IMPORT_GEOPACKAGE_SHOW:"IMPORT_GEOPACKAGE_SHOW",IMPORT_SHAPEFILE:"IMPORT_SHAPEFILE",IMPORT_GEOJSON:"IMPORT_GEOJSON", -IMPORT_GML:"IMPORT_GML",IMPORT_WKT:"IMPORT_WKT",IMPORT_SPATIALITE:"IMPORT_SPATIALITE",IMPORT_GEOPACKAGE:"IMPORT_GEOPACKAGE",EXPORT_PDF_SHOW:"EXPORT_PDF_SHOW",EXPORT_JPEG_SHOW:"EXPORT_JPEG_SHOW",EXPORT_PNG_SHOW:"EXPORT_PNG_SHOW",EXPORT_GIF_SHOW:"EXPORT_GIF_SHOW",EXPORT_PDF:"EXPORT_PDF",EXPORT_JPEG:"EXPORT_JPEG",EXPORT_PNG:"EXPORT_PNG",EXPORT_GIF:"EXPORT_GIF",EXPORT_BEGIN:"EXPORT_BEGIN",EXPORT_END:"EXPORT_END",ADD_SERVICE_SHOW:"ADD_SERVICE_SHOW",ADD_SERVICE_WMS:"ADD_SERVICE_WMS",ADD_SERVICE_WFS:"ADD_SERVICE_WFS"});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.initDefaultFolders();this.tools=document.createElement("div");this.tools.className="netgis-layer-tools";this.tools.innerHTML="
";this.root.appendChild(this.tools);this.buttonAddService=document.createElement("button");this.buttonAddService.className= -"netgis-text-primary netgis-hover-primary";this.buttonAddService.innerHTML=" Dienst hinzuf\u00fcgen";this.buttonAddService.setAttribute("type","button");this.buttonAddService.addEventListener("click",this.onAddServiceClick.bind(this));this.tools.appendChild(this.buttonAddService);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));this.client.on(netgis.Events.EDIT_FEATURES_CHANGE,this.onEditFeaturesChange.bind(this));this.client.on(netgis.Events.ADD_SERVICE_WMS,this.onAddServiceWMS.bind(this));this.client.on(netgis.Events.ADD_SERVICE_WFS,this.onAddServiceWFS.bind(this));this.client.on(netgis.Events.SET_MODE,this.onSetMode.bind(this))}; -netgis.LayerTree.prototype.initDefaultFolders=function(){this.folderDraw=this.createFolder("Zeichnung");this.folderDraw.classList.add("netgis-hide");this.list.appendChild(this.folderDraw);this.folderImport=this.createFolder("Importierte Ebenen");this.folderImport.classList.add("netgis-hide");this.list.appendChild(this.folderImport);this.folderServices=this.createFolder("Eigene Dienste");this.folderServices.classList.add("netgis-hide");this.list.appendChild(this.folderServices)}; -netgis.LayerTree.prototype.clearAll=function(){this.list.innerHTML="";this.initDefaultFolders()}; -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.setAttribute("type","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);b=document.createElement("span");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;da.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.MapOpenLayers.prototype.onEditLayerAdd=function(a){this.updateEditLayerItem();this.updateEditOutput();this.snapFeatures.push(a.feature)}; netgis.MapOpenLayers.prototype.onEditLayerRemove=function(a){this.updateEditOutput();this.snapFeatures.remove(a.feature)};netgis.MapOpenLayers.prototype.onEditLayerChange=function(a){this.updateEditOutput()}; netgis.MapOpenLayers.prototype.updateEditOutput=function(){var a=this.editLayer.getSource().getFeatures(),b=this.projection,c=(new ol.format.GeoJSON).writeFeaturesObject(a,{dataProjection:b,featureProjection:b});c.crs={type:"name",properties:{name:"urn:ogc:def:crs:"+b.replace(":","::")}};for(var d=b=0;dn.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); @@ -193,53 +201,9 @@ netgis.Menu.prototype.onDeleteFeaturesClick=function(a){this.client.invoke(netgi netgis.Menu.prototype.onToolboxClick=function(a){netgis.util.invoke(this.root,netgis.Events.TOOLBOX_TOGGLE)};netgis.Menu.prototype.onSearchDataClick=function(a){alert("TODO: data search interface")};netgis.Menu.prototype.onImportOWSClick=function(a){alert("TODO: ows import interface, try setting url parameter '?ows='")};netgis.Menu.prototype.onImportShapefileClick=function(a){this.client.invoke(netgis.Events.IMPORT_SHAPEFILE_SHOW,null)}; netgis.Menu.prototype.onImportGeoJSONClick=function(a){this.client.invoke(netgis.Events.IMPORT_GEOJSON_SHOW,null)};netgis.Menu.prototype.onImportKMLClick=function(a){alert("TODO: kml import interface")};netgis.Menu.prototype.onImportGMLClick=function(a){this.client.invoke(netgis.Events.IMPORT_GML_SHOW,null)};netgis.Menu.prototype.onImportSpatialiteClick=function(a){this.client.invoke(netgis.Events.IMPORT_SPATIALITE_SHOW,null)}; netgis.Menu.prototype.onImportGeopackageClick=function(a){this.client.invoke(netgis.Events.IMPORT_GEOPACKAGE_SHOW,null)};netgis.Menu.prototype.onExportPDFClick=function(a){this.client.invoke(netgis.Events.EXPORT_PDF_SHOW,null)};netgis.Menu.prototype.onExportJPEGClick=function(a){this.client.invoke(netgis.Events.EXPORT_JPEG_SHOW,null)};netgis.Menu.prototype.onExportPNGClick=function(a){this.client.invoke(netgis.Events.EXPORT_PNG_SHOW,null)}; -netgis.Menu.prototype.onExportGIFClick=function(a){this.client.invoke(netgis.Events.EXPORT_GIF_SHOW,null)};netgis=netgis||{};netgis.Modal=function(){this.addService=this.exportGIF=this.exportPNG=this.exportJPEG=this.exportPDF=this.importShapefile=this.importGML=this.importGeoJSON=this.client=null;this.addServiceID=1E4}; -netgis.Modal.prototype.load=function(){this.root=document.createElement("section");this.root.className="netgis-modal";this.root.addEventListener("click",this.onRootClick.bind(this));this.importGeoJSON=this.createImportGeoJSON();this.root.appendChild(this.importGeoJSON);this.importGML=this.createImportGML();this.root.appendChild(this.importGML);this.importShapefile=this.createImportShapefile();this.root.appendChild(this.importShapefile);this.importSpatialite=this.createImportSpatialite();this.root.appendChild(this.importSpatialite); -this.importGeopackage=this.createImportGeopackage();this.root.appendChild(this.importGeopackage);this.exportPDF=this.createExportPDF();this.root.appendChild(this.exportPDF);this.exportJPEG=this.createExportJPEG();this.root.appendChild(this.exportJPEG);this.exportPNG=this.createExportPNG();this.root.appendChild(this.exportPNG);this.exportGIF=this.createExportGIF();this.root.appendChild(this.exportGIF);this.addService=this.createAddService();this.root.appendChild(this.addService);this.client.root.appendChild(this.root); -this.client.on(netgis.Events.IMPORT_GEOJSON_SHOW,this.onImportGeoJSONShow.bind(this));this.client.on(netgis.Events.IMPORT_GML_SHOW,this.onImportGMLShow.bind(this));this.client.on(netgis.Events.IMPORT_SHAPEFILE_SHOW,this.onImportShapefileShow.bind(this));this.client.on(netgis.Events.IMPORT_SPATIALITE_SHOW,this.onImportSpatialiteShow.bind(this));this.client.on(netgis.Events.IMPORT_GEOPACKAGE_SHOW,this.onImportGeopackageShow.bind(this));this.client.on(netgis.Events.EXPORT_PDF_SHOW,this.onExportPDFShow.bind(this)); -this.client.on(netgis.Events.EXPORT_JPEG_SHOW,this.onExportJPEGShow.bind(this));this.client.on(netgis.Events.EXPORT_PNG_SHOW,this.onExportPNGShow.bind(this));this.client.on(netgis.Events.EXPORT_GIF_SHOW,this.onExportGIFShow.bind(this));this.client.on(netgis.Events.ADD_SERVICE_SHOW,this.onAddServiceShow.bind(this))}; -netgis.Modal.prototype.createImportGeoJSON=function(){var a=this.createContainer("Import GeoJSON");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:",".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.createImportSpatialite=function(){var a=this.createContainer("Import Spatialite");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:",".sqlite",this.onImportSpatialiteChange.bind(this));this.createSpace(a);this.createButton(a,"Importieren",this.onImportSpatialiteAccept.bind(this));return a}; -netgis.Modal.prototype.createImportGeopackage=function(){var a=this.createContainer("Import GeoPackage");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:",".gpkg",this.onImportGeopackageChange.bind(this));this.createSpace(a);this.createButton(a,"Importieren",this.onImportGeopackageAccept.bind(this));return a}; -netgis.Modal.prototype.createExportPDF=function(){var a=this.createContainer("Export PDF");this.createInputInteger(a,"Breite (Pixel):",800,0,4096);this.createInputInteger(a,"H\u00f6he (Pixel):",600,0,4096);this.createInputInteger(a,"Seitenr\u00e4nder (Millimeter):",10,0,100);this.createInputCheckbox(a,"Querformat:",!0);this.createSpace(a);this.createButton(a,"Exportieren",this.onExportPDFAccept.bind(this));return a}; -netgis.Modal.prototype.createExportJPEG=function(){var a=this.createContainer("Export JPEG");this.createInputInteger(a,"Breite (Pixel):",800,0,4096);this.createInputInteger(a,"H\u00f6he (Pixel):",600,0,4096);this.createSpace(a);this.createButton(a,"Exportieren",this.onExportJPEGAccept.bind(this));return a}; -netgis.Modal.prototype.createExportPNG=function(){var a=this.createContainer("Export PNG");this.createInputInteger(a,"Breite (Pixel):",800,0,4096);this.createInputInteger(a,"H\u00f6he (Pixel):",600,0,4096);this.createSpace(a);this.createButton(a,"Exportieren",this.onExportPNGAccept.bind(this));return a}; -netgis.Modal.prototype.createExportGIF=function(){var a=this.createContainer("Export GIF");this.createInputInteger(a,"Breite (Pixel):",800,0,4096);this.createInputInteger(a,"H\u00f6he (Pixel):",600,0,4096);this.createSpace(a);this.createButton(a,"Exportieren",this.onExportGIFAccept.bind(this));return a}; -netgis.Modal.prototype.createAddService=function(){var a=this.createContainer("Dienst hinzuf\u00fcgen");this.createInputText(a,"WMS/WFS URL:");this.createSpace(a);this.createButton(a,"Dienst laden",this.onAddServiceLoad.bind(this));this.createSpace(a);this.createInputHidden(a);this.createInputHidden(a);this.createText(a,"Bezeichnung:","");this.createInputSelect(a,"Kartenebene:",[]);this.createInputSelect(a,"Format:",[]);this.createSpace(a);this.createButton(a, -"Dienst hinzuf\u00fcgen",this.onAddServiceAccept.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.setAttribute("type","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.createInputHidden=function(a){var b=document.createElement("tr");b.className="netgis-hidden";var c=document.createElement("td");b.appendChild(c);var d=document.createElement("input");d.setAttribute("type","hidden");c.appendChild(d);a.getElementsByClassName("netgis-modal-content")[0].getElementsByTagName("table")[0].appendChild(b);return d}; -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";c.appendChild(b);d=document.createElement("input");d.setAttribute("type","text");b.appendChild(d);e.htmlFor=d;a.getElementsByClassName("netgis-modal-content")[0].getElementsByTagName("table")[0].appendChild(c); -return d};netgis.Modal.prototype.createInputSelect=function(a,b,c){c=document.createElement("tr");var 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";c.appendChild(b);d=document.createElement("select");b.appendChild(d);e.htmlFor=d;a.getElementsByClassName("netgis-modal-content")[0].getElementsByTagName("table")[0].appendChild(c);return d}; -netgis.Modal.prototype.createInputInteger=function(a,b,c,d,e){var f=document.createElement("tr"),g=document.createElement("th");g.className="netgis-padding";var h=document.createElement("label");h.innerHTML=b;g.appendChild(h);f.appendChild(g);b=document.createElement("td");b.className="netgis-padding";g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min",d);g.setAttribute("max",e);g.value=Number.parseInt(c);b.appendChild(g);f.appendChild(b);h.htmlFor=g;a.getElementsByClassName("netgis-modal-content")[0].getElementsByTagName("table")[0].appendChild(f); -return g}; -netgis.Modal.prototype.createInputCheckbox=function(a,b,c){var d=document.createElement("tr"),e=document.createElement("th");e.className="netgis-padding";var f=document.createElement("label");f.innerHTML=b;e.appendChild(f);d.appendChild(e);b=document.createElement("td");b.className="netgis-padding";e=document.createElement("input");e.setAttribute("type","checkbox");e.checked=c;b.appendChild(e);d.appendChild(b);f.htmlFor=e;a.getElementsByClassName("netgis-modal-content")[0].getElementsByTagName("table")[0].appendChild(d);return e}; -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.onRootClick=function(a){a.target===this.root&&this.hide()}; -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&&0";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",PANNING:"PANNING",ZOOMING_IN:"ZOOMING_IN",ZOOMING_OUT:"ZOOMING_OUT",DRAW_POINTS:"DRAW_POINTS",DRAW_LINES:"DRAW_LINES",DRAW_POLYGONS:"DRAW_POLYGONS",CUT_FEATURE_BEGIN:"CUT_FEATURE_BEGIN",CUT_FEATURE_DRAW:"CUT_FEATURE_DRAW",MODIFY_FEATURES:"MODIFY_FEATURES",DELETE_FEATURES:"DELETE_FEATURES",BUFFER_FEATURE_BEGIN:"BUFFER_FEATURE_BEGIN",BUFFER_FEATURE_EDIT:"BUFFER_FEATURE_EDIT",SEARCH_PLACE:"SEARCH_PLACE",SEARCH_PARCEL:"SEARCH_PARCEL",PARCEL_SELECT:"PARCEL_SELECT",IMPORT:"IMPORT", EXPORT:"EXPORT"});netgis=netgis||{}; netgis.OWS=function(){return{read:function(a,b){var c={layers:[],folders:[]};netgis.util.isDefined(a.properties)&&(c.bbox=a.properties.bbox);a=a.features;for(var d=0;dPunkte zeichnen:',this.onToolbarClose.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_POINTS],this.createToolbarCheckbox("Einrasten",this.onSnapChange.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_POINTS],this.createToolbarCheckbox("Puffern",this.onDrawBufferChange.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_POINTS],this.createToolbarInput("Radius (Meter):",b,this.onDrawBufferRadiusChange.bind(this))); this.append(this.toolbars[netgis.Modes.DRAW_POINTS],this.createToolbarInput("Segmente:",c,this.onDrawBufferSegmentsChange.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.DRAW_POINTS]);this.toolbars[netgis.Modes.DRAW_LINES]=this.createToolbar();this.append(this.toolbars[netgis.Modes.DRAW_LINES],this.createToolbarButton('Linien zeichnen:',this.onToolbarClose.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_LINES],this.createToolbarCheckbox("Einrasten", @@ -324,14 +292,15 @@ netgis.Toolbar.prototype.showDrawBufferOptions=function(a){var b=this.toolbars[n netgis.Toolbox.prototype.initElements=function(a){this.container=document.createElement("section");this.container.className="netgis-toolbox";var b=document.createElement("section");this.container.appendChild(b);this.top=b;this.addButton(this.top,"Betrachten",netgis.util.handler(netgis.Events.SET_MODE,netgis.Modes.VIEW));this.addButton(this.top,"Punkte", netgis.util.handler(netgis.Events.SET_MODE,netgis.Modes.DRAW_POINTS));this.addButton(this.top,"Linien",netgis.util.handler(netgis.Events.SET_MODE,netgis.Modes.DRAW_LINES));this.addButton(this.top,"Polygone",netgis.util.handler(netgis.Events.SET_MODE,netgis.Modes.DRAW_POLYGONS));this.addButton(this.top,"Ausschneiden", netgis.util.handler(netgis.Events.SET_MODE,netgis.Modes.CUT_FEATURE_BEGIN));this.addButton(this.top,"Verschieben",netgis.util.handler(netgis.Events.SET_MODE,netgis.Modes.MODIFY_FEATURES));this.addButton(this.top,"L\u00f6schen",netgis.util.handler(netgis.Events.SET_MODE,netgis.Modes.DELETE_FEATURES));this.addButton(this.top,"Puffern", -netgis.util.handler(netgis.Events.SET_MODE,netgis.Modes.BUFFER_FEATURE_BEGIN));b=document.createElement("section");b.className="netgis-hide";this.container.appendChild(b);this.bottom=b;var c=document.createElement("button");c.className="netgis-button netgis-clip-text netgis-color-c";c.innerHTML="Einstellungen";c.setAttribute("type","button");c.addEventListener("click",this.onBottomHeaderClick.bind(this));b.appendChild(c);this.bottomTitle=c.getElementsByTagName("span")[0]; -this.bottomPanels={};b=a.tools.buffer.defaultRadius;a=a.tools.buffer.defaultSegments;c=document.createElement("div");this.addCheckbox(c,"Einrasten",netgis.util.handler(netgis.Events.SNAP_TOGGLE));this.addCheckbox(c,"Puffern",netgis.util.handler(netgis.Events.BUFFER_TOGGLE));this.addInputNumber(c,"Radius (Meter):",b,netgis.util.handler(netgis.Events.DRAW_BUFFER_RADIUS_CHANGE));this.addInputNumber(c,"Segmente:",a,netgis.util.handler(netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE));this.bottomPanels[netgis.Modes.DRAW_POINTS]= -c;c=document.createElement("div");this.addCheckbox(c,"Einrasten",netgis.util.handler(netgis.Events.SNAP_TOGGLE));this.addCheckbox(c,"Puffern",netgis.util.handler(netgis.Events.BUFFER_TOGGLE));this.addInputNumber(c,"Radius (Meter):",b,netgis.util.handler(netgis.Events.DRAW_BUFFER_RADIUS_CHANGE));this.addInputNumber(c,"Segmente:",a,netgis.util.handler(netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE));this.bottomPanels[netgis.Modes.DRAW_LINES]=c;c=document.createElement("div");this.addCheckbox(c,"Einrasten", -netgis.util.handler(netgis.Events.SNAP_TOGGLE));this.addCheckbox(c,"Tracing",netgis.util.handler(netgis.Events.TRACING_TOGGLE));this.bottomPanels[netgis.Modes.DRAW_POLYGONS]=c;c=document.createElement("div");this.addInputNumber(c,"Radius (Meter):",b,this.onBufferFeatureChange.bind(this));this.addInputNumber(c,"Segmente:",a,this.onBufferFeatureChange.bind(this));this.addButton(c,"Akzeptieren",this.onBufferFeatureAccept.bind(this)); -this.bottomPanels[netgis.Modes.BUFFER_FEATURE_EDIT]=c;b=document.createElement("div");this.addButton(b,"Shapefile",netgis.util.handler(netgis.Events.IMPORT_SHAPEFILE_SHOW));this.addButton(b,"GeoJSON",netgis.util.handler(netgis.Events.IMPORT_GEOJSON_SHOW));this.addButton(b,"GML",netgis.util.handler(netgis.Events.IMPORT_GML_SHOW)); -this.addButton(b,"Spatialite",netgis.util.handler(netgis.Events.IMPORT_SPATIALITE_SHOW));this.addButton(b,"Geopackage",netgis.util.handler(netgis.Events.IMPORT_GEOPACKAGE_SHOW));this.bottomPanels[netgis.Modes.IMPORT]=b;b=document.createElement("div");this.addButton(b,"PDF",netgis.util.handler(netgis.Events.EXPORT_PDF_SHOW)); -this.addButton(b,"JPEG",netgis.util.handler(netgis.Events.EXPORT_JPEG_SHOW));this.addButton(b,"PNG",netgis.util.handler(netgis.Events.EXPORT_PNG_SHOW));this.addButton(b,"GIF",netgis.util.handler(netgis.Events.EXPORT_GIF_SHOW));this.bottomPanels[netgis.Modes.EXPORT]=b;this.setBuffer(!1)}; -netgis.Toolbox.prototype.initEvents=function(){this.resizeObserver=(new ResizeObserver(this.onTopResize.bind(this))).observe(this.top)};netgis.Toolbox.prototype.attach=function(a){a.appendChild(this.container)};netgis.Toolbox.prototype.addButton=function(a,b,c){var d=document.createElement("button");d.className="netgis-button netgis-clip-text netgis-color-e netgis-hover-a";d.innerHTML=b;d.setAttribute("type","button");c&&(d.onclick=c);a&&a.appendChild(d);return d}; +netgis.util.handler(netgis.Events.SET_MODE,netgis.Modes.BUFFER_FEATURE_BEGIN));this.addButton(this.top,"Exportieren",netgis.util.handler(netgis.Events.EXPORT_SHOW));b=document.createElement("section");b.className="netgis-hide";this.container.appendChild(b);this.bottom=b;var c=document.createElement("button");c.className="netgis-button netgis-clip-text netgis-color-c";c.innerHTML="Einstellungen"; +c.setAttribute("type","button");c.addEventListener("click",this.onBottomHeaderClick.bind(this));b.appendChild(c);this.bottomTitle=c.getElementsByTagName("span")[0];this.bottomPanels={};b=a.tools.buffer.defaultRadius;a=a.tools.buffer.defaultSegments;c=document.createElement("div");this.addCheckbox(c,"Einrasten",netgis.util.handler(netgis.Events.SNAP_TOGGLE));this.addCheckbox(c,"Puffern",netgis.util.handler(netgis.Events.BUFFER_TOGGLE));this.addInputNumber(c,"Radius (Meter):",b,netgis.util.handler(netgis.Events.DRAW_BUFFER_RADIUS_CHANGE)); +this.addInputNumber(c,"Segmente:",a,netgis.util.handler(netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE));this.bottomPanels[netgis.Modes.DRAW_POINTS]=c;c=document.createElement("div");this.addCheckbox(c,"Einrasten",netgis.util.handler(netgis.Events.SNAP_TOGGLE));this.addCheckbox(c,"Puffern",netgis.util.handler(netgis.Events.BUFFER_TOGGLE));this.addInputNumber(c,"Radius (Meter):",b,netgis.util.handler(netgis.Events.DRAW_BUFFER_RADIUS_CHANGE));this.addInputNumber(c,"Segmente:",a,netgis.util.handler(netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE)); +this.bottomPanels[netgis.Modes.DRAW_LINES]=c;c=document.createElement("div");this.addCheckbox(c,"Einrasten",netgis.util.handler(netgis.Events.SNAP_TOGGLE));this.addCheckbox(c,"Tracing",netgis.util.handler(netgis.Events.TRACING_TOGGLE));this.bottomPanels[netgis.Modes.DRAW_POLYGONS]=c;c=document.createElement("div");this.addInputNumber(c,"Radius (Meter):",b,this.onBufferFeatureChange.bind(this));this.addInputNumber(c,"Segmente:",a,this.onBufferFeatureChange.bind(this));this.addButton(c,"Akzeptieren", +this.onBufferFeatureAccept.bind(this));this.bottomPanels[netgis.Modes.BUFFER_FEATURE_EDIT]=c;b=document.createElement("div");this.addButton(b,"Shapefile",netgis.util.handler(netgis.Events.IMPORT_SHAPEFILE_SHOW));this.addButton(b,"GeoJSON",netgis.util.handler(netgis.Events.IMPORT_GEOJSON_SHOW));this.addButton(b,"GML", +netgis.util.handler(netgis.Events.IMPORT_GML_SHOW));this.addButton(b,"Spatialite",netgis.util.handler(netgis.Events.IMPORT_SPATIALITE_SHOW));this.addButton(b,"Geopackage",netgis.util.handler(netgis.Events.IMPORT_GEOPACKAGE_SHOW));this.bottomPanels[netgis.Modes.IMPORT]=b;b=document.createElement("div");this.addButton(b,"PDF", +netgis.util.handler(netgis.Events.EXPORT_PDF_SHOW));this.addButton(b,"JPEG",netgis.util.handler(netgis.Events.EXPORT_JPEG_SHOW));this.addButton(b,"PNG",netgis.util.handler(netgis.Events.EXPORT_PNG_SHOW));this.addButton(b,"GIF",netgis.util.handler(netgis.Events.EXPORT_GIF_SHOW)); +this.bottomPanels[netgis.Modes.EXPORT]=b;this.setBuffer(!1)};netgis.Toolbox.prototype.initEvents=function(){this.resizeObserver=(new ResizeObserver(this.onTopResize.bind(this))).observe(this.top)};netgis.Toolbox.prototype.attach=function(a){a.appendChild(this.container)}; +netgis.Toolbox.prototype.addButton=function(a,b,c){var d=document.createElement("button");d.className="netgis-button netgis-clip-text netgis-color-e netgis-hover-a";d.innerHTML=b;d.setAttribute("type","button");c&&(d.onclick=c);a&&a.appendChild(d);return d}; netgis.Toolbox.prototype.addCheckbox=function(a,b,c){var d=document.createElement("label");d.className="netgis-noselect netgis-hover-a";var e=document.createElement("input");e.setAttribute("type","checkbox");d.appendChild(e);var f=document.createElement("span");f.innerHTML=b;d.appendChild(f);c&&(e.onchange=c);a&&a.appendChild(d);return e}; netgis.Toolbox.prototype.addInputNumber=function(a,b,c,d){var e=document.createElement("label");e.className="netgis-noselect netgis-hover-a";var f=document.createElement("span");f.innerHTML=b;e.appendChild(f);b=document.createElement("input");b.setAttribute("type","number");b.setAttribute("min",0);b.value=c;e.appendChild(b);d&&(b.onchange=d,b.onkeyup=d);a&&a.appendChild(e);return b}; netgis.Toolbox.prototype.setMode=function(a){for(var b=this.top.getElementsByTagName("button"),c=0;c";b.appendChild(f);c=document.createElement("label"); f.appendChild(c);f=document.createElement("input");f.setAttribute("type","checkbox");f.onchange=this.onFolderChange.bind(this);c.appendChild(f);c=document.createElement("ul");b.appendChild(c);a=a?a.getElementsByTagName("ul")[0]:this.container;d?a.insertBefore(e,a.firstChild):a.appendChild(e);return e}; netgis.Tree.prototype.addCheckbox=function(a,b,c){var d=document.createElement("li");d.className="netgis-item";var e=document.createElement("label");e.className="netgis-button netgis-noselect netgis-clip-text netgis-color-e netgis-hover-a";e.innerHTML=""+c+"";d.appendChild(e);c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("data-id",b);c.onchange=this.onItemChange.bind(this);e.insertBefore(c,e.firstChild);a?a.getElementsByTagName("ul")[0].appendChild(d): -this.container.appendChild(d);return d};netgis.Tree.prototype.setItemChecked=function(a,b){var c=this.container.getElementsByClassName("netgis-item");a=a.toString();for(var d=0;d")},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,b){var c=new XMLHttpRequest;c.onload=function(){b(this.responseText)};c.open("GET",a,!0);c.send()},padstr:function(a,b){for(a=a.toString();a.length(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")},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)}}}}(); +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,b){var c=new XMLHttpRequest;c.onload=function(){b(this.responseText)};c.open("GET",a,!0);c.send()},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]},formatArea:function(a,d,e,f){a=(e=a>(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")},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)}}}}();