# WIP: Netgis Client Update
This commit is contained in:
1 parent
794001a8ae
commit
d91e9d016c
27 files changed
+2012
-173
No files matched your search
@@ -96,6 +96,10 @@
|
|||||||
"parcelURL": "/client/proxy?https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/mod_alkis/flur_search.php?gmk_gmn={district}&fln={field}&fsn_zae={parcelA}&fsn_nen={parcelB}&export=json"
|
"parcelURL": "/client/proxy?https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/mod_alkis/flur_search.php?gmk_gmn={district}&fln={field}&fsn_zae={parcelA}&fsn_nen={parcelB}&export=json"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"import":
|
||||||
|
{
|
||||||
|
"geopackageLibURL": "/libs/geopackage/4.2.3/"
|
||||||
|
},
|
||||||
"export":
|
"export":
|
||||||
{
|
{
|
||||||
"logo": "/static/assets/logo.png",
|
"logo": "/static/assets/logo.png",
|
||||||
@@ -108,7 +112,7 @@
|
|||||||
{
|
{
|
||||||
"buffer":
|
"buffer":
|
||||||
{
|
{
|
||||||
"defaultRadius": 2,
|
"defaultRadius": 5,
|
||||||
"defaultSegments": 2
|
"defaultSegments": 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
<!-- Library Styles -->
|
<!-- Library Styles -->
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'fontawesome/5.12.0/css/all.min.css' %}" />
|
<link rel="stylesheet" type="text/css" href="{% static 'fontawesome/5.12.0/css/all.min.css' %}" />
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'openlayers/6.14.1/ol.css' %}" />
|
<link rel="stylesheet" type="text/css" href="{% static 'openlayers/7.2.2/ol.css' %}" />
|
||||||
|
|
||||||
<!-- Client Styles -->
|
<!-- Client Styles -->
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'netgis/Client.css' %}" />
|
<link rel="stylesheet" type="text/css" href="{% static 'netgis/Client.css' %}" />
|
||||||
@@ -24,12 +24,14 @@
|
|||||||
<input type="hidden" id="netgis-storage" name="geom" value="{{geom_form.fields.geom.initial}}"/>
|
<input type="hidden" id="netgis-storage" name="geom" value="{{geom_form.fields.geom.initial}}"/>
|
||||||
|
|
||||||
<!-- Library Scripts -->
|
<!-- Library Scripts -->
|
||||||
<script type="text/javascript" src="{% static 'openlayers/6.14.1/ol.js' %}"></script>
|
<script type="text/javascript" src="{% static 'openlayers/7.2.2/ol.js' %}"></script>
|
||||||
<script type="text/javascript" src="{% static 'proj4js/2.6.0/proj4.js' %}"></script>
|
<script type="text/javascript" src="{% static 'proj4js/2.6.0/proj4.js' %}"></script>
|
||||||
<script type="text/javascript" src="{% static 'jsts/1.6.1/jsts.min.js' %}"></script>
|
<script type="text/javascript" src="{% static 'jsts/1.6.1/jsts.min.js' %}"></script>
|
||||||
<script type="text/javascript" src="{% static 'shapefilejs/4.0.2/shp.js' %}"></script>
|
<script type="text/javascript" src="{% static 'shapefilejs/4.0.2/shp.js' %}"></script>
|
||||||
<script type="text/javascript" src="{% static 'jspdf/1.3.2/jspdf.min.js' %}"></script>
|
<script type="text/javascript" src="{% static 'jspdf/1.3.2/jspdf.min.js' %}"></script>
|
||||||
<script type="text/javascript" src="{% static 'gifjs/0.2.0/gif.js' %}"></script>
|
<script type="text/javascript" src="{% static 'gifjs/0.2.0/gif.js' %}"></script>
|
||||||
|
<script type="text/javascript" src="{% static 'sqljs/1.8.0/sql.js' %}"></script>
|
||||||
|
<script type="text/javascript" src="{% static 'geopackage/4.2.3/geopackage.min.js' %}"></script>
|
||||||
|
|
||||||
<!-- Client Scripts -->
|
<!-- Client Scripts -->
|
||||||
<script type="text/javascript" src="{% static 'netgis/Util.js' %}"></script>
|
<script type="text/javascript" src="{% static 'netgis/Util.js' %}"></script>
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
/*! For license information please see geopackage.min.js.LICENSE.txt */
|
||||||
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(function(){try{return require("better-sqlite3")}catch(t){}}()):"function"==typeof define&&define.amd?define(["better-sqlite3"],e):"object"==typeof exports?exports.GeoPackage=e(function(){try{return require("better-sqlite3")}catch(t){}}()):t.GeoPackage=e(t["better-sqlite3"])}(self,(function(__WEBPACK_EXTERNAL_MODULE__3730__){return(()=>{var __webpack_modules__={8927:(t,e,n)=>{var r,i=n(3085).Buffer,o=n(4155),a=n(5108),s=(r=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,s,u,l;t=t||{},e||(e=void 0!==t?t:{}),e.ready=new Promise((function(t,e){s=t,u=e})),(l=e).Ud=l.Ud||[],l.Ud.push((function(){l.MakeSWCanvasSurface=function(t){var e=t;if("CANVAS"!==e.tagName&&!(e=document.getElementById(t)))throw"Canvas with id "+t+" was not found";return(t=l.MakeSurface(e.width,e.height))&&(t.Hd=e),t},l.MakeCanvasSurface||(l.MakeCanvasSurface=l.MakeSWCanvasSurface),l.MakeSurface=function(t,e){var n={width:t,height:e,colorType:l.ColorType.RGBA_8888,alphaType:l.AlphaType.Unpremul,colorSpace:l.ColorSpace.SRGB},r=t*e*4,i=l._malloc(r);return(n=l.Surface._makeRasterDirect(n,i,4*t))&&(n.Hd=null,n.zf=t,n.wf=e,n.yf=r,n.$e=i,n.getCanvas().clear(l.TRANSPARENT)),n},l.MakeRasterDirectSurface=function(t,e,n){return l.Surface._makeRasterDirect(t,e.byteOffset,n)},l.Surface.prototype.flush=function(t){if(this._flush(),this.Hd){var e=new Uint8ClampedArray(l.HEAPU8.buffer,this.$e,this.yf);e=new ImageData(e,this.zf,this.wf),t?this.Hd.getContext("2d").putImageData(e,0,0,t[0],t[1],t[2]-t[0],t[3]-t[1]):this.Hd.getContext("2d").putImageData(e,0,0)}},l.Surface.prototype.dispose=function(){this.$e&&l._free(this.$e),this.delete()},l.currentContext=l.currentContext||function(){},l.setCurrentContext=l.setCurrentContext||function(){}})),function(t){t.Ud=t.Ud||[],t.Ud.push((function(){function e(t,e,n){return t&&t.hasOwnProperty(e)?t[e]:n}t.GetWebGLContext=function(t,n){if(!t)throw"null canvas passed into makeWebGLContext";var r={alpha:e(n,"alpha",1),depth:e(n,"depth",1),stencil:e(n,"stencil",8),antialias:e(n,"antialias",0),premultipliedAlpha:e(n,"premultipliedAlpha",1),preserveDrawingBuffer:e(n,"preserveDrawingBuffer",0),preferLowPowerToHighPerformance:e(n,"preferLowPowerToHighPerformance",0),failIfMajorPerformanceCaveat:e(n,"failIfMajorPerformanceCaveat",0),enableExtensionsByDefault:e(n,"enableExtensionsByDefault",1),explicitSwapControl:e(n,"explicitSwapControl",0),renderViaOffscreenBackBuffer:e(n,"renderViaOffscreenBackBuffer",0)};if(r.majorVersion=n&&n.majorVersion?n.majorVersion:"undefined"!=typeof WebGL2RenderingContext?2:1,r.explicitSwapControl)throw"explicitSwapControl is not supported";return t=function(t,e){t.rf||(t.rf=t.getContext,t.getContext=function(e,n){return"webgl"==e==(n=t.rf(e,n))instanceof WebGLRenderingContext?n:null});var n=1<e.majorVersion?t.getContext("webgl2",e):t.getContext("webgl",e);return n?function(t,e){var n=Be(Pe),r={Rf:n,attributes:e,version:e.majorVersion,Ce:t};return t.canvas&&(t.canvas.jf=r),Pe[n]=r,(void 0===e.Gf||e.Gf)&&function(t){if(t||(t=We),!t.Tf){t.Tf=!0;var e=t.Ce;!function(t){var e=t.getExtension("ANGLE_instanced_arrays");e&&(t.vertexAttribDivisor=function(t,n){e.vertexAttribDivisorANGLE(t,n)},t.drawArraysInstanced=function(t,n,r,i){e.drawArraysInstancedANGLE(t,n,r,i)},t.drawElementsInstanced=function(t,n,r,i,o){e.drawElementsInstancedANGLE(t,n,r,i,o)})}(e),function(t){var e=t.getExtension("OES_vertex_array_object");e&&(t.createVertexArray=function(){return e.createVertexArrayOES()},t.deleteVertexArray=function(t){e.deleteVertexArrayOES(t)},t.bindVertexArray=function(t){e.bindVertexArrayOES(t)},t.isVertexArray=function(t){return e.isVertexArrayOES(t)})}(e),function(t){var e=t.getExtension("WEBGL_draw_buffers");e&&(t.drawBuffers=function(t,n){e.drawBuffersWEBGL(t,n)})}(e),e.nf=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"),e.sf=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"),2<=t.version&&(e.pf=e.getExtension("EXT_disjoint_timer_query_webgl2")),(2>t.version||!e.pf)&&(e.pf=e.getExtension("EXT_disjoint_timer_query")),e.tg=e.getExtension("WEBGL_multi_draw"),(e.getSupportedExtensions()||[]).forEach((function(t){t.includes("lose_context")||t.includes("debug")||e.getExtension(t)}))}}(r),n}(n,e):0}(t,r),t?(je(t),t):0},t.deleteContext=function(t){We===Pe[t]&&(We=null),"object"==typeof JSEvents&&JSEvents.wg(Pe[t].Ce.canvas),Pe[t]&&Pe[t].Ce.canvas&&(Pe[t].Ce.canvas.jf=void 0),Pe[t]=null},t.MakeWebGLCanvasSurface=function(e,n,r){n=n||null;var i=e,o="undefined"!=typeof OffscreenCanvas&&i instanceof OffscreenCanvas;if(!("undefined"!=typeof HTMLCanvasElement&&i instanceof HTMLCanvasElement||o||(i=document.getElementById(e),i)))throw"Canvas with id "+e+" was not found";if(!(e=this.GetWebGLContext(i,r))||0>e)throw"failed to create webgl context: err "+e;return r=this.MakeGrContext(e),(n=this.MakeOnScreenGLSurface(r,i.width,i.height,n))Line truncated
|
||||||
|
//# sourceMappingURL=geopackage.min.js.map
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
object-assign
|
||||||
|
(c) Sindre Sorhus
|
||||||
|
@license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* The buffer module from node.js, for the browser.
|
||||||
|
*
|
||||||
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* The buffer module from node.js, for the browser.
|
||||||
|
*
|
||||||
|
* @author Feross Aboukhadijeh <https://feross.org>
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! https://mths.be/punycode v1.3.2 by @mathias */
|
||||||
|
|
||||||
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||||
|
|
||||||
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* splaytree v3.1.0
|
||||||
|
* Fast Splay tree for Node and browser
|
||||||
|
*
|
||||||
|
* @author Alexander Milevski <info@w8r.name>
|
||||||
|
* @license MIT
|
||||||
|
* @preserve
|
||||||
|
*/
|
||||||
Binary file not shown.
@@ -191,6 +191,7 @@ netgis.Client.prototype.load = function()
|
|||||||
|
|
||||||
if ( this.output.value && this.output.value.length > 0 )
|
if ( this.output.value && this.output.value.length > 0 )
|
||||||
{
|
{
|
||||||
|
//console.info( "INPUT:", this.output.value );
|
||||||
var json = JSON.parse( this.output.value );
|
var json = JSON.parse( this.output.value );
|
||||||
this.invoke( netgis.Events.EDIT_FEATURES_LOADED, json );
|
this.invoke( netgis.Events.EDIT_FEATURES_LOADED, json );
|
||||||
}
|
}
|
||||||
@@ -288,6 +289,7 @@ netgis.Client.prototype.onHtmlResponse = function( data )
|
|||||||
netgis.Client.prototype.onEditFeaturesChange = function( e )
|
netgis.Client.prototype.onEditFeaturesChange = function( e )
|
||||||
{
|
{
|
||||||
var geojson = JSON.stringify( e );
|
var geojson = JSON.stringify( e );
|
||||||
|
//console.info( "OUTPUT:", geojson );
|
||||||
this.output.value = geojson;
|
this.output.value = geojson;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -40,18 +40,27 @@ netgis.Events = Object.freeze
|
|||||||
BUFFER_CHANGE: "BUFFER_CHANGE",
|
BUFFER_CHANGE: "BUFFER_CHANGE",
|
||||||
BUFFER_ACCEPT: "BUFFER_ACCEPT",
|
BUFFER_ACCEPT: "BUFFER_ACCEPT",
|
||||||
BUFFER_CANCEL: "BUFFER_CANCEL",
|
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_ON: "SNAP_ON",
|
||||||
SNAP_OFF: "SNAP_OFF",
|
SNAP_OFF: "SNAP_OFF",
|
||||||
|
TRACING_ON: "TRACING_ON",
|
||||||
|
TRACING_OFF: "TRACING_OFF",
|
||||||
|
|
||||||
IMPORT_SHAPEFILE_SHOW: "IMPORT_SHAPEFILE_SHOW",
|
IMPORT_SHAPEFILE_SHOW: "IMPORT_SHAPEFILE_SHOW",
|
||||||
IMPORT_GEOJSON_SHOW: "IMPORT_GEOJSON_SHOW",
|
IMPORT_GEOJSON_SHOW: "IMPORT_GEOJSON_SHOW",
|
||||||
IMPORT_GML_SHOW: "IMPORT_GML_SHOW",
|
IMPORT_GML_SHOW: "IMPORT_GML_SHOW",
|
||||||
|
IMPORT_SPATIALITE_SHOW: "IMPORT_SPATIALITE_SHOW",
|
||||||
|
IMPORT_GEOPACKAGE_SHOW: "IMPORT_GEOPACKAGE_SHOW",
|
||||||
|
|
||||||
IMPORT_SHAPEFILE: "IMPORT_SHAPEFILE",
|
IMPORT_SHAPEFILE: "IMPORT_SHAPEFILE",
|
||||||
IMPORT_GEOJSON: "IMPORT_GEOJSON",
|
IMPORT_GEOJSON: "IMPORT_GEOJSON",
|
||||||
IMPORT_GML: "IMPORT_GML",
|
IMPORT_GML: "IMPORT_GML",
|
||||||
IMPORT_WKT: "IMPORT_WKT",
|
IMPORT_WKT: "IMPORT_WKT",
|
||||||
|
IMPORT_SPATIALITE: "IMPORT_SPATIALITE",
|
||||||
|
IMPORT_GEOPACKAGE: "IMPORT_GEOPACKAGE",
|
||||||
|
|
||||||
EXPORT_PDF_SHOW: "EXPORT_PDF_SHOW",
|
EXPORT_PDF_SHOW: "EXPORT_PDF_SHOW",
|
||||||
EXPORT_JPEG_SHOW: "EXPORT_JPEG_SHOW",
|
EXPORT_JPEG_SHOW: "EXPORT_JPEG_SHOW",
|
||||||
@@ -63,6 +72,10 @@ netgis.Events = Object.freeze
|
|||||||
EXPORT_PNG: "EXPORT_PNG",
|
EXPORT_PNG: "EXPORT_PNG",
|
||||||
EXPORT_GIF: "EXPORT_GIF",
|
EXPORT_GIF: "EXPORT_GIF",
|
||||||
EXPORT_BEGIN: "EXPORT_BEGIN",
|
EXPORT_BEGIN: "EXPORT_BEGIN",
|
||||||
EXPORT_END: "EXPORT_END"
|
EXPORT_END: "EXPORT_END",
|
||||||
|
|
||||||
|
ADD_SERVICE_SHOW: "ADD_SERVICE_SHOW",
|
||||||
|
ADD_SERVICE_WMS: "ADD_SERVICE_WMS",
|
||||||
|
ADD_SERVICE_WFS: "ADD_SERVICE_WFS"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -157,3 +157,27 @@
|
|||||||
{
|
{
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.netgis-layer-tools
|
||||||
|
{
|
||||||
|
padding: 4mm;
|
||||||
|
padding-top: 0mm;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.netgis-layer-tools hr
|
||||||
|
{
|
||||||
|
margin: 4mm 0mm;
|
||||||
|
color: #eee;
|
||||||
|
border-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.netgis-layer-tools button
|
||||||
|
{
|
||||||
|
padding: 2mm 4mm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.netgis-layer-tools button i
|
||||||
|
{
|
||||||
|
margin-right: 1mm;
|
||||||
|
}
|
||||||
@@ -24,20 +24,56 @@ netgis.LayerTree.prototype.load = function()
|
|||||||
this.list.className = "root";
|
this.list.className = "root";
|
||||||
this.root.appendChild( this.list );
|
this.root.appendChild( this.list );
|
||||||
|
|
||||||
|
this.initDefaultFolders();
|
||||||
|
|
||||||
|
this.tools = document.createElement( "div" );
|
||||||
|
this.tools.className = "netgis-layer-tools";
|
||||||
|
this.tools.innerHTML = "<hr/>";
|
||||||
|
this.root.appendChild( this.tools );
|
||||||
|
|
||||||
|
this.buttonAddService = document.createElement( "button" );
|
||||||
|
this.buttonAddService.setAttribute( "type", "button" );
|
||||||
|
//this.buttonAddService.className = "netgis-primary netgis-hover-primary netgis-shadow";
|
||||||
|
this.buttonAddService.className = "netgis-text-primary netgis-hover-primary";
|
||||||
|
//this.buttonAddService.innerHTML = "<i class='fas fa-plus' style='color: #000'></i> Dienst hinzufügen";
|
||||||
|
this.buttonAddService.innerHTML = "<i class='fas fa-folder-plus'></i> Dienst hinzufügen";
|
||||||
|
//this.buttonAddService.innerHTML = "<i class='fas fa-cloud-upload-alt'></i> Dienst hinzufügen";
|
||||||
|
this.buttonAddService.addEventListener( "click", this.onAddServiceClick.bind( this ) );
|
||||||
|
this.tools.appendChild( this.buttonAddService );
|
||||||
|
|
||||||
this.client.root.appendChild( this.root );
|
this.client.root.appendChild( this.root );
|
||||||
|
|
||||||
this.client.on( netgis.Events.CONTEXT_UPDATE, this.onContextUpdate.bind( this ) );
|
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_LIST_TOGGLE, this.onLayerListToggle.bind( this ) );
|
||||||
this.client.on( netgis.Events.LAYER_CREATED, this.onLayerCreated.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.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 ) );
|
||||||
|
|
||||||
//TODO: kind of hack to hide if parcel search open
|
//TODO: kind of hack to hide if parcel search open
|
||||||
this.client.on( netgis.Events.SET_MODE, this.onSetMode.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()
|
netgis.LayerTree.prototype.clearAll = function()
|
||||||
{
|
{
|
||||||
this.list.innerHTML = "";
|
this.list.innerHTML = "";
|
||||||
|
|
||||||
|
this.initDefaultFolders();
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.LayerTree.prototype.createFolder = function( title )
|
netgis.LayerTree.prototype.createFolder = function( title )
|
||||||
@@ -102,6 +138,9 @@ netgis.LayerTree.prototype.createLayer = function( id, title, checked )
|
|||||||
var text = document.createTextNode( title );
|
var text = document.createTextNode( title );
|
||||||
label.appendChild( text );
|
label.appendChild( text );
|
||||||
|
|
||||||
|
var appendix = document.createElement( "span" );
|
||||||
|
label.appendChild( appendix );
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -342,21 +381,26 @@ netgis.LayerTree.prototype.onLayerCreated = function( e )
|
|||||||
//TODO: this is a hack to get special folders working
|
//TODO: this is a hack to get special folders working
|
||||||
if ( e.folder === "import" )
|
if ( e.folder === "import" )
|
||||||
{
|
{
|
||||||
if ( ! this.folderImport )
|
/*if ( ! this.folderImport )
|
||||||
{
|
{
|
||||||
this.folderImport = this.createFolder( "Importierte Ebenen" );
|
this.folderImport = this.createFolder( "Importierte Ebenen" );
|
||||||
this.list.insertBefore( this.folderImport, this.folderDraw ? this.folderDraw.nextSibling : this.list.firstChild );
|
this.list.insertBefore( this.folderImport, this.folderDraw ? this.folderDraw.nextSibling : this.list.firstChild );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
this.folderImport.classList.remove( "netgis-hide" );
|
||||||
|
|
||||||
folder = this.folderImport;
|
folder = this.folderImport;
|
||||||
}
|
}
|
||||||
else if ( e.folder === "draw" )
|
else if ( e.folder === "draw" )
|
||||||
{
|
{
|
||||||
if ( ! this.folderDraw )
|
/*if ( ! this.folderDraw )
|
||||||
{
|
{
|
||||||
this.folderDraw = this.createFolder( "Zeichnung" );
|
this.folderDraw = this.createFolder( "Zeichnung" );
|
||||||
this.list.insertBefore( this.folderDraw, this.list.firstChild );
|
this.list.insertBefore( this.folderDraw, this.list.firstChild );
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
this.folderDraw.classList.remove( "netgis-hide" );
|
||||||
|
|
||||||
folder = this.folderDraw;
|
folder = this.folderDraw;
|
||||||
}
|
}
|
||||||
@@ -382,9 +426,45 @@ netgis.LayerTree.prototype.onEditFeaturesChange = function( e )
|
|||||||
this.updateFolderChecks( this.folderDraw );
|
this.updateFolderChecks( this.folderDraw );
|
||||||
this.client.invoke( netgis.Events.LAYER_SHOW, { id: id } );
|
this.client.invoke( netgis.Events.LAYER_SHOW, { id: id } );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update Area
|
||||||
|
var label = list.getElementsByTagName( "label" )[ 0 ];
|
||||||
|
var spans = label.getElementsByTagName( "span" );
|
||||||
|
var appendix = spans[ spans.length - 1 ];
|
||||||
|
|
||||||
|
if ( e.area && e.area > 0.0 )
|
||||||
|
{
|
||||||
|
appendix.innerText = " (Fläche: " + netgis.util.formatArea( e.area, true ) + ")";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
appendix.innerText = "";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.LayerTree.prototype.onAddServiceWMS = function( e )
|
||||||
|
{
|
||||||
|
var item = this.createLayer( e.id, e.title, true );
|
||||||
|
|
||||||
|
this.folderServices.classList.remove( "netgis-hide" );
|
||||||
|
this.addToFolder( this.folderServices, item, true );
|
||||||
|
this.updateFolderChecks( this.folderServices );
|
||||||
|
|
||||||
|
this.client.invoke( netgis.Events.LAYER_SHOW, { id: e.id } );
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.LayerTree.prototype.onAddServiceWFS = function( e )
|
||||||
|
{
|
||||||
|
var item = this.createLayer( e.id, e.title, true );
|
||||||
|
|
||||||
|
this.folderServices.classList.remove( "netgis-hide" );
|
||||||
|
this.addToFolder( this.folderServices, item, true );
|
||||||
|
this.updateFolderChecks( this.folderServices );
|
||||||
|
|
||||||
|
this.client.invoke( netgis.Events.LAYER_SHOW, { id: e.id } );
|
||||||
|
};
|
||||||
|
|
||||||
netgis.LayerTree.prototype.onSetMode = function( e )
|
netgis.LayerTree.prototype.onSetMode = function( e )
|
||||||
{
|
{
|
||||||
if ( e === netgis.Modes.SEARCH_PARCEL )
|
if ( e === netgis.Modes.SEARCH_PARCEL )
|
||||||
@@ -392,3 +472,8 @@ netgis.LayerTree.prototype.onSetMode = function( e )
|
|||||||
this.root.classList.add( "netgis-hide" );
|
this.root.classList.add( "netgis-hide" );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.LayerTree.prototype.onAddServiceClick = function( e )
|
||||||
|
{
|
||||||
|
this.client.invoke( netgis.Events.ADD_SERVICE_SHOW, null );
|
||||||
|
};
|
||||||
@@ -28,8 +28,11 @@ netgis.MapOpenLayers = function()
|
|||||||
|
|
||||||
this.editEventsSilent = false;
|
this.editEventsSilent = false;
|
||||||
|
|
||||||
this.importLayerID = 1000;
|
this.importLayerID = 20000;
|
||||||
this.editLayerID = 2000;
|
this.editLayerID = 30000;
|
||||||
|
this.labelFont = "4mm Verdana, sans-serif";
|
||||||
|
this.drawBufferRadius = 100.0;
|
||||||
|
this.drawBufferSegments = 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype = Object.create( netgis.Map.prototype );
|
netgis.MapOpenLayers.prototype = Object.create( netgis.Map.prototype );
|
||||||
@@ -54,9 +57,9 @@ netgis.MapOpenLayers.prototype.load = function()
|
|||||||
this.root.addEventListener( "drop", this.onDragDrop.bind( this ) );
|
this.root.addEventListener( "drop", this.onDragDrop.bind( this ) );
|
||||||
|
|
||||||
// Map Renderer
|
// Map Renderer
|
||||||
this.createMap();
|
this.initMap();
|
||||||
this.createDefaultLayers();
|
this.initDefaultLayers();
|
||||||
this.createInteractions();
|
this.initInteractions();
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
this.client.on( netgis.Events.CONTEXT_UPDATE, this.onContextUpdate.bind( this ) );
|
this.client.on( netgis.Events.CONTEXT_UPDATE, this.onContextUpdate.bind( this ) );
|
||||||
@@ -65,6 +68,8 @@ netgis.MapOpenLayers.prototype.load = function()
|
|||||||
this.client.on( netgis.Events.SET_MODE, this.onSetMode.bind( this ) );
|
this.client.on( netgis.Events.SET_MODE, this.onSetMode.bind( this ) );
|
||||||
this.client.on( netgis.Events.SNAP_ON, this.onSnapOn.bind( this ) );
|
this.client.on( netgis.Events.SNAP_ON, this.onSnapOn.bind( this ) );
|
||||||
this.client.on( netgis.Events.SNAP_OFF, this.onSnapOff.bind( this ) );
|
this.client.on( netgis.Events.SNAP_OFF, this.onSnapOff.bind( this ) );
|
||||||
|
this.client.on( netgis.Events.TRACING_ON, this.onTracingOn.bind( this ) );
|
||||||
|
this.client.on( netgis.Events.TRACING_OFF, this.onTracingOff.bind( this ) );
|
||||||
this.client.on( netgis.Events.LAYER_SHOW, this.onLayerShow.bind( this ) );
|
this.client.on( netgis.Events.LAYER_SHOW, this.onLayerShow.bind( this ) );
|
||||||
this.client.on( netgis.Events.LAYER_HIDE, this.onLayerHide.bind( this ) );
|
this.client.on( netgis.Events.LAYER_HIDE, this.onLayerHide.bind( this ) );
|
||||||
this.client.on( netgis.Events.MAP_ZOOM_WKT, this.onZoomWKT.bind( this ) );
|
this.client.on( netgis.Events.MAP_ZOOM_WKT, this.onZoomWKT.bind( this ) );
|
||||||
@@ -77,15 +82,23 @@ netgis.MapOpenLayers.prototype.load = function()
|
|||||||
this.client.on( netgis.Events.IMPORT_GML, this.onImportGML.bind( this ) );
|
this.client.on( netgis.Events.IMPORT_GML, this.onImportGML.bind( this ) );
|
||||||
this.client.on( netgis.Events.IMPORT_SHAPEFILE, this.onImportShapefile.bind( this ) );
|
this.client.on( netgis.Events.IMPORT_SHAPEFILE, this.onImportShapefile.bind( this ) );
|
||||||
this.client.on( netgis.Events.IMPORT_WKT, this.onImportWKT.bind( this ) );
|
this.client.on( netgis.Events.IMPORT_WKT, this.onImportWKT.bind( this ) );
|
||||||
|
this.client.on( netgis.Events.IMPORT_SPATIALITE, this.onImportSpatialite.bind( this ) );
|
||||||
|
this.client.on( netgis.Events.IMPORT_GEOPACKAGE, this.onImportGeopackage.bind( this ) );
|
||||||
this.client.on( netgis.Events.EXPORT_PDF, this.onExportPDF.bind( this ) );
|
this.client.on( netgis.Events.EXPORT_PDF, this.onExportPDF.bind( this ) );
|
||||||
this.client.on( netgis.Events.EXPORT_JPEG, this.onExportJPEG.bind( this ) );
|
this.client.on( netgis.Events.EXPORT_JPEG, this.onExportJPEG.bind( this ) );
|
||||||
this.client.on( netgis.Events.EXPORT_PNG, this.onExportPNG.bind( this ) );
|
this.client.on( netgis.Events.EXPORT_PNG, this.onExportPNG.bind( this ) );
|
||||||
this.client.on( netgis.Events.EXPORT_GIF, this.onExportGIF.bind( this ) );
|
this.client.on( netgis.Events.EXPORT_GIF, this.onExportGIF.bind( this ) );
|
||||||
this.client.on( netgis.Events.PARCEL_SHOW_PREVIEW, this.onParcelShowPreview.bind( this ) );
|
this.client.on( netgis.Events.PARCEL_SHOW_PREVIEW, this.onParcelShowPreview.bind( this ) );
|
||||||
this.client.on( netgis.Events.PARCEL_HIDE_PREVIEW, this.onParcelHidePreview.bind( this ) );
|
this.client.on( netgis.Events.PARCEL_HIDE_PREVIEW, this.onParcelHidePreview.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.DRAW_BUFFER_ON, this.onDrawBufferOn.bind( this ) );
|
||||||
|
this.client.on( netgis.Events.DRAW_BUFFER_OFF, this.onDrawBufferOff.bind( this ) );
|
||||||
|
this.client.on( netgis.Events.DRAW_BUFFER_RADIUS_CHANGE, this.onDrawBufferRadiusChange.bind( this ) );
|
||||||
|
this.client.on( netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE, this.onDrawBufferSegmentsChange.bind( this ) );
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.createMap = function()
|
netgis.MapOpenLayers.prototype.initMap = function()
|
||||||
{
|
{
|
||||||
var config = this.client.config;
|
var config = this.client.config;
|
||||||
|
|
||||||
@@ -133,14 +146,17 @@ netgis.MapOpenLayers.prototype.createMap = function()
|
|||||||
this.view.on( "change:resolution", this.onChangeResolution.bind( this ) );
|
this.view.on( "change:resolution", this.onChangeResolution.bind( this ) );
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.createDefaultLayers = function()
|
netgis.MapOpenLayers.prototype.initDefaultLayers = function()
|
||||||
{
|
{
|
||||||
//TODO: why id as z index ?
|
//TODO: why id as z index ?
|
||||||
|
|
||||||
this.editLayer = new ol.layer.Vector( { source: new ol.source.Vector( { features: [] } ), style: this.styleEdit.bind( this ), zIndex: this.editLayerID } );
|
this.editLayer = new ol.layer.Vector( { source: new ol.source.Vector( { features: [] } ), style: this.styleEdit.bind( this ), zIndex: this.editLayerID } );
|
||||||
this.map.addLayer( this.editLayer );
|
this.map.addLayer( this.editLayer );
|
||||||
|
|
||||||
this.parcelLayer = new ol.layer.Vector( { source: new ol.source.Vector( { features: [] } ), style: this.styleParcel.bind( this ), zIndex: this.editLayerID + 10 } );
|
this.previewLayer = new ol.layer.Vector( { source: new ol.source.Vector( { features: [] } ), style: this.styleSketch.bind( this ), zIndex: this.editLayerID + 10 } );
|
||||||
|
this.map.addLayer( this.previewLayer );
|
||||||
|
|
||||||
|
this.parcelLayer = new ol.layer.Vector( { source: new ol.source.Vector( { features: [] } ), style: this.styleParcel.bind( this ), zIndex: this.editLayerID + 20 } );
|
||||||
this.map.addLayer( this.parcelLayer );
|
this.map.addLayer( this.parcelLayer );
|
||||||
|
|
||||||
this.editEventsOn();
|
this.editEventsOn();
|
||||||
@@ -163,7 +179,7 @@ netgis.MapOpenLayers.prototype.editEventsOff = function()
|
|||||||
//this.editLayer.getSource().un( "removefeature"/*, this.onEditLayerRemove*/ );
|
//this.editLayer.getSource().un( "removefeature"/*, this.onEditLayerRemove*/ );
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.createInteractions = function()
|
netgis.MapOpenLayers.prototype.initInteractions = function()
|
||||||
{
|
{
|
||||||
// View
|
// View
|
||||||
this.interactions[ netgis.Modes.VIEW ] =
|
this.interactions[ netgis.Modes.VIEW ] =
|
||||||
@@ -184,6 +200,8 @@ netgis.MapOpenLayers.prototype.createInteractions = function()
|
|||||||
new ol.interaction.MouseWheelZoom()
|
new ol.interaction.MouseWheelZoom()
|
||||||
];
|
];
|
||||||
|
|
||||||
|
this.interactions[ netgis.Modes.DRAW_POINTS ][ 0 ].on( "drawend", this.onDrawPointsEnd.bind( this ) );
|
||||||
|
|
||||||
this.interactions[ netgis.Modes.DRAW_LINES ] =
|
this.interactions[ netgis.Modes.DRAW_LINES ] =
|
||||||
[
|
[
|
||||||
new ol.interaction.Draw( { type: "LineString", source: this.editLayer.getSource(), style: this.styleSketch.bind( this ) } ),
|
new ol.interaction.Draw( { type: "LineString", source: this.editLayer.getSource(), style: this.styleSketch.bind( this ) } ),
|
||||||
@@ -191,6 +209,8 @@ netgis.MapOpenLayers.prototype.createInteractions = function()
|
|||||||
new ol.interaction.MouseWheelZoom()
|
new ol.interaction.MouseWheelZoom()
|
||||||
];
|
];
|
||||||
|
|
||||||
|
this.interactions[ netgis.Modes.DRAW_LINES ][ 0 ].on( "drawend", this.onDrawLinesEnd.bind( this ) );
|
||||||
|
|
||||||
this.interactions[ netgis.Modes.DRAW_POLYGONS ] =
|
this.interactions[ netgis.Modes.DRAW_POLYGONS ] =
|
||||||
[
|
[
|
||||||
new ol.interaction.Draw( { type: "Polygon", source: this.editLayer.getSource(), style: this.styleSketch.bind( this ) } ),
|
new ol.interaction.Draw( { type: "Polygon", source: this.editLayer.getSource(), style: this.styleSketch.bind( this ) } ),
|
||||||
@@ -257,19 +277,55 @@ netgis.MapOpenLayers.prototype.createInteractions = function()
|
|||||||
|
|
||||||
netgis.MapOpenLayers.prototype.createLayer = function( data )
|
netgis.MapOpenLayers.prototype.createLayer = function( data )
|
||||||
{
|
{
|
||||||
//TODO: refactor into createLayerWMS, createLayerWFS etc.
|
var layer = null;
|
||||||
|
|
||||||
|
// Create Specific Layer By Type
|
||||||
switch ( data.type )
|
switch ( data.type )
|
||||||
{
|
{
|
||||||
case netgis.LayerTypes.XYZ:
|
case netgis.LayerTypes.XYZ:
|
||||||
{
|
{
|
||||||
|
layer = this.createLayerXYZ( data.url );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case netgis.LayerTypes.OSM:
|
||||||
|
{
|
||||||
|
layer = this.createLayerOSM();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case netgis.LayerTypes.WMS:
|
||||||
|
{
|
||||||
|
layer = this.createLayerWMS( data.url, data.name, data.format, data.username, data.password );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case netgis.LayerTypes.WFS:
|
||||||
|
{
|
||||||
|
layer = this.createLayerWFS( data.url, data.name, this.client.config.map.projection, data.outputFormat );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Common Settings
|
||||||
|
if ( layer )
|
||||||
|
{
|
||||||
|
if ( data.minZoom ) layer.setMinZoom( Number.parseFloat( data.minZoom ) - 1.0 );
|
||||||
|
if ( data.maxZoom ) layer.setMaxZoom( Number.parseFloat( data.maxZoom ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return layer;
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.createLayerXYZ = function( url )
|
||||||
|
{
|
||||||
var layer = new ol.layer.Tile
|
var layer = new ol.layer.Tile
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
source: new ol.source.XYZ
|
source: new ol.source.XYZ
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
url: data.url,
|
url: url,
|
||||||
crossOrigin: "anonymous"
|
crossOrigin: "anonymous"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -277,10 +333,10 @@ netgis.MapOpenLayers.prototype.createLayer = function( data )
|
|||||||
);
|
);
|
||||||
|
|
||||||
return layer;
|
return layer;
|
||||||
}
|
};
|
||||||
|
|
||||||
case netgis.LayerTypes.OSM:
|
netgis.MapOpenLayers.prototype.createLayerOSM = function()
|
||||||
{
|
{
|
||||||
var layer = new ol.layer.Tile
|
var layer = new ol.layer.Tile
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
@@ -295,17 +351,17 @@ netgis.MapOpenLayers.prototype.createLayer = function( data )
|
|||||||
);
|
);
|
||||||
|
|
||||||
return layer;
|
return layer;
|
||||||
}
|
};
|
||||||
|
|
||||||
case netgis.LayerTypes.WMS:
|
netgis.MapOpenLayers.prototype.createLayerWMS = function( url, layerName, format, user, password )
|
||||||
{
|
{
|
||||||
var params =
|
var params =
|
||||||
{
|
{
|
||||||
url: data.url,
|
url: url,
|
||||||
params:
|
params:
|
||||||
{
|
{
|
||||||
"LAYERS": data.name,
|
"LAYERS": layerName,
|
||||||
"FORMAT": "image/png",
|
"FORMAT": format ? format : "image/png",
|
||||||
"TRANSPARENT": "true",
|
"TRANSPARENT": "true",
|
||||||
"VERSION": "1.1.1"
|
"VERSION": "1.1.1"
|
||||||
},
|
},
|
||||||
@@ -316,13 +372,13 @@ netgis.MapOpenLayers.prototype.createLayer = function( data )
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Authorization
|
// Authorization
|
||||||
if ( data.username && data.password )
|
if ( user && password )
|
||||||
{
|
{
|
||||||
params.imageLoadFunction = function( image, src )
|
params.imageLoadFunction = function( image, src )
|
||||||
{
|
{
|
||||||
var request = new XMLHttpRequest();
|
var request = new XMLHttpRequest();
|
||||||
request.open( "GET", src );
|
request.open( "GET", src );
|
||||||
request.setRequestHeader( "Authorization", "Basic " + window.btoa( data.username + ":" + data.password ) );
|
request.setRequestHeader( "Authorization", "Basic " + window.btoa( user + ":" + password ) );
|
||||||
|
|
||||||
request.onload = function()
|
request.onload = function()
|
||||||
{
|
{
|
||||||
@@ -345,17 +401,19 @@ netgis.MapOpenLayers.prototype.createLayer = function( data )
|
|||||||
);
|
);
|
||||||
|
|
||||||
return layer;
|
return layer;
|
||||||
}
|
};
|
||||||
|
|
||||||
case netgis.LayerTypes.WFS:
|
netgis.MapOpenLayers.prototype.createLayerWFS = function( url, typeName, projection, outputFormat )
|
||||||
{
|
{
|
||||||
var config = this.client.config;
|
url = url
|
||||||
|
|
||||||
var url = data.url
|
|
||||||
+ "service=WFS"
|
+ "service=WFS"
|
||||||
+ "&version=1.1.0"
|
+ "&version=1.1.0"
|
||||||
+ "&request=GetFeature"
|
+ "&request=GetFeature";
|
||||||
+ "&outputformat=application/json";
|
|
||||||
|
if ( ! outputFormat )
|
||||||
|
outputFormat = "application/json";
|
||||||
|
else
|
||||||
|
outputFormat = netgis.util.replace( outputFormat, " ", "+" ); //TODO: encode uri component ?
|
||||||
|
|
||||||
var source = new ol.source.Vector
|
var source = new ol.source.Vector
|
||||||
(
|
(
|
||||||
@@ -365,10 +423,13 @@ netgis.MapOpenLayers.prototype.createLayer = function( data )
|
|||||||
url: function( extent )
|
url: function( extent )
|
||||||
{
|
{
|
||||||
return url
|
return url
|
||||||
+ "&typename=" + data.name
|
+ "&typename=" + typeName
|
||||||
+ "&srsname=" + config.map.projection
|
+ "&srsname=" + projection
|
||||||
+ "&bbox=" + extent.join( "," ) + "," + config.map.projection;
|
+ "&bbox=" + extent.join( "," ) + "," + projection
|
||||||
|
+ "&outputFormat=" + outputFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: custom loader function to catch xhr response parse errors
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -382,12 +443,9 @@ netgis.MapOpenLayers.prototype.createLayer = function( data )
|
|||||||
var self = this;
|
var self = this;
|
||||||
source.on( "featuresloadstart", function( e ) { self.removeSnapLayer( layer ); } );
|
source.on( "featuresloadstart", function( e ) { self.removeSnapLayer( layer ); } );
|
||||||
source.on( "featuresloadend", function( e ) { window.setTimeout( function() { self.addSnapLayer( layer ); }, 10 ); } );
|
source.on( "featuresloadend", function( e ) { window.setTimeout( function() { self.addSnapLayer( layer ); }, 10 ); } );
|
||||||
|
//source.on( "featuresloaderror", function( e ) { console.info( "Layer Error:", e ); } );
|
||||||
|
|
||||||
return layer;
|
return layer;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.clearAll = function()
|
netgis.MapOpenLayers.prototype.clearAll = function()
|
||||||
@@ -416,9 +474,10 @@ netgis.MapOpenLayers.prototype.onUpdateStyle = function( e )
|
|||||||
this.editLayer.setStyle( style );
|
this.editLayer.setStyle( style );
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.styleEdit = function()
|
netgis.MapOpenLayers.prototype.styleEdit = function( feature )
|
||||||
{
|
{
|
||||||
var radius = this.client.config.styles.editLayer.pointRadius;
|
var radius = this.client.config.styles.editLayer.pointRadius;
|
||||||
|
var geom = feature.getGeometry();
|
||||||
|
|
||||||
var style = new ol.style.Style
|
var style = new ol.style.Style
|
||||||
(
|
(
|
||||||
@@ -429,11 +488,32 @@ netgis.MapOpenLayers.prototype.styleEdit = function()
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ( geom instanceof ol.geom.Polygon )
|
||||||
|
{
|
||||||
|
var area = geom.getArea();
|
||||||
|
|
||||||
|
style.setText
|
||||||
|
(
|
||||||
|
new ol.style.Text
|
||||||
|
(
|
||||||
|
{
|
||||||
|
text: [ netgis.util.formatArea( area, true ), "4mm sans-serif" ],
|
||||||
|
font: this.labelFont,
|
||||||
|
fill: new ol.style.Fill( { color: this.client.config.styles.editLayer.stroke } ),
|
||||||
|
backgroundFill: new ol.style.Fill( { color: "rgba( 255, 255, 255, 0.5 )" } ),
|
||||||
|
padding: [ 2, 4, 2, 4 ]
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return style;
|
return style;
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.styleSelect = function( feature )
|
netgis.MapOpenLayers.prototype.styleSelect = function( feature )
|
||||||
{
|
{
|
||||||
|
var geom = feature.getGeometry();
|
||||||
|
|
||||||
var style = new ol.style.Style
|
var style = new ol.style.Style
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
@@ -443,6 +523,25 @@ netgis.MapOpenLayers.prototype.styleSelect = function( feature )
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ( geom instanceof ol.geom.Polygon )
|
||||||
|
{
|
||||||
|
var area = geom.getArea();
|
||||||
|
|
||||||
|
style.setText
|
||||||
|
(
|
||||||
|
new ol.style.Text
|
||||||
|
(
|
||||||
|
{
|
||||||
|
text: [ netgis.util.formatArea( area, true ), "4mm sans-serif" ],
|
||||||
|
font: this.labelFont,
|
||||||
|
fill: new ol.style.Fill( { color: this.client.config.styles.select.stroke } ),
|
||||||
|
backgroundFill: new ol.style.Fill( { color: "rgba( 255, 255, 255, 0.5 )" } ),
|
||||||
|
padding: [ 2, 4, 2, 4 ]
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return style;
|
return style;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -470,6 +569,8 @@ netgis.MapOpenLayers.prototype.styleModify = function( feature )
|
|||||||
|
|
||||||
netgis.MapOpenLayers.prototype.styleSketch = function( feature )
|
netgis.MapOpenLayers.prototype.styleSketch = function( feature )
|
||||||
{
|
{
|
||||||
|
var geom = feature.getGeometry();
|
||||||
|
|
||||||
var style = new ol.style.Style
|
var style = new ol.style.Style
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
@@ -479,6 +580,25 @@ netgis.MapOpenLayers.prototype.styleSketch = function( feature )
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ( geom instanceof ol.geom.Polygon )
|
||||||
|
{
|
||||||
|
var area = geom.getArea();
|
||||||
|
|
||||||
|
style.setText
|
||||||
|
(
|
||||||
|
new ol.style.Text
|
||||||
|
(
|
||||||
|
{
|
||||||
|
text: [ netgis.util.formatArea( area, true ), "4mm sans-serif" ],
|
||||||
|
font: this.labelFont,
|
||||||
|
fill: new ol.style.Fill( { color: this.client.config.styles.sketch.stroke } ),
|
||||||
|
backgroundFill: new ol.style.Fill( { color: "rgba( 255, 255, 255, 0.5 )" } ),
|
||||||
|
padding: [ 2, 4, 2, 4 ]
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
var vertex = new ol.style.Style
|
var vertex = new ol.style.Style
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
@@ -599,7 +719,7 @@ netgis.MapOpenLayers.prototype.getActiveVectorLayers = function()
|
|||||||
|
|
||||||
netgis.MapOpenLayers.prototype.setMode = function( mode )
|
netgis.MapOpenLayers.prototype.setMode = function( mode )
|
||||||
{
|
{
|
||||||
// Old Mode
|
// Leave
|
||||||
switch ( this.mode )
|
switch ( this.mode )
|
||||||
{
|
{
|
||||||
case netgis.Modes.BUFFER_FEATURE_EDIT:
|
case netgis.Modes.BUFFER_FEATURE_EDIT:
|
||||||
@@ -607,6 +727,18 @@ netgis.MapOpenLayers.prototype.setMode = function( mode )
|
|||||||
this.onBufferCancel( null );
|
this.onBufferCancel( null );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case netgis.Modes.DRAW_POINTS:
|
||||||
|
case netgis.Modes.DRAW_LINES:
|
||||||
|
{
|
||||||
|
this.onDrawBufferOff( null );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enter
|
||||||
|
switch ( mode )
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interactions
|
// Interactions
|
||||||
@@ -674,6 +806,8 @@ netgis.MapOpenLayers.prototype.setSnapOn = function()
|
|||||||
this.snapFeatures.changed();
|
this.snapFeatures.changed();
|
||||||
|
|
||||||
//this.updateSnapLayers();
|
//this.updateSnapLayers();
|
||||||
|
|
||||||
|
//TODO: https://openlayers.org/en/latest/examples/tracing.html
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.setSnapOff = function()
|
netgis.MapOpenLayers.prototype.setSnapOff = function()
|
||||||
@@ -685,6 +819,29 @@ netgis.MapOpenLayers.prototype.setSnapOff = function()
|
|||||||
//this.snapFeatures = null;
|
//this.snapFeatures = null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.setTracingOn = function()
|
||||||
|
{
|
||||||
|
var source = new ol.source.Vector( { features: this.snapFeatures } );
|
||||||
|
|
||||||
|
this.tracing = new ol.interaction.Draw( { type: "Polygon", source: this.editLayer.getSource(), style: this.styleSketch.bind( this ), trace: true, traceSource: source } );
|
||||||
|
|
||||||
|
var actions = this.interactions[ netgis.Modes.DRAW_POLYGONS ];
|
||||||
|
actions[ 0 ].setActive( false );
|
||||||
|
actions.push( this.tracing );
|
||||||
|
|
||||||
|
this.setMode( this.mode );
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.setTracingOff = function()
|
||||||
|
{
|
||||||
|
var actions = this.interactions[ netgis.Modes.DRAW_POLYGONS ];
|
||||||
|
actions[ 0 ].setActive( true );
|
||||||
|
actions.splice( actions.indexOf( this.tracing ), 1 );
|
||||||
|
|
||||||
|
this.setMode( this.mode );
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
netgis.MapOpenLayers.prototype.updateSnapLayers = function()
|
netgis.MapOpenLayers.prototype.updateSnapLayers = function()
|
||||||
{
|
{
|
||||||
@@ -739,6 +896,16 @@ netgis.MapOpenLayers.prototype.onSnapOff = function( e )
|
|||||||
this.setSnapOff();
|
this.setSnapOff();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onTracingOn = function( e )
|
||||||
|
{
|
||||||
|
this.setTracingOn();
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onTracingOff = function( e )
|
||||||
|
{
|
||||||
|
this.setTracingOff();
|
||||||
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.onLayerShow = function( e )
|
netgis.MapOpenLayers.prototype.onLayerShow = function( e )
|
||||||
{
|
{
|
||||||
var layer = this.layers[ e.id ];
|
var layer = this.layers[ e.id ];
|
||||||
@@ -825,6 +992,20 @@ netgis.MapOpenLayers.prototype.onContextUpdate = function( e )
|
|||||||
}*/
|
}*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onAddServiceWMS = function( e )
|
||||||
|
{
|
||||||
|
var layer = this.createLayerWMS( e.url, e.name, e.format );
|
||||||
|
layer.setZIndex( e.id );
|
||||||
|
this.layers[ e.id ] = layer;
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onAddServiceWFS = function( e )
|
||||||
|
{
|
||||||
|
var layer = this.createLayerWFS( e.url, e.name, this.client.config.map.projection, e.format );
|
||||||
|
layer.setZIndex( e.id );
|
||||||
|
this.layers[ e.id ] = layer;
|
||||||
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.onSetMode = function( e )
|
netgis.MapOpenLayers.prototype.onSetMode = function( e )
|
||||||
{
|
{
|
||||||
this.setMode( e );
|
this.setMode( e );
|
||||||
@@ -857,7 +1038,8 @@ netgis.MapOpenLayers.prototype.onZoomWKT = function( e )
|
|||||||
|
|
||||||
netgis.MapOpenLayers.prototype.onPointerMove = function( e )
|
netgis.MapOpenLayers.prototype.onPointerMove = function( e )
|
||||||
{
|
{
|
||||||
//var pixel = e.pixel;
|
var pixel = e.pixel;
|
||||||
|
var coords = e.coordinate;
|
||||||
|
|
||||||
var hover = this.hover;
|
var hover = this.hover;
|
||||||
var styleSelect = this.styleSelect.bind( this );
|
var styleSelect = this.styleSelect.bind( this );
|
||||||
@@ -876,7 +1058,7 @@ netgis.MapOpenLayers.prototype.onPointerMove = function( e )
|
|||||||
{
|
{
|
||||||
this.map.forEachFeatureAtPixel
|
this.map.forEachFeatureAtPixel
|
||||||
(
|
(
|
||||||
e.pixel,
|
pixel,
|
||||||
function( feature, layer ) //TODO: bind to this?
|
function( feature, layer ) //TODO: bind to this?
|
||||||
{
|
{
|
||||||
if ( layer === self.editLayer )
|
if ( layer === self.editLayer )
|
||||||
@@ -896,7 +1078,7 @@ netgis.MapOpenLayers.prototype.onPointerMove = function( e )
|
|||||||
{
|
{
|
||||||
this.map.forEachFeatureAtPixel
|
this.map.forEachFeatureAtPixel
|
||||||
(
|
(
|
||||||
e.pixel,
|
pixel,
|
||||||
function( feature, layer ) //TODO: bind to this?
|
function( feature, layer ) //TODO: bind to this?
|
||||||
{
|
{
|
||||||
if ( layer === self.editLayer )
|
if ( layer === self.editLayer )
|
||||||
@@ -916,7 +1098,7 @@ netgis.MapOpenLayers.prototype.onPointerMove = function( e )
|
|||||||
{
|
{
|
||||||
this.map.forEachFeatureAtPixel
|
this.map.forEachFeatureAtPixel
|
||||||
(
|
(
|
||||||
e.pixel,
|
pixel,
|
||||||
function( feature, layer ) //TODO: bind to this?
|
function( feature, layer ) //TODO: bind to this?
|
||||||
{
|
{
|
||||||
if ( layer === self.editLayer )
|
if ( layer === self.editLayer )
|
||||||
@@ -931,6 +1113,13 @@ netgis.MapOpenLayers.prototype.onPointerMove = function( e )
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case netgis.Modes.DRAW_POINTS:
|
||||||
|
case netgis.Modes.DRAW_LINES:
|
||||||
|
{
|
||||||
|
this.updateDrawBufferPreview();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: refactor to default hover handler?
|
//TODO: refactor to default hover handler?
|
||||||
@@ -1030,13 +1219,31 @@ netgis.MapOpenLayers.prototype.onCutFeatureDrawEnd = function( e )
|
|||||||
netgis.MapOpenLayers.prototype.onModifyFeaturesEnd = function( e )
|
netgis.MapOpenLayers.prototype.onModifyFeaturesEnd = function( e )
|
||||||
{
|
{
|
||||||
this.updateEditOutput();
|
this.updateEditOutput();
|
||||||
|
this.updateEditArea();
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.createBufferFeature = function( srcgeom, radius, segments )
|
||||||
|
{
|
||||||
|
var geom = this.createBufferGeometry( srcgeom, radius, segments );
|
||||||
|
var feature = new ol.Feature( { geometry: geom } );
|
||||||
|
|
||||||
|
return feature;
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.createBufferGeometry = function( srcgeom, radius, segments )
|
||||||
|
{
|
||||||
|
var parser = new jsts.io.OL3Parser();
|
||||||
|
|
||||||
|
var a = parser.read( srcgeom );
|
||||||
|
var b = a.buffer( radius, segments );
|
||||||
|
|
||||||
|
var geom = parser.write( b );
|
||||||
|
|
||||||
|
return geom;
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.onBufferChange = function( e )
|
netgis.MapOpenLayers.prototype.onBufferChange = function( e )
|
||||||
{
|
{
|
||||||
var radius = e.radius;
|
|
||||||
var segments = e.segments;
|
|
||||||
|
|
||||||
var source = this.editLayer.getSource();
|
var source = this.editLayer.getSource();
|
||||||
var target = this.selected;
|
var target = this.selected;
|
||||||
|
|
||||||
@@ -1047,15 +1254,7 @@ netgis.MapOpenLayers.prototype.onBufferChange = function( e )
|
|||||||
|
|
||||||
if ( target )
|
if ( target )
|
||||||
{
|
{
|
||||||
// Cut Process
|
var feature = this.createBufferFeature( target.getGeometry(), e.radius, e.segments );
|
||||||
var parser = new jsts.io.OL3Parser();
|
|
||||||
|
|
||||||
var a = parser.read( target.getGeometry() );
|
|
||||||
var b = a.buffer( radius, segments );
|
|
||||||
|
|
||||||
// Output
|
|
||||||
var geom = parser.write( b );
|
|
||||||
var feature = new ol.Feature( { geometry: geom } );
|
|
||||||
|
|
||||||
//source.removeFeature( target );
|
//source.removeFeature( target );
|
||||||
source.addFeature( feature );
|
source.addFeature( feature );
|
||||||
@@ -1090,10 +1289,87 @@ netgis.MapOpenLayers.prototype.onBufferCancel = function( e )
|
|||||||
this.selected = null;
|
this.selected = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onDrawPointsEnd = function( e )
|
||||||
|
{
|
||||||
|
var preview = this.previewLayer.getSource().getFeatures()[ 0 ];
|
||||||
|
|
||||||
|
if ( preview )
|
||||||
|
{
|
||||||
|
var src = this.editLayer.getSource();
|
||||||
|
src.addFeature( preview.clone() );
|
||||||
|
|
||||||
|
//TODO: remove sketch point ?
|
||||||
|
//this.editLayer.getSource().removeFeature( e.feature );
|
||||||
|
|
||||||
|
/*window.setTimeout( function() {
|
||||||
|
var features = src.getFeatures();
|
||||||
|
src.removeFeature( features[ features.length - 1 ] );
|
||||||
|
src.addFeature( preview.clone() );
|
||||||
|
}, 10 );*/
|
||||||
|
|
||||||
|
/*e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
return false;*/
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onDrawLinesEnd = function( e )
|
||||||
|
{
|
||||||
|
var preview = this.previewLayer.getSource().getFeatures()[ 0 ];
|
||||||
|
if ( ! preview ) return;
|
||||||
|
|
||||||
|
var src = this.editLayer.getSource();
|
||||||
|
src.addFeature( preview.clone() );
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onDrawBufferOn = function( e )
|
||||||
|
{
|
||||||
|
var feature = this.createBufferFeature( new ol.geom.Point( this.client.config.map.center ), this.drawBufferRadius, this.drawBufferSegments );
|
||||||
|
this.previewLayer.getSource().addFeature( feature );
|
||||||
|
|
||||||
|
//TODO: send all draw buffer params with events ?
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onDrawBufferOff = function( e )
|
||||||
|
{
|
||||||
|
this.previewLayer.getSource().clear();
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onDrawBufferRadiusChange = function( e )
|
||||||
|
{
|
||||||
|
var radius = e;
|
||||||
|
this.drawBufferRadius = radius;
|
||||||
|
|
||||||
|
this.updateDrawBufferPreview();
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onDrawBufferSegmentsChange = function( e )
|
||||||
|
{
|
||||||
|
var segs = e;
|
||||||
|
this.drawBufferSegments = segs;
|
||||||
|
|
||||||
|
this.updateDrawBufferPreview();
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.updateDrawBufferPreview = function()
|
||||||
|
{
|
||||||
|
var draw = this.interactions[ this.mode ][ 0 ];
|
||||||
|
var overlays = draw.getOverlay().getSource().getFeatures();
|
||||||
|
if ( overlays.length < 1 ) return;
|
||||||
|
|
||||||
|
var preview = this.previewLayer.getSource().getFeatures()[ 0 ];
|
||||||
|
if ( ! preview ) return;
|
||||||
|
|
||||||
|
var geom = overlays[ 0 ].getGeometry();
|
||||||
|
var buffer = this.createBufferGeometry( geom, this.drawBufferRadius, this.drawBufferSegments );
|
||||||
|
preview.setGeometry( buffer );
|
||||||
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.onEditLayerAdd = function( e )
|
netgis.MapOpenLayers.prototype.onEditLayerAdd = function( e )
|
||||||
{
|
{
|
||||||
this.updateEditOutput();
|
////this.updateEditOutput();
|
||||||
this.updateEditLayerItem();
|
this.updateEditLayerItem();
|
||||||
|
this.updateEditOutput();
|
||||||
this.snapFeatures.push( e.feature );
|
this.snapFeatures.push( e.feature );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1116,14 +1392,28 @@ netgis.MapOpenLayers.prototype.updateEditOutput = function()
|
|||||||
var format = new ol.format.GeoJSON();
|
var format = new ol.format.GeoJSON();
|
||||||
var output = format.writeFeaturesObject( features, { dataProjection: proj, featureProjection: proj } );
|
var output = format.writeFeaturesObject( features, { dataProjection: proj, featureProjection: proj } );
|
||||||
|
|
||||||
|
// Projection
|
||||||
output[ "crs" ] =
|
output[ "crs" ] =
|
||||||
{
|
{
|
||||||
"type": "name",
|
"type": "name",
|
||||||
"properties": { "name": "urn:ogc:def:crs:" + proj.replace( ":", "::" ) }
|
"properties": { "name": "urn:ogc:def:crs:" + proj.replace( ":", "::" ) }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Total Area
|
||||||
|
var area = 0.0;
|
||||||
|
|
||||||
|
for ( var i = 0; i < features.length; i++ )
|
||||||
|
{
|
||||||
|
var geom = features[ i ].getGeometry();
|
||||||
|
if ( geom instanceof ol.geom.Polygon ) area += geom.getArea();
|
||||||
|
}
|
||||||
|
|
||||||
|
output[ "area" ] = area;
|
||||||
|
|
||||||
if ( ! this.editEventsSilent )
|
if ( ! this.editEventsSilent )
|
||||||
|
{
|
||||||
this.client.invoke( netgis.Events.EDIT_FEATURES_CHANGE, output );
|
this.client.invoke( netgis.Events.EDIT_FEATURES_CHANGE, output );
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.updateEditLayerItem = function()
|
netgis.MapOpenLayers.prototype.updateEditLayerItem = function()
|
||||||
@@ -1138,6 +1428,11 @@ netgis.MapOpenLayers.prototype.updateEditLayerItem = function()
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.updateEditArea = function()
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.onEditFeaturesLoaded = function( e )
|
netgis.MapOpenLayers.prototype.onEditFeaturesLoaded = function( e )
|
||||||
{
|
{
|
||||||
var json = e;
|
var json = e;
|
||||||
@@ -1247,6 +1542,28 @@ netgis.MapOpenLayers.prototype.onImportShapefile = function( e )
|
|||||||
reader.readAsArrayBuffer( file );
|
reader.readAsArrayBuffer( file );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onImportSpatialite = function( e )
|
||||||
|
{
|
||||||
|
var file = e;
|
||||||
|
var title = file.name;
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
var reader = new FileReader();
|
||||||
|
reader.onload = function( e ) { self.createLayerSpatialite( title, e.target.result ); };
|
||||||
|
reader.readAsArrayBuffer( file );
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.onImportGeopackage = function( e )
|
||||||
|
{
|
||||||
|
var file = e;
|
||||||
|
var title = file.name;
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
var reader = new FileReader();
|
||||||
|
reader.onload = function( e ) { self.createLayerGeopackage( title, e.target.result ); };
|
||||||
|
reader.readAsArrayBuffer( file );
|
||||||
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.createLayerGeoJSON = function( title, data )
|
netgis.MapOpenLayers.prototype.createLayerGeoJSON = function( title, data )
|
||||||
{
|
{
|
||||||
var format = new ol.format.GeoJSON();
|
var format = new ol.format.GeoJSON();
|
||||||
@@ -1265,7 +1582,6 @@ netgis.MapOpenLayers.prototype.createLayerGeoJSON = function( title, data )
|
|||||||
case this.client.config.map.projection:
|
case this.client.config.map.projection:
|
||||||
{
|
{
|
||||||
// Projection OK
|
// Projection OK
|
||||||
//console.info( "Import Projection:", projcode );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1441,6 +1757,124 @@ netgis.MapOpenLayers.prototype.createLayerShapefile = function( title, shapeData
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.createLayerSpatialite = function( title, data )
|
||||||
|
{
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
window.initSqlJs().then
|
||||||
|
(
|
||||||
|
function( SQL )
|
||||||
|
{
|
||||||
|
var features = [];
|
||||||
|
|
||||||
|
var arr = new Uint8Array( data );
|
||||||
|
var db = new SQL.Database( arr );
|
||||||
|
|
||||||
|
// Tables
|
||||||
|
var results = db.exec
|
||||||
|
(
|
||||||
|
"SELECT name FROM sqlite_schema WHERE type = 'table' \n\
|
||||||
|
AND name NOT LIKE 'sqlite_%' \n\
|
||||||
|
AND name NOT LIKE 'sql_%' \n\
|
||||||
|
AND name NOT LIKE 'idx_%' \n\
|
||||||
|
AND name NOT LIKE 'spatial_ref_sys%' \n\
|
||||||
|
AND name NOT LIKE 'spatialite_%' \n\
|
||||||
|
AND name NOT LIKE 'geometry_columns%' \n\
|
||||||
|
AND name NOT LIKE 'views_%' \n\
|
||||||
|
AND name NOT LIKE 'virts_%' \n\
|
||||||
|
AND name NOT LIKE 'SpatialIndex' \n\
|
||||||
|
AND name NOT LIKE 'ElementaryGeometries' \n\
|
||||||
|
;" );
|
||||||
|
|
||||||
|
var tables = results[ 0 ].values;
|
||||||
|
|
||||||
|
for ( var t = 0; t < tables.length; t++ )
|
||||||
|
{
|
||||||
|
var table = tables[ t ][ 0 ];
|
||||||
|
|
||||||
|
results = db.exec( "SELECT * FROM " + table );
|
||||||
|
var result = results[ 0 ];
|
||||||
|
|
||||||
|
// Columns
|
||||||
|
var geomcol = null;
|
||||||
|
|
||||||
|
for ( var c = 0; c < result.columns.length; c++ )
|
||||||
|
{
|
||||||
|
if ( result.columns[ c ].toLowerCase() === "geometry" ) { geomcol = c; break; }
|
||||||
|
if ( result.columns[ c ].toLowerCase() === "geom" ) { geomcol = c; break; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rows
|
||||||
|
var rows = result.values;
|
||||||
|
|
||||||
|
for ( var r = 0; r < rows.length; r++ )
|
||||||
|
{
|
||||||
|
var row = rows[ r ];
|
||||||
|
|
||||||
|
// Convert WKB
|
||||||
|
var input = row[ geomcol ];
|
||||||
|
var output = new Uint8Array( input.length - 43 - 1 + 5 );
|
||||||
|
|
||||||
|
// Byte Order
|
||||||
|
output[ 0 ] = input[ 1 ];
|
||||||
|
|
||||||
|
// Type
|
||||||
|
output[ 1 ] = input[ 39 ];
|
||||||
|
output[ 2 ] = input[ 40 ];
|
||||||
|
output[ 3 ] = input[ 41 ];
|
||||||
|
output[ 4 ] = input[ 42 ];
|
||||||
|
|
||||||
|
// Geometry
|
||||||
|
var geomlen = input.length - 43 - 1;
|
||||||
|
|
||||||
|
for ( var i = 0; i < geomlen; i++ )
|
||||||
|
{
|
||||||
|
output[ 5 + i ] = input[ 43 + i ];
|
||||||
|
}
|
||||||
|
|
||||||
|
var wkb = new ol.format.WKB();
|
||||||
|
var geom = wkb.readGeometry( output, { featureProjection: self.client.config.map.projection } );
|
||||||
|
|
||||||
|
features.push( new ol.Feature( { geometry: geom } ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.addImportedFeatures( features );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.MapOpenLayers.prototype.createLayerGeopackage = function( title, data )
|
||||||
|
{
|
||||||
|
var self = this;
|
||||||
|
var arr = new Uint8Array( data );
|
||||||
|
|
||||||
|
window.GeoPackage.setSqljsWasmLocateFile( function( file ) { return self.client.config.import.geopackageLibURL + file; } );
|
||||||
|
|
||||||
|
window.GeoPackage.GeoPackageAPI.open( arr ).then( function( geoPackage )
|
||||||
|
{
|
||||||
|
var features = [];
|
||||||
|
var format = new ol.format.GeoJSON();
|
||||||
|
var tables = geoPackage.getFeatureTables();
|
||||||
|
|
||||||
|
for ( var t = 0; t < tables.length; t++ )
|
||||||
|
{
|
||||||
|
var table = tables[ t ];
|
||||||
|
var rows = geoPackage.queryForGeoJSONFeaturesInTable( table );
|
||||||
|
|
||||||
|
for ( var r = 0; r < rows.length; r++ )
|
||||||
|
{
|
||||||
|
var row = rows[ r ];
|
||||||
|
var geom = format.readGeometry( row.geometry, { featureProjection: self.client.config.map.projection } );
|
||||||
|
var feature = new ol.Feature( { geometry: geom } );
|
||||||
|
features.push( feature );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.addImportedFeatures( features );
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
|
||||||
netgis.MapOpenLayers.prototype.addImportedFeatures = function( features )
|
netgis.MapOpenLayers.prototype.addImportedFeatures = function( features )
|
||||||
{
|
{
|
||||||
// Add To Edit Layer
|
// Add To Edit Layer
|
||||||
@@ -1537,6 +1971,7 @@ netgis.MapOpenLayers.prototype.exportImage = function( format, resx, resy, mode,
|
|||||||
|
|
||||||
// Request Logo Image
|
// Request Logo Image
|
||||||
var logo = new Image();
|
var logo = new Image();
|
||||||
|
|
||||||
logo.onload = function()
|
logo.onload = function()
|
||||||
{
|
{
|
||||||
//TODO: refactor map render image and image export
|
//TODO: refactor map render image and image export
|
||||||
@@ -1597,6 +2032,13 @@ netgis.MapOpenLayers.prototype.exportImage = function( format, resx, resy, mode,
|
|||||||
// Watermark Logo
|
// Watermark Logo
|
||||||
mapContext.drawImage( logo, 0, 0 );
|
mapContext.drawImage( logo, 0, 0 );
|
||||||
|
|
||||||
|
// Timestamp
|
||||||
|
mapContext.fillStyle = "#fff";
|
||||||
|
mapContext.fillRect( 0, mapCanvas.height - 30, 140, 30 );
|
||||||
|
mapContext.fillStyle = "#000";
|
||||||
|
mapContext.font = "4mm sans-serif";
|
||||||
|
mapContext.fillText( netgis.util.getTimeStamp(), 10, mapCanvas.height - 10 );
|
||||||
|
|
||||||
// Export Map Image
|
// Export Map Image
|
||||||
var link = document.createElement( "a" );
|
var link = document.createElement( "a" );
|
||||||
|
|
||||||
@@ -1658,7 +2100,11 @@ netgis.MapOpenLayers.prototype.exportImage = function( format, resx, resy, mode,
|
|||||||
pdf.addImage( mapCanvas.toDataURL( "image/png,1.0", 1.0 ), "PNG", x, y, width, height );
|
pdf.addImage( mapCanvas.toDataURL( "image/png,1.0", 1.0 ), "PNG", x, y, width, height );
|
||||||
|
|
||||||
// Text
|
// Text
|
||||||
|
pdf.setFillColor( 255, 255, 255 );
|
||||||
|
pdf.rect( x, y + height - 11, 80, 11, "F" );
|
||||||
|
|
||||||
pdf.setFontSize( 8 );
|
pdf.setFontSize( 8 );
|
||||||
|
pdf.text( "Datum: " + netgis.util.getTimeStamp(), x + 2, y + height - 2 - 4 );
|
||||||
pdf.text( "Quelle: " + window.location.href, x + 2, y + height - 2 );
|
pdf.text( "Quelle: " + window.location.href, x + 2, y + height - 2 );
|
||||||
|
|
||||||
// Same Tab
|
// Same Tab
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ netgis.Menu.prototype.load = function()
|
|||||||
//fileItems.appendChild( this.createMenuItem( '<i class="fas fa-file"></i>KML', this.onImportKMLClick.bind( this ) ) );
|
//fileItems.appendChild( this.createMenuItem( '<i class="fas fa-file"></i>KML', this.onImportKMLClick.bind( this ) ) );
|
||||||
importItem.appendChild( this.createMenuItem( '<i class="fas fa-file"></i>GML', this.onImportGMLClick.bind( this ) ) );
|
importItem.appendChild( this.createMenuItem( '<i class="fas fa-file"></i>GML', this.onImportGMLClick.bind( this ) ) );
|
||||||
importItem.appendChild( this.createMenuItem( '<i class="fas fa-file"></i>Shapefile', this.onImportShapefileClick.bind( this ) ) );
|
importItem.appendChild( this.createMenuItem( '<i class="fas fa-file"></i>Shapefile', this.onImportShapefileClick.bind( this ) ) );
|
||||||
|
importItem.appendChild( this.createMenuItem( '<i class="fas fa-file"></i>Spatialite', this.onImportSpatialiteClick.bind( this ) ) );
|
||||||
|
importItem.appendChild( this.createMenuItem( '<i class="fas fa-file"></i>GeoPackage', this.onImportGeopackageClick.bind( this ) ) );
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
var exportMenu = this.createMenu( '<i class="fas fa-caret-down"></i>Export' );
|
var exportMenu = this.createMenu( '<i class="fas fa-caret-down"></i>Export' );
|
||||||
@@ -228,6 +230,16 @@ netgis.Menu.prototype.onImportGMLClick = function( e )
|
|||||||
this.client.invoke( netgis.Events.IMPORT_GML_SHOW, null );
|
this.client.invoke( netgis.Events.IMPORT_GML_SHOW, null );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.Menu.prototype.onImportSpatialiteClick = function( e )
|
||||||
|
{
|
||||||
|
this.client.invoke( netgis.Events.IMPORT_SPATIALITE_SHOW, null );
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Menu.prototype.onImportGeopackageClick = function( e )
|
||||||
|
{
|
||||||
|
this.client.invoke( netgis.Events.IMPORT_GEOPACKAGE_SHOW, null );
|
||||||
|
};
|
||||||
|
|
||||||
netgis.Menu.prototype.onExportPDFClick = function( e )
|
netgis.Menu.prototype.onExportPDFClick = function( e )
|
||||||
{
|
{
|
||||||
this.client.invoke( netgis.Events.EXPORT_PDF_SHOW, null );
|
this.client.invoke( netgis.Events.EXPORT_PDF_SHOW, null );
|
||||||
|
|||||||
@@ -131,7 +131,8 @@
|
|||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.netgis-modal-content input
|
.netgis-modal-content input,
|
||||||
|
.netgis-modal-content select
|
||||||
{
|
{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ netgis.Modal = function()
|
|||||||
this.exportJPEG = null;
|
this.exportJPEG = null;
|
||||||
this.exportPNG = null;
|
this.exportPNG = null;
|
||||||
this.exportGIF = null;
|
this.exportGIF = null;
|
||||||
|
this.addService = null;
|
||||||
|
|
||||||
|
this.addServiceID = 10000;
|
||||||
};
|
};
|
||||||
|
|
||||||
netgis.Modal.prototype.load = function()
|
netgis.Modal.prototype.load = function()
|
||||||
@@ -39,6 +42,12 @@ netgis.Modal.prototype.load = function()
|
|||||||
this.importShapefile = this.createImportShapefile();
|
this.importShapefile = this.createImportShapefile();
|
||||||
this.root.appendChild( this.importShapefile );
|
this.root.appendChild( this.importShapefile );
|
||||||
|
|
||||||
|
this.importSpatialite = this.createImportSpatialite();
|
||||||
|
this.root.appendChild( this.importSpatialite );
|
||||||
|
|
||||||
|
this.importGeopackage = this.createImportGeopackage();
|
||||||
|
this.root.appendChild( this.importGeopackage );
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
this.exportPDF = this.createExportPDF();
|
this.exportPDF = this.createExportPDF();
|
||||||
this.root.appendChild( this.exportPDF );
|
this.root.appendChild( this.exportPDF );
|
||||||
@@ -52,6 +61,10 @@ netgis.Modal.prototype.load = function()
|
|||||||
this.exportGIF = this.createExportGIF();
|
this.exportGIF = this.createExportGIF();
|
||||||
this.root.appendChild( this.exportGIF );
|
this.root.appendChild( this.exportGIF );
|
||||||
|
|
||||||
|
// Layers
|
||||||
|
this.addService = this.createAddService();
|
||||||
|
this.root.appendChild( this.addService );
|
||||||
|
|
||||||
// Done
|
// Done
|
||||||
this.client.root.appendChild( this.root );
|
this.client.root.appendChild( this.root );
|
||||||
|
|
||||||
@@ -59,11 +72,15 @@ netgis.Modal.prototype.load = function()
|
|||||||
this.client.on( netgis.Events.IMPORT_GEOJSON_SHOW, this.onImportGeoJSONShow.bind( this ) );
|
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_GML_SHOW, this.onImportGMLShow.bind( this ) );
|
||||||
this.client.on( netgis.Events.IMPORT_SHAPEFILE_SHOW, this.onImportShapefileShow.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_PDF_SHOW, this.onExportPDFShow.bind( this ) );
|
||||||
this.client.on( netgis.Events.EXPORT_JPEG_SHOW, this.onExportJPEGShow.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_PNG_SHOW, this.onExportPNGShow.bind( this ) );
|
||||||
this.client.on( netgis.Events.EXPORT_GIF_SHOW, this.onExportGIFShow.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()
|
netgis.Modal.prototype.createImportGeoJSON = function()
|
||||||
@@ -102,6 +119,30 @@ netgis.Modal.prototype.createImportShapefile = function()
|
|||||||
return container;
|
return container;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.createImportSpatialite = function()
|
||||||
|
{
|
||||||
|
var container = this.createContainer( "Import Spatialite" );
|
||||||
|
|
||||||
|
this.createText( container, "Unterstützte Koordinatensysteme:", "<ul><li>World Geodetic System 1984 (EPSG:4326)</li><li>ETRS89 / UTM zone 32N (EPSG:25832)</li></ul>" );
|
||||||
|
this.createInputFile( container, "Datei auswählen / ablegen:", ".sqlite", this.onImportSpatialiteChange.bind( this ) );
|
||||||
|
this.createSpace( container );
|
||||||
|
this.createButton( container, "<i class='fas fa-check'></i>Importieren", this.onImportSpatialiteAccept.bind( this ) );
|
||||||
|
|
||||||
|
return container;
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.createImportGeopackage = function()
|
||||||
|
{
|
||||||
|
var container = this.createContainer( "Import GeoPackage" );
|
||||||
|
|
||||||
|
this.createText( container, "Unterstützte Koordinatensysteme:", "<ul><li>World Geodetic System 1984 (EPSG:4326)</li><li>ETRS89 / UTM zone 32N (EPSG:25832)</li></ul>" );
|
||||||
|
this.createInputFile( container, "Datei auswählen / ablegen:", ".gpkg", this.onImportGeopackageChange.bind( this ) );
|
||||||
|
this.createSpace( container );
|
||||||
|
this.createButton( container, "<i class='fas fa-check'></i>Importieren", this.onImportGeopackageAccept.bind( this ) );
|
||||||
|
|
||||||
|
return container;
|
||||||
|
};
|
||||||
|
|
||||||
netgis.Modal.prototype.createExportPDF = function()
|
netgis.Modal.prototype.createExportPDF = function()
|
||||||
{
|
{
|
||||||
var container = this.createContainer( "Export PDF" );
|
var container = this.createContainer( "Export PDF" );
|
||||||
@@ -152,6 +193,29 @@ netgis.Modal.prototype.createExportGIF = function()
|
|||||||
return container;
|
return container;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.createAddService = function()
|
||||||
|
{
|
||||||
|
var container = this.createContainer( "Dienst hinzufügen" );
|
||||||
|
|
||||||
|
this.createInputText( container, "WMS/WFS URL:" );
|
||||||
|
this.createSpace( container );
|
||||||
|
this.createButton( container, "<i class='fas fa-cloud-download-alt'></i>Dienst laden", this.onAddServiceLoad.bind( this ) );
|
||||||
|
|
||||||
|
/*var details = document.createElement( "div" );
|
||||||
|
details.className = "netgis-hide";
|
||||||
|
container.appendChild( details );*/
|
||||||
|
|
||||||
|
this.createSpace( container );
|
||||||
|
this.createInputHidden( container );
|
||||||
|
this.createText( container, "Bezeichnung:", "" );
|
||||||
|
this.createInputSelect( container, "Kartenebene:", [] );
|
||||||
|
this.createInputSelect( container, "Format:", [] );
|
||||||
|
this.createSpace( container );
|
||||||
|
this.createButton( container, "<i class='fas fa-check'></i>Dienst hinzufügen", this.onAddServiceAccept.bind( this ) );
|
||||||
|
|
||||||
|
return container;
|
||||||
|
};
|
||||||
|
|
||||||
netgis.Modal.prototype.show = function( container )
|
netgis.Modal.prototype.show = function( container )
|
||||||
{
|
{
|
||||||
this.root.classList.add( "netgis-show" );
|
this.root.classList.add( "netgis-show" );
|
||||||
@@ -243,6 +307,25 @@ netgis.Modal.prototype.createButton = function( container, title, callback )
|
|||||||
return button;
|
return button;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.createInputHidden = function( container )
|
||||||
|
{
|
||||||
|
var row = document.createElement( "tr" );
|
||||||
|
row.className = "netgis-hidden";
|
||||||
|
|
||||||
|
var cell = document.createElement( "td" );
|
||||||
|
row.appendChild( cell );
|
||||||
|
|
||||||
|
var input = document.createElement( "input" );
|
||||||
|
input.setAttribute( "type", "hidden" );
|
||||||
|
cell.appendChild( input );
|
||||||
|
|
||||||
|
var content = container.getElementsByClassName( "netgis-modal-content" )[ 0 ];
|
||||||
|
var table = content.getElementsByTagName( "table" )[ 0 ];
|
||||||
|
table.appendChild( row );
|
||||||
|
|
||||||
|
return input;
|
||||||
|
};
|
||||||
|
|
||||||
netgis.Modal.prototype.createInputText = function( container, title )
|
netgis.Modal.prototype.createInputText = function( container, title )
|
||||||
{
|
{
|
||||||
var row = document.createElement( "tr" );
|
var row = document.createElement( "tr" );
|
||||||
@@ -258,12 +341,41 @@ netgis.Modal.prototype.createInputText = function( container, title )
|
|||||||
|
|
||||||
var cell = document.createElement( "td" );
|
var cell = document.createElement( "td" );
|
||||||
cell.className = "netgis-padding";
|
cell.className = "netgis-padding";
|
||||||
|
row.appendChild( cell );
|
||||||
|
|
||||||
var input = document.createElement( "input" );
|
var input = document.createElement( "input" );
|
||||||
input.setAttribute( "type", "text" );
|
input.setAttribute( "type", "text" );
|
||||||
cell.appendChild( input );
|
cell.appendChild( input );
|
||||||
|
|
||||||
|
label.htmlFor = input;
|
||||||
|
|
||||||
|
var content = container.getElementsByClassName( "netgis-modal-content" )[ 0 ];
|
||||||
|
var table = content.getElementsByTagName( "table" )[ 0 ];
|
||||||
|
table.appendChild( row );
|
||||||
|
|
||||||
|
return input;
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.createInputSelect = function( container, title, keyValues )
|
||||||
|
{
|
||||||
|
var row = document.createElement( "tr" );
|
||||||
|
//row.className = "netgis-hover-light";
|
||||||
|
|
||||||
|
var head = document.createElement( "th" );
|
||||||
|
head.className = "netgis-padding";
|
||||||
|
|
||||||
|
var label = document.createElement( "label" );
|
||||||
|
label.innerHTML = title;
|
||||||
|
head.appendChild( label );
|
||||||
|
row.appendChild( head );
|
||||||
|
|
||||||
|
var cell = document.createElement( "td" );
|
||||||
|
cell.className = "netgis-padding";
|
||||||
row.appendChild( cell );
|
row.appendChild( cell );
|
||||||
|
|
||||||
|
var input = document.createElement( "select" );
|
||||||
|
cell.appendChild( input );
|
||||||
|
|
||||||
label.htmlFor = input;
|
label.htmlFor = input;
|
||||||
|
|
||||||
var content = container.getElementsByClassName( "netgis-modal-content" )[ 0 ];
|
var content = container.getElementsByClassName( "netgis-modal-content" )[ 0 ];
|
||||||
@@ -503,6 +615,74 @@ netgis.Modal.prototype.onImportShapefileAccept = function( e )
|
|||||||
this.hide();
|
this.hide();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.onImportSpatialiteShow = function( e )
|
||||||
|
{
|
||||||
|
var input = this.importShapefile.getElementsByTagName( "input" )[ 0 ];
|
||||||
|
var button = this.importShapefile.getElementsByTagName( "button" )[ 1 ];
|
||||||
|
input.value = "";
|
||||||
|
button.disabled = true;
|
||||||
|
|
||||||
|
this.show( this.importSpatialite );
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.onImportSpatialiteChange = function( e )
|
||||||
|
{
|
||||||
|
var input = this.importSpatialite.getElementsByTagName( "input" )[ 0 ];
|
||||||
|
var button = this.importSpatialite.getElementsByTagName( "button" )[ 1 ];
|
||||||
|
|
||||||
|
if ( input.value && input.value.length > 0 )
|
||||||
|
{
|
||||||
|
button.disabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
button.disabled = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.onImportSpatialiteAccept = function( e )
|
||||||
|
{
|
||||||
|
var input = this.importSpatialite.getElementsByTagName( "input" )[ 0 ];
|
||||||
|
var file = input.files[ 0 ];
|
||||||
|
this.client.invoke( netgis.Events.IMPORT_SPATIALITE, file );
|
||||||
|
|
||||||
|
this.hide();
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.onImportGeopackageShow = function( e )
|
||||||
|
{
|
||||||
|
var input = this.importGeopackage.getElementsByTagName( "input" )[ 0 ];
|
||||||
|
var button = this.importGeopackage.getElementsByTagName( "button" )[ 1 ];
|
||||||
|
input.value = "";
|
||||||
|
button.disabled = true;
|
||||||
|
|
||||||
|
this.show( this.importGeopackage );
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.onImportGeopackageChange = function( e )
|
||||||
|
{
|
||||||
|
var input = this.importGeopackage.getElementsByTagName( "input" )[ 0 ];
|
||||||
|
var button = this.importGeopackage.getElementsByTagName( "button" )[ 1 ];
|
||||||
|
|
||||||
|
if ( input.value && input.value.length > 0 )
|
||||||
|
{
|
||||||
|
button.disabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
button.disabled = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.onImportGeopackageAccept = function( e )
|
||||||
|
{
|
||||||
|
var input = this.importGeopackage.getElementsByTagName( "input" )[ 0 ];
|
||||||
|
var file = input.files[ 0 ];
|
||||||
|
this.client.invoke( netgis.Events.IMPORT_GEOPACKAGE, file );
|
||||||
|
|
||||||
|
this.hide();
|
||||||
|
};
|
||||||
|
|
||||||
netgis.Modal.prototype.onExportPDFShow = function( e )
|
netgis.Modal.prototype.onExportPDFShow = function( e )
|
||||||
{
|
{
|
||||||
var inputs = this.exportPDF.getElementsByTagName( "input" );
|
var inputs = this.exportPDF.getElementsByTagName( "input" );
|
||||||
@@ -590,3 +770,235 @@ netgis.Modal.prototype.onExportGIFAccept = function( e )
|
|||||||
|
|
||||||
this.hide();
|
this.hide();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.onAddServiceShow = function( e )
|
||||||
|
{
|
||||||
|
//this.addService.getElementsByTagName( "input" )[ 0 ].value = "";
|
||||||
|
|
||||||
|
this.show( this.addService );
|
||||||
|
|
||||||
|
// Hide Details
|
||||||
|
var rows = this.addService.getElementsByTagName( "tr" );
|
||||||
|
|
||||||
|
for ( var r = 3; r < rows.length; r++ )
|
||||||
|
{
|
||||||
|
rows[ r ].classList.add( "netgis-hide" );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.onAddServiceLoad = function( e )
|
||||||
|
{
|
||||||
|
var inputs = this.addService.getElementsByTagName( "input" );
|
||||||
|
var url = inputs[ 0 ].value;
|
||||||
|
|
||||||
|
// Get Base URL
|
||||||
|
var qmark = url.indexOf( "?" );
|
||||||
|
if ( qmark > -1 ) url = url.substr( 0, qmark );
|
||||||
|
|
||||||
|
var getCaps = url + "?request=GetCapabilities";
|
||||||
|
|
||||||
|
netgis.util.request( getCaps, this.onAddServiceCapsResponse.bind( this ) );
|
||||||
|
|
||||||
|
console.info( "Add Service Load:", url );
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.onAddServiceCapsResponse = function( e )
|
||||||
|
{
|
||||||
|
var parser = new DOMParser();
|
||||||
|
var xml = parser.parseFromString( e, "text/xml" );
|
||||||
|
var caps = xml.documentElement;
|
||||||
|
|
||||||
|
var rows = this.addService.getElementsByTagName( "tr" );
|
||||||
|
var rowTitle = rows[ 5 ];
|
||||||
|
|
||||||
|
var inputs = this.addService.getElementsByTagName( "input" );
|
||||||
|
var inputType = inputs[ 1 ];
|
||||||
|
|
||||||
|
var selects = this.addService.getElementsByTagName( "select" );
|
||||||
|
var selectLayer = selects[ 0 ];
|
||||||
|
var selectFormat = selects[ 1 ];
|
||||||
|
|
||||||
|
for ( var i = selectLayer.options.length - 1; i >= 0; i-- ) selectLayer.options.remove( i );
|
||||||
|
for ( var i = selectFormat.options.length - 1; i >= 0; i-- ) selectFormat.options.remove( i );
|
||||||
|
|
||||||
|
switch ( caps.nodeName )
|
||||||
|
{
|
||||||
|
// WMS
|
||||||
|
case "WMS_Capabilities":
|
||||||
|
{
|
||||||
|
inputType.value = "wms";
|
||||||
|
|
||||||
|
var version = caps.getAttribute( "version" );
|
||||||
|
var service = caps.getElementsByTagName( "Service" )[ 0 ];
|
||||||
|
var title = service.getElementsByTagName( "Title" )[ 0 ].textContent;
|
||||||
|
rowTitle.children[ 1 ].innerHTML = title;
|
||||||
|
|
||||||
|
var layerItems = caps.getElementsByTagName( "Layer" );
|
||||||
|
var layers = [];
|
||||||
|
|
||||||
|
for ( var l = 0; l < layerItems.length; l++ )
|
||||||
|
{
|
||||||
|
var item = layerItems[ l ];
|
||||||
|
var layerName = item.getElementsByTagName( "Name" )[ 0 ].textContent;
|
||||||
|
var layerTitle = item.getElementsByTagName( "Title" )[ 0 ].textContent;
|
||||||
|
|
||||||
|
layers.push( { name: layerName, title: layerTitle } );
|
||||||
|
|
||||||
|
var option = document.createElement( "option" );
|
||||||
|
option.text = layerTitle;
|
||||||
|
option.value = layerName;
|
||||||
|
selectLayer.options.add( option );
|
||||||
|
}
|
||||||
|
|
||||||
|
var getMap = caps.getElementsByTagName( "GetMap" )[ 0 ];
|
||||||
|
var formatItems = getMap.getElementsByTagName( "Format" );
|
||||||
|
var formats = [];
|
||||||
|
|
||||||
|
for ( var f = 0; f < formatItems.length; f++ )
|
||||||
|
{
|
||||||
|
var item = formatItems[ f ];
|
||||||
|
var format = item.textContent;
|
||||||
|
|
||||||
|
formats.push( format );
|
||||||
|
|
||||||
|
var option = document.createElement( "option" );
|
||||||
|
option.text = format;
|
||||||
|
option.value = format;
|
||||||
|
selectFormat.options.add( option );
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// WFS
|
||||||
|
case "WFS_Capabilities":
|
||||||
|
case "wfs:WFS_Capabilities":
|
||||||
|
{
|
||||||
|
inputType.value = "wfs";
|
||||||
|
|
||||||
|
var version = caps.getAttribute( "version" );
|
||||||
|
var service = caps.getElementsByTagName( "ows:ServiceIdentification" )[ 0 ];
|
||||||
|
var title = service.getElementsByTagName( "ows:Title" )[ 0 ].textContent;
|
||||||
|
rowTitle.children[ 1 ].innerHTML = title;
|
||||||
|
|
||||||
|
var featureTypeItems = caps.getElementsByTagName( "FeatureType" );
|
||||||
|
var types = [];
|
||||||
|
|
||||||
|
for ( var l = 0; l < featureTypeItems.length; l++ )
|
||||||
|
{
|
||||||
|
var item = featureTypeItems[ l ];
|
||||||
|
var typeName = item.getElementsByTagName( "Name" )[ 0 ].textContent;
|
||||||
|
var typeTitle = item.getElementsByTagName( "Title" )[ 0 ].textContent;
|
||||||
|
|
||||||
|
types.push( { name: typeName, title: typeTitle } );
|
||||||
|
|
||||||
|
var option = document.createElement( "option" );
|
||||||
|
option.text = typeTitle;
|
||||||
|
option.value = typeName;
|
||||||
|
selectLayer.options.add( option );
|
||||||
|
}
|
||||||
|
|
||||||
|
var operations = caps.getElementsByTagName( "ows:Operation" );
|
||||||
|
var getFeature = null;
|
||||||
|
|
||||||
|
for ( var o = 0; o < operations.length; o++ )
|
||||||
|
{
|
||||||
|
if ( operations[ o ].getAttribute( "name" ) === "GetFeature" )
|
||||||
|
{
|
||||||
|
getFeature = operations[ o ];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( getFeature )
|
||||||
|
{
|
||||||
|
var parameters = getFeature.getElementsByTagName( "ows:Parameter" );
|
||||||
|
|
||||||
|
for ( var p = 0; p < parameters.length; p++ )
|
||||||
|
{
|
||||||
|
var parameter = parameters[ p ];
|
||||||
|
|
||||||
|
if ( parameter.getAttribute( "name" ) === "outputFormat" )
|
||||||
|
{
|
||||||
|
var formatItems = parameter.getElementsByTagName( "ows:Value" );
|
||||||
|
|
||||||
|
for ( var f = 0; f < formatItems.length; f++ )
|
||||||
|
{
|
||||||
|
var item = formatItems[ f ];
|
||||||
|
var format = item.textContent;
|
||||||
|
|
||||||
|
var option = document.createElement( "option" );
|
||||||
|
option.text = format;
|
||||||
|
option.value = format;
|
||||||
|
selectFormat.options.add( option );
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
selectFormat.value = "application/json";
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show Details
|
||||||
|
var rows = this.addService.getElementsByTagName( "tr" );
|
||||||
|
|
||||||
|
for ( var r = 3; r < rows.length; r++ )
|
||||||
|
{
|
||||||
|
rows[ r ].classList.remove( "netgis-hide" );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Modal.prototype.onAddServiceAccept = function( e )
|
||||||
|
{
|
||||||
|
/*var inputs = this.exportPDF.getElementsByTagName( "input" );
|
||||||
|
var resx = Number.parseInt( inputs[ 0 ].value );
|
||||||
|
var resy = Number.parseInt( inputs[ 1 ].value );
|
||||||
|
var margin = Number.parseInt( inputs[ 2 ].value );
|
||||||
|
var mode = inputs[ 3 ].checked;
|
||||||
|
this.client.invoke( netgis.Events.EXPORT_PDF, { resx: resx, resy: resy, mode: mode, margin: margin } );*/
|
||||||
|
|
||||||
|
var inputs = this.addService.getElementsByTagName( "input" );
|
||||||
|
var selects = this.addService.getElementsByTagName( "select" );
|
||||||
|
|
||||||
|
var url = inputs[ 0 ].value;
|
||||||
|
var type = inputs[ 1 ].value;
|
||||||
|
|
||||||
|
var selectLayer = selects[ 0 ];
|
||||||
|
var selectFormat = selects[ 1 ];
|
||||||
|
|
||||||
|
var layerOption = selectLayer.options.item( selectLayer.options.selectedIndex );
|
||||||
|
var formatOption = selectFormat.options.item( selectFormat.options.selectedIndex );
|
||||||
|
|
||||||
|
var id = this.addServiceID++;
|
||||||
|
|
||||||
|
var params =
|
||||||
|
{
|
||||||
|
id: id,
|
||||||
|
url: url,
|
||||||
|
title: layerOption.text,
|
||||||
|
name: layerOption.value,
|
||||||
|
format: formatOption.value
|
||||||
|
};
|
||||||
|
|
||||||
|
switch ( type )
|
||||||
|
{
|
||||||
|
case "wms":
|
||||||
|
{
|
||||||
|
this.client.invoke( netgis.Events.ADD_SERVICE_WMS, params );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case "wfs":
|
||||||
|
{
|
||||||
|
this.client.invoke( netgis.Events.ADD_SERVICE_WFS, params );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.hide();
|
||||||
|
};
|
||||||
@@ -18,20 +18,38 @@ netgis.Toolbar.prototype.load = function()
|
|||||||
|
|
||||||
if ( this.client.editable )
|
if ( this.client.editable )
|
||||||
{
|
{
|
||||||
|
var bufferDefaultRadius = 1000;
|
||||||
|
var bufferDefaultSegments = 3;
|
||||||
|
|
||||||
|
if ( netgis.util.isDefined( config.tools ) )
|
||||||
|
{
|
||||||
|
if ( netgis.util.isDefined( config.tools.buffer.defaultRadius ) ) bufferDefaultRadius = config.tools.buffer.defaultRadius;
|
||||||
|
if ( netgis.util.isDefined( config.tools.buffer.defaultSegments ) ) bufferDefaultSegments = config.tools.buffer.defaultSegments;
|
||||||
|
}
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
this.toolbars[ netgis.Modes.DRAW_POINTS ] = this.createToolbar();
|
this.toolbars[ netgis.Modes.DRAW_POINTS ] = this.createToolbar();
|
||||||
this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Punkte zeichnen:</span>', this.onToolbarClose.bind( this ) ) );
|
this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Punkte zeichnen:</span>', 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( "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):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) );
|
||||||
|
this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) );
|
||||||
this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_POINTS ] );
|
this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_POINTS ] );
|
||||||
|
|
||||||
this.toolbars[ netgis.Modes.DRAW_LINES ] = this.createToolbar();
|
this.toolbars[ netgis.Modes.DRAW_LINES ] = this.createToolbar();
|
||||||
this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Linien zeichnen:</span>', this.onToolbarClose.bind( this ) ) );
|
this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Linien zeichnen:</span>', this.onToolbarClose.bind( this ) ) );
|
||||||
this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) );
|
this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) );
|
||||||
|
this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) );
|
||||||
|
this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) );
|
||||||
|
this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) );
|
||||||
this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_LINES ] );
|
this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_LINES ] );
|
||||||
|
|
||||||
|
this.showDrawBufferOptions( false );
|
||||||
|
|
||||||
this.toolbars[ netgis.Modes.DRAW_POLYGONS ] = this.createToolbar();
|
this.toolbars[ netgis.Modes.DRAW_POLYGONS ] = this.createToolbar();
|
||||||
this.append( this.toolbars[ netgis.Modes.DRAW_POLYGONS ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Polygone zeichnen:</span>', this.onToolbarClose.bind( this ) ) );
|
this.append( this.toolbars[ netgis.Modes.DRAW_POLYGONS ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Polygone zeichnen:</span>', this.onToolbarClose.bind( this ) ) );
|
||||||
this.append( this.toolbars[ netgis.Modes.DRAW_POLYGONS ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) );
|
this.append( this.toolbars[ netgis.Modes.DRAW_POLYGONS ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) );
|
||||||
|
this.append( this.toolbars[ netgis.Modes.DRAW_POLYGONS ], this.createToolbarCheckbox( "Tracing", this.onTracingChange.bind( this ) ) );
|
||||||
this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_POLYGONS ] );
|
this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_POLYGONS ] );
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
@@ -60,17 +78,8 @@ netgis.Toolbar.prototype.load = function()
|
|||||||
//var wrapper = document.createElement( "div" );
|
//var wrapper = document.createElement( "div" );
|
||||||
//this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ].appendChild( wrapper );
|
//this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ].appendChild( wrapper );
|
||||||
|
|
||||||
var bufferDefaultRadius = 1000;
|
|
||||||
var bufferDefaultSegments = 3;
|
|
||||||
|
|
||||||
if ( netgis.util.isDefined( config.tools ) )
|
|
||||||
{
|
|
||||||
if ( netgis.util.isDefined( config.tools.buffer.defaultRadius ) ) bufferDefaultRadius = config.tools.buffer.defaultRadius;
|
|
||||||
if ( netgis.util.isDefined( config.tools.buffer.defaultSegments ) ) bufferDefaultSegments = config.tools.buffer.defaultSegments;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Feature puffern:</span>', this.onBufferCancel.bind( this ) ) );
|
this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Feature puffern:</span>', this.onBufferCancel.bind( this ) ) );
|
||||||
this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarInput( "Radius in Meter:", bufferDefaultRadius, this.onBufferChange.bind( this ) ) );
|
this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onBufferChange.bind( this ) ) );
|
||||||
this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onBufferChange.bind( this ) ) );
|
this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onBufferChange.bind( this ) ) );
|
||||||
this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarButton( '<i class="fas fa-check"></i><span>OK</span>', this.onBufferAccept.bind( this ) ) );
|
this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarButton( '<i class="fas fa-check"></i><span>OK</span>', this.onBufferAccept.bind( this ) ) );
|
||||||
|
|
||||||
@@ -252,6 +261,19 @@ netgis.Toolbar.prototype.onSetMode = function( e )
|
|||||||
this.updateBuffer();
|
this.updateBuffer();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case netgis.Modes.DRAW_POINTS:
|
||||||
|
case netgis.Modes.DRAW_LINES:
|
||||||
|
{
|
||||||
|
var checkbox = this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 1 ];
|
||||||
|
|
||||||
|
if ( checkbox.checked )
|
||||||
|
{
|
||||||
|
this.client.invoke( netgis.Events.DRAW_BUFFER_ON, null );
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -445,3 +467,82 @@ netgis.Toolbar.prototype.onSnapChange = function( e )
|
|||||||
|
|
||||||
this.client.invoke( on ? netgis.Events.SNAP_ON : netgis.Events.SNAP_OFF, null );
|
this.client.invoke( on ? netgis.Events.SNAP_ON : netgis.Events.SNAP_OFF, null );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
netgis.Toolbar.prototype.onTracingChange = function( e )
|
||||||
|
{
|
||||||
|
var input = e.target;
|
||||||
|
var on = input.checked;
|
||||||
|
|
||||||
|
var snapInput = this.toolbars[ netgis.Modes.DRAW_POLYGONS ].getElementsByTagName( "input" )[ 0 ];
|
||||||
|
var snap = snapInput.checked;
|
||||||
|
|
||||||
|
if ( on && !snap )
|
||||||
|
{
|
||||||
|
snapInput.checked = on;
|
||||||
|
this.client.invoke( netgis.Events.SNAP_ON, null );
|
||||||
|
}
|
||||||
|
|
||||||
|
this.client.invoke( on ? netgis.Events.TRACING_ON : netgis.Events.TRACING_OFF, null );
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Toolbar.prototype.onDrawBufferChange = function( e )
|
||||||
|
{
|
||||||
|
var input = e.target;
|
||||||
|
var on = input.checked;
|
||||||
|
|
||||||
|
this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 1 ].checked = on;
|
||||||
|
this.toolbars[ netgis.Modes.DRAW_LINES ].getElementsByTagName( "input" )[ 1 ].checked = on;
|
||||||
|
|
||||||
|
this.client.invoke( on ? netgis.Events.DRAW_BUFFER_ON : netgis.Events.DRAW_BUFFER_OFF, null );
|
||||||
|
|
||||||
|
this.showDrawBufferOptions( on );
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Toolbar.prototype.onDrawBufferRadiusChange = function( e )
|
||||||
|
{
|
||||||
|
var input = e.target;
|
||||||
|
var radius = Number.parseFloat( input.value );
|
||||||
|
|
||||||
|
this.client.invoke( netgis.Events.DRAW_BUFFER_RADIUS_CHANGE, radius );
|
||||||
|
|
||||||
|
var pointsInput = this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 2 ];
|
||||||
|
if ( input !== pointsInput ) pointsInput.value = radius;
|
||||||
|
|
||||||
|
var linesInput = this.toolbars[ netgis.Modes.DRAW_LINES ].getElementsByTagName( "input" )[ 2 ];
|
||||||
|
if ( input !== linesInput ) linesInput.value = radius;
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Toolbar.prototype.onDrawBufferSegmentsChange = function( e )
|
||||||
|
{
|
||||||
|
var input = e.target;
|
||||||
|
var segs = Number.parseInt( input.value );
|
||||||
|
|
||||||
|
this.client.invoke( netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE, segs );
|
||||||
|
|
||||||
|
var pointsInput = this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 3 ];
|
||||||
|
if ( input !== pointsInput ) pointsInput.value = segs;
|
||||||
|
|
||||||
|
var linesInput = this.toolbars[ netgis.Modes.DRAW_LINES ].getElementsByTagName( "input" )[ 3 ];
|
||||||
|
if ( input !== linesInput ) linesInput.value = segs;
|
||||||
|
};
|
||||||
|
|
||||||
|
netgis.Toolbar.prototype.showDrawBufferOptions = function( on )
|
||||||
|
{
|
||||||
|
var pointsItems = this.toolbars[ netgis.Modes.DRAW_POINTS ].children[ 0 ].children;
|
||||||
|
var linesItems = this.toolbars[ netgis.Modes.DRAW_LINES ].children[ 0 ].children;
|
||||||
|
|
||||||
|
if ( on )
|
||||||
|
{
|
||||||
|
pointsItems[ 3 ].classList.remove( "netgis-hide" );
|
||||||
|
pointsItems[ 4 ].classList.remove( "netgis-hide" );
|
||||||
|
linesItems[ 3 ].classList.remove( "netgis-hide" );
|
||||||
|
linesItems[ 4 ].classList.remove( "netgis-hide" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pointsItems[ 3 ].classList.add( "netgis-hide" );
|
||||||
|
pointsItems[ 4 ].classList.add( "netgis-hide" );
|
||||||
|
linesItems[ 3 ].classList.add( "netgis-hide" );
|
||||||
|
linesItems[ 4 ].classList.add( "netgis-hide" );
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -140,6 +140,59 @@ netgis.util =
|
|||||||
return Object.assign( target, other );
|
return Object.assign( target, other );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {String} Formatted Date Time String (German Locale)
|
||||||
|
*/
|
||||||
|
var getTimeStamp = function()
|
||||||
|
{
|
||||||
|
var date = new Date();
|
||||||
|
|
||||||
|
var timestamp = date.getDate() + "." + ( date.getMonth() + 1 ) + "." + date.getFullYear();
|
||||||
|
timestamp += " " + date.getHours() + ":" + date.getMinutes();
|
||||||
|
|
||||||
|
return timestamp;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @param {Number} area Raw Area in Square Meters
|
||||||
|
* @param {Boolean} decimals Output Rounded Decimals
|
||||||
|
* @returns {String} Formatted Area String (Square Meters/Square Kilometers)
|
||||||
|
*/
|
||||||
|
var formatArea = function( area, decimals )
|
||||||
|
{
|
||||||
|
var output;
|
||||||
|
|
||||||
|
// Normal / Large Value
|
||||||
|
var large = ( area > 10000 );
|
||||||
|
|
||||||
|
// Round Value
|
||||||
|
var i = 0;
|
||||||
|
|
||||||
|
if ( large )
|
||||||
|
{
|
||||||
|
if ( decimals )
|
||||||
|
i = Math.round( area / 1000000 * 1000 ) / 1000;
|
||||||
|
else
|
||||||
|
i = Math.round( area / 1000000 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( decimals )
|
||||||
|
i = Math.round( area * 100 ) / 100;
|
||||||
|
else
|
||||||
|
i = Math.round( area );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( i === 0 ) large = false;
|
||||||
|
|
||||||
|
// Build String
|
||||||
|
output = i + ( large ? " qkm" : " qm" );
|
||||||
|
|
||||||
|
//NOTE: HTML Superscript / Unicode (² etc.) not supported in OL Labels
|
||||||
|
|
||||||
|
return output;
|
||||||
|
};
|
||||||
|
|
||||||
// Public Interface
|
// Public Interface
|
||||||
var iface =
|
var iface =
|
||||||
{
|
{
|
||||||
@@ -153,7 +206,9 @@ netgis.util =
|
|||||||
size: size,
|
size: size,
|
||||||
request: request,
|
request: request,
|
||||||
padstr: padstr,
|
padstr: padstr,
|
||||||
merge: merge
|
merge: merge,
|
||||||
|
getTimeStamp: getTimeStamp,
|
||||||
|
formatArea: formatArea
|
||||||
};
|
};
|
||||||
|
|
||||||
return iface;
|
return iface;
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid #b3c5db;background-color:rgba(255,255,255,.4)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-step-marker{width:1px;height:15px;background-color:#000;float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:12px;z-index:11;color:#000;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.ol-scale-text{position:absolute;font-size:14px;text-align:center;bottom:25px;color:#000;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid #000}.ol-unsupported{display:none}.ol-unselectable,.ol-viewport{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:rgba(255,255,255,.4);border-radius:4px;padding:2px}.ol-control:hover{background-color:rgba(255,255,255,.6)}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:rgba(0,60,136,.5);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:focus,.ol-control button:hover{text-decoration:none;background-color:rgba(0,60,136,.7)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:rgba(0,60,136,.7);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:#000;text-shadow:0 0 2px #fff;font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:2px;left:2px;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-overviewmap-box{border:2px dotted rgba(0,60,136,.7)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}
|
|
||||||
/*# sourceMappingURL=ol.css.map */
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"version":3,"sources":["src/ol/ol.css"],"names":[],"mappings":"AAAA,QACE,WAAY,WACZ,cAAe,IACf,OAAQ,MAAM,MAAM,QACpB,iBAAkB,qBAGpB,mBACE,IAAK,IACL,MAAO,IACP,SAAU,SAGZ,eACE,WAAY,kBACZ,cAAe,IACf,OAAQ,IACR,KAAM,IACN,QAAS,IACT,SAAU,SAEZ,qBACE,OAAQ,IAAI,MAAM,KAClB,WAAY,KACZ,MAAO,KACP,UAAW,KACX,WAAY,OACZ,OAAQ,IACR,YAAa,QAAQ,CAAE,MACvB,WAAY,IAAI,KAElB,cACE,SAAU,SACV,OAAQ,IACR,KAAM,IAER,sBACE,MAAO,IACP,OAAQ,KACR,iBAAkB,KAClB,MAAO,MACP,QAAS,GAEX,oBACE,SAAU,SACV,OAAQ,KACR,UAAW,KACX,QAAS,GACT,MAAO,KACP,YAAa,KAAK,EAAE,IAAO,CAAE,EAAE,IAAI,IAAO,CAAE,IAAI,EAAE,IAAO,CAAE,EAAE,KAAK,KAEpE,eACE,SAAU,SACV,UAAW,KACX,WAAY,OACZ,OAAQ,KACR,MAAO,KACP,YAAa,KAAK,EAAE,IAAO,CAAE,EAAE,IAAI,IAAO,CAAE,IAAI,EAAE,IAAO,CAAE,EAAE,KAAK,KAEpE,oBACE,SAAU,SACV,OAAQ,KACR,QAAS,EACT,WAAY,WACZ,OAAQ,IAAI,MAAM,KAGpB,gBACE,QAAS,KAEG,iBAAd,aACE,sBAAuB,KACvB,oBAAqB,KACrB,iBAAkB,KAClB,gBAAiB,KACjB,YAAa,KACb,4BAA6B,YAE/B,oBACE,IAAK,MAEP,eACE,sBAAuB,QACvB,oBAAqB,KACrB,iBAAkB,KAClB,gBAAiB,KACjB,YAAa,KAEf,aACE,OAAQ,iBACR,OAAQ,cACR,OAAQ,SAEV,SACE,OAAQ,KACR,OAAQ,aACR,OAAQ,UACR,OAAQ,KAEV,YACE,SAAU,SACV,iBAAkB,qBAClB,cAAe,IACf,QAAS,IAEX,kBACE,iBAAkB,qBAEpB,SACE,IAAK,KACL,KAAM,KAER,WACE,IAAK,KACL,MAAO,KACP,WAAY,QAAQ,KAAK,MAAM,CAAE,WAAW,GAAG,OAEjD,qBACE,QAAS,EACT,WAAY,OACZ,WAAY,QAAQ,KAAK,MAAM,CAAE,WAAW,GAAG,OAAO,KAExD,gBACE,IAAK,QACL,KAAM,KAER,gBACE,MAAO,KACP,IAAK,KAGP,mBACE,QAAS,MACT,OAAQ,IACR,QAAS,EACT,MAAO,KACP,YAAa,IACb,gBAAiB,KACjB,UAAW,QACX,WAAY,OACZ,OAAQ,QACR,MAAO,QACP,YAAa,KACb,iBAAkB,kBAClB,OAAQ,KACR,cAAe,IAEjB,qCACE,OAAQ,KACR,QAAS,EAEX,uBACE,YAAa,MAEf,YACE,QAAS,MACT,YAAa,IACb,UAAW,MACX,YAAa,UAEf,6BACE,UAAW,MAEb,0BACE,IAAK,MAGP,yBADA,yBAEE,gBAAiB,KACjB,iBAAkB,kBAEpB,qBACE,cAAe,IAAI,IAAI,EAAE,EAE3B,sBACE,cAAe,EAAE,EAAE,IAAI,IAIzB,gBACE,WAAY,MACZ,OAAQ,KACR,MAAO,KACP,UAAW,mBACX,QAAS,KACT,UAAW,YACX,YAAa,OAEf,kBACE,MAAO,kBACP,gBAAiB,KAEnB,mBACE,OAAQ,EACR,QAAS,IAAI,KACb,MAAO,KACP,YAAa,EAAE,EAAE,IAAI,KACrB,UAAW,KAEb,mBACE,QAAS,OACT,WAAY,KAEd,0CACE,QAAS,IAEX,oBACE,WAAY,IACZ,UAAW,QACX,eAAgB,OAElB,uBACE,YAAa,EAEf,gCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,iCACE,OAAQ,EACR,MAAO,EACP,cAAe,IAAI,EAAE,EAEvB,qCACE,WAAY,MACZ,WAAY,MAEd,wCACE,QAAS,KAGX,eACE,IAAK,MACL,KAAM,KACN,OAAQ,MAEV,sBACE,SAAU,SACV,OAAQ,KAGV,yBACE,IAAK,MAGP,gBACE,KAAM,KACN,OAAQ,KAEV,iCACE,OAAQ,EACR,KAAM,EACN,cAAe,EAAE,IAAI,EAAE,EAEzB,oCACA,uBACE,QAAS,MAEX,oCACE,OAAQ,IAAI,MAAM,QAClB,OAAQ,MACR,OAAQ,IACR,MAAO,MAET,0CACE,OAAQ,IACR,KAAM,IACN,SAAU,SAEZ,iDACA,wCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,oBACE,OAAQ,IAAI,OAAO,kBAGrB,0CACE,OAAQ"}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/*! For license information please see ol.js.LICENSE.txt */
|
|
||||||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.ol=n():t.ol=n()}(self,(function(){return function(){var t,n={226:function(t,n){n.read=function(t,n,i,r,e){var o,s,a=8*e-r-1,u=(1<<a)-1,c=u>>1,h=-7,f=i?e-1:0,l=i?-1:1,v=t[n+f];for(f+=l,o=v&(1<<-h)-1,v>>=-h,h+=a;h>0;o=256*o+t[n+f],f+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+t[n+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(v?-1:1);s+=Math.pow(2,r),o-=c}return(v?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,n,i,r,e,o){var s,a,u,c=8*o-e-1,h=(1<<c)-1,f=h>>1,l=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,d=r?1:-1,p=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(a=isNaN(n)?1:0,s=h):(s=Math.floor(Math.log(n)/Math.LN2),n*(u=Math.pow(2,-s))<1&&(s--,u*=2),(n+=s+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(n*u-1)*Math.pow(2,e),s+=f):(a=n*Math.pow(2,f-1)*Math.pow(2,e),s=0));e>=8;t[i+v]=255&a,v+=d,a/=256,e-=8);for(s=s<<e|a,c+=e;c>0;t[i+v]=255&s,v+=d,s/=256,c-=8);t[i+v-d]|=128*p}},875:function(t,n,i){"use strict";function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function e(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}var s=i(692),a=Symbol("max"),u=Symbol("length"),c=Symbol("lengthCalculator"),h=Symbol("allowStale"),f=Symbol("maxAge"),l=Symbol("dispose"),v=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),y=Symbol("updateAgeOnGet"),m=function(){return 1},w=function(){function t(n){if(r(this,t),"number"==typeof n&&(n={max:n}),n||(n={}),n.max&&("number"!=typeof n.max||n.max<0))throw new TypeError("max must be a non-negative number");this[a]=n.max||1/0;var i=n.length||m;if(this[c]="function"!=typeof i?m:i,this[h]=n.stale||!1,n.maxAge&&"number"!=typeof n.maxAge)throw new TypeError("maxAge must be a number");this[f]=n.maxAge||0,this[l]=n.dispose,this[v]=n.noDisposeOnSet||!1,this[y]=n.updateAgeOnGet||!1,this.reset()}return o(t,[{key:"max",get:function(){return this[a]},set:function(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[a]=t||1/0,x(this)}},{key:"allowStale",get:function(){return this[h]},set:function(t){this[h]=!!t}},{key:"maxAge",get:function(){return this[f]},set:function(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[f]=t,x(this)}},{key:"lengthCalculator",get:function(){return this[c]},set:function(t){var n=this;"function"!=typeof t&&(t=m),t!==this[c]&&(this[c]=t,this[u]=0,this[d].forEach((function(t){t.length=n[c](t.value,t.key),n[u]+=t.length}))),x(this)}},{key:"length",get:function(){return this[u]}},{key:"itemCount",get:function(){return this[d].length}},{key:"rforEach",value:function(t,n){n=n||this;for(var i=this[d].tail;null!==i;){var r=i.prev;k(this,t,i,n),i=r}}},{key:"forEach",value:function(t,n){n=n||this;for(var i=this[d].head;null!==i;){var r=i.next;k(this,t,i,n),i=r}}},{key:"keys",value:function(){return this[d].toArray().map((function(t){return t.key}))}},{key:"values",value:function(){return this[d].toArray().map((function(t){return t.value}))}},{key:"reset",value:function(){var t=this;this[l]&&this[d]&&this[d].length&&this[d].forEach((function(n){return t[l](n.key,n.value)})),this[p]=new Map,this[d]=new s,this[u]=0}},{key:"dump",value:function(){var t=this;return this[d].map((function(n){return!g(t,n)&&{k:n.key,v:n.value,e:n.now+(n.maxAge||0)}})).toArray().filter((function(t){return t}))}},{key:"dumpLru",value:function(){return this[d]}},{key:"set",value:function(t,n,i){if((i=i||this[f])&&"number"!=typeof i)throw new TypeError("maxAge must be a number");var r=i?Date.now():0,e=this[c](n,t);if(this[p].has(t)){if(e>this[a])return j(this,this[p].get(t)),!1;var o=this[p].get(t).value;return this[l]&&(this[v]||this[l](t,o.value)),o.now=r,o.maxAge=i,o.value=n,this[u]+=e-o.length,o.length=e,this.get(t),x(this),!0}var s=new S(t,n,e,r,i);return s.length>this[a]?(this[l]&&this[l](t,n),!1):(this[u]+=s.length,this[d].unshift(s),this[p].set(t,this[d].head),x(this),!0)}},{key:"has",value:function(t){if(!this[p].has(t))return!1;var n=this[p].get(t).value;return!g(this,n)}},{key:"get",value:function(t){return b(this,t,!0)}},{key:"peek",value:function(t){return b(this,t,!1)}},{key:"pop",value:function(){var t=this[d].tail;return t?(j(this,t),t.value):null}},{key:"del",value:function(t){j(this,this[p].get(t))}},{key:"load",value:function(t){this.reset();for(var n=Date.now(),i=t.length-1;i>=0;i--){var r=t[i],e=r.e||0;if(0===e)this.set(r.k,r.v);else{var o=e-n;o>0&&this.set(r.k,r.v,o)}}}},{key:"prune",value:function(){var t=this;this[p].forEach((function(n,i){return b(t,i,!1)}))}}]),t}(),b=function(t,n,i){var r=t[p].get(n);if(r){var e=rLine truncated
|
|
||||||
//# sourceMappingURL=ol.js.map
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/*! https://mths.be/punycode v1.3.2 by @mathias */
|
|
||||||
|
|
||||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"ol.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAY,GAAID,IAEhBD,EAAS,GAAIC,IARf,CASGK,MAAM,WACT,sBCVIC,uBCCJL,EAAQM,KAAO,SAAUC,EAAQC,EAAQC,EAAMC,EAAMC,GACnD,IAAIC,EAAGC,EACHC,EAAiB,EAATH,EAAcD,EAAO,EAC7BK,GAAQ,GAAKD,GAAQ,EACrBE,EAAQD,GAAQ,EAChBE,GAAS,EACTC,EAAIT,EAAQE,EAAS,EAAK,EAC1BQ,EAAIV,GAAQ,EAAI,EAChBW,EAAIb,EAAOC,EAASU,GAOxB,IALAA,GAAKC,EAELP,EAAIQ,GAAM,IAAOH,GAAU,EAC3BG,KAAQH,EACRA,GAASH,EACFG,EAAQ,EAAGL,EAAS,IAAJA,EAAWL,EAAOC,EAASU,GAAIA,GAAKC,EAAGF,GAAS,GAKvE,IAHAJ,EAAID,GAAM,IAAOK,GAAU,EAC3BL,KAAQK,EACRA,GAASP,EACFO,EAAQ,EAAGJ,EAAS,IAAJA,EAAWN,EAAOC,EAASU,GAAIA,GAAKC,EAAGF,GAAS,GAEvE,GAAU,IAANL,EACFA,EAAI,EAAII,MACH,IAAIJ,IAAMG,EACf,OAAOF,EAAIQ,IAAsBC,EAAAA,GAAdF,GAAK,EAAI,GAE5BP,GAAQU,KAAKC,IAAI,EAAGd,GACpBE,GAAQI,EAEV,OAAQI,GAAK,EAAI,GAAKP,EAAIU,KAAKC,IAAI,EAAGZ,EAAIF,IAG5CV,EAAQyB,MAAQ,SAAUlB,EAAQmB,EAAOlB,EAAQC,EAAMC,EAAMC,GAC3D,IAAIC,EAAGC,EAAGc,EACNb,EAAiB,EAATH,EAAcD,EAAO,EAC7BK,GAAQ,GAAKD,GAAQ,EACrBE,EAAQD,GAAQ,EAChBa,EAAe,KAATlB,EAAca,KAAKC,IAAI,GAAI,IAAMD,KAAKC,IAAI,GAAI,IAAM,EAC1DN,EAAIT,EAAO,EAAKE,EAAS,EACzBQ,EAAIV,EAAO,GAAK,EAChBW,EAAIM,EAAQ,GAAgB,IAAVA,GAAe,EAAIA,EAAQ,EAAK,EAAI,EAmC1D,IAjCAA,EAAQH,KAAKM,IAAIH,GAEbI,MAAMJ,IAAUA,IAAUJ,EAAAA,GAC5BT,EAAIiB,MAAMJ,GAAS,EAAI,EACvBd,EAAIG,IAEJH,EAAIW,KAAKQ,MAAMR,KAAKS,IAAIN,GAASH,KAAKU,KAClCP,GAASC,EAAIJ,KAAKC,IAAI,GAAIZ,IAAM,IAClCA,IACAe,GAAK,IAGLD,GADEd,EAAII,GAAS,EACNY,EAAKD,EAELC,EAAKL,KAAKC,IAAI,EAAG,EAAIR,IAEpBW,GAAK,IACff,IACAe,GAAK,GAGHf,EAAII,GAASD,GACfF,EAAI,EACJD,EAAIG,GACKH,EAAII,GAAS,GACtBH,GAAMa,EAAQC,EAAK,GAAKJ,KAAKC,IAAI,EAAGd,GACpCE,GAAQI,IAERH,EAAIa,EAAQH,KAAKC,IAAI,EAAGR,EAAQ,GAAKO,KAAKC,IAAI,EAAGd,GACjDE,EAAI,IAIDF,GAAQ,EAAGH,EAAOC,EAASU,GAAS,IAAJL,EAAUK,GAAKC,EAAGN,GAAK,IAAKH,GAAQ,GAI3E,IAFAE,EAAKA,GAAKF,EAAQG,EAClBC,GAAQJ,EACDI,EAAO,EAAGP,EAAOC,EAASU,GAAS,IAAJN,EAAUM,GAAKC,EAAGP,GAAK,IAAKE,GAAQ,GAE1EP,EAAOC,EAASU,EAAIC,IAAU,IAAJC,qZChF5B,IAAMc,EAAUC,EAAQ,KAElBC,EAAMC,OAAO,OACbC,EAASD,OAAO,UAChBE,EAAoBF,OAAO,oBAC3BG,EAAcH,OAAO,cACrBI,EAAUJ,OAAO,UACjBK,EAAUL,OAAO,WACjBM,EAAoBN,OAAO,kBAC3BO,EAAWP,OAAO,WAClBQ,EAAQR,OAAO,SACfS,EAAoBT,OAAO,kBAE3BU,EAAc,kBAAM,GAUpBC,EAAAA,WACJ,WAAaC,GAOX,GAPoB,UACG,iBAAZA,IACTA,EAAU,CAAEC,IAAKD,IAEdA,IACHA,EAAU,IAERA,EAAQC,MAA+B,iBAAhBD,EAAQC,KAAoBD,EAAQC,IAAM,GACnE,MAAM,IAAIC,UAAU,qCAEVC,KAAKhB,GAAOa,EAAQC,KAAO5B,EAAAA,EAAvC,IAEM+B,EAAKJ,EAAQK,QAAUP,EAG7B,GAFAK,KAAKb,GAAoC,mBAAPc,EAAqBN,EAAcM,EACrED,KAAKZ,GAAeS,EAAQM,QAAS,EACjCN,EAAQO,QAAoC,iBAAnBP,EAAQO,OACnC,MAAM,IAAIL,UAAU,2BACtBC,KAAKX,GAAWQ,EAAQO,QAAU,EAClCJ,KAAKV,GAAWO,EAAQQ,QACxBL,KAAKT,GAAqBM,EAAQS,iBAAkB,EACpDN,KAAKN,GAAqBG,EAAQU,iBAAkB,EACpDP,KAAKQ,mCAWP,WACE,OAAOR,KAAKhB,QARd,SAASyB,GACP,GAAkB,iBAAPA,GAAmBA,EAAK,EACjC,MAAM,IAAIV,UAAU,qCAEtBC,KAAKhB,GAAOyB,GAAMvC,EAAAA,EAClBwC,EAAKV,8BASP,WACE,OAAOA,KAAKZ,QAJd,SAAgBuB,GACdX,KAAKZ,KAAiBuB,sBAaxB,WACE,OAAOX,KAAKX,QARd,SAAYuB,GACV,GAAkB,iBAAPA,EACT,MAAM,IAAIb,UAAU,wCAEtBC,KAAKX,GAAWuB,EAChBF,EAAKV,oCAqBP,WAA0B,OAAOA,KAAKb,QAdtC,SAAsB0B,GAAI,WACN,mBAAPA,IACTA,EAAKlB,GAEHkB,IAAOb,KAAKb,KACda,KAAKb,GAAqB0B,EAC1Bb,KAAKd,GAAU,EACfc,KAAKR,GAAUsB,SAAQ,SAAAC,GACrBA,EAAIb,OAAS,EAAKf,GAAmB4B,EAAIzC,MAAOyC,EAAIC,KACpD,EAAK9B,IAAW6B,EAAIb,WAGxBQ,EAAKV,0BAIP,WAAgB,OAAOA,KAAKd,0BAC5B,WAAmB,OAAOc,KAAKR,GAAUU,+BAEzC,SAAUe,EAAIC,GACZA,EAAQA,GAASlB,KACjB,IAAK,IAAImB,EAASnB,KAAKR,GAAU4B,KAAiB,OAAXD,GAAkB,CACvD,IAAME,EAAOF,EAAOE,KACpBC,EAAYtB,KAAMiB,EAAIE,EAAQD,GAC9BC,EAASE,0BAIb,SAASJ,EAAIC,GACXA,EAAQA,GAASlB,KACjB,IAAK,IAAImB,EAASnB,KAAKR,GAAU+B,KAAiB,OAAXJ,GAAkB,CACvD,IAAMK,EAAOL,EAAOK,KACpBF,EAAYtB,KAAMiB,EAAIE,EAAQD,GAC9BC,EAASK,uBAIb,WACE,OAAOxB,KAAKR,GAAUiC,UAAUC,KAAI,SAAAC,GAAC,OAAIA,EAAEX,6BAG7C,WACE,OAAOhB,KAAKR,GAAUiC,UAAUC,KAAI,SAAAC,GAAC,OAAIA,EAAErD,8BAG7C,WAAS,WACH0B,KAAKV,IACLU,KAAKR,IACLQ,KAAKR,GAAUU,QACjBF,KAAKR,GAAUsB,SAAQ,SAAAC,GAAG,OAAI,EAAKzB,GAASyB,EAAIC,IAAKD,EAAIzC,UAG3D0B,KAAKP,GAAS,IAAImC,IAClB5B,KAAKR,GAAY,IAAIV,EACrBkB,KAAKd,GAAU,sBAGjB,WAAQ,WACN,OAAOc,KAAKR,GAAUkC,KAAI,SAAAX,GAAG,OAC3Bc,EAAQ,EAAMd,IAAe,CAC3BY,EAAGZ,EAAIC,IACPc,EAAGf,EAAIzC,MACPd,EAAGuD,EAAIgB,KAAOhB,EAAIX,QAAU,OAC3BqB,UAAUO,QAAO,SAAAC,GAAC,OAAIA,4BAG7B,WACE,OAAOjC,KAAKR,sBAGd,SAAKwB,EAAK1C,EAAO8B,GAGf,IAFAA,EAASA,GAAUJ,KAAKX,KAEQ,iBAAXe,EACnB,MAAM,IAAIL,UAAU,2BAEtB,IAAMgC,EAAM3B,EAAS8B,KAAKH,MAAQ,EAC5BI,EAAMnC,KAAKb,GAAmBb,EAAO0C,GAE3C,GAAIhB,KAAKP,GAAO2C,IAAIpB,GAAM,CACxB,GAAImB,EAAMnC,KAAKhB,GAEb,OADAqD,EAAIrC,KAAMA,KAAKP,GAAO6C,IAAItB,KACnB,EAGT,IACMuB,EADOvC,KAAKP,GAAO6C,IAAItB,GACX1C,MAgBlB,OAZI0B,KAAKV,KACFU,KAAKT,IACRS,KAAKV,GAAS0B,EAAKuB,EAAKjE,QAG5BiE,EAAKR,IAAMA,EACXQ,EAAKnC,OAASA,EACdmC,EAAKjE,MAAQA,EACb0B,KAAKd,IAAWiD,EAAMI,EAAKrC,OAC3BqC,EAAKrC,OAASiC,EACdnC,KAAKsC,IAAItB,GACTN,EAAKV,OACE,EAGT,IAAMe,EAAM,IAAIyB,EAAMxB,EAAK1C,EAAO6D,EAAKJ,EAAK3B,GAG5C,OAAIW,EAAIb,OAASF,KAAKhB,IAChBgB,KAAKV,IACPU,KAAKV,GAAS0B,EAAK1C,IAEd,IAGT0B,KAAKd,IAAW6B,EAAIb,OACpBF,KAAKR,GAAUiD,QAAQ1B,GACvBf,KAAKP,GAAOiD,IAAI1B,EAAKhB,KAAKR,GAAU+B,MACpCb,EAAKV,OACE,sBAGT,SAAKgB,GACH,IAAKhB,KAAKP,GAAO2C,IAAIpBLine truncated
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
BSD 2-Clause License
|
||||||
|
|
||||||
|
Copyright 2005-present, OpenLayers Contributors
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@@ -0,0 +1,345 @@
|
|||||||
|
:root,
|
||||||
|
:host {
|
||||||
|
--ol-background-color: white;
|
||||||
|
--ol-accent-background-color: #F5F5F5;
|
||||||
|
--ol-subtle-background-color: rgba(128, 128, 128, 0.25);
|
||||||
|
--ol-partial-background-color: rgba(255, 255, 255, 0.75);
|
||||||
|
--ol-foreground-color: #333333;
|
||||||
|
--ol-subtle-foreground-color: #666666;
|
||||||
|
--ol-brand-color: #00AAFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-box {
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 2px;
|
||||||
|
border: 1.5px solid var(--ol-background-color);
|
||||||
|
background-color: var(--ol-partial-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-mouse-position {
|
||||||
|
top: 8px;
|
||||||
|
right: 8px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-scale-line {
|
||||||
|
background: var(--ol-partial-background-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
bottom: 8px;
|
||||||
|
left: 8px;
|
||||||
|
padding: 2px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-scale-line-inner {
|
||||||
|
border: 1px solid var(--ol-subtle-foreground-color);
|
||||||
|
border-top: none;
|
||||||
|
color: var(--ol-foreground-color);
|
||||||
|
font-size: 10px;
|
||||||
|
text-align: center;
|
||||||
|
margin: 1px;
|
||||||
|
will-change: contents, width;
|
||||||
|
transition: all 0.25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-scale-bar {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 8px;
|
||||||
|
left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-scale-bar-inner {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-scale-step-marker {
|
||||||
|
width: 1px;
|
||||||
|
height: 15px;
|
||||||
|
background-color: var(--ol-foreground-color);
|
||||||
|
float: right;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-scale-step-text {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -5px;
|
||||||
|
font-size: 10px;
|
||||||
|
z-index: 11;
|
||||||
|
color: var(--ol-foreground-color);
|
||||||
|
text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-scale-text {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
bottom: 25px;
|
||||||
|
color: var(--ol-foreground-color);
|
||||||
|
text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-scale-singlebar {
|
||||||
|
position: relative;
|
||||||
|
height: 10px;
|
||||||
|
z-index: 9;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px solid var(--ol-foreground-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-scale-singlebar-even {
|
||||||
|
background-color: var(--ol-subtle-foreground-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-scale-singlebar-odd {
|
||||||
|
background-color: var(--ol-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-unsupported {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-viewport,
|
||||||
|
.ol-unselectable {
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-viewport canvas {
|
||||||
|
all: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-selectable {
|
||||||
|
-webkit-touch-callout: default;
|
||||||
|
-webkit-user-select: text;
|
||||||
|
-moz-user-select: text;
|
||||||
|
user-select: text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-grabbing {
|
||||||
|
cursor: -webkit-grabbing;
|
||||||
|
cursor: -moz-grabbing;
|
||||||
|
cursor: grabbing;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-grab {
|
||||||
|
cursor: move;
|
||||||
|
cursor: -webkit-grab;
|
||||||
|
cursor: -moz-grab;
|
||||||
|
cursor: grab;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-control {
|
||||||
|
position: absolute;
|
||||||
|
background-color: var(--ol-subtle-background-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-zoom {
|
||||||
|
top: .5em;
|
||||||
|
left: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-rotate {
|
||||||
|
top: .5em;
|
||||||
|
right: .5em;
|
||||||
|
transition: opacity .25s linear, visibility 0s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-rotate.ol-hidden {
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
transition: opacity .25s linear, visibility 0s linear .25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-zoom-extent {
|
||||||
|
top: 4.643em;
|
||||||
|
left: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-full-screen {
|
||||||
|
right: .5em;
|
||||||
|
top: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-control button {
|
||||||
|
display: block;
|
||||||
|
margin: 1px;
|
||||||
|
padding: 0;
|
||||||
|
color: var(--ol-subtle-foreground-color);
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: inherit;
|
||||||
|
text-align: center;
|
||||||
|
height: 1.375em;
|
||||||
|
width: 1.375em;
|
||||||
|
line-height: .4em;
|
||||||
|
background-color: var(--ol-background-color);
|
||||||
|
border: none;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-control button::-moz-focus-inner {
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-zoom-extent button {
|
||||||
|
line-height: 1.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-compass {
|
||||||
|
display: block;
|
||||||
|
font-weight: normal;
|
||||||
|
will-change: transform;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-touch .ol-control button {
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-touch .ol-zoom-extent {
|
||||||
|
top: 5.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-control button:hover,
|
||||||
|
.ol-control button:focus {
|
||||||
|
text-decoration: none;
|
||||||
|
outline: 1px solid var(--ol-subtle-foreground-color);
|
||||||
|
color: var(--ol-foreground-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-zoom .ol-zoom-in {
|
||||||
|
border-radius: 2px 2px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-zoom .ol-zoom-out {
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution {
|
||||||
|
text-align: right;
|
||||||
|
bottom: .5em;
|
||||||
|
right: .5em;
|
||||||
|
max-width: calc(100% - 1.3em);
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row-reverse;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution a {
|
||||||
|
color: var(--ol-subtle-foreground-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 1px .5em;
|
||||||
|
color: var(--ol-foreground-color);
|
||||||
|
text-shadow: 0 0 2px var(--ol-background-color);
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution li {
|
||||||
|
display: inline;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution li:not(:last-child):after {
|
||||||
|
content: " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution img {
|
||||||
|
max-height: 2em;
|
||||||
|
max-width: inherit;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution button {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution.ol-collapsed ul {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution:not(.ol-collapsed) {
|
||||||
|
background: var(--ol-partial-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution.ol-uncollapsible {
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
border-radius: 4px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution.ol-uncollapsible img {
|
||||||
|
margin-top: -.2em;
|
||||||
|
max-height: 1.6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-attribution.ol-uncollapsible button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-zoomslider {
|
||||||
|
top: 4.5em;
|
||||||
|
left: .5em;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-zoomslider button {
|
||||||
|
position: relative;
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-touch .ol-zoomslider {
|
||||||
|
top: 5.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-overviewmap {
|
||||||
|
left: 0.5em;
|
||||||
|
bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-overviewmap.ol-uncollapsible {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
border-radius: 0 4px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-overviewmap .ol-overviewmap-map,
|
||||||
|
.ol-overviewmap button {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-overviewmap .ol-overviewmap-map {
|
||||||
|
border: 1px solid var(--ol-subtle-foreground-color);
|
||||||
|
height: 150px;
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-overviewmap:not(.ol-collapsed) button {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-overviewmap.ol-collapsed .ol-overviewmap-map,
|
||||||
|
.ol-overviewmap.ol-uncollapsible button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-overviewmap:not(.ol-collapsed) {
|
||||||
|
background: var(--ol-subtle-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-overviewmap-box {
|
||||||
|
border: 1.5px dotted var(--ol-subtle-foreground-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ol-overviewmap .ol-overviewmap-box:hover {
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
var ol=function(){"use strict";const t={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class e extends Error{constructor(e){const i=t[e];super(i),this.code=e,this.name="AssertionError",this.message=i}}var i=e;function n(t){t.stopPropagation()}var r=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}},s="propertychange";var o=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function a(t,e,i){let n,r;i=i||l;let s=0,o=t.length,a=!1;for(;s<o;)n=s+(o-s>>1),r=+i(t[n],e),r<0?s=n+1:(o=n,a=!r);return a?s:~s}function l(t,e){return t>e?1:t<e?-1:0}function h(t,e,i){const n=t.length;if(t[0]<=e)return 0;if(e<=t[n-1])return n-1;let r;if(i>0){for(r=1;r<n;++r)if(t[r]<e)return r-1}else if(i<0){for(r=1;r<n;++r)if(t[r]<=e)return r}else for(r=1;r<n;++r){if(t[r]==e)return r;if(t[r]<e)return"function"==typeof i?i(e,t[r-1],t[r])>0?r-1:r:t[r-1]-e<e-t[r]?r-1:r}return n-1}function c(t,e,i){for(;e<i;){const n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function u(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let e=0;e<n;e++)t[t.length]=i[e]}function d(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function g(t,e,i){const n=e||l;return t.every((function(e,r){if(0===r)return!0;const s=n(t[r-1],e);return!(s>0||i&&0===s)}))}function f(){return!0}function p(){return!1}function m(){}function _(t){let e,i,n,r=!1;return function(){const s=Array.prototype.slice.call(arguments);return r&&this===n&&d(s,i)||(r=!0,n=this,i=s,e=t.apply(this,arguments)),e}}function y(t){return function(){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}function x(t){for(const e in t)delete t[e]}function v(t){let e;for(e in t)return!1;retuLine truncated
|
||||||
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||||
|
read:function(t,e,i,n,r){var s,o,a=8*r-n-1,l=(1<<a)-1,h=l>>1,c=-7,u=i?r-1:0,d=i?-1:1,g=t[e+u];for(u+=d,s=g&(1<<-c)-1,g>>=-c,c+=a;c>0;s=256*s+t[e+u],u+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+t[e+u],u+=d,c-=8);if(0===s)s=1-h;else{if(s===l)return o?NaN:1/0*(g?-1:1);o+=Math.pow(2,n),s-=h}return(g?-1:1)*o*Math.pow(2,s-n)},write:function(t,e,i,n,r,s){var o,a,l,h=8*s-r-1,c=(1<<h)-1,u=c>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:s-1,f=n?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(o++,l/=2),o+u>=c?(a=0,o=c):o+u>=1?(a=(e*l-1)*Math.pow(2,r),o+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,r),o=0));r>=8;t[i+g]=255&a,g+=f,a/=256,r-=8);for(o=o<<r|a,h+=r;h>0;t[i+g]=255&o,g+=f,o/=256,h-=8);t[i+g-f]|=128*p}},y_=v_,x_=__;function v_(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}v_.Varint=0,v_.Fixed64=1,v_.Bytes=2,v_.Fixed32=5;var S_=4294967296,w_=1/S_,T_="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function E_(t){return t.type===v_.Bytes?t.readVarint()+t.pos:t.pos+1}function C_(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function R_(t,e,i){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=t;r--)i.buf[r+n]=i.buf[r]}function b_(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function P_(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function I_(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function L_(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function F_(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function M_(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function A_(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function O_(t,e){for(var i=0;i<t.length;i++)e.writeFixed64(t[i])}function N_(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function D_(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function G_(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function k_(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}v_.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,s=this.pos;this.type=7&n,t(r,e,this),this.pos===s&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=D_(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=k_(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=D_(this.buf,this.pos)+D_(this.buf,this.pos+4)*S_;return this.pos+=8,t},readSFixed64:function(){var t=D_(this.buf,this.pos)+k_(this.buf,this.pos+4)*S_;return this.pos+=8,t},readFloat:function(){var t=x_.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=x_.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,n=this.buf;return e=127&(i=n[this.pos++]),i<128?e:(e|=(127&(i=n[this.pos++]))<<7,i<128?e:(e|=(127&(i=n[this.pos++]))<<14,i<128?e:(e|=(127&(i=n[this.pos++]))<<21,i<128?e:function(t,e,i){var n,r,s=i.buf;if(r=s[i.pos++],n=(112&r)>>4,r<128)return C_(t,n,e);if(r=s[i.pos++],n|=(127&r)<<3,r<128)return C_(t,n,e);if(r=s[i.pos++],n|=(127&r)<<10,r<128)return C_(t,n,e);if(r=s[i.pos++],n|=(127&r)<<17,r<128)return C_(t,n,e);if(r=s[i.pos++],n|=(127&r)<<24,r<128)return C_(t,n,e);if(r=s[i.pos++],n|=(1&r)<<31,r<128)return C_(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&T_?function(t,e,i){return T_.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){var n="",r=e;for(;r<i;){var s,o,a,l=t[r],h=null,c=l>239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(h=l):2===c?128==(192&(s=t[r+1]))&&(h=(31&l)<<6|63&s)<=127&&(h=null):3===c?(s=t[r+1],o=t[r+2],128==(192&s)&&128==(192&o)&&((h=(15&l)<<12|(63&s)<<6|63&o)<=2047||h>=55296&&h<=57343)&&(h=null)):4===c&&(s=t[r+1],o=t[r+2],a=t[r+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&((h=(15&l)<<18|(63&s)<<12|(63&o)<<6|63&a)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,c=1):h>65535&&(h-=65536,n+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),n+=String.fromCharCode(h),r+=c}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==v_.Bytes)return t.push(this.readVarint(e));var i=E_(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==v_.Bytes)returLine truncated
|
||||||
|
//# sourceMappingURL=ol.js.map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"ol.js","sources":["../ol/AssertionError.js","../ol/events/Event.js","../ol/ObjectEventType.js","../ol/Disposable.js","../ol/array.js","../ol/functions.js","../ol/obj.js","../ol/events/Target.js","../ol/events/EventType.js","../ol/events.js","../ol/Observable.js","../ol/util.js","../ol/Object.js","../ol/CollectionEventType.js","../ol/Collection.js","../ol/TileState.js","../ol/easing.js","../ol/Tile.js","../ol/has.js","../ol/dom.js","../ol/DataTile.js","../ol/asserts.js","../ol/Feature.js","../ol/transform.js","../ol/extent/Relationship.js","../ol/extent.js","../ol/proj/Units.js","../ol/proj/Projection.js","../ol/proj/epsg3857.js","../ol/proj/epsg4326.js","../ol/proj/projections.js","../ol/proj/transforms.js","../ol/math.js","../ol/string.js","../ol/coordinate.js","../ol/sphere.js","../ol/console.js","../ol/proj.js","../ol/geom/flat/transform.js","../ol/geom/Geometry.js","../ol/geom/SimpleGeometry.js","../ol/geom/flat/closest.js","../ol/geom/flat/deflate.js","../ol/geom/flat/simplify.js","../ol/geom/flat/inflate.js","../ol/geom/flat/area.js","../ol/geom/LinearRing.js","../ol/geom/Point.js","../ol/geom/flat/contains.js","../ol/geom/flat/interiorpoint.js","../ol/geom/flat/segments.js","../ol/geom/flat/intersectsextent.js","../ol/geom/flat/reverse.js","../ol/geom/flat/orient.js","../ol/geom/Polygon.js","../ol/Geolocation.js","../ol/ImageBase.js","../ol/ImageState.js","../ol/Image.js","../ol/ImageCanvas.js","../ol/ImageTile.js","../ol/Kinetic.js","../ol/color.js","../ol/style/IconImageCache.js","../ol/layer/Property.js","../ol/layer/Base.js","../ol/render/EventType.js","../ol/layer/Layer.js","../ol/renderer/Map.js","../ol/render/Event.js","../ol/css.js","../ol/render/canvas.js","../ol/renderer/Composite.js","../ol/layer/Group.js","../ol/MapEvent.js","../ol/MapBrowserEvent.js","../ol/MapBrowserEventType.js","../ol/pointer/EventType.js","../ol/MapBrowserEventHandler.js","../ol/MapEventType.js","../ol/MapProperty.js","../ol/structs/PriorityQueue.js","../ol/TileQueue.js","../ol/ViewHint.js","../ol/ViewProperty.js","../ol/tilegrid/common.js","../ol/centerconstraint.js","../ol/resolutionconstraint.js","../ol/rotationconstraint.js","../ol/View.js","../ol/control/Control.js","../ol/control/Attribution.js","../ol/control/Rotate.js","../ol/control/Zoom.js","../ol/control/defaults.js","../ol/interaction/Property.js","../ol/interaction/Interaction.js","../ol/interaction/DoubleClickZoom.js","../ol/interaction/Pointer.js","../ol/events/condition.js","../ol/interaction/DragPan.js","../ol/interaction/DragRotate.js","../ol/render/Box.js","../ol/interaction/DragBox.js","../ol/interaction/DragZoom.js","../ol/events/KeyCode.js","../ol/interaction/KeyboardPan.js","../ol/interaction/KeyboardZoom.js","../ol/interaction/MouseWheelZoom.js","../ol/interaction/PinchRotate.js","../ol/interaction/PinchZoom.js","../ol/interaction/defaults.js","../ol/size.js","../ol/Map.js","../ol/Overlay.js","../ol/structs/LRUCache.js","../ol/tilecoord.js","../ol/TileCache.js","../ol/TileRange.js","../ol/VectorRenderTile.js","../ol/VectorTile.js","../ol/colorlike.js","../ol/featureloader.js","../ol/net.js","../ol/loadingstrategy.js","../ol/render/VectorContext.js","../ol/render/canvas/Immediate.js","../ol/renderer/vector.js","../ol/render.js","../ol/reproj.js","../ol/reproj/common.js","../ol/reproj/Triangulation.js","../ol/reproj/Tile.js","../ol/source/TileEventType.js","../ol/source/Source.js","../ol/tilegrid/TileGrid.js","../ol/tilegrid.js","../ol/source/Tile.js","../ol/tileurlfunction.js","../ol/source/UrlTile.js","../ol/source/TileImage.js","../ol/source/BingMaps.js","../ol/source/XYZ.js","../ol/source/CartoDB.js","../../node_modules/quickselect/index.js","../../node_modules/rbush/index.js","../ol/structs/RBush.js","../ol/source/VectorEventType.js","../ol/source/Vector.js","../ol/source/Cluster.js","../ol/reproj/DataTile.js","../ol/source/DataTile.js","../ol/source/GeoTIFF.js","../ol/source/Zoomify.js","../ol/format/IIIFInfo.js","../ol/source/IIIF.js","../ol/reproj/Image.js","../ol/source/Image.js","../ol/uri.js","../ol/source/ImageArcGISRest.js","../ol/source/ImageCanvas.js","../ol/source/ImageMapGuide.js","../ol/source/ImageStatic.js","../ol/source/wms.js","../ol/source/ImageWMS.js","../ol/source/OSM.js","../ol/layer/BaseImage.js","../ol/renderer/Layer.js","../ol/renderer/canvas/Layer.js","../ol/renderer/canvas/ImageLayer.js","../ol/layer/Image.js","../ol/layer/TileProperty.js","../ol/layer/BaseTile.js","../ol/renderer/canvas/TileLayer.js","../ol/layer/Tile.js","../ol/source/Raster.js","../ol/source/Stamen.js","../ol/source/TileArcGISRest.js","../ol/source/TileDebug.js","../ol/source/TileJSON.js","../ol/source/TileWMS.js","../ol/source/UTFGrid.js","../ol/source/VectorTile.js","../ol/tilegrid/WMTS.js","../ol/source/WMTS.js","../ol/webgl.js","../ol/xml.js","../ol/webgl/Buffer.js","../ol/webgl/ContextEventType.js","../ol/webgl/PostProcessingPass.js","../ol/vec/mat4.js","../ol/webgl/Helper.js","../ol/webgl/PaletteTexture.js","../ol/webLine truncated
|
||||||
@@ -0,0 +1,218 @@
|
|||||||
|
|
||||||
|
// We are modularizing this manually because the current modularize setting in Emscripten has some issues:
|
||||||
|
// https://github.com/kripken/emscripten/issues/5820
|
||||||
|
// In addition, When you use emcc's modularization, it still expects to export a global object called `Module`,
|
||||||
|
// which is able to be used/called before the WASM is loaded.
|
||||||
|
// The modularization below exports a promise that loads and resolves to the actual sql.js module.
|
||||||
|
// That way, this module can't be used before the WASM is finished loading.
|
||||||
|
|
||||||
|
// We are going to define a function that a user will call to start loading initializing our Sql.js library
|
||||||
|
// However, that function might be called multiple times, and on subsequent calls, we don't actually want it to instantiate a new instance of the Module
|
||||||
|
// Instead, we want to return the previously loaded module
|
||||||
|
|
||||||
|
// TODO: Make this not declare a global if used in the browser
|
||||||
|
var initSqlJsPromise = undefined;
|
||||||
|
|
||||||
|
var initSqlJs = function (moduleConfig) {
|
||||||
|
|
||||||
|
if (initSqlJsPromise){
|
||||||
|
return initSqlJsPromise;
|
||||||
|
}
|
||||||
|
// If we're here, we've never called this function before
|
||||||
|
initSqlJsPromise = new Promise(function (resolveModule, reject) {
|
||||||
|
|
||||||
|
// We are modularizing this manually because the current modularize setting in Emscripten has some issues:
|
||||||
|
// https://github.com/kripken/emscripten/issues/5820
|
||||||
|
|
||||||
|
// The way to affect the loading of emcc compiled modules is to create a variable called `Module` and add
|
||||||
|
// properties to it, like `preRun`, `postRun`, etc
|
||||||
|
// We are using that to get notified when the WASM has finished loading.
|
||||||
|
// Only then will we return our promise
|
||||||
|
|
||||||
|
// If they passed in a moduleConfig object, use that
|
||||||
|
// Otherwise, initialize Module to the empty object
|
||||||
|
var Module = typeof moduleConfig !== 'undefined' ? moduleConfig : {};
|
||||||
|
|
||||||
|
// EMCC only allows for a single onAbort function (not an array of functions)
|
||||||
|
// So if the user defined their own onAbort function, we remember it and call it
|
||||||
|
var originalOnAbortFunction = Module['onAbort'];
|
||||||
|
Module['onAbort'] = function (errorThatCausedAbort) {
|
||||||
|
reject(new Error(errorThatCausedAbort));
|
||||||
|
if (originalOnAbortFunction){
|
||||||
|
originalOnAbortFunction(errorThatCausedAbort);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Module['postRun'] = Module['postRun'] || [];
|
||||||
|
Module['postRun'].push(function () {
|
||||||
|
// When Emscripted calls postRun, this promise resolves with the built Module
|
||||||
|
resolveModule(Module);
|
||||||
|
});
|
||||||
|
|
||||||
|
// There is a section of code in the emcc-generated code below that looks like this:
|
||||||
|
// (Note that this is lowercase `module`)
|
||||||
|
// if (typeof module !== 'undefined') {
|
||||||
|
// module['exports'] = Module;
|
||||||
|
// }
|
||||||
|
// When that runs, it's going to overwrite our own modularization export efforts in shell-post.js!
|
||||||
|
// The only way to tell emcc not to emit it is to pass the MODULARIZE=1 or MODULARIZE_INSTANCE=1 flags,
|
||||||
|
// but that carries with it additional unnecessary baggage/bugs we don't want either.
|
||||||
|
// So, we have three options:
|
||||||
|
// 1) We undefine `module`
|
||||||
|
// 2) We remember what `module['exports']` was at the beginning of this function and we restore it later
|
||||||
|
// 3) We write a script to remove those lines of code as part of the Make process.
|
||||||
|
//
|
||||||
|
// Since those are the only lines of code that care about module, we will undefine it. It's the most straightforward
|
||||||
|
// of the options, and has the side effect of reducing emcc's efforts to modify the module if its output were to change in the future.
|
||||||
|
// That's a nice side effect since we're handling the modularization efforts ourselves
|
||||||
|
module = undefined;
|
||||||
|
|
||||||
|
// The emcc-generated code and shell-post.js code goes below,
|
||||||
|
// meaning that all of it runs inside of this promise. If anything throws an exception, our promise will abort
|
||||||
|
|
||||||
|
var e;e||(e=typeof Module !== 'undefined' ? Module : {});null;
|
||||||
|
e.onRuntimeInitialized=function(){function a(g,m){switch(typeof m){case "boolean":jc(g,m?1:0);break;case "number":kc(g,m);break;case "string":lc(g,m,-1,-1);break;case "object":if(null===m)nb(g);else if(null!=m.length){var n=ba(m);mc(g,n,m.length,-1);ca(n)}else Ba(g,"Wrong API use : tried to return a value of an unknown type ("+m+").",-1);break;default:nb(g)}}function b(g,m){for(var n=[],p=0;p<g;p+=1){var v=k(m+4*p,"i32"),y=nc(v);if(1===y||2===y)v=oc(v);else if(3===y)v=pc(v);else if(4===y){y=v;v=qc(y);
|
||||||
|
y=rc(y);for(var L=new Uint8Array(v),G=0;G<v;G+=1)L[G]=q[y+G];v=L}else v=null;n.push(v)}return n}function c(g,m){this.La=g;this.db=m;this.Ja=1;this.fb=[]}function d(g,m){this.db=m;m=da(g)+1;this.Ya=ea(m);if(null===this.Ya)throw Error("Unable to allocate memory for the SQL string");r(g,t,this.Ya,m);this.eb=this.Ya;this.Ua=this.ib=null}function f(g){this.filename="dbfile_"+(4294967295*Math.random()>>>0);if(null!=g){var m=this.filename,n="/",p=m;n&&(n="string"==typeof n?n:fa(n),p=m?z(n+"/"+m):n);m=ha(!0,
|
||||||
|
!0);p=ia(p,(void 0!==m?m:438)&4095|32768,0);if(g){if("string"==typeof g){n=Array(g.length);for(var v=0,y=g.length;v<y;++v)n[v]=g.charCodeAt(v);g=n}ja(p,m|146);n=ka(p,577);la(n,g,0,g.length,0);ma(n);ja(p,m)}}this.handleError(u(this.filename,h));this.db=k(h,"i32");sc(this.db);this.Za={};this.Na={}}var h=B(4),l=e.cwrap,u=l("sqlite3_open","number",["string","number"]),x=l("sqlite3_close_v2","number",["number"]),w=l("sqlite3_exec","number",["number","string","number","number","number"]),A=l("sqlite3_changes",
|
||||||
|
"number",["number"]),T=l("sqlite3_prepare_v2","number",["number","string","number","number","number"]),qb=l("sqlite3_sql","string",["number"]),tc=l("sqlite3_normalized_sql","string",["number"]),rb=l("sqlite3_prepare_v2","number",["number","number","number","number","number"]),uc=l("sqlite3_bind_text","number",["number","number","number","number","number"]),sb=l("sqlite3_bind_blob","number",["number","number","number","number","number"]),vc=l("sqlite3_bind_double","number",["number","number","number"]),
|
||||||
|
wc=l("sqlite3_bind_int","number",["number","number","number"]),xc=l("sqlite3_bind_parameter_index","number",["number","string"]),yc=l("sqlite3_step","number",["number"]),zc=l("sqlite3_errmsg","string",["number"]),Ac=l("sqlite3_column_count","number",["number"]),Bc=l("sqlite3_data_count","number",["number"]),Cc=l("sqlite3_column_double","number",["number","number"]),tb=l("sqlite3_column_text","string",["number","number"]),Dc=l("sqlite3_column_blob","number",["number","number"]),Ec=l("sqlite3_column_bytes",
|
||||||
|
"number",["number","number"]),Fc=l("sqlite3_column_type","number",["number","number"]),Gc=l("sqlite3_column_name","string",["number","number"]),Hc=l("sqlite3_reset","number",["number"]),Ic=l("sqlite3_clear_bindings","number",["number"]),Jc=l("sqlite3_finalize","number",["number"]),ub=l("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),nc=l("sqlite3_value_type","number",["number"]),qc=l("sqlite3_value_bytes","number",["number"]),pc=l("sqlite3_value_text",
|
||||||
|
"string",["number"]),rc=l("sqlite3_value_blob","number",["number"]),oc=l("sqlite3_value_double","number",["number"]),kc=l("sqlite3_result_double","",["number","number"]),nb=l("sqlite3_result_null","",["number"]),lc=l("sqlite3_result_text","",["number","string","number","number"]),mc=l("sqlite3_result_blob","",["number","number","number","number"]),jc=l("sqlite3_result_int","",["number","number"]),Ba=l("sqlite3_result_error","",["number","string","number"]),vb=l("sqlite3_aggregate_context","number",
|
||||||
|
["number","number"]),sc=l("RegisterExtensionFunctions","number",["number"]);c.prototype.bind=function(g){if(!this.La)throw"Statement closed";this.reset();return Array.isArray(g)?this.xb(g):null!=g&&"object"===typeof g?this.yb(g):!0};c.prototype.step=function(){if(!this.La)throw"Statement closed";this.Ja=1;var g=yc(this.La);switch(g){case 100:return!0;case 101:return!1;default:throw this.db.handleError(g);}};c.prototype.sb=function(g){null==g&&(g=this.Ja,this.Ja+=1);return Cc(this.La,g)};c.prototype.Cb=
|
||||||
|
function(g){null==g&&(g=this.Ja,this.Ja+=1);g=tb(this.La,g);if("function"!==typeof BigInt)throw Error("BigInt is not supported");return BigInt(g)};c.prototype.Db=function(g){null==g&&(g=this.Ja,this.Ja+=1);return tb(this.La,g)};c.prototype.getBlob=function(g){null==g&&(g=this.Ja,this.Ja+=1);var m=Ec(this.La,g);g=Dc(this.La,g);for(var n=new Uint8Array(m),p=0;p<m;p+=1)n[p]=q[g+p];return n};c.prototype.get=function(g,m){m=m||{};null!=g&&this.bind(g)&&this.step();g=[];for(var n=Bc(this.La),p=0;p<n;p+=
|
||||||
|
1)switch(Fc(this.La,p)){case 1:var v=m.useBigInt?this.Cb(p):this.sb(p);g.push(v);break;case 2:g.push(this.sb(p));break;case 3:g.push(this.Db(p));break;case 4:g.push(this.getBlob(p));break;default:g.push(null)}return g};c.prototype.getColumnNames=function(){for(var g=[],m=Ac(this.La),n=0;n<m;n+=1)g.push(Gc(this.La,n));return g};c.prototype.getAsObject=function(g,m){g=this.get(g,m);m=this.getColumnNames();for(var n={},p=0;p<m.length;p+=1)n[m[p]]=g[p];return n};c.prototype.getSQL=function(){return qb(this.La)};
|
||||||
|
c.prototype.getNormalizedSQL=function(){return tc(this.La)};c.prototype.run=function(g){null!=g&&this.bind(g);this.step();return this.reset()};c.prototype.nb=function(g,m){null==m&&(m=this.Ja,this.Ja+=1);g=na(g);var n=ba(g);this.fb.push(n);this.db.handleError(uc(this.La,m,n,g.length-1,0))};c.prototype.wb=function(g,m){null==m&&(m=this.Ja,this.Ja+=1);var n=ba(g);this.fb.push(n);this.db.handleError(sb(this.La,m,n,g.length,0))};c.prototype.mb=function(g,m){null==m&&(m=this.Ja,this.Ja+=1);this.db.handleError((g===
|
||||||
|
(g|0)?wc:vc)(this.La,m,g))};c.prototype.zb=function(g){null==g&&(g=this.Ja,this.Ja+=1);sb(this.La,g,0,0,0)};c.prototype.ob=function(g,m){null==m&&(m=this.Ja,this.Ja+=1);switch(typeof g){case "string":this.nb(g,m);return;case "number":this.mb(g,m);return;case "bigint":this.nb(g.toString(),m);return;case "boolean":this.mb(g+0,m);return;case "object":if(null===g){this.zb(m);return}if(null!=g.length){this.wb(g,m);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+g+").";};c.prototype.yb=
|
||||||
|
function(g){var m=this;Object.keys(g).forEach(function(n){var p=xc(m.La,n);0!==p&&m.ob(g[n],p)});return!0};c.prototype.xb=function(g){for(var m=0;m<g.length;m+=1)this.ob(g[m],m+1);return!0};c.prototype.reset=function(){this.freemem();return 0===Ic(this.La)&&0===Hc(this.La)};c.prototype.freemem=function(){for(var g;void 0!==(g=this.fb.pop());)ca(g)};c.prototype.free=function(){this.freemem();var g=0===Jc(this.La);delete this.db.Za[this.La];this.La=0;return g};d.prototype.next=function(){if(null===
|
||||||
|
this.Ya)return{done:!0};null!==this.Ua&&(this.Ua.free(),this.Ua=null);if(!this.db.db)throw this.gb(),Error("Database closed");var g=oa(),m=B(4);pa(h);pa(m);try{this.db.handleError(rb(this.db.db,this.eb,-1,h,m));this.eb=k(m,"i32");var n=k(h,"i32");if(0===n)return this.gb(),{done:!0};this.Ua=new c(n,this.db);this.db.Za[n]=this.Ua;return{value:this.Ua,done:!1}}catch(p){throw this.ib=C(this.eb),this.gb(),p;}finally{qa(g)}};d.prototype.gb=function(){ca(this.Ya);this.Ya=null};d.prototype.getRemainingSQL=
|
||||||
|
function(){return null!==this.ib?this.ib:C(this.eb)};"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator&&(d.prototype[Symbol.iterator]=function(){return this});f.prototype.run=function(g,m){if(!this.db)throw"Database closed";if(m){g=this.prepare(g,m);try{g.step()}finally{g.free()}}else this.handleError(w(this.db,g,0,0,h));return this};f.prototype.exec=function(g,m,n){if(!this.db)throw"Database closed";var p=oa(),v=null;try{var y=da(g)+1,L=B(y);r(g,q,L,y);var G=L;var I=B(4);for(g=[];0!==
|
||||||
|
k(G,"i8");){pa(h);pa(I);this.handleError(rb(this.db,G,-1,h,I));var J=k(h,"i32");G=k(I,"i32");if(0!==J){y=null;v=new c(J,this);for(null!=m&&v.bind(m);v.step();)null===y&&(y={columns:v.getColumnNames(),values:[]},g.push(y)),y.values.push(v.get(null,n));v.free()}}return g}catch(ra){throw v&&v.free(),ra;}finally{qa(p)}};f.prototype.each=function(g,m,n,p,v){"function"===typeof m&&(p=n,n=m,m=void 0);g=this.prepare(g,m);try{for(;g.step();)n(g.getAsObject(null,v))}finally{g.free()}if("function"===typeof p)return p()};
|
||||||
|
f.prototype.prepare=function(g,m){pa(h);this.handleError(T(this.db,g,-1,h,0));g=k(h,"i32");if(0===g)throw"Nothing to prepare";var n=new c(g,this);null!=m&&n.bind(m);return this.Za[g]=n};f.prototype.iterateStatements=function(g){return new d(g,this)};f.prototype["export"]=function(){Object.values(this.Za).forEach(function(m){m.free()});Object.values(this.Na).forEach(sa);this.Na={};this.handleError(x(this.db));var g=ta(this.filename);this.handleError(u(this.filename,h));this.db=k(h,"i32");return g};
|
||||||
|
f.prototype.close=function(){null!==this.db&&(Object.values(this.Za).forEach(function(g){g.free()}),Object.values(this.Na).forEach(sa),this.Na={},this.handleError(x(this.db)),ua("/"+this.filename),this.db=null)};f.prototype.handleError=function(g){if(0===g)return null;g=zc(this.db);throw Error(g);};f.prototype.getRowsModified=function(){return A(this.db)};f.prototype.create_function=function(g,m){Object.prototype.hasOwnProperty.call(this.Na,g)&&(sa(this.Na[g]),delete this.Na[g]);var n=va(function(p,
|
||||||
|
v,y){v=b(v,y);try{var L=m.apply(null,v)}catch(G){Ba(p,G,-1);return}a(p,L)});this.Na[g]=n;this.handleError(ub(this.db,g,m.length,1,0,n,0,0,0));return this};f.prototype.create_aggregate=function(g,m){var n=m.init||function(){return null},p=m.finalize||function(I){return I},v=m.step;if(!v)throw"An aggregate function must have a step function in "+g;var y={};Object.hasOwnProperty.call(this.Na,g)&&(sa(this.Na[g]),delete this.Na[g]);m=g+"__finalize";Object.hasOwnProperty.call(this.Na,m)&&(sa(this.Na[m]),
|
||||||
|
delete this.Na[m]);var L=va(function(I,J,ra){var aa=vb(I,1);Object.hasOwnProperty.call(y,aa)||(y[aa]=n());J=b(J,ra);J=[y[aa]].concat(J);try{y[aa]=v.apply(null,J)}catch(Lc){delete y[aa],Ba(I,Lc,-1)}}),G=va(function(I){var J=vb(I,1);try{var ra=p(y[J])}catch(aa){delete y[J];Ba(I,aa,-1);return}a(I,ra);delete y[J]});this.Na[g]=L;this.Na[m]=G;this.handleError(ub(this.db,g,v.length-1,1,0,0,L,G,0));return this};e.Database=f};
|
||||||
|
var wa=Object.assign({},e),xa="./this.program",ya="object"==typeof window,za="function"==typeof importScripts,Aa="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,D="",Ca,Da,Ea,fs,Fa,Ga;
|
||||||
|
if(Aa)D=za?require("path").dirname(D)+"/":__dirname+"/",Ga=()=>{Fa||(fs=require("fs"),Fa=require("path"))},Ca=function(a,b){var c=Ha(a);if(c)return b?c:c.toString();Ga();a=Fa.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")},Ea=a=>{a=Ca(a,!0);a.buffer||(a=new Uint8Array(a));return a},Da=(a,b,c)=>{var d=Ha(a);d&&b(d);Ga();a=Fa.normalize(a);fs.readFile(a,function(f,h){f?c(f):b(h.buffer)})},1<process.argv.length&&(xa=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),"undefined"!=typeof module&&
|
||||||
|
(module.exports=e),e.inspect=function(){return"[Emscripten Module object]"};else if(ya||za)za?D=self.location.href:"undefined"!=typeof document&&document.currentScript&&(D=document.currentScript.src),D=0!==D.indexOf("blob:")?D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Ca=a=>{try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText}catch(f){if(a=Ha(a)){b=[];for(var c=0;c<a.length;c++){var d=a[c];255<d&&(Ia&&E("Character code "+d+" ("+String.fromCharCode(d)+") at offset "+
|
||||||
|
c+" not in 0x00-0xFF."),d&=255);b.push(String.fromCharCode(d))}return b.join("")}throw f;}},za&&(Ea=a=>{try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}catch(c){if(a=Ha(a))return a;throw c;}}),Da=(a,b,c)=>{var d=new XMLHttpRequest;d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=()=>{if(200==d.status||0==d.status&&d.response)b(d.response);else{var f=Ha(a);f?b(f.buffer):c()}};d.onerror=c;d.send(null)};
|
||||||
|
var Ja=e.print||console.log.bind(console),Ka=e.printErr||console.warn.bind(console);Object.assign(e,wa);wa=null;e.thisProgram&&(xa=e.thisProgram);var La;e.wasmBinary&&(La=e.wasmBinary);var noExitRuntime=e.noExitRuntime||!0;function Ma(){this.buffer=new ArrayBuffer(Na/65536*65536)}function Oa(){this.exports=(
|
||||||
|
// EMSCRIPTEN_START_ASM
|
||||||
|
function instantiate(Oa){function e(f){f.grow=function(b){var a=this.length;this.length=this.length+b;return a};f.set=function(c,d){this[c]=d};f.get=function(c){return this[c]};return f}var g;var h=new Uint8Array(123);for(var c=25;c>=0;--c){h[48+c]=52+c;h[65+c]=c;h[97+c]=26+c}h[43]=62;h[47]=63;function n(o,p,q){var i,j,c=0,k=p,l=q.length,m=p+(l*3>>2)-(q[l-2]=="=")-(q[l-1]=="=");for(;c<l;c+=4){i=h[q.charCodeAt(c+1)];j=h[q.charCodeAt(c+2)];o[k++]=h[q.charCodeAt(c)]<<2|i>>4;if(k<m)o[k++]=i<<4|j>>2;if(k<m)o[k++]=j<<6|h[q.charCodeAt(c+3)]}}function r(s){n(g,1024,"My4zOS4zAHt9ACVzLiV6AGFmZmluaXR5AFJlYWxBZmZpbml0eQBidXN5AHRlbXBfc3RvcmVfZGlyZWN0b3J5AG5vdCBhIHdyaXRhYmxlIGRpcmVjdG9yeQBvcGVuRGlyZWN0b3J5AHNocmlua19tZW1vcnkAb3V0IG9mIG1lbW9yeQBmYWlsZWQgdG8gYWxsb2NhdGUgJXUgYnl0ZXMgb2YgbWVtb3J5AEhBVklORyBjbGF1c2Ugb24gYSBub24tYWdncmVnYXRlIHF1ZXJ5AEludENvcHkAU0NvcHkAVkRlc3Ryb3kATXVsdGlwbHkAcXVlcnlfb25seQB1bmxpa2VseQB0YWJsZSAiJXMiIGhhcyBtb3JlIHRoYW4gb25lIHByaW1hcnkga2V5AGZvcmVpZ24ga2V5AGpzb25fZ3JvdXBfYXJyYXkAanNvbl9hcnJheQBqdWxpYW5kYXkAZnRzNGF1eAB1bml4AHNxbGl0ZV9yZW5hbWVfcXVvdGVmaXgAcHJlZml4AExJS0Ugb3IgR0xPQiBwYXR0ZXJuIHRvbyBjb21wbGV4AGhleABjaGFyaW5kZXgAT3BlbkF1dG9pbmRleABhdXRvbWF0aWNfaW5kZXgAYXV0by1pbmRleABvcnBoYW4gaW5kZXgARHJvcEluZGV4AGlkeABSZW9wZW5JZHgAcGN4AG1heABNZW1NYXgAJTAyeAAweAAgRlJPTSAnJXEnLiclcSVzJyBBUyB4AENSRUFURSBUQUJMRSB4AHJ3AHBzb3cAaW1wbGllc19ub25udWxsX3JvdwBub3cAaW50ZWdlciBvdmVyZmxvdwBwYXJzZXIgc3RhY2sgb3ZlcmZsb3cAd2luZG93AHNoYWRvdwBSZXN1bHRSb3cASWZOdWxsUm93AG5ldwBubyBzdWNoIHZpZXcAY2Fubm90IG1vZGlmeSAlcyBiZWNhdXNlIGl0IGlzIGEgdmlldwBDYW5ub3QgYWRkIGEgY29sdW1uIHRvIGEgdmlldwBjYW5ub3QgVVBTRVJUIGEgdmlldwBQcmV2AHN0ZGV2ACAlbGx1ACVjJXUAJS4qejoldQBGcmFnbWVudGF0aW9uIG9mICVkIGJ5dGVzIHJlcG9ydGVkIGFzICVkIG9uIHBhZ2UgJXUATXVsdGlwbGUgdXNlcyBmb3IgYnl0ZSAldSBvZiBwYWdlICV1AHVuYWJsZSB0byB1c2UgZnVuY3Rpb24gJXMgaW4gdGhlIHJlcXVlc3RlZCBjb250ZXh0AFNvcnRlck5leHQAVk5leHQAaW5jb21wbGV0ZSBpbnB1dABidXN5X3RpbWVvdXQAbG9jYWxob3N0AGNhbm5vdCBkcm9wIGNvbHVtbiAiJXMiOiBubyBvdGhlciBjb2x1bW5zIGV4aXN0AHBlcnNpc3QAZm9yZWlnbl9rZXlfbGlzdABpbmRleF9saXN0AGZ1bmN0aW9uX2xpc3QAY29sbGF0aW9uX2xpc3QAZGF0YWJhc2VfbGlzdABtb2R1bGVfbGlzdABQUkFHTUEgdGFibGVfbGlzdABwcmFnbWFfbGlzdABzZXQgbGlzdABWYWx1ZUxpc3QAc3FsaXRlX3JlbmFtZV90ZXN0AFJvd1NldFRlc3QAU2VxdWVuY2VUZXN0AGZhc3QATGFzdABDYXN0AHNxcnQAU29ydGVyU29ydABqc29uX2luc2VydABJZHhJbnNlcnQAU29ydGVySW5zZXJ0AHJlc3RhcnQAY290AEJpdE5vdABJZk5vdABQYWdlY291bnQAZnJlZWxpc3RfY291bnQAbWF4X3BhZ2VfY291bnQAUmVzZXRDb3VudAB3YWxfYXV0b2NoZWNrcG9pbnQAd2FsX2NoZWNrcG9pbnQAQ2hlY2twb2ludABTYXZlcG9pbnQAYSBDSEVDSyBjb25zdHJhaW50ACVzT04gQ09ORkxJQ1QgY2xhdXNlIGRvZXMgbm90IG1hdGNoIGFueSBQUklNQVJZIEtFWSBvciBVTklRVUUgY29uc3RyYWludABDdXJzb3JIaW50AF9jb250ZW50AHBhcmVudABESVNUSU5DVCBhZ2dyZWdhdGVzIG11c3QgaGF2ZSBleGFjdGx5IG9uZSBhcmd1bWVudABjb21tZW50AEFQSSBjYWxsZWQgd2l0aCBmaW5hbGl6ZWQgcHJlcGFyZWQgc3RhdGVtZW50AEFQSSBjYWxsZWQgd2l0aCBOVUxMIHByZXBhcmVkIHN0YXRlbWVudABNYXhQZ2NudABkZWZhdWx0IHZhbHVlIG9mIGNvbHVtbiBbJXNdIGlzIG5vdCBjb25zdGFudABNdXN0QmVJbnQAQ2Fubm90IGFkZCBhIGNvbHVtbiB3aXRoIG5vbi1jb25zdGFudCBkZWZhdWx0AEhhbHQAbGFub2l0AHN0YXRfaW5pdABJbml0AEF1dG9Db21taXQAYW5hbHlzaXNfbGltaXQAc29mdF9oZWFwX2xpbWl0AGhhcmRfaGVhcF9saW1pdABqb3VybmFsX3NpemVfbGltaXQAT2Zmc2V0TGltaXQAU2Vla0hpdABPTiBjbGF1c2UgcmVmZXJlbmNlcyB0YWJsZXMgdG8gaXRzIHJpZ2h0AFNoaWZ0UmlnaHQAaGdodABTaGlmdExlZnQAT2Zmc2V0AHJlc2V0AGpzb25fc2V0AHRvbyBtYW55IGNvbHVtbnMgaW4gcmVzdWx0IHNldAAlciBPUkRFUiBCWSB0ZXJtIGRvZXMgbm90IG1hdGNoIGFueSBjb2x1bW4gaW4gdGhlIHJlc3VsdCBzZXQAc25pcHBldABzdGF0X2dldABzcWxpdGVfY29tcGlsZW9wdGlvbl9nZXQAc3RyaWN0AE5vQ29uZmxpY3QAanNvbl9ncm91cF9vYmplY3QAanNvbl9vYmplY3QAanNvbl9leHRyYWN0AFN1YnRyYWN0AGxzdGF0AGZzdGF0ACVzX3N0YXQAdGJsLGlkeCxzdGF0AHVuc3VwcG9ydGVkIGZpbGUgZm9ybWF0AGdyb3VwX2NvbmNhdABDb25jYXQATHQAR3QAZGVmZXJfZm9yZWlnbl9rZXlzAGFsd2F5cwBwYXJhbWV0ZXJzIGFyZSBub3QgYWxsb3dlZCBpbiB2aWV3cwBzdGF0dXMAc3luY2hyb25vdXMAaW5kZXggJXMgYWxyZWFkeSBleGlzdHMAb3V0cHV0IGZpbGUgYWxyZWFkeSBleGlzdHMAJXMgJVQgYWxyZWFkeSBleGlzdHMAdHJpZ2dlciAlVCBhbHJlYWR5IGV4aXN0cwBOb3RFeGlzdHMAaWdub3JlX2NoZWNrX2NvbnN0cmFpbnRzAENIRUNLIGNvbnN0cmFpbnRzAGV4cHJlc3Npb25zIHByb2hpYml0ZWQgaW4gUFJJTUFSWSBLRVkgYW5kIFVOSVFVRSBjb25zdHJhaW50cwBqc29uX29iamVjdCgpIHJlcXVpcmVzIGFuIGV2ZW4gbnVtYmVyIG9mIGFyZ3VtZW50cwBqc29uXyVzKCkgbmVlZHMgYW4gb2RkIG51bWJlciBvZiBhcmd1bWVudHMAJXNfc2VnbWVudHMAdW5hYmxlIHRvIGRlbGV0ZS9tb2RpZnkgdXNlci1mdW5jdGlvbiBkdWUgdG8gYWN0aXZlIHN0YXRlbWVudHMAdW5hYmxlIHRvIGRlbGV0ZS9tb2RpZnkgY29sbGF0aW9uIHNlcXVlbmNlIGR1ZSB0byBhY3RpdmUgc3RhdGVtZW50cwBvZmZzZXRzAHJldmVyc2VfdW5vcmRlcmVkX3NlbGVjdHMAaWlzc3Nzc3MAaXNzAHNlc3MAdW5jb21wcmVzcwBjYW5ub3Qgb3BlbiBzYXZlcG9pbnQgLSBTUUwgc3RhdGVtZW50cyBpbiBwcm9ncmVzcwBjYW5ub3QgcmVsZWFzZSBzYXZlcG9pbnQgLSBTUUwgc3RhdGVtZW50cyBpbiBwcm9ncmVzcwBjYW5ub3QgY29tbWl0IHRyYW5zYWN0aW9uIC0gU1FMIHN0YXRlbWVudHMgaW4gcHJvZ3Jlc3MAY2Fubm90IFZBQ1VVTSAtIFNRTCBzdGF0ZW1lbnRzIGluIHByb2dyZXNzAGFjY2VzcwBwYXJhbWV0ZXJzAHJlY3Vyc2l2ZV90cmlnZ2VycwB0aGUgSU5ERVhFRCBCWSBjbGF1c2UgaXMgbm90IGFsbG93ZWQgb24gVVBEQVRFIG9yIERFTEVURSBzdGF0ZW1lbnRzIHdpdGhpbiB0cmlnZ2VycwB0aGUgTk9UIElOREVYRUQgY2xhdXNlIGlzIG5vdCBhbGxvd2VkIG9uIFVQREFURSBvciBERUxFVEUgc3RhdGVtZW50cyB3aXRoaW4gdHJpZ2dlcnMAcXVhbGLine truncated
|
||||||
|
// EMSCRIPTEN_START_FUNCS
|
||||||
|
function xx(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,L=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0;j=Ga-336|0;Ga=j;o=H[a+88>>2];t=H[a+104>>2];i=H[a>>2];u=I[i+84|0];cv(a);if(H[i+368>>2]){e=H[i+376>>2];L=e-(K[a+176>>2]%(e>>>0)|0)|0;E=0}else{L=-1;E=-1}a:{b:{c:{d:{if(H[a+36>>2]==7){g=t;break d}H[a+120>>2]=0;H[a+56>>2]=0;H[a+60>>2]=0;H[a+36>>2]=0;H[i+452>>2]=0;if(H[i+296>>2]){e=9;g=t;break c}V=i+488|0;Q=a+212|0;y=a+124|0;$=a+232|0;g=N(H[a+32>>2],20)+t|0;W=j+296|4;aa=j+300|0;ba=j+304|0;e=0;while(1){h=P;b=R+1|0;h=b?h:h+1|0;R=b;P=h;e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{G:{H:{I:{J:{K:{L:{M:{N:{O:{P:{Q:{R:{S:{T:{U:{V:{W:{X:{Y:{Z:{_:{$:{aa:{ba:{ca:{da:{ea:{fa:{ga:{ha:{ia:{ja:{ka:{la:{ma:{na:{oa:{pa:{qa:{ra:{sa:{ta:{ua:{va:{wa:{xa:{ya:{za:{Aa:{Ba:{Ca:{Da:{Ea:{Fa:{Ga:{Ha:{Ia:{Ja:{Ka:{La:{Ma:{Na:{Oa:{Pa:{Qa:{Ra:{Sa:{Ta:{Ua:{Va:{Wa:{Xa:{Ya:{Za:{_a:{$a:{ab:{bb:{cb:{db:{eb:{fb:{gb:{hb:{ib:{jb:{kb:{lb:{mb:{nb:{ob:{pb:{qb:{rb:{sb:{tb:{ub:{vb:{wb:{xb:{yb:{zb:{Ab:{Bb:{Cb:{Db:{Eb:{Fb:{Gb:{Hb:{Ib:{Jb:{Kb:{Lb:{Mb:{Nb:{Ob:{Pb:{Qb:{Rb:{Sb:{Tb:{Ub:{Vb:{Wb:{Xb:{Yb:{Zb:{_b:{$b:{ac:{bc:{cc:{dc:{ec:{fc:{gc:{hc:{ic:{jc:{kc:{lc:{mc:{nc:{oc:{pc:{qc:{rc:{sc:{tc:{uc:{vc:{c=I[g|0];switch(c|0){case 154:break Oa;case 155:break Pa;case 156:break Qa;case 45:break Ra;case 46:break Sa;case 47:break Ta;case 157:break Ua;case 158:break Va;case 48:break Wa;case 159:break Xa;case 49:break Ya;case 160:break Za;case 59:break _a;case 60:break $a;case 161:case 162:break bb;case 164:case 165:break cb;case 3:break db;case 4:break eb;case 5:break fb;case 8:break g;case 61:break gb;case 166:break hb;case 167:break ib;case 168:break jb;case 169:break kb;case 170:break lb;case 171:break mb;case 172:break nb;case 173:break ob;case 174:break pb;case 6:break qb;case 175:break rb;case 62:break sb;case 176:break tb;case 7:break ub;case 177:break vb;case 178:break wb;case 65:case 66:break xb;case 179:break yb;case 180:break zb;case 63:break Ab;case 64:case 181:break Bb;case 68:break Cb;case 94:break Db;case 18:break Eb;case 51:break Fb;case 92:break Gb;case 17:break Hb;case 50:break Ib;case 16:break Jb;case 15:break Kb;case 14:break Lb;case 114:break Mb;case 19:break Nb;case 91:break Ob;case 43:case 44:break Pb;case 13:break Qb;case 90:break Rb;case 58:break Sb;case 52:case 53:case 54:case 55:case 56:case 57:break Tb;case 88:break Ub;case 87:break Vb;case 12:break Wb;case 86:break Xb;case 102:case 103:case 104:case 105:break Yb;case 85:break Zb;case 106:case 107:case 108:case 109:case 110:break _b;case 111:break $b;case 84:break ac;case 83:break bc;case 82:break cc;case 81:break dc;case 80:break ec;case 79:break fc;case 78:break gc;case 77:break hc;case 76:break ic;case 74:case 75:break jc;case 73:break kc;case 117:break lc;case 153:break mc;case 72:break nc;case 71:break oc;case 70:break pc;case 69:break qc;case 11:break rc;case 10:break sc;case 67:break tc;case 9:break uc;case 163:break vc;case 95:break D;case 96:break E;case 97:break F;case 98:break G;case 0:break J;case 1:break K;case 2:break L;case 99:break M;case 100:break N;case 112:case 113:break P;case 101:break Q;case 115:break R;case 116:case 118:break S;case 119:break T;case 120:break U;case 121:break V;case 122:break W;case 20:case 21:case 22:case 23:break Y;case 124:break Z;case 125:break _;case 24:break $;case 26:case 27:case 28:break aa;case 25:break ba;case 29:break ea;case 30:break fa;case 126:break ga;case 127:break ha;case 128:break ia;case 129:break ja;case 130:break ka;case 131:break la;case 132:break ma;case 133:break na;case 134:break oa;case 135:break pa;case 136:break qa;case 31:case 137:break ra;case 32:break sa;case 35:break ta;case 33:case 34:break ua;case 36:break wa;case 37:break xa;case 38:break ya;case 138:break za;case 139:break Aa;case 140:break Ba;case 141:case 142:break Ca;case 143:break Da;case 39:case 40:case 41:case 42:break Ea;case 144:break Fa;case 145:break Ga;case 146:break Ha;case 147:break Ia;case 148:break Ja;case 149:break Ka;case 150:break La;case 151:break Ma;case 152:break Na;default:break e}}d=H[g+16>>2];break ab}b=N(H[g+4>>2],40)+o|0;c=(g-t|0)/20|0;H[b>>2]=c;H[b+4>>2]=c>>31;G[b+16>>1]=4;break g}b=N(H[g+4>>2],40)+o|0;if(!(I[b+16|0]&4)){break e}g=N(H[b>>2],20)+t|0;break e}c=H[g+12>>2];b=N(H[g+4>>2],40)+o|0;G[b+16>>1]=4;c=c-1|0;H[b>>2]=c;H[b+4>>2]=c>>31;if(!H[g+8>>2]){break e}break h}b=N(H[g+4>>2],40)+o|0;G[b+16>>1]=4;c=H[b>>2];d=(g-t|0)/20|0;H[b>>2]=d;H[b+4>>2]=d>>31;g=N(c,20)+t|0;break e}if(!(F[(N(H[g+12>>2],40)+o|0)+16|0]&1)){break e}}c=H[g+4>>2];b=H[Q>>2];if(!(c|!b)){H[a+212>>2]=H[b+4>>2];H[a+220>>2]=H[a+220>>2]-1;Yo(i,H[a+40>>2],H[a+44>>2]);b=bv(b);t=H[a+104>>2];c=t;if(H[g+8>>2]==4){b=H[(N(b,20)+t|0)+8>>2]-1|0}g=N(b,20)+c|0;o=H[a+88>>2];break e}H[a+36>>2]=c;F[a+146|0]=H[g+8>>2];if(c){b=J[g+2>>1];wc:{if(b){H[j+80>>2]=H[(b<<2)+32892>>2];Uc(a,15180,j+80|0);b=H[g+16Line truncated
|
||||||
|
function Pj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,L=0,M=0;r=Ga-1264|0;Ga=r;x=H[a>>2];z=H[x+124>>2];if(!H[x+184>>2]){H[x+296>>2]=0}H[a+232>>2]=b;H[a+12>>2]=0;c=r+48|0;H[c+8>>2]=0;H[c+4>>2]=a;H[c+1208>>2]=c+1196;H[c>>2]=c+8;M=H[x+264>>2];H[x+264>>2]=a;y=-1;while(1){a:{B=Xj(b,r+1260|0);z=z-B|0;if((z|0)<0){H[a+12>>2]=18;H[a+36>>2]=H[a+36>>2]+1;break a}c=H[r+1260>>2];b:{if((c|0)<164){y=c;break b}if(H[x+296>>2]){H[a+12>>2]=9;H[a+36>>2]=H[a+36>>2]+1;break a}if((c|0)==183){b=b+B|0;continue}if(!I[b|0]){B=0;c=0;c:{switch(y|0){default:c=1;break;case 1:break c;case 0:break a}}H[r+1260>>2]=c;y=c;break b}d:{e:{switch(c-164|0){case 1:c=Ga-16|0;Ga=c;H[c+12>>2]=b+4;e=59;if((y|0)==23){e=gl(c+12|0);e=(e|0)==59?165:(e|0)==22?165:59}Ga=c+16|0;c=e;break d;case 2:e=Ga-16|0;Ga=e;H[e+12>>2]=b+6;f:{if((y|0)==23){c=166;if((gl(e+12|0)|0)==22){break f}}c=59}Ga=e+16|0;break d;default:H[r+44>>2]=B;H[r+40>>2]=b;H[r+32>>2]=r+40;Ta(a,28657,r+32|0);break a;case 0:break e}}e=Ga-16|0;Ga=e;H[e+12>>2]=b+6;c=59;if((gl(e+12|0)|0)==59){c=(gl(e+12|0)|0)==24?164:59}Ga=e+16|0}y=c;H[r+1260>>2]=c}H[a+200>>2]=B;H[a+196>>2]=b;c=H[a+200>>2];H[r+24>>2]=H[a+196>>2];H[r+28>>2]=c;t=Ga-32|0;Ga=t;u=r+48|0;f=H[u+4>>2];e=J[H[u>>2]>>1];g:{while(1){c=y&65535;e=e&65535;if(e>>>0<=575){h=J[(e<<1)+36368>>1];h:{i:{while(1){g=c;d=c+h|0;if((c|0)==J[(d<<1)+37520>>1]){break i}c=J[(g<<1)+35568>>1];if(c){continue}break}c=h+101|0;if(!(!(g&65535)|J[(c<<1)+37520>>1]!=101)){e=(c<<1)+42096|0;break h}e=(e<<1)+46304|0;break h}e=(d<<1)+42096|0}e=J[e>>1]}c=e&65535;if(c>>>0>=1243){if(!(I[c+34709|0]|K[u>>2]<K[u+1208>>2])){zt(u);break g}e=H[r+28>>2];H[t>>2]=H[r+24>>2];H[t+4>>2]=e;e=0;g=0;i=0;h=0;n=0;m=Ga-176|0;Ga=m;d=H[u>>2];j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{G:{H:{I:{J:{K:{L:{M:{N:{O:{P:{Q:{R:{S:{T:{U:{V:{W:{X:{Y:{Z:{_:{$:{aa:{ba:{ca:{da:{ea:{fa:{ga:{ha:{ia:{ja:{ka:{la:{ma:{na:{oa:{pa:{qa:{ra:{sa:{ta:{ua:{va:{wa:{xa:{ya:{za:{Aa:{Ba:{Ca:{Da:{Ea:{Fa:{Ga:{Ha:{Ia:{Ja:{Ka:{La:{Ma:{Na:{Oa:{Pa:{Qa:{Ra:{Sa:{Ta:{Ua:{Va:{Wa:{Xa:{Ya:{Za:{_a:{$a:{ab:{bb:{cb:{db:{eb:{fb:{gb:{hb:{ib:{jb:{kb:{lb:{mb:{nb:{ob:{pb:{qb:{rb:{sb:{tb:{ub:{vb:{wb:{xb:{yb:{zb:{Ab:{Bb:{Cb:{Db:{Eb:{Fb:{Gb:{Hb:{Ib:{Jb:{Kb:{Lb:{Mb:{Nb:{Ob:{Pb:{Qb:{Rb:{Sb:{Tb:{Ub:{Vb:{Wb:{Xb:{Yb:{Zb:{_b:{$b:{ac:{bc:{cc:{dc:{ec:{fc:{gc:{hc:{ic:{jc:{kc:{lc:{mc:{nc:{oc:{pc:{qc:{rc:{sc:{tc:{uc:{vc:{wc:{xc:{yc:{zc:{Ac:{Bc:{Cc:{Dc:{Ec:{Fc:{Gc:{Hc:{Ic:{Jc:{Kc:{Lc:{Mc:{Nc:{Oc:{Pc:{Qc:{Rc:{Sc:{Tc:{Uc:{Vc:{Wc:{Xc:{Yc:{Zc:{_c:{$c:{ad:{bd:{cd:{dd:{ed:{fd:{gd:{hd:{id:{jd:{kd:{ld:{md:{nd:{od:{pd:{qd:{rd:{sd:{td:{ud:{vd:{wd:{xd:{yd:{zd:{Ad:{Bd:{Cd:{Dd:{Ed:{Fd:{Gd:{Hd:{Id:{Jd:{Kd:{Ld:{Md:{Nd:{Od:{Pd:{Qd:{Rd:{Sd:{Td:{Ud:{Vd:{Wd:{Xd:{Yd:{Zd:{_d:{$d:{ae:{be:{ce:{de:{ee:{fe:{ge:{he:{ie:{je:{D=c-1243|0;switch(D|0){case 255:break ya;case 254:break za;case 253:break Aa;case 252:break Ba;case 251:break Ca;case 248:break Da;case 247:break Ea;case 246:break Fa;case 243:break Ga;case 242:break Ha;case 239:break Ia;case 238:case 280:break Ja;case 237:break Ka;case 236:case 241:break La;case 234:break Ma;case 233:break Na;case 227:break Oa;case 226:break Pa;case 225:break Qa;case 224:break Ra;case 223:break Sa;case 222:break Ta;case 221:break Ua;case 220:break Va;case 217:break Wa;case 215:case 218:break Xa;case 214:break Ya;case 213:break Za;case 211:case 212:break _a;case 210:break $a;case 209:break ab;case 208:break bb;case 207:break cb;case 206:break db;case 205:break eb;case 204:break fb;case 203:break gb;case 202:break hb;case 195:case 196:case 197:case 198:case 199:case 200:case 201:break ib;case 194:break jb;case 193:break kb;case 192:break lb;case 191:break mb;case 190:break nb;case 189:break ob;case 188:break pb;case 187:break qb;case 186:break rb;case 185:break sb;case 184:break tb;case 182:case 183:break ub;case 181:break vb;case 180:break wb;case 178:case 179:break xb;case 177:break yb;case 176:break zb;case 175:break Ab;case 174:break Bb;case 173:break Cb;case 170:break Db;case 169:break Eb;case 168:break Fb;case 167:break Gb;case 166:break Hb;case 165:break Ib;case 164:break Jb;case 163:break Kb;case 162:break Lb;case 161:break Mb;case 160:break Nb;case 159:break Ob;case 158:break Pb;case 157:break Qb;case 156:break Rb;case 155:break Sb;case 150:break Tb;case 149:break Ub;case 148:break Vb;case 147:break Wb;case 145:case 152:case 154:case 228:case 249:break Xb;case 144:case 146:case 151:case 153:case 229:case 231:case 250:break Yb;case 140:break Zb;case 139:break _b;case 138:case 141:break $b;case 137:break ac;case 136:break bc;case 135:break cc;case 134:break dc;case 133:case 143:break ec;case 131:break fc;case 130:break gc;case 128:break hc;case 127:break ic;case 126:break jc;case 125:break kc;case 124:break lc;case 123:break mc;case 122:break nc;case 121:break oc;case 120:break pc;case 119:break qc;case 118:break rc;case 117:break sc;case 116:break tc;case 114:case 129:break uc;case 113:break vc;case 112:break wc;case 111:break xc;case 110:Line truncated
|
||||||
|
function TJ(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;b=gf(H[c>>2]);c=Wb(H[c+4>>2]);a:{if(H[b+8>>2]){e=(c|0)>0?c:0;while(1)if((d|0)==(e|0)){while(1){if(H[b+16>>2]<=(c|0)){break a}d=c<<2;e=d+H[b+32>>2]|0;H[e>>2]=H[e>>2]+1;H[d+H[b+28>>2]>>2]=1;c=c+1|0;continue}}else{f=H[b+28>>2]+(d<<2)|0;H[f>>2]=H[f>>2]+1;d=d+1|0;continue}}c=0;while(1){if(H[b+16>>2]<=(c|0)){break a}H[H[b+28>>2]+(c<<2)>>2]=1;c=c+1|0;continue}}c=H[b+8>>2]+1|0;H[b+8>>2]=c;d=H[b+12>>2];b:{if(!d){break b}e=I[b+24|0];if(c>>>0<=N(d,e+1|0)>>>0){break b}F[b+24|0]=e+1;Bc(a,H[H[b+32>>2]>>2]!=0)}}function sl(a,b,c,d){var e=0,f=0,g=0,h=0;if(!H[d>>2]){e=H[a+64>>2]+(b<<1)|0;f=I[e|0]<<8|I[e+1|0];if(K[H[a+52>>2]+40>>2]<f+c>>>0){H[d>>2]=Wa(73879);return}g=I[a+9|0];h=H[a+56>>2];c=zo(a,f,c&65535);if(c){H[d>>2]=c;return}c=J[a+24>>1]-1|0;G[a+24>>1]=c;if(!(c&65535)){b=g+h|0;F[b+7|0]=0;F[b+1|0]=0;F[b+2|0]=0;F[b+3|0]=0;F[b+4|0]=0;F[b+5|0]=H[H[a+52>>2]+40>>2]>>>8;F[b+6|0]=H[H[a+52>>2]+40>>2];H[a+20>>2]=(H[H[a+52>>2]+40>>2]-(I[a+9|0]+I[a+10|0]|0)|0)-8;return}pd(e,e+2|0,(c&65535)-b<<1);b=g+h|0;F[b+3|0]=I[a+25|0];F[b+4|0]=I[a+24|0];H[a+20>>2]=H[a+20>>2]+2}}function iz(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ga-16|0;Ga=b;d=Ac(a);H[b>>2]=-1;H[b+12>>2]=0;H[b+4>>2]=b+12;e=Ga-16|0;Ga=e;H[e+12>>2]=b;a:{while(1){if((f|0)==16){break a}if(H[(f<<3)+31424>>2]!=1004){f=f+1|0;continue}break}c=H[e+12>>2];H[e+12>>2]=c+4;g=H[c>>2];H[e+12>>2]=c+8;h=H[d+32>>2];a=H[d+36>>2];c=H[c+4>>2];b:{if((g|0)>0){g=H[(f<<3)+31428>>2]|h}else{if(g){break b}g=(H[(f<<3)+31428>>2]^-1)&h}H[d+32>>2]=g;H[d+36>>2]=a;if((g|0)==(h|0)){break b}qg(d,0)}if(!c){break a}H[c>>2]=(H[d+32>>2]&H[(f<<3)+31428>>2])!=0}Ga=e+16|0;Ga=b+16|0;return H[b+12>>2]}function DJ(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;e=b<<2|1;e=Cb(e,e>>31);if(e){h=(b|0)>0?b:0;b=e;while(1){if((f|0)!=(h|0)){d=Wb(H[(f<<2)+c>>2]);g=Ja;d=!g&d>>>0>1114111|g?65533:d&2097151;a:{if(d>>>0<=127){F[b|0]=d;b=b+1|0;break a}if(d>>>0<=2047){F[b+1|0]=d&63|128;F[b|0]=d>>>6|192;b=b+2|0;break a}if(d>>>0<=65535){F[b+2|0]=d&63|128;F[b|0]=d>>>12|224;F[b+1|0]=d>>>6&63|128;b=b+3|0;break a}F[b+3|0]=d&63|128;F[b|0]=d>>>18|240;F[b+2|0]=d>>>6&63|128;F[b+1|0]=d>>>12&63|128;b=b+4|0}f=f+1|0;continue}break}c=a;a=b-e|0;Vp(c,e,a,a>>31,3);return}cc(a)}function yl(a,b){var c=0,d=0,e=0;a:{switch(I[b|0]){case 1:c=H[a>>2];a=H[b+36>>2];if(a){Zu(c,a);Qa(H[a+40>>2]);Ua(c,a);H[b+36>>2]=0}return;case 0:c=H[b+36>>2];e=H[c+8>>2];if(e){d=H[c+20>>2];Db(e);a=H[d+8>>2];b:{if((c|0)==(a|0)){H[d+8>>2]=H[c+24>>2];break b}while(1){b=H[a+24>>2];if((b|0)==(c|0)){H[a+24>>2]=H[c+24>>2];break b}a=b;if(a){continue}break}}ei(c);pr(d);Qa(H[c+12>>2]);Qa(H[c+16>>2]);if(!(H[d+8>>2]|!(I[d+16|0]&4))){Ag(e)}H[c+8>>2]=0}return;case 2:b=H[b+36>>2];a=H[b>>2];H[a+4>>2]=H[a+4>>2]-1;Ka[H[H[a>>2]+28>>2]](b)|0;break;default:break a}}}function Td(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;if(!a){return rc(b,c)}if(!(b|c)){Qa(a);return 0}a:{if(!c&b>>>0>2147483391|c){break a}f=We(a);e=Ka[H[16012]](b)|0;if((f|0)==(e|0)){return a}if(H[16e3]){bm(5,b);b=e-f|0;b:{if((b|0)<=0){break b}g=H[17502];c=H[17526];d=g>>>0<c-b>>>0;c=H[17527]-(b>>>0>c>>>0)|0;if(d&(c|0)>=0|(c|0)>0){break b}c=H[17528];d=H[17529];if(!c&(d|0)<=0|(d|0)<0){break b}h=c-b|0;b=d-(b>>>0>c>>>0)|0;if((b|0)<=0&g>>>0>=h>>>0|(b|0)<0){break a}}a=Ka[H[16010]](a,e)|0;if(!a){break a}Vj(0,We(a)-f|0);return a}i=Ka[H[16010]](a,e)|0}return i}function WC(a,b,c){var d=0,e=0,f=0,g=0;a:{if(!(I[c+28|0]&8)){break a}f=H[a>>2];if(I[f+24|0]&4){break a}b:{d=H[H[(H[f+16>>2]+(b<<4)|0)+12>>2]+72>>2];if(!(!d|I[d+28|0]&128|I[d+43|0]==1)){if(J[d+34>>1]==2){break b}}H[a+12>>2]=523;H[a+36>>2]=H[a+36>>2]+1;return 0}d=H[a+116>>2];d=d?d:a;e=d+112|0;c:{while(1){e=H[e>>2];if(!e){break c}if(H[e+4>>2]!=(c|0)){continue}break}return H[e+12>>2]}e=Nb(f,16,0);qe(d,46,e);if(I[H[a>>2]+87|0]){break a}H[e>>2]=H[d+112>>2];H[d+112>>2]=e;H[e+8>>2]=b;H[e+4>>2]=c;a=H[d+44>>2];g=a+2|0;H[e+12>>2]=g;H[d+44>>2]=a+4}return g}function sm(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;while(1){if(!(H[c>>2]|!b)){d=H[b+20>>2];if(d){Di(d);if(H[d+40>>2]){h=0;while(1){if(H[d+64>>2]>(h|0)){g=H[(N(h,24)+d|0)+92>>2];if(g){H[g+28>>2]=1;H[g+8>>2]=0;e=H[g+4>>2];i=(e|0)>0?e:0;e=0;while(1){if((e|0)!=(i|0)){f=H[g>>2]+(e<<2)|0;H[H[f>>2]+80>>2]=0;f=H[f>>2];H[f+88>>2]=0;H[f+92>>2]=0;H[f+84>>2]=0;e=e+1|0;continue}break}}h=h+1|0;continue}break}H[c>>2]=Ny(a,0,d)}H[d+48>>2]=0;H[d+16>>2]=0;H[d+20>>2]=0;H[d+8>>2]=0}G[b+32>>1]=0;H[b+24>>2]=0;H[b+28>>2]=0;sm(a,H[b+12>>2],c);b=H[b+16>>2];continue}break}}function rt(a,b,c){var d=0,e=0,f=0,g=0,h=0;g=Ga-16|0;Ga=g;d=H[a+236>>2];a:{if(!d){break a}if(I[a+208|0]==1){Ta(a,4798,0);break a}b:{c:{e=H[d+4>>2];f=G[d+34>>1]-1|0;h=e+N(f,12)|0;d:{if(J[h+8>>1]){break d}if(!c){break c}e:{switch(H[c+4>>2]-6|0){case 0:if(zb(14904,H[c>>2],6)){break d}c=64;break b;case 1:break e;default:break d}}if(!zb(11157,H[c>>2],7)){break c}}H[g>>2]=H[h>>2];Ta(a,28327,g);break a}G[d+36>>1]=J[d+36>>1]-1;c=32}e=e+N(f,12)|0;f=J[e+10>>1];G[e+10>>1]=c|f;H[d+28>>2]=c|H[d+28>>2];if(f&1){Wn(a,h)}_n(a,d,h,b);b=0}$a(H[a>>2],b);Ga=g+16|0}function uK(a,b){a=a|0;b=b|0Line truncated
|
||||||
|
function Ej(a,b){a:{switch((b&255)-10|0){case 0:case 3:F[a+17|0]=6;H[a+44>>2]=b;Rl(a);break;default:break a}}return b}function Cl(a,b){Ka[H[16034]](H[H[a+12>>2]+44>>2],H[a>>2],H[a+24>>2],b);H[a+24>>2]=b;if((J[a+28>>1]&10)==10){Gj(a,3)}}function vp(a){var b=0;b=512;a:{if(I[a+12|0]){break a}if($g(H[a+64>>2])&4096){break a}b=Zv(H[a+64>>2])}H[a+156>>2]=b}function so(a){var b=0,c=0;while(1){b=I[a|0];if(b){a=a+1|0;c=N(I[b+29632|0]+c|0,-1640531535);continue}break}return c}function nc(a){a=a+8|0;while(1){a=H[a>>2];if(!(!a|((I[a+55|0]|I[a+56|0]<<8)&3)==2)){a=a+20|0;continue}break}return a}function ip(a,b){var c=0;while(1){c=kg(a,b);if((c|0)==5){if(Ka[H[a+192>>2]](H[a+196>>2])|0){continue}}break}return c}function dw(a,b,c){var d=0;d=H[a+4>>2];Db(a);a=H[d+52>>2];if(!(a|!b)){a=sb(0,b,0);H[d+56>>2]=c;H[d+52>>2]=a}return a}function Vj(a,b){var c=0,d=0;d=b;b=a<<2;c=b+70008|0;a=d+H[c>>2]|0;H[c>>2]=a;b=b+70048|0;if(a>>>0>K[b>>2]){H[b>>2]=a}}function Uc(a,b,c){var d=0;d=Ga-16|0;Ga=d;Ua(H[a>>2],H[a+124>>2]);H[d+12>>2]=c;H[a+124>>2]=Fh(H[a>>2],b,c);Ga=d+16|0}function Jq(a,b){var c=0,d=0;if(!b){return 0}c=H[a>>2];b=jc(c+1|0,b,b>>31);F[c|0]=1;d=a;a=b+1|0;H[d>>2]=a+c;return a}function Dk(a,b){var c=0;a:{if(!a){break a}c=H[b+4>>2]&3;if(!c){break a}H[a+4>>2]=H[a+4>>2]|c;H[a+36>>2]=H[b+36>>2]}}function DI(a){a=a|0;var b=0,c=0;a:{b=yb(a,8);if(!b){break a}c=H[b>>2];if(!c){break a}Wd(a,c);cd(H[b>>2]);H[b>>2]=0}}function Ce(a,b){var c=0;if(b){while(1){if((c|0)<H[b>>2]){Ua(a,H[((c<<3)+b|0)+8>>2]);c=c+1|0;continue}break}Vb(a,b)}}function yc(a,b){a=H[a+88>>2]+N(H[b+8>>2],40)|0;if(I[a+17|0]&144){Zb(a);G[a+16>>1]=4;return a}G[a+16>>1]=4;return a}function ww(a){var b=0,c=0;b=Ga-16|0;Ga=b;xw(b+12|0);Ga=b+16|0;return(a|0)<0|H[b+12>>2]<=(a|0)?c:H[(a<<2)+54960>>2]}function wb(a,b){b=b<<8&16711680|b<<24|(b>>>8&65280|b>>>24);F[a|0]=b;F[a+1|0]=b>>>8;F[a+2|0]=b>>>16;F[a+3|0]=b>>>24}function Ow(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;return Pw(a,b,c,d,e,f,g,h,i)|0}function FI(a,b,c){a=a|0;b=b|0;c=c|0;b=yb(a,24);a=H[b+20>>2];c=H[b+16>>2]+1|0;a=c?a:a+1|0;H[b+16>>2]=c;H[b+20>>2]=a}function Co(a){var b=0;b=H[a+32>>2];if(b){H[b>>2]=H[a+36>>2];b=H[a+36>>2];if(b){H[b+32>>2]=H[a+32>>2]}H[a+32>>2]=0}}function yn(a,b,c){a:{if(!H[a+8>>2]){break a}bg(a,b);Kh(H[a+8>>2],b,0,c);if((b|0)==1){break a}Kh(H[a+8>>2],1,0,c)}}function rz(a,b){if(H[a+20>>2]<(b|0)){b=b<<1;H[a+20>>2]=b;b=ue(H[a+16>>2],b);if(!b){return 7}H[a+16>>2]=b}return 0}function rb(a,b){var c=0;a:{if(!b){break a}c=I[a+19|0];if(c>>>0>7){break a}F[a+19|0]=c+1;H[((c<<2)+a|0)+152>>2]=b}}function Sa(a,b,c){var d=0;if(c){d=a;while(1){F[d|0]=I[b|0];d=d+1|0;b=b+1|0;c=c-1|0;if(c){continue}break}}return a}function Gx(a,b){var c=0;a:{b=yb(a,b);if(!b){break a}c=H[b+8>>2];if(!c){break a}Wd(a,c);cd(H[b+8>>2]);H[b+8>>2]=0}}function Fg(a,b,c){a=H[a+24>>2];b=a+N(b,48)|0;H[b+16>>2]=c;a=a+N(c,48)|0;G[b+8>>1]=J[a+8>>1];F[a+14|0]=I[a+14|0]+1}function oA(a,b,c){a=a|0;b=b|0;c=c|0;b=yb(a,24);a=H[b+12>>2];c=H[b+8>>2]+1|0;a=c?a:a+1|0;H[b+8>>2]=c;H[b+12>>2]=a}function Zv(a){var b=0;b=H[H[a>>2]+44>>2];if(b){a=Ka[b|0](a)|0}else{a=4096}return(a|0)<32?512:(a|0)<65536?a:65536}function PI(a,b,c){a=a|0;b=b|0;c=c|0;a=yb(a,8);if(a){b=H[a+4>>2];c=H[a>>2]+1|0;b=c?b:b+1|0;H[a>>2]=c;H[a+4>>2]=b}}function PB(a,b){var c=0,d=0;c=Ga-16|0;Ga=c;if(I[b+37|0]&4){H[c>>2]=H[b+8>>2];Ta(a,9836,c);d=1}Ga=c+16|0;return d}function LH(a){a=a|0;Va(70508,0,100);H[17640]=1;H[17630]=10;a=H[16046];H[17641]=!a;H[17642]=a?0:H[16048];return 0}function Hp(a){var b=0;b=H[a+4>>2];if((b|0)<H[a>>2]){H[a+4>>2]=b+1;a=Ya(H[H[a+8>>2]+(b<<2)>>2])}else{a=0}return a}function Hf(a){if(I[a+21|0]&4){Ua(H[a>>2],H[a+4>>2]);F[a+21|0]=I[a+21|0]&251}H[a+16>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0}function qi(a,b,c){var d=0;if(bf(a,b,c,1,0)){a=0}else{d=Bb(b,0);if(!d){return 7}a=Ow(a,b,c,1,d,8,0,0,3)}return a}function qH(a){a=a|0;nf(H[H[a>>2]+12>>2]);wh(a+4|0);Qa(H[a+60>>2]);Qa(H[a+76>>2]);Qa(H[a+112>>2]);Qa(a);return 0}function Vv(a){var b=0,c=0;a:{if(!a){break a}b=H[a+16>>2];if(!b){break a}F[H[a+4>>2]+b|0]=0;c=H[a+4>>2]}return c}function Sc(a,b){var c=0;H[a+64>>2]=b;if(H[a+288>>2]?1:b){c=H[a+288>>2];if(c){Zb(c)}qs(a,b);return}H[a+68>>2]=-1}function rh(a){var b=0;b=F[a|0];if(!b){return 0}b=b-97|0;if((b|0)!=24){return 1-F[b+54512|0]|0}return kf(a+1|0)}function mt(a,b,c){var d=0;d=Ga-16|0;Ga=d;if(!(!b|H[b>>2]<=H[H[a>>2]+128>>2])){H[d>>2]=c;Ta(a,6156,d)}Ga=d+16|0}function _a(a){a=I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24);return a<<24|a<<8&16711680|(a>>>8&65280|a>>>24)}function EG(a,b,c){a=a|0;b=b|0;c=c|0;a=H[a+20>>2];H[c+4>>2]=H[c+4>>2]+1;H[c+8>>2]=H[c+8>>2]+H[a+64>>2];return 0}function wd(a,b,c){var d=0;d=Ga-16|0;Ga=d;H[d+8>>2]=b;H[d+12>>2]=c;is(a,72,1,d+8|0,-13);Pa(a,84,1,1);Ga=d+16|0}function tJ(a,b,c){a=a|0;b=b|0;c=c|0;a=Ga-16|0;Ga=a;b=Wb(H[c>>2]);H[a>>2]=Ya(H[c+4>>2]);zc(b,8310,a);Ga=a+16|0}function jC(a,b){var c=0,d=0;a:{c=H[a+84>>2];d=1<<b;if(c&d){break a}H[a+84>>2]=c|d;if((b|0)!=1){break a}oC(a)}}function Rb(a,b){var c=0,d=0;a:{if(!b){break a}c=a;a=ob(b)+Line truncated
|
||||||
|
function Hc(a,b){b=(b|0)<0?H[a+108>>2]-1|0:b;return I[H[a>>2]+87|0]?70640:H[a+104>>2]+N(b,20)|0}function Bb(a,b){var c=0,d=0;c=Ga-16|0;Ga=c;if(!Be()){H[c+12>>2]=b;d=Ll(a,b)}Ga=c+16|0;return d}function $c(a,b,c,d,e){G[a+20>>1]=0;H[a+16>>2]=0;H[a+12>>2]=e;H[a+8>>2]=d;H[a>>2]=b;H[a+4>>2]=c}function mj(a,b,c){if(b){H[b+20>>2]=c;H[b+4>>2]=H[b+4>>2]|4198400;bl(a,b);return}bc(H[a>>2],c)}function gr(a){F[a+24|0]=1;H[a+16>>2]=0;H[a+20>>2]=0;H[a+8>>2]=100;H[a+12>>2]=0;H[a+4>>2]=a+26}function gd(a,b,c){if((c|0)==1){rb(a,b);return}if(H[a+28>>2]<(c|0)){H[a+32>>2]=b;H[a+28>>2]=c}}function Si(a,b,c){var d=0,e=0;d=Ga-16|0;Ga=d;e=d+8|0;Ih(e,c);a=jt(a,b,e,0);Ga=d+16|0;return a}function $o(a){a=a+8|0;while(1){a=H[a>>2];if(a){F[a+1|0]=I[a+1|0]&251;a=a+24|0;continue}break}}function uq(a,b){var c=0;c=H[b+20>>2];if(c){H[c+28>>2]=H[c+28>>2]|16384;ce(a,c);H[b+20>>2]=0}}function lz(a){a=a|0;var b=0;while(1){b=a;a=b+1|0;if(kf(b)){continue}break}return I[b|0]!=0|0}function jH(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((b|0)==(d|0)){a=ve(a,c,b)}else{a=1}return a|0}function iH(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((b|0)==(d|0)){a=Ib(a,c,b)}else{a=1}return a|0}function cA(a,b){var c=0;c=Ga-16|0;Ga=c;H[c>>2]=b;b=a;a=Bb(3687,c);$b(b,a,-1);Qa(a);Ga=c+16|0}function Vx(a,b){return b*2247116418577895e292*jq(a+-1416.0996898839683)*2247116418577895e292}function oh(a,b,c){var d=0;d=Ga-16|0;Ga=d;H[d+12>>2]=0;a=jy(a,d+12|0,b,c);Ga=d+16|0;return a}function kp(a){var b=0;jp(a);b=G[a+40>>1];if((b|0)>=0){Zg(a,(b&65535)+3|0);G[a+40>>1]=65535}}function hi(a,b){var c=0;c=Gv(H[a+228>>2],b,0);if(c){a=hp(H[a+228>>2],b,c)}else{a=0}return a}function Zd(a,b,c){var d=0;d=Ga-16|0;Ga=d;Qa(H[a>>2]);H[d+12>>2]=c;H[a>>2]=Ll(b,c);Ga=d+16|0}function Tr(a,b){var c=0;c=H[b+12>>2];while(1){if((c|0)>0){c=c-1|0;Gg(a,b,c);continue}break}}function QC(a){a=a-7|0;if((a&255)>>>0<=3){a=H[(a<<24>>24<<2)+55136>>2]}else{a=19212}return a}function KI(a){a=a|0;var b=0;b=yb(a,24);if(b){_b(a,H[b>>2],H[b+4>>2]);H[b>>2]=0;H[b+4>>2]=0}}function ow(a){if(!H[a+44>>2]){if(I[a+18|0]&16){H[a+48>>2]=H[a+48>>2]|4096}H[a+44>>2]=4096}}function _e(a){var b=0;b=Ga-16|0;Ga=b;H[b+12>>2]=0;ug(a,b+12|0);Ga=b+16|0;return H[b+12>>2]}function Pb(a,b,c,d){var e=0;e=Yj(a,b);if(!e){Rc((H[a+100>>2]+N(b,40)|0)-40|0,c,d)}return e}function Ms(a){var b=0;b=Ga-16|0;Ga=b;H[b+12>>2]=0;IB(a,b+12|0);Ga=b+16|0;return H[b+12>>2]}function Gh(a){var b=0;b=H[a+220>>2];if(b){b=H[Hc(H[a+8>>2],b)+8>>2]}else{b=0}H[a+220>>2]=b}function tK(a,b){a=a|0;b=b|0;a=H[a>>2];id(a,0,b);if(!(I[b+7|0]&3)){id(a,0,b+44|0)}return 0}function mH(a,b){a=a|0;b=b|0;var c=0;c=H[a+100>>2];H[b>>2]=H[a+96>>2];H[b+4>>2]=c;return 0}function gB(a,b,c){if(F[c+11|0]&1){a=Hc(a,-1);b=H[b+44>>2];G[a+2>>1]=b&1;H[a+12>>2]=b>>>1}}function _k(a){var b=0;b=H[a+44>>2]+1|0;H[a+44>>2]=b;a=tb(a);if(a){Ra(a,4,0,b,-1);te(a,0)}}function Qk(a,b,c){a:{if(!I[a+23|0]){break a}if(!vn(b)){break a}un(a,b,c);return}Kk(a,b,c)}function Ok(a,b){return((b|0)<0|G[a+34>>1]<=(b|0)?68:F[(H[a+4>>2]+N(b,12)|0)+5|0])<<24>>24}function Jd(a,b,c){H[a+8>>2]=0;H[a+12>>2]=0;H[a+4>>2]=c;F[a|0]=b;H[a+16>>2]=0;H[a+20>>2]=0}function Ip(a){var b=0;C(+a);b=x(1)|0;return(b&2146435072)==2146435072&(b&1048575|x(0))!=0}function Eg(a){Qa(H[a+8>>2]);H[a>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;Qa(H[a+16>>2]);H[a+16>>2]=0}function CI(a){a=a|0;var b=0;a:{b=yb(a,0);if(!b){break a}b=H[b>>2];if(!b){break a}Wd(a,b)}}function fJ(a){a=a|0;var b=0,c=0;b=yb(a,0);if(b){c=H[b>>2];b=H[b+4>>2]}else{b=0}_b(a,c,b)}function cH(a,b,c){a=a|0;b=b|0;c=c|0;a=Ob(4);if(!a){return 7}H[a>>2]=0;H[c>>2]=a;return 0}function SG(a,b){a=a|0;b=b|0;var c=0;c=H[a+36>>2];H[b>>2]=H[a+32>>2];H[b+4>>2]=c;return 0}function QD(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=H[a+4>>2];H[a+32>>2]=H[a+32>>2]-1;return 0}function Pd(a,b,c,d){var e=0;e=Ga-16|0;Ga=e;H[e+12>>2]=d;a=Ev(a,b,c,d);Ga=e+16|0;return a}function OI(a){a=a|0;var b=0,c=0;b=yb(a,8);if(b){c=H[b>>2];b=H[b+4>>2]}else{b=0}_b(a,c,b)}function KK(a,b){a=a|0;b=b|0;nd(H[H[a+16>>2]+28>>2]+40|0,11868,0);kb(a,H[b+4>>2]);Ua(a,b)}function JD(a,b){a=a|0;b=b|0;var c=0;c=H[a+20>>2];H[b>>2]=H[a+16>>2];H[b+4>>2]=c;return 0}function ly(a,b,c,d){F[H[a>>2]]=b;if(c|d){b=jc(H[a>>2]+1|0,c,d)+1|0}else{b=1}H[a+4>>2]=b}function gz(a,b,c){a:{if(!a){break a}if((hh(a)|0)!=1){break a}b=Wb(a);c=Ja}Ja=c;return b}function cD(a,b){a=a|0;b=b|0;var c=0;c=H[a+12>>2];H[b>>2]=H[a+8>>2];H[b+4>>2]=c;return 0}function Jn(a,b){var c=0;c=H[a+108>>2];if((c-1|0)==(b|0)){H[a+108>>2]=b;return}Vi(a,b,c)}function mC(a,b){if(I[b+5|0]&16){ms(a,H[H[H[b+20>>2]+28>>2]>>2],1);return}Ta(a,14826,0)}function bu(a,b){var c=0;c=H[a+380>>2];H[a+380>>2]=c+1;H[H[a+404>>2]+(c<<2)>>2]=b;Qp(b)}function _G(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return hz(0,a,b,c,d,e,f)|0}function SK(a,b){var c=0,d=0;c=b&31;d=(-1>>>c&a)<<c;c=a;a=0-b&31;return d|(c&-1<<a)>>>a}function $G(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return hz(1,a,b,c,d,e,f)|0}function wt(a){F[a+24|0]=I[a+24|0]+1;a=H[a>>2];G[a+308>>1]=0;H[a+304>>2]=H[a+304>>2]+1}function oF(a,b){a=a|0;b=b|0;var c=0,d=0;c=M[a>>Line truncated
|
||||||
|
function ox(a,b,c){if(!a|!b){a=0}else{a=nx(H[a+128>>2],b,c)}return a}function hh(a){var b=0;b=ab(a);if((b|0)==3){Wj(a,0);b=ab(a)}return b}function cJ(a){a=a|0;var b=0;b=yb(a,0);if(b){rr(a,b);Qa(H[b+32>>2])}}function Ww(){var a=0;a=Ga-16|0;Ga=a;H[a>>2]=50912;Uw(4,a);Ga=a+16|0}function Vc(a){var b=0;b=H[a>>2];if(b){Ka[H[b+4>>2]](a)|0;H[a>>2]=0}}function Kl(a){if(I[a+43|0]!=2){a=H[a+4>>2];Ka[H[H[a>>2]+60>>2]](a)}}function Kb(a,b){if(!a){return b?-1:0}if(!b){return 1}return bb(a,b)}function Gi(a,b,c,d,e,f,g,h,i){return Bz(a,b,c,d,e,f,g,h,Va(i,0,56))}function xt(a){var b=0;b=H[a>>2];H[a>>2]=b-12;yt(a,J[b+2>>1],b+4|0)}function vK(a,b){a=a|0;b=b|0;if(F[b+7|0]&1){Co(H[b+44>>2])}return 0}function hG(a,b){a=a|0;b=b|0;H[b>>2]=H[a+4>>2];H[b+4>>2]=0;return 0}function ah(a,b,c){var d=0;d=H[a>>2];if(d){Ka[H[d+40>>2]](a,b,c)|0}}function YE(a,b,c){a=a|0;b=b|0;c=c|0;return sc(ja(a|0,b|0,c|0)|0)|0}function Dr(a){a=H[H[a+72>>2]+20>>2];if(!a){return 0}return H[a>>2]}function Ae(a,b){if(!b){return 0}return Ka[H[H[a>>2]+20>>2]](a,b)|0}function $E(a,b,c){a=a|0;b=b|0;c=c|0;return sc(ea(a|0,b|0,c|0)|0)|0}function Gv(a,b,c){return Ka[H[16032]](H[a+44>>2],b,I[a+33|0]&c)|0}function Dl(a){return(a|0)<0?(a|0)==-2147483648?2147483647:0-a|0:a}function $e(a,b,c,d,e){return Ka[H[a+24>>2]](a,b,c,d&17334143,e)|0}function yg(a,b){a=H[a>>2];F[a+19|0]=b;G[a+16>>1]=J[a+16>>1]|2048}function ue(a,b){if(Be()){a=0}else{a=Td(a,(b|0)>0?b:0,0)}return a}function ij(a,b){Za(a,68,b);a=H[a+12>>2];H[a+28>>2]=0;F[a+19|0]=0}function gA(a,b){return(b|0)==108096&a>>>0<275971584|b>>>0<108096}function db(a){var b=0;b=a;a=H[a+56>>2]-1|0;H[b+56>>2]=a;return a}function UA(a,b){var c=0;c=J[b>>1];G[a>>1]=c;Sa(a+8|0,b+8|0,c<<4)}function Su(a,b,c){if(!(Ka[H[16232]]()|0)){Ka[H[16229]](a,b,c)|0}}function Qx(a,b){a=Ox(a-1|0);if(!a){a=Ox(b);a=a?a+32|0:0}return a}function Mh(a,b){if(!H[b>>2]){H[b>>2]=Wt(H[a+52>>2],a,H[a+4>>2])}}function LE(a,b){a=a|0;b=b|0;var c=0;c=Hb(_f(a,b));Yf(a);return+c}function Jv(a,b,c,d){return Ka[H[H[a>>2]+52>>2]](a,b,32768,c,d)|0}function rk(a,b,c){H[b+12>>2]=c;return Az(a,b,H[c>>2],H[c+4>>2])}function Mo(a){var b=0;Db(a);b=Xm(a,0);if(!b){b=Bk(a,0)}return b}function Id(a,b){var c=0;c=H[a+8>>2];a=Uk(a,b);if(a){Jc(c,a,-8)}}function Gs(a,b,c){H[b+4>>2]=a;H[b>>2]=H[a+248>>2];H[a+248>>2]=c}function vc(a,b,c,d,e){return Ka[H[H[a>>2]+12>>2]](a,b,c,d,e)|0}function sc(a){if(a>>>0>=4294963201){H[17665]=0-a;a=-1}return a}function ju(a,b){a=H[a+8>>2]+(b>>>3|0)|0;F[a|0]=I[a|0]|1<<(b&7)}function gt(a,b){if(b){if(I[a+208|0]>=2){Xn(a,b)}qj(H[a>>2],b)}}function _c(a,b){var c=0;b=Wb(_f(a,b));c=Ja;Yf(a);Ja=c;return b}function ZH(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;H[d>>2]=0;return 0}function Ux(a){var b=0;b=Ga-16|0;M[b+8>>3]=a;return M[b+8>>3]*a}function PJ(a,b,c){a=a|0;b=b|0;c=c|0;qb(a,ww(Wb(H[c>>2])),-1,0)}function Em(a,b,c){a=xz(a,b,c);if(!a){return 0}return H[a+8>>2]}function yG(a,b,c){a=a|0;b=b|0;c=c|0;H[(b<<4)+c>>2]=a;return 0}function fw(a,b,c,d){F[d|0]=0;return Ka[H[a+36>>2]](a,b,c,d)|0}function cF(a,b){a=a|0;b=b|0;return sc(Fa(-100,a|0,b|0,0)|0)|0}function bm(a,b){a=(a<<2)+70048|0;if(K[a>>2]<b>>>0){H[a>>2]=b}}function Zt(a,b){kb(a,H[b+4>>2]);bc(a,H[b+8>>2]);Ua(a,H[b>>2])}function Fs(a){if(H[a>>2]){a=0}else{zc(21,2648,0);a=1}return a}function Dc(a,b,c,d,e){return Ka[H[H[a>>2]+8>>2]](a,b,c,d,e)|0}function As(a,b,c){Mb(a,83);Pa(a,84,b,1);Tj(a,1);cf(a,0,0,c,0)}function qc(a,b,c){a=a|0;b=b|0;c=c|0;return Pb(a,b,c,c>>31)|0}function pK(a,b){a=a|0;b=b|0;H[a+16>>2]=H[a+16>>2]+1;return 0}function Vm(a,b){a=gb(a,75,0,0);if(a){G[a+32>>1]=b+1}return a}function UH(a,b){a=a|0;b=b|0;a=H[a+20>>2];Ka[H[a+52>>2]](a,b)}function Kf(a){H[a>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[a+12>>2]=0}function IC(a,b){var c=0;b=pc(a,b);c=Rg(a,b);Ua(a,b);return c}function wC(a,b){if(I[b|0]==138){a=Lk(a,b)}else{a=0}return a}function pk(a){var b=0;a=H[a+72>>2];b=H[a+20>>2];wp(a);Dv(b)}function cc(a){Zb(H[a>>2]);H[a+20>>2]=7;Gb(H[H[a>>2]+20>>2])}function VE(a,b){a=a|0;b=b|0;return sc(wa(-100,a|0,b|0)|0)|0}function Tf(a,b){b=Md(a,b);if(!b){b=H[H[a>>2]+8>>2]}return b}function Ox(a){return F[(N(0-a&a,124511785)>>>27|0)+61328|0]}function Ob(a){if(Be()|(a|0)<=0){a=0}else{a=rc(a,0)}return a}function Lw(a,b){a:{if((b|0)>0){Kw(a,9,b);break a}Kw(a,0,0)}}function FF(a,b,c){a=a|0;b=b|0;c=c|0;Tb(a,3.141592653589793)}function sw(a,b,c,d,e){return lw(H[a+12>>2],b,c,d,e,a+20|0)}function mx(a,b){bd(a);Sa(a,b,40);H[b+24>>2]=0;G[b+16>>1]=1}function jh(a,b){a=a|0;b=b|0;b=ab(_f(a,b));Yf(a);return b|0}function gI(a,b,c){a=a|0;b=b|0;c=c|0;Bc(a,(Nm(a,c,0)|0)!=0)}function ff(a,b){a=a|0;b=b|0;b=gf(_f(a,b));Yf(a);return b|0}function ef(a,b){a=a|0;b=b|0;b=Ya(_f(a,b));Yf(a);return b|0}function bF(a){a=a|0;a=da(a|0)|0;return gk((a|0)==27?0:a)|0}function Xl(a,b,c,d,e){if(!b){return 0}return Jp(a,b,c,d,e)}function Ud(a,b){a=a|0;b=b|0;b=Xb(_f(a,b));Yf(a);return b|0}function Jl(a,b,c,d){return Ka[H[H[a>>2]+56>>2]](a,b,c,d)|0}function Jj(a){var b=0;b=ud(512,0);if(b){H[b>>2]=a}return b}function wj(a,b,c,d){c=Ed(a,b,c,d);if(!c){Ua(a,b)}returLine truncated
|
||||||
|
function qf(a,b){if(!b){Ja=0;return 0}a=_m(a,b);return a}function lh(a){H[a+20>>2]=18;ie(H[a>>2],11894,-1,-1,1,0)}function bl(a,b){if(!H[a+36>>2]){UC(b);Zk(a,H[b+24>>2])}}function Oc(a,b,c){if(a){return Nb(a,b,c)}return rc(b,c)}function Gz(a){a=a|0;if(a){Qa(H[a+12>>2]);Qa(a)}return 0}function Gu(a){if(!fm(H[a+36>>2])){return 0}return Ou(a)}function sb(a,b,c){a=Oc(a,b,c);if(a){Va(a,0,b)}return a}function mv(a){var b=0;b=kg(a,4);if(b){Yg(a,1)}return b}function mf(a,b,c){return Ka[H[H[a>>2]+16>>2]](a,b,c)|0}function dm(a){a=a|0;if(!a){return 0}return J[a+144>>1]}function Yf(a){if(a){H[a+36>>2]=hd(H[a>>2],H[a+36>>2])}}function FK(a,b){a=a|0;b=b|0;return H[a+24>>2]!=(b|0)|0}function yB(a,b,c){Hh(a,H[b+28>>2],H[c>>2],0,I[c+4|0])}function nz(a,b){return I[(a+b|0)+4|0]!=0&b<<24>>24>=0}function md(a,b,c,d){return Ka[H[a+220>>2]](a,b,c,d)|0}function cb(a){if(!a){return 0}return ob(a)&1073741823}function ab(a){a=a|0;return I[(J[a+16>>1]&63)+29920|0]}function Wf(a){var b=0;b=H[a+116>>2];F[(b?b:a)+20|0]=1}function WE(a,b){a=a|0;b=b|0;return bq(-100,a,b,256)|0}function Lc(a){var b=0;b=H[a+116>>2];F[(b?b:a)+21|0]=1}function Ke(a,b,c){if(!I[a+43|0]){Jl(H[a+4>>2],b,c,9)}}function IJ(a,b,c){a=a|0;b=b|0;c=c|0;Bc(a,Ex(H[c>>2]))}function Ep(a,b){F[a+84|0]=b;H[a+8>>2]=Jf(a,b,32112,0)}function uJ(a,b,c){a=a|0;b=b|0;c=c|0;qb(a,22284,-1,0)}function jg(a,b,c,d){return Ka[H[a+32>>2]](a,b,c,d)|0}function iE(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return 0}function hb(a,b,c){if(!b){return 0}return hs(a,b,c,0)}function VC(a,b,c){if((b|0)>0){Pa(H[a+8>>2],159,b,c)}}function Mp(a,b,c,d){return $k(a,b,-1,c&15|128,0,d,0)}function Dw(a,b){if(!a){return 0}return(Nl(a,b)|0)!=0}function Cb(a,b){if(Be()){a=0}else{a=rc(a,b)}return a}function qD(a,b,c){a=a|0;b=b|0;c=c|0;return H[17665]}function oK(a,b){a=a|0;b=b|0;H[a+16>>2]=H[a+16>>2]-1}function jG(a){a=a|0;return K[a+12>>2]>=K[a+16>>2]|0}function eg(a,b,c){c=Rb(b,c);Ua(b,H[a>>2]);H[a>>2]=c}function bd(a){if(H[a+24>>2]?1:I[a+17|0]&144){iq(a)}}function Zg(a,b){if(!I[a+43|0]){Jl(H[a+4>>2],b,1,5)}}function UK(a){if(a){return 31-Q(a-1^a)|0}return 32}
|
||||||
|
function RJ(a,b,c){a=a|0;b=b|0;c=c|0;qb(a,1024,-1,0)}function PE(a,b){a=a|0;b=b|0;return bq(-100,a,b,0)|0}function Nr(a){if(!a){return 1}return H[a+12>>2]==10}function Kq(a,b,c){b=se(a,b,c);if(!b){Qa(a)}return b}function El(a){ci(a);Ja=H[a+36>>2];return H[a+32>>2]}function ud(a,b){b=rc(a,b);if(b){Va(b,0,a)}return b}function em(a,b){a=(a<<2)+70008|0;H[a>>2]=H[a>>2]-b}function Re(a,b){b=Cb(a,b);if(b){Va(b,0,a)}return b}function KE(a,b){a=a|0;b=b|0;return ox(a,b,cb(b))|0}function Hv(a,b){return Ka[H[H[a>>2]+28>>2]](a,b)|0}function Hd(a,b){return Ka[H[H[a>>2]+24>>2]](a,b)|0}function Al(a){Qa(H[a+16>>2]);F[a|0]=1;H[a+16>>2]=0}function zd(a,b){var c=0;c=H[a+116>>2];jC(c?c:a,b)}function sv(a){a=J[a+66>>1];return(a<<16|a)&130560}function ku(a){return Qc(H[a+24>>2]+8|0,H[a+4>>2])}function gk(a){if(!a){return 0}H[17665]=a;return-1}function Zq(a){a=a|0;Qa(H[a+20>>2]);Qa(a);return 0}function OE(a){a=a|0;return sc(na(-100,a|0,0)|0)|0}function Mu(a){return(a|0)!=6?H[(a<<2)+33152>>2]:0}function JK(a,b){a=a|0;b=b|0;G[a+20>>1]=0;return 2}function Ax(a,b,c){if(b+1>>>0>=2){Ka[b|0](a)}lh(c)}function vk(a){if(!I[a+24|0]){Qa(H[a+4>>2])}gr(a)}function QG(a){a=a|0;H[a+52>>2]=0;return cz(a)|0}
|
||||||
|
function Gd(){var a=0;a=H[17653];if(a){Ka[a|0]()}}function Fd(){var a=0;a=H[17654];if(a){Ka[a|0]()}}function Dh(a){return Qc(H[a+60>>2]+56|0,H[a>>2])}function QK(a,b,c,d){LK(a,b,c,d);Ja=Ia;return Ha}function Bc(a,b){a=a|0;b=b|0;Rc(H[a>>2],b,b>>31)}function rH(a,b){a=a|0;b=b|0;return Yp(b,120)|0}function le(a){return I[a|0]>=6?H[a+4>>2]+1|0:1}function eF(a){a=a|0;a=Ga-a&-16;Ga=a;return a|0}function dE(a,b){a=a|0;b=b|0;H[b>>2]=0;return 0}function Tk(a){if(a){H[a>>2]=H[a>>2]+1}return a}function Eb(a,b){if(!b){return 0}return rC(a,b)}function Dv(a){if(!H[H[a+228>>2]+12>>2]){_v(a)}}function vs(a,b){H[a+68>>2]=mb(a,H[a+68>>2],b)}function uG(a,b){a=a|0;b=b|0;return Yp(b,36)|0}function tI(a,b,c){a=a|0;b=b|0;c=c|0;lA(a,0,0)}function sI(a,b,c){a=a|0;b=b|0;c=c|0;jA(a,0,0)}function rI(a,b,c){a=a|0;b=b|0;c=c|0;mA(a,0,0)}function lr(a){return I[a+12|0]?1:I[a+16|0]!=0}function dy(a,b){a=a|0;b=b|0;return Yp(b,64)|0}function ME(a,b,c){a=a|0;b=b|0;c=c|0;_b(a,b,c)}function Kw(a,b,c){H[a+268>>2]=b;H[a+272>>2]=c}function Jg(a){if(!a){return 0}return I[a+8|0]}function Fk(a,b,c){if((b|0)>0){Ra(a,49,b,c,1)}}function Df(a){return(H[a+32>>2]&268435457)==1}function Cn(a,b){if(b){vd(a,1,b);Pa(a,84,1,1)}}function xC(a){if(I[Hc(a,-1)|0]==80){jb(a,1)}}function vd(a,b,c){return eb(a,117,0,b,0,c,0)}function bc(a,b){a=a|0;b=b|0;if(b){_t(a,b,1)}}function Zm(a,b,c){return gc(0,dd(a),dd(b),c)}function RA(a){return(I[a+15|0]-73&255)>>>0<2}function Pq(a){return a&128?1:I[a+54608|0]!=0}function Kd(a,b){b=Wb(_f(a,b));Yf(a);return b}function Ex(a){return I[a+17|0]&8?I[a+19|0]:0}function pf(a,b){F[a+25|0]=0;H[a>>2]=b;gr(a)}function pE(a){a=a|0;ow(a);return H[a+44>>2]}function oE(a){a=a|0;ow(a);return H[a+48>>2]}function nf(a){$l(H[a+252>>2]);H[a+252>>2]=0}function cd(a){if(a){bd(a);Vb(H[a+20>>2],a)}}function Np(a,b,c){return $k(a,b,-1,0,0,c,0)}function MD(a){a=a|0;pp(H[a+12>>2]);return 0}function zw(a){return zp(H[H[a+4>>2]>>2],1)}function vA(a,b){a=tb(a);if(a){Za(a,150,b)}}function rn(a,b,c){if(a){ie(a,b,-1,-1,1,c)}}function ji(a){return H[H[a+32>>2]>>2]+96|0}function dj(a,b,c,d){Ra(H[a+8>>2],79,b,c,d)}function Ua(a,b){a=a|0;b=b|0;if(b){Vb(a,b)}}function SB(a){return!a|(a|0)==5?0:(a|0)!=6}function Rl(a){H[a+220>>2]=H[a+44>>2]?17:18}function QE(a){a=a|0;return sc(qa(a|0)|0)|0}function PK(a,b,c,d){a=LK(a,b,c,d);return a}function LG(a,b){a=a|0;b=b|0;qk(a);return 0}function $a(a,b){a=a|0;b=b|0;if(b){qj(a,b)}}function yw(a){return G[H[a+4>>2]+24>>1]&1}function vD(a){a=a|0;fu(a);Ua(H[a+4>>2],a)}function pz(a){og(H[a+64>>2]);H[a+64>>2]=0}function Nk(a){return!I[H[ag(a)+8>>2]+4|0]}function Kp(a,b,c,d){return _w(a,b,c,d,94)}function Ih(a,b){H[a>>2]=b;H[a+4>>2]=cb(b)}function zE(a,b){a=a|0;b=b|0;return 31600}function tG(a){a=a|0;sq(a);Qa(a);return 0}function qm(a){return mh(Ob(ob(a)+1|0),a)}function mG(a){a=a|0;rm(a);Qa(a);return 0}function gD(a){a=a|0;oo(a);Qa(a);return 0}function am(a){return(I[a+30016|0]&70)!=0}function _D(a,b){a=a|0;b=b|0;return 31752}function Zo(a,b){if(I[b+4|0]&16){Vb(a,b)}}function Xu(a){if(a){Wg(H[a+4>>2]);Qa(a)}}function WG(a){a=a|0;Rq(a);Qa(a);return 0}function Tb(a,b){a=a|0;b=+b;zx(H[a>>2],b)}function Qc(a,b){return H[Ft(a,b,0)+8>>2]}function Pa(a,b,c,d){return Ra(a,b,c,d,0)}function $D(a,b){a=a|0;b=b|0;return 31676}function rG(a){a=a|0;return!H[a+16>>2]|0}function bC(a){Ta(a,9770,0);H[a+12>>2]=1}function Ze(a){return H[H[a+4>>2]+36>>2]}function Op(a,b){return ri(a,b,30008,91)}function Jx(a){return a-97>>>0<26?a&95:a}function Eh(a){return H[H[a+4>>2]+48>>2]}function Db(a){H[H[a+4>>2]+4>>2]=H[a>>2]}function wg(a){return H[H[a+4>>2]+8>>2]}function ss(a,b){if(b){fb(H[a+8>>2],b)}}function re(a){im(14,a,13325);return 14}function hv(a,b,c,d){return _l(a,b,c,d)}function fj(a){H[a+28>>2]=0;F[a+19|0]=0}function ed(a){im(21,a,12518);return 21}function eD(a){a=a|0;return!H[a+4>>2]|0}function af(a){return(a<<25>>31&9)+a&15}function Za(a,b,c){return Ra(a,b,c,0,0)}function We(a){return Ka[H[16011]](a)|0}function Rt(a,b,c){G[a+28>>1]=c;Cl(a,b)}function Qm(a){F[a+44|0]=0;G[a+42>>1]=0}function Mn(a){F[a+150|0]=I[a+150|0]|16}function Ij(a,b){return(Aw(a,1,b)|0)!=0}function HE(a){a=a|0;return H[a+104>>2]}function Fw(a){H[a+24>>2]=H[a+24>>2]&-2}function $w(a,b,c){return _w(a,b,c,0,0)}function ui(a){ci(a);return H[a+44>>2]}function oH(a){a=a|0;return H[a+88>>2]}function Zx(a,b){H[a>>2]=0;H[a+4>>2]=b}function XI(a){a=a|0;return H[a+48>>2]}function Wa(a){im(11,a,9656);return 11}function Qw(a,b){Ka[H[a+60>>2]](a,b)|0}function Qp(a){H[a+12>>2]=H[a+12>>2]+1}function Ff(a){return H[H[a+32>>2]>>2]}function Cx(a){return J[a+16>>1]>>>6&1}function Ac(a){return H[H[a>>2]+20>>2]}function gv(a,b,c){Sa(b,a,c);return 0}function bh(a,b){a=a|0;b=b|0;return 0}function Ya(a){a=a|0;return om(a,1)|0}function Vz(a){a=a|0;return H[a-8>>2]}function Sb(a,b){return Ra(a,8,0,b,0)}function Pc(a){return H[H[a+4>>2]>>2]}function Mb(a,b){return Ra(a,b,0,0,0)}function GE(a){a=a|0;return Tw(a,1)|0}function AH(a){a=a|0;return of(500)|0}function $i(a,b,c){H[Hc(a,b)+12>>2]=c}function fLine truncated
|
||||||
|
// EMSCRIPTEN_END_FUNCS
|
||||||
|
g=I;r(Na);var Ka=e([null,js,gm,Qa,BD,Iu,ex,FE,EE,DE,Hw,BE,AE,xk,IE,PD,tA,OD,ND,ID,HD,GD,FD,ED,DD,vD,xD,sj,sD,rD,pD,oD,nD,kb,bD,KK,ml,uK,tK,IK,sK,rK,qK,pK,oK,nK,Ua,GK,ce,bc,bh,mK,lK,kK,tc,YB,DK,_J,ZJ,JK,sC,Ue,YJ,HK,FK,EK,CK,BK,AK,$a,zK,bh,yK,xK,wK,vK,jK,iK,hK,gK,fK,dK,eK,bK,aK,cK,$J,UJ,ZI,YI,VI,UI,QI,Xz,BH,yH,lH,kH,gH,fH,hH,vh,jH,iH,aH,lz,ke,DG,FG,EG,CG,BG,AG,zG,yG,CD,AD,zD,yD,wD,uD,tD,qD,Yt,mD,lD,kD,zE,$D,_D,yE,xE,wE,vE,uE,tE,sE,tw,rE,qE,pE,oE,nE,mE,gm,lE,jE,iE,hE,bF,cF,XE,PE,ZE,YE,_E,SE,NE,aF,OE,gE,VE,QE,$E,hF,UE,TE,fE,RE,WE,eE,bh,bh,dE,cE,bE,hw,aE,ZD,YD,XD,WD,bh,VD,UD,TD,SD,RD,QD,MD,LD,KD,Wv,bh,JD,jD,iD,jl,hD,gD,fD,Bt,eD,dD,cD,XJ,WJ,VJ,TJ,SJ,RJ,QJ,PJ,OJ,NJ,MJ,LJ,KJ,JJ,IJ,HJ,GJ,FJ,EJ,DJ,CJ,BJ,AJ,zJ,yJ,xJ,wJ,vJ,uJ,tJ,sJ,rJ,qJ,pJ,oJ,nJ,mJ,lJ,kJ,jJ,iJ,hJ,gJ,fJ,eJ,dJ,cJ,bJ,aJ,$I,_I,WI,TI,SI,RI,PI,OI,NI,MI,LI,KI,pA,JI,oA,pA,II,oA,HI,GI,FI,EI,DI,CI,BI,AI,zI,gm,yI,xI,wI,vI,mA,lA,jA,uI,tI,sI,rI,qI,pI,oI,nI,mI,lI,kI,jI,iI,hI,gI,fI,eI,dI,cI,bI,aI,$H,_H,ZH,YH,XH,WH,VH,UH,TH,SH,RH,QH,PH,OH,NH,Vz,MH,Uz,gm,LH,KH,JH,IH,XI,HH,GH,FH,EH,Rz,DH,CH,AH,zH,$G,_G,ZG,Sq,YG,XG,WG,VG,ez,UG,TG,SG,RG,QG,bz,Uz,PG,OG,NG,MG,bh,LG,KG,xH,Gz,wH,Zq,vH,uH,tH,sH,rH,qH,pH,Ez,oH,nH,mH,eH,jl,oz,Zq,dH,cH,jl,oz,Zq,bH,JG,IG,HG,GG,xG,wG,vG,uG,tG,sG,ey,rG,qG,pG,oG,nG,jl,dy,mG,lG,kG,jG,iG,hG,gG,qF,oF,mF,iF,eG,dG,cG,bG,aG,$F,_F,ZF,YF,XF,WF,VF,UF,TF,SF,RF,QF,PF,OF,NF,MF,LF,KF,JF,IF,HF,GF,FF,EF,DF,CF,BF,AF,zF,yF,xF,wF,vF,uF,tF,sF,rF,nF,lF,kF,jF]);function La(){return E.byteLength/65536|0}return{"J":aD,"K":Qa,"L":kE,"M":Ya,"N":dF,"O":Lh,"P":ub,"Q":Zc,"R":lb,"S":ec,"T":pF,"U":gf,"V":Xb,"W":ab,"X":wi,"Y":Tb,"Z":$b,"_":Bc,"$":ME,"aa":Qb,"ba":qb,"ca":wx,"da":yb,"ea":dm,"fa":tx,"ga":ff,"ha":Ud,"ia":LE,"ja":ef,"ka":jh,"la":cm,"ma":vg,"na":rx,"oa":qc,"pa":qx,"qa":KE,"ra":JE,"sa":rg,"ta":Le,"ua":HE,"va":GE,"wa":Ow,"xa":CE,"ya":Oe,"za":Ne,"Aa":Ka,"Ba":fG,"Ca":Ix,"Da":gF,"Ea":fF,"Fa":eF}}return Ma(Oa)}
|
||||||
|
// EMSCRIPTEN_END_ASM
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
)(Pa)}function Qa(){return{then:function(a){a({instance:new Oa})}}}var Ra=Error,WebAssembly={};La=[];"object"!=typeof WebAssembly&&E("no native wasm support detected");
|
||||||
|
var Sa,Ta=!1,Ua="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
|
||||||
|
function Va(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&Ua)return Ua.decode(a.subarray(b,c));for(d="";b<c;){var f=a[b++];if(f&128){var h=a[b++]&63;if(192==(f&224))d+=String.fromCharCode((f&31)<<6|h);else{var l=a[b++]&63;f=224==(f&240)?(f&15)<<12|h<<6|l:(f&7)<<18|h<<12|l<<6|a[b++]&63;65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d}function C(a,b){return a?Va(t,a,b):""}
|
||||||
|
function r(a,b,c,d){if(!(0<d))return 0;var f=c;d=c+d-1;for(var h=0;h<a.length;++h){var l=a.charCodeAt(h);if(55296<=l&&57343>=l){var u=a.charCodeAt(++h);l=65536+((l&1023)<<10)|u&1023}if(127>=l){if(c>=d)break;b[c++]=l}else{if(2047>=l){if(c+1>=d)break;b[c++]=192|l>>6}else{if(65535>=l){if(c+2>=d)break;b[c++]=224|l>>12}else{if(c+3>=d)break;b[c++]=240|l>>18;b[c++]=128|l>>12&63}b[c++]=128|l>>6&63}b[c++]=128|l&63}}b[c]=0;return c-f}
|
||||||
|
function da(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b}var Wa,q,t,Xa,F,H,Ya,Za,Na=e.INITIAL_MEMORY||16777216;e.wasmMemory?Sa=e.wasmMemory:Sa=new Ma;Sa&&(Wa=Sa.buffer);Na=Wa.byteLength;var K=Wa;Wa=K;e.HEAP8=q=new Int8Array(K);e.HEAP16=Xa=new Int16Array(K);e.HEAP32=F=new Int32Array(K);e.HEAPU8=t=new Uint8Array(K);e.HEAPU16=new Uint16Array(K);e.HEAPU32=H=new Uint32Array(K);e.HEAPF32=Ya=new Float32Array(K);
|
||||||
|
e.HEAPF64=Za=new Float64Array(K);var M,$a=[],ab=[],bb=[];function cb(){var a=e.preRun.shift();$a.unshift(a)}var db=0,eb=null,fb=null;function E(a){if(e.onAbort)e.onAbort(a);a="Aborted("+a+")";Ka(a);Ta=!0;throw new Ra(a+". Build with -sASSERTIONS for more info.");}var gb="data:application/octet-stream;base64,",N;N="sql-asm.wasm";if(!N.startsWith(gb)){var hb=N;N=e.locateFile?e.locateFile(hb,D):D+hb}
|
||||||
|
function ib(){var a=N;try{if(a==N&&La)return new Uint8Array(La);var b=Ha(a);if(b)return b;if(Ea)return Ea(a);throw"both async and sync fetching of the wasm failed";}catch(c){E(c)}}
|
||||||
|
function jb(){if(!La&&(ya||za)){if("function"==typeof fetch&&!N.startsWith("file://"))return fetch(N,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+N+"'";return a.arrayBuffer()}).catch(function(){return ib()});if(Da)return new Promise(function(a,b){Da(N,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return ib()})}var O,P;function kb(a){for(;0<a.length;)a.shift()(e)}
|
||||||
|
function k(a,b="i8"){b.endsWith("*")&&(b="*");switch(b){case "i1":return q[a>>0];case "i8":return q[a>>0];case "i16":return Xa[a>>1];case "i32":return F[a>>2];case "i64":return F[a>>2];case "float":return Ya[a>>2];case "double":return Za[a>>3];case "*":return H[a>>2];default:E("invalid type for getValue: "+b)}return null}
|
||||||
|
function pa(a){var b="i32";b.endsWith("*")&&(b="*");switch(b){case "i1":q[a>>0]=0;break;case "i8":q[a>>0]=0;break;case "i16":Xa[a>>1]=0;break;case "i32":F[a>>2]=0;break;case "i64":P=[0,(O=0,1<=+Math.abs(O)?0<O?(Math.min(+Math.floor(O/4294967296),4294967295)|0)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)];F[a>>2]=P[0];F[a+4>>2]=P[1];break;case "float":Ya[a>>2]=0;break;case "double":Za[a>>3]=0;break;case "*":H[a>>2]=0;break;default:E("invalid type for setValue: "+b)}}
|
||||||
|
var lb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var f=a[d];"."===f?a.splice(d,1):".."===f?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},z=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=lb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},mb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},ob=a=>{if("/"===
|
||||||
|
a)return"/";a=z(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)};function pb(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var a=new Uint8Array(1);return()=>{crypto.getRandomValues(a);return a[0]}}if(Aa)try{var b=require("crypto");return()=>b.randomBytes(1)[0]}catch(c){}return()=>E("randomDevice")}
|
||||||
|
function wb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=lb(a.split("/").filter(d=>!!d),!b).join("/");return(b?"/":"")+a||"."}function na(a,b){var c=Array(da(a)+1);a=r(a,c,0,c.length);b&&(c.length=a);return c}var xb=[];function yb(a,b){xb[a]={input:[],output:[],Xa:b};zb(a,Ab)}
|
||||||
|
var Ab={open:function(a){var b=xb[a.node.rdev];if(!b)throw new Q(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.Xa.fsync(a.tty)},fsync:function(a){a.tty.Xa.fsync(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.Xa.tb)throw new Q(60);for(var f=0,h=0;h<d;h++){try{var l=a.tty.Xa.tb(a.tty)}catch(u){throw new Q(29);}if(void 0===l&&0===f)throw new Q(6);if(null===l||void 0===l)break;f++;b[c+h]=l}f&&(a.node.timestamp=Date.now());return f},write:function(a,b,c,d){if(!a.tty||!a.tty.Xa.jb)throw new Q(60);
|
||||||
|
try{for(var f=0;f<d;f++)a.tty.Xa.jb(a.tty,b[c+f])}catch(h){throw new Q(29);}d&&(a.node.timestamp=Date.now());return f}},Bb={tb:function(a){if(!a.input.length){var b=null;if(Aa){var c=Buffer.alloc(256),d=0;try{d=fs.readSync(process.stdin.fd,c,0,256,-1)}catch(f){if(f.toString().includes("EOF"))d=0;else throw f;}0<d?b=c.slice(0,d).toString("utf-8"):b=null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),null!==b&&(b+="\n")):"function"==typeof readline&&(b=
|
||||||
|
readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=na(b,!0)}return a.input.shift()},jb:function(a,b){null===b||10===b?(Ja(Va(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},fsync:function(a){a.output&&0<a.output.length&&(Ja(Va(a.output,0)),a.output=[])}},Cb={jb:function(a,b){null===b||10===b?(Ka(Va(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},fsync:function(a){a.output&&0<a.output.length&&(Ka(Va(a.output,0)),a.output=[])}},R={Qa:null,Ra:function(){return R.createNode(null,"/",16895,
|
||||||
|
0)},createNode:function(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new Q(63);R.Qa||(R.Qa={dir:{node:{Pa:R.Ga.Pa,Oa:R.Ga.Oa,lookup:R.Ga.lookup,ab:R.Ga.ab,rename:R.Ga.rename,unlink:R.Ga.unlink,rmdir:R.Ga.rmdir,readdir:R.Ga.readdir,symlink:R.Ga.symlink},stream:{Ta:R.Ha.Ta}},file:{node:{Pa:R.Ga.Pa,Oa:R.Ga.Oa},stream:{Ta:R.Ha.Ta,read:R.Ha.read,write:R.Ha.write,lb:R.Ha.lb,bb:R.Ha.bb,cb:R.Ha.cb}},link:{node:{Pa:R.Ga.Pa,Oa:R.Ga.Oa,readlink:R.Ga.readlink},stream:{}},pb:{node:{Pa:R.Ga.Pa,Oa:R.Ga.Oa},
|
||||||
|
stream:Db}});c=Eb(a,b,c,d);16384===(c.mode&61440)?(c.Ga=R.Qa.dir.node,c.Ha=R.Qa.dir.stream,c.Ia={}):32768===(c.mode&61440)?(c.Ga=R.Qa.file.node,c.Ha=R.Qa.file.stream,c.Ma=0,c.Ia=null):40960===(c.mode&61440)?(c.Ga=R.Qa.link.node,c.Ha=R.Qa.link.stream):8192===(c.mode&61440)&&(c.Ga=R.Qa.pb.node,c.Ha=R.Qa.pb.stream);c.timestamp=Date.now();a&&(a.Ia[b]=c,a.timestamp=c.timestamp);return c},Jb:function(a){return a.Ia?a.Ia.subarray?a.Ia.subarray(0,a.Ma):new Uint8Array(a.Ia):new Uint8Array(0)},qb:function(a,
|
||||||
|
b){var c=a.Ia?a.Ia.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Ia,a.Ia=new Uint8Array(b),0<a.Ma&&a.Ia.set(c.subarray(0,a.Ma),0))},Gb:function(a,b){if(a.Ma!=b)if(0==b)a.Ia=null,a.Ma=0;else{var c=a.Ia;a.Ia=new Uint8Array(b);c&&a.Ia.set(c.subarray(0,Math.min(b,a.Ma)));a.Ma=b}},Ga:{Pa:function(a){var b={};b.dev=8192===(a.mode&61440)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;16384===(a.mode&61440)?b.size=4096:32768===(a.mode&61440)?
|
||||||
|
b.size=a.Ma:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.Ab=4096;b.blocks=Math.ceil(b.size/b.Ab);return b},Oa:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&R.Gb(a,b.size)},lookup:function(){throw Fb[44];},ab:function(a,b,c,d){return R.createNode(a,b,c,d)},rename:function(a,b,c){if(16384===(a.mode&61440)){try{var d=Gb(b,c)}catch(h){}if(d)for(var f in d.Ia)throw new Q(55);
|
||||||
|
}delete a.parent.Ia[a.name];a.parent.timestamp=Date.now();a.name=c;b.Ia[c]=a;b.timestamp=a.parent.timestamp;a.parent=b},unlink:function(a,b){delete a.Ia[b];a.timestamp=Date.now()},rmdir:function(a,b){var c=Gb(a,b),d;for(d in c.Ia)throw new Q(55);delete a.Ia[b];a.timestamp=Date.now()},readdir:function(a){var b=[".",".."],c;for(c in a.Ia)a.Ia.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=R.createNode(a,b,41471,0);a.link=c;return a},readlink:function(a){if(40960!==(a.mode&61440))throw new Q(28);
|
||||||
|
return a.link}},Ha:{read:function(a,b,c,d,f){var h=a.node.Ia;if(f>=a.node.Ma)return 0;a=Math.min(a.node.Ma-f,d);if(8<a&&h.subarray)b.set(h.subarray(f,f+a),c);else for(d=0;d<a;d++)b[c+d]=h[f+d];return a},write:function(a,b,c,d,f,h){if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.Ia||a.Ia.subarray)){if(h)return a.Ia=b.subarray(c,c+d),a.Ma=d;if(0===a.Ma&&0===f)return a.Ia=b.slice(c,c+d),a.Ma=d;if(f+d<=a.Ma)return a.Ia.set(b.subarray(c,c+d),f),d}R.qb(a,f+d);if(a.Ia.subarray&&b.subarray)a.Ia.set(b.subarray(c,
|
||||||
|
c+d),f);else for(h=0;h<d;h++)a.Ia[f+h]=b[c+h];a.Ma=Math.max(a.Ma,f+d);return d},Ta:function(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.Ma);if(0>b)throw new Q(28);return b},lb:function(a,b,c){R.qb(a.node,b+c);a.node.Ma=Math.max(a.node.Ma,b+c)},bb:function(a,b,c,d,f){if(32768!==(a.node.mode&61440))throw new Q(43);a=a.node.Ia;if(f&2||a.buffer!==Wa){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,c,c+b);c=!0;b=65536*Math.ceil(b/65536);
|
||||||
|
(f=Hb(65536,b))?(t.fill(0,f,f+b),b=f):b=0;if(!b)throw new Q(48);q.set(a,b)}else c=!1,b=a.byteOffset;return{Fb:b,vb:c}},cb:function(a,b,c,d,f){if(32768!==(a.node.mode&61440))throw new Q(43);if(f&2)return 0;R.Ha.write(a,b,0,d,c,!1);return 0}}},Ib=null,Jb={},S=[],Kb=1,U=null,Lb=!0,Q=null,Fb={},V=(a,b={})=>{a=wb("/",a);if(!a)return{path:"",node:null};b=Object.assign({rb:!0,kb:0},b);if(8<b.kb)throw new Q(32);a=lb(a.split("/").filter(l=>!!l),!1);for(var c=Ib,d="/",f=0;f<a.length;f++){var h=f===a.length-
|
||||||
|
1;if(h&&b.parent)break;c=Gb(c,a[f]);d=z(d+"/"+a[f]);c.Va&&(!h||h&&b.rb)&&(c=c.Va.root);if(!h||b.Sa)for(h=0;40960===(c.mode&61440);)if(c=Mb(d),d=wb(mb(d),c),c=V(d,{kb:b.kb+1}).node,40<h++)throw new Q(32);}return{path:d,node:c}},fa=a=>{for(var b;;){if(a===a.parent)return a=a.Ra.ub,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}},Nb=(a,b)=>{for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%U.length},Ob=a=>{var b=Nb(a.parent.id,a.name);if(U[b]===a)U[b]=
|
||||||
|
a.Wa;else for(b=U[b];b;){if(b.Wa===a){b.Wa=a.Wa;break}b=b.Wa}},Gb=(a,b)=>{var c;if(c=(c=Pb(a,"x"))?c:a.Ga.lookup?0:2)throw new Q(c,a);for(c=U[Nb(a.id,b)];c;c=c.Wa){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Ga.lookup(a,b)},Eb=(a,b,c,d)=>{a=new Qb(a,b,c,d);b=Nb(a.parent.id,a.name);a.Wa=U[b];return U[b]=a},Rb={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},Sb=a=>{var b=["r","w","rw"][a&3];a&512&&(b+="w");return b},Pb=(a,b)=>{if(Lb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&
|
||||||
|
!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0},Tb=(a,b)=>{try{return Gb(a,b),20}catch(c){}return Pb(a,"wx")},Ub=(a,b,c)=>{try{var d=Gb(a,b)}catch(f){return f.Ka}if(a=Pb(a,"wx"))return a;if(c){if(16384!==(d.mode&61440))return 54;if(d===d.parent||"/"===fa(d))return 10}else if(16384===(d.mode&61440))return 31;return 0},Vb=(a=0)=>{for(;4096>=a;a++)if(!S[a])return a;throw new Q(33);},Xb=(a,b)=>{Wb||(Wb=function(){this.$a={}},Wb.prototype={},Object.defineProperties(Wb.prototype,
|
||||||
|
{object:{get:function(){return this.node},set:function(c){this.node=c}},flags:{get:function(){return this.$a.flags},set:function(c){this.$a.flags=c}},position:{get:function(){return this.$a.position},set:function(c){this.$a.position=c}}}));a=Object.assign(new Wb,a);b=Vb(b);a.fd=b;return S[b]=a},Db={open:a=>{a.Ha=Jb[a.node.rdev].Ha;a.Ha.open&&a.Ha.open(a)},Ta:()=>{throw new Q(70);}},zb=(a,b)=>{Jb[a]={Ha:b}},Yb=(a,b)=>{var c="/"===b,d=!b;if(c&&Ib)throw new Q(10);if(!c&&!d){var f=V(b,{rb:!1});b=f.path;
|
||||||
|
f=f.node;if(f.Va)throw new Q(10);if(16384!==(f.mode&61440))throw new Q(54);}b={type:a,Kb:{},ub:b,Eb:[]};a=a.Ra(b);a.Ra=b;b.root=a;c?Ib=a:f&&(f.Va=b,f.Ra&&f.Ra.Eb.push(b))},ia=(a,b,c)=>{var d=V(a,{parent:!0}).node;a=ob(a);if(!a||"."===a||".."===a)throw new Q(28);var f=Tb(d,a);if(f)throw new Q(f);if(!d.Ga.ab)throw new Q(63);return d.Ga.ab(d,a,b,c)},W=(a,b)=>ia(a,(void 0!==b?b:511)&1023|16384,0),Zb=(a,b,c)=>{"undefined"==typeof c&&(c=b,b=438);ia(a,b|8192,c)},$b=(a,b)=>{if(!wb(a))throw new Q(44);var c=
|
||||||
|
V(b,{parent:!0}).node;if(!c)throw new Q(44);b=ob(b);var d=Tb(c,b);if(d)throw new Q(d);if(!c.Ga.symlink)throw new Q(63);c.Ga.symlink(c,b,a)},ac=a=>{var b=V(a,{parent:!0}).node;a=ob(a);var c=Gb(b,a),d=Ub(b,a,!0);if(d)throw new Q(d);if(!b.Ga.rmdir)throw new Q(63);if(c.Va)throw new Q(10);b.Ga.rmdir(b,a);Ob(c)},ua=a=>{var b=V(a,{parent:!0}).node;if(!b)throw new Q(44);a=ob(a);var c=Gb(b,a),d=Ub(b,a,!1);if(d)throw new Q(d);if(!b.Ga.unlink)throw new Q(63);if(c.Va)throw new Q(10);b.Ga.unlink(b,a);Ob(c)},Mb=
|
||||||
|
a=>{a=V(a).node;if(!a)throw new Q(44);if(!a.Ga.readlink)throw new Q(28);return wb(fa(a.parent),a.Ga.readlink(a))},bc=(a,b)=>{a=V(a,{Sa:!b}).node;if(!a)throw new Q(44);if(!a.Ga.Pa)throw new Q(63);return a.Ga.Pa(a)},cc=a=>bc(a,!0),ja=(a,b)=>{a="string"==typeof a?V(a,{Sa:!0}).node:a;if(!a.Ga.Oa)throw new Q(63);a.Ga.Oa(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})},dc=(a,b)=>{if(0>b)throw new Q(28);a="string"==typeof a?V(a,{Sa:!0}).node:a;if(!a.Ga.Oa)throw new Q(63);if(16384===(a.mode&61440))throw new Q(31);
|
||||||
|
if(32768!==(a.mode&61440))throw new Q(28);var c=Pb(a,"w");if(c)throw new Q(c);a.Ga.Oa(a,{size:b,timestamp:Date.now()})},ka=(a,b,c)=>{if(""===a)throw new Q(44);if("string"==typeof b){var d=Rb[b];if("undefined"==typeof d)throw Error("Unknown file open mode: "+b);b=d}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var f=a;else{a=z(a);try{f=V(a,{Sa:!(b&131072)}).node}catch(h){}}d=!1;if(b&64)if(f){if(b&128)throw new Q(20);}else f=ia(a,c,0),d=!0;if(!f)throw new Q(44);8192===(f.mode&
|
||||||
|
61440)&&(b&=-513);if(b&65536&&16384!==(f.mode&61440))throw new Q(54);if(!d&&(c=f?40960===(f.mode&61440)?32:16384===(f.mode&61440)&&("r"!==Sb(b)||b&512)?31:Pb(f,Sb(b)):44))throw new Q(c);b&512&&!d&&dc(f,0);b&=-131713;f=Xb({node:f,path:fa(f),flags:b,seekable:!0,position:0,Ha:f.Ha,Ib:[],error:!1});f.Ha.open&&f.Ha.open(f);!e.logReadFiles||b&1||(ec||(ec={}),a in ec||(ec[a]=1));return f},ma=a=>{if(null===a.fd)throw new Q(8);a.hb&&(a.hb=null);try{a.Ha.close&&a.Ha.close(a)}catch(b){throw b;}finally{S[a.fd]=
|
||||||
|
null}a.fd=null},fc=(a,b,c)=>{if(null===a.fd)throw new Q(8);if(!a.seekable||!a.Ha.Ta)throw new Q(70);if(0!=c&&1!=c&&2!=c)throw new Q(28);a.position=a.Ha.Ta(a,b,c);a.Ib=[]},gc=(a,b,c,d,f)=>{if(0>d||0>f)throw new Q(28);if(null===a.fd)throw new Q(8);if(1===(a.flags&2097155))throw new Q(8);if(16384===(a.node.mode&61440))throw new Q(31);if(!a.Ha.read)throw new Q(28);var h="undefined"!=typeof f;if(!h)f=a.position;else if(!a.seekable)throw new Q(70);b=a.Ha.read(a,b,c,d,f);h||(a.position+=b);return b},la=
|
||||||
|
(a,b,c,d,f)=>{if(0>d||0>f)throw new Q(28);if(null===a.fd)throw new Q(8);if(0===(a.flags&2097155))throw new Q(8);if(16384===(a.node.mode&61440))throw new Q(31);if(!a.Ha.write)throw new Q(28);a.seekable&&a.flags&1024&&fc(a,0,2);var h="undefined"!=typeof f;if(!h)f=a.position;else if(!a.seekable)throw new Q(70);b=a.Ha.write(a,b,c,d,f,void 0);h||(a.position+=b);return b},ta=a=>{var b="binary";if("utf8"!==b&&"binary"!==b)throw Error('Invalid encoding type "'+b+'"');var c;var d=ka(a,d||0);a=bc(a).size;var f=
|
||||||
|
new Uint8Array(a);gc(d,f,0,a,0);"utf8"===b?c=Va(f,0):"binary"===b&&(c=f);ma(d);return c},hc=()=>{Q||(Q=function(a,b){this.node=b;this.Hb=function(c){this.Ka=c};this.Hb(a);this.message="FS error"},Q.prototype=Error(),Q.prototype.constructor=Q,[44].forEach(a=>{Fb[a]=new Q(a);Fb[a].stack="<generic error, no stack>"}))},ic,ha=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},Mc=(a,b,c)=>{a=z("/dev/"+a);var d=ha(!!b,!!c);Kc||(Kc=64);var f=Kc++<<8|0;zb(f,{open:h=>{h.seekable=!1},close:()=>{c&&c.buffer&&
|
||||||
|
c.buffer.length&&c(10)},read:(h,l,u,x)=>{for(var w=0,A=0;A<x;A++){try{var T=b()}catch(qb){throw new Q(29);}if(void 0===T&&0===w)throw new Q(6);if(null===T||void 0===T)break;w++;l[u+A]=T}w&&(h.node.timestamp=Date.now());return w},write:(h,l,u,x)=>{for(var w=0;w<x;w++)try{c(l[u+w])}catch(A){throw new Q(29);}x&&(h.node.timestamp=Date.now());return w}});Zb(a,d,f)},Kc,X={},Wb,ec;
|
||||||
|
function Nc(a,b,c){if("/"===b.charAt(0))return b;a=-100===a?"/":Y(a).path;if(0==b.length){if(!c)throw new Q(44);return a}return z(a+"/"+b)}
|
||||||
|
function Oc(a,b,c){try{var d=a(b)}catch(f){if(f&&f.node&&z(b)!==z(fa(f.node)))return-54;throw f;}F[c>>2]=d.dev;F[c+8>>2]=d.ino;F[c+12>>2]=d.mode;H[c+16>>2]=d.nlink;F[c+20>>2]=d.uid;F[c+24>>2]=d.gid;F[c+28>>2]=d.rdev;P=[d.size>>>0,(O=d.size,1<=+Math.abs(O)?0<O?(Math.min(+Math.floor(O/4294967296),4294967295)|0)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)];F[c+40>>2]=P[0];F[c+44>>2]=P[1];F[c+48>>2]=4096;F[c+52>>2]=d.blocks;P=[Math.floor(d.atime.getTime()/1E3)>>>0,(O=Math.floor(d.atime.getTime()/
|
||||||
|
1E3),1<=+Math.abs(O)?0<O?(Math.min(+Math.floor(O/4294967296),4294967295)|0)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)];F[c+56>>2]=P[0];F[c+60>>2]=P[1];H[c+64>>2]=0;P=[Math.floor(d.mtime.getTime()/1E3)>>>0,(O=Math.floor(d.mtime.getTime()/1E3),1<=+Math.abs(O)?0<O?(Math.min(+Math.floor(O/4294967296),4294967295)|0)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)];F[c+72>>2]=P[0];F[c+76>>2]=P[1];H[c+80>>2]=0;P=[Math.floor(d.ctime.getTime()/1E3)>>>0,(O=Math.floor(d.ctime.getTime()/1E3),1<=+Math.abs(O)?
|
||||||
|
0<O?(Math.min(+Math.floor(O/4294967296),4294967295)|0)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)];F[c+88>>2]=P[0];F[c+92>>2]=P[1];H[c+96>>2]=0;P=[d.ino>>>0,(O=d.ino,1<=+Math.abs(O)?0<O?(Math.min(+Math.floor(O/4294967296),4294967295)|0)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)];F[c+104>>2]=P[0];F[c+108>>2]=P[1];return 0}var Pc=void 0;function Qc(){Pc+=4;return F[Pc-4>>2]}function Y(a){a=S[a];if(!a)throw new Q(8);return a}function Rc(a){return H[a>>2]+4294967296*F[a+4>>2]}
|
||||||
|
function Sc(a){var b=da(a)+1,c=ea(b);c&&r(a,q,c,b);return c}function Tc(a,b,c){function d(x){return(x=x.toTimeString().match(/\(([A-Za-z ]+)\)$/))?x[1]:"GMT"}var f=(new Date).getFullYear(),h=new Date(f,0,1),l=new Date(f,6,1);f=h.getTimezoneOffset();var u=l.getTimezoneOffset();F[a>>2]=60*Math.max(f,u);F[b>>2]=Number(f!=u);a=d(h);b=d(l);a=Sc(a);b=Sc(b);u<f?(H[c>>2]=a,H[c+4>>2]=b):(H[c>>2]=b,H[c+4>>2]=a)}function Uc(a,b,c){Uc.Bb||(Uc.Bb=!0,Tc(a,b,c))}var Vc;
|
||||||
|
Vc=Aa?()=>{var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:()=>performance.now();var Wc={};function Xc(){if(!Yc){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:xa||"./this.program"},b;for(b in Wc)void 0===Wc[b]?delete a[b]:a[b]=Wc[b];var c=[];for(b in a)c.push(b+"="+a[b]);Yc=c}return Yc}var Yc,Z=void 0,Zc=[];
|
||||||
|
function va(a){if(!Z){Z=new WeakMap;var b=M.length;if(Z)for(var c=0;c<0+b;c++){var d=M.get(c);d&&Z.set(d,c)}}if(Z.has(a))return Z.get(a);if(Zc.length)b=Zc.pop();else{try{M.grow(1)}catch(f){if(!(f instanceof RangeError))throw f;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}b=M.length-1}try{M.set(b,a)}catch(f){if(!(f instanceof TypeError))throw f;M.set(b,a)}Z.set(a,b);return b}function sa(a){Z.delete(M.get(a));Zc.push(a)}var $c=0,ad=1;
|
||||||
|
function ba(a){var b=$c==ad?B(a.length):ea(a.length);a.subarray||a.slice||(a=new Uint8Array(a));t.set(a,b);return b}
|
||||||
|
function bd(a,b,c,d){var f={string:w=>{var A=0;if(null!==w&&void 0!==w&&0!==w){var T=(w.length<<2)+1;A=B(T);r(w,t,A,T)}return A},array:w=>{var A=B(w.length);q.set(w,A);return A}};a=e["_"+a];var h=[],l=0;if(d)for(var u=0;u<d.length;u++){var x=f[c[u]];x?(0===l&&(l=oa()),h[u]=x(d[u])):h[u]=d[u]}c=a.apply(null,h);return c=function(w){0!==l&&qa(l);return"string"===b?C(w):"boolean"===b?!!w:w}(c)}
|
||||||
|
function Qb(a,b,c,d){a||(a=this);this.parent=a;this.Ra=a.Ra;this.Va=null;this.id=Kb++;this.name=b;this.mode=c;this.Ga={};this.Ha={};this.rdev=d}Object.defineProperties(Qb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}}});hc();U=Array(4096);Yb(R,"/");W("/tmp");W("/home");W("/home/web_user");
|
||||||
|
(()=>{W("/dev");zb(259,{read:()=>0,write:(b,c,d,f)=>f});Zb("/dev/null",259);yb(1280,Bb);yb(1536,Cb);Zb("/dev/tty",1280);Zb("/dev/tty1",1536);var a=pb();Mc("random",a);Mc("urandom",a);W("/dev/shm");W("/dev/shm/tmp")})();(()=>{W("/proc");var a=W("/proc/self");W("/proc/self/fd");Yb({Ra:()=>{var b=Eb(a,"fd",16895,73);b.Ga={lookup:(c,d)=>{var f=S[+d];if(!f)throw new Q(8);c={parent:null,Ra:{ub:"fake"},Ga:{readlink:()=>f.path}};return c.parent=c}};return b}},"/proc/self/fd")})();
|
||||||
|
var Ia=!1,cd="function"==typeof atob?atob:function(a){var b="",c=0;a=a.replace(/[^A-Za-z0-9\+\/=]/g,"");do{var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));d=d<<2|
|
||||||
|
f>>4;f=(f&15)<<4|h>>2;var u=(h&3)<<6|l;b+=String.fromCharCode(d);64!==h&&(b+=String.fromCharCode(f));64!==l&&(b+=String.fromCharCode(u))}while(c<a.length);return b};
|
||||||
|
function Ha(a){if(a.startsWith(gb)){a=a.slice(gb.length);if("boolean"==typeof Aa&&Aa){var b=Buffer.from(a,"base64");b=new Uint8Array(b.buffer,b.byteOffset,b.byteLength)}else try{var c=cd(a),d=new Uint8Array(c.length);for(a=0;a<c.length;++a)d[a]=c.charCodeAt(a);b=d}catch(f){throw Error("Converting base64 string to bytes failed.");}return b}}
|
||||||
|
var Pa={b:function(a,b,c,d){E("Assertion failed: "+C(a)+", at: "+[b?C(b):"unknown filename",c,d?C(d):"unknown function"])},i:function(a,b){try{return a=C(a),ja(a,b),0}catch(c){if("undefined"==typeof X||!(c instanceof Q))throw c;return-c.Ka}},I:function(a,b,c){try{b=C(b);b=Nc(a,b);if(c&-8)return-28;var d=V(b,{Sa:!0}).node;if(!d)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&Pb(d,a)?-2:0}catch(f){if("undefined"==typeof X||!(f instanceof Q))throw f;return-f.Ka}},j:function(a,b){try{var c=
|
||||||
|
S[a];if(!c)throw new Q(8);ja(c.node,b);return 0}catch(d){if("undefined"==typeof X||!(d instanceof Q))throw d;return-d.Ka}},h:function(a){try{var b=S[a];if(!b)throw new Q(8);var c=b.node;var d="string"==typeof c?V(c,{Sa:!0}).node:c;if(!d.Ga.Oa)throw new Q(63);d.Ga.Oa(d,{timestamp:Date.now()});return 0}catch(f){if("undefined"==typeof X||!(f instanceof Q))throw f;return-f.Ka}},c:function(a,b,c){Pc=c;try{var d=Y(a);switch(b){case 0:var f=Qc();return 0>f?-28:Xb(d,f).fd;case 1:case 2:return 0;case 3:return d.flags;
|
||||||
|
case 4:return f=Qc(),d.flags|=f,0;case 5:return f=Qc(),Xa[f+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return F[dd()>>2]=28,-1;default:return-28}}catch(h){if("undefined"==typeof X||!(h instanceof Q))throw h;return-h.Ka}},H:function(a,b){try{var c=Y(a);return Oc(bc,c.path,b)}catch(d){if("undefined"==typeof X||!(d instanceof Q))throw d;return-d.Ka}},m:function(a,b,c){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return-61;var d=S[a];if(!d)throw new Q(8);
|
||||||
|
if(0===(d.flags&2097155))throw new Q(28);dc(d.node,b);return 0}catch(f){if("undefined"==typeof X||!(f instanceof Q))throw f;return-f.Ka}},C:function(a,b){try{if(0===b)return-28;var c=da("/")+1;if(b<c)return-68;r("/",t,a,b);return c}catch(d){if("undefined"==typeof X||!(d instanceof Q))throw d;return-d.Ka}},F:function(a,b){try{return a=C(a),Oc(cc,a,b)}catch(c){if("undefined"==typeof X||!(c instanceof Q))throw c;return-c.Ka}},z:function(a,b,c){try{return b=C(b),b=Nc(a,b),b=z(b),"/"===b[b.length-1]&&
|
||||||
|
(b=b.substr(0,b.length-1)),W(b,c),0}catch(d){if("undefined"==typeof X||!(d instanceof Q))throw d;return-d.Ka}},E:function(a,b,c,d){try{b=C(b);var f=d&256;b=Nc(a,b,d&4096);return Oc(f?cc:bc,b,c)}catch(h){if("undefined"==typeof X||!(h instanceof Q))throw h;return-h.Ka}},w:function(a,b,c,d){Pc=d;try{b=C(b);b=Nc(a,b);var f=d?Qc():0;return ka(b,c,f).fd}catch(h){if("undefined"==typeof X||!(h instanceof Q))throw h;return-h.Ka}},u:function(a,b,c,d){try{b=C(b);b=Nc(a,b);if(0>=d)return-28;var f=Mb(b),h=Math.min(d,
|
||||||
|
da(f)),l=q[c+h];r(f,t,c,d+1);q[c+h]=l;return h}catch(u){if("undefined"==typeof X||!(u instanceof Q))throw u;return-u.Ka}},t:function(a){try{return a=C(a),ac(a),0}catch(b){if("undefined"==typeof X||!(b instanceof Q))throw b;return-b.Ka}},G:function(a,b){try{return a=C(a),Oc(bc,a,b)}catch(c){if("undefined"==typeof X||!(c instanceof Q))throw c;return-c.Ka}},q:function(a,b,c){try{return b=C(b),b=Nc(a,b),0===c?ua(b):512===c?ac(b):E("Invalid flags passed to unlinkat"),0}catch(d){if("undefined"==typeof X||
|
||||||
|
!(d instanceof Q))throw d;return-d.Ka}},p:function(a,b,c){try{b=C(b);b=Nc(a,b,!0);if(c){var d=Rc(c),f=F[c+8>>2];h=1E3*d+f/1E6;c+=16;d=Rc(c);f=F[c+8>>2];l=1E3*d+f/1E6}else var h=Date.now(),l=h;a=h;var u=V(b,{Sa:!0}).node;u.Ga.Oa(u,{timestamp:Math.max(a,l)});return 0}catch(x){if("undefined"==typeof X||!(x instanceof Q))throw x;return-x.Ka}},f:function(){return Date.now()},k:function(a,b){a=new Date(1E3*Rc(a));F[b>>2]=a.getSeconds();F[b+4>>2]=a.getMinutes();F[b+8>>2]=a.getHours();F[b+12>>2]=a.getDate();
|
||||||
|
F[b+16>>2]=a.getMonth();F[b+20>>2]=a.getFullYear()-1900;F[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);F[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;F[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();F[b+32>>2]=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0},x:function(a,b,c,d,f,h){try{var l=Y(d);if(0!==(b&2)&&0===(c&2)&&2!==(l.flags&2097155))throw new Q(2);if(1===(l.flags&2097155))throw new Q(2);if(!l.Ha.bb)throw new Q(43);
|
||||||
|
var u=l.Ha.bb(l,a,f,b,c);var x=u.Fb;F[h>>2]=u.vb;return x}catch(w){if("undefined"==typeof X||!(w instanceof Q))throw w;return-w.Ka}},y:function(a,b,c,d,f,h){try{var l=Y(f);if(c&2){var u=t.slice(a,a+b);l&&l.Ha.cb&&l.Ha.cb(l,u,h,b,d)}}catch(x){if("undefined"==typeof X||!(x instanceof Q))throw x;return-x.Ka}},o:Uc,r:function(){return t.length},e:Vc,d:function(){E("OOM")},A:function(a,b){var c=0;Xc().forEach(function(d,f){var h=b+c;f=H[a+4*f>>2]=h;for(h=0;h<d.length;++h)q[f++>>0]=d.charCodeAt(h);q[f>>
|
||||||
|
0]=0;c+=d.length+1});return 0},B:function(a,b){var c=Xc();H[a>>2]=c.length;var d=0;c.forEach(function(f){d+=f.length+1});H[b>>2]=d;return 0},g:function(a){try{var b=Y(a);ma(b);return 0}catch(c){if("undefined"==typeof X||!(c instanceof Q))throw c;return c.Ka}},n:function(a,b){try{var c=Y(a);q[b>>0]=c.tty?2:16384===(c.mode&61440)?3:40960===(c.mode&61440)?7:4;return 0}catch(d){if("undefined"==typeof X||!(d instanceof Q))throw d;return d.Ka}},v:function(a,b,c,d){try{a:{var f=Y(a);a=b;for(var h=b=0;h<
|
||||||
|
c;h++){var l=H[a>>2],u=H[a+4>>2];a+=8;var x=gc(f,q,l,u);if(0>x){var w=-1;break a}b+=x;if(x<u)break}w=b}H[d>>2]=w;return 0}catch(A){if("undefined"==typeof X||!(A instanceof Q))throw A;return A.Ka}},l:function(a,b,c,d,f){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return 61;var h=Y(a);fc(h,b,d);P=[h.position>>>0,(O=h.position,1<=+Math.abs(O)?0<O?(Math.min(+Math.floor(O/4294967296),4294967295)|0)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)];F[f>>2]=P[0];F[f+4>>2]=P[1];
|
||||||
|
h.hb&&0===b&&0===d&&(h.hb=null);return 0}catch(l){if("undefined"==typeof X||!(l instanceof Q))throw l;return l.Ka}},D:function(a){try{var b=Y(a);return b.Ha&&b.Ha.fsync?b.Ha.fsync(b):0}catch(c){if("undefined"==typeof X||!(c instanceof Q))throw c;return c.Ka}},s:function(a,b,c,d){try{a:{var f=Y(a);a=b;for(var h=b=0;h<c;h++){var l=H[a>>2],u=H[a+4>>2];a+=8;var x=la(f,q,l,u);if(0>x){var w=-1;break a}b+=x}w=b}H[d>>2]=w;return 0}catch(A){if("undefined"==typeof X||!(A instanceof Q))throw A;return A.Ka}},
|
||||||
|
a:Sa};
|
||||||
|
(function(){function a(f){e.asm=f.exports;M=e.asm.Aa;ab.unshift(e.asm.J);db--;e.monitorRunDependencies&&e.monitorRunDependencies(db);0==db&&(null!==eb&&(clearInterval(eb),eb=null),fb&&(f=fb,fb=null,f()))}function b(f){a(f.instance)}function c(f){return jb().then(function(){return Qa()}).then(function(h){return h}).then(f,function(h){Ka("failed to asynchronously prepare wasm: "+h);E(h)})}var d={a:Pa};db++;e.monitorRunDependencies&&e.monitorRunDependencies(db);if(e.instantiateWasm)try{return e.instantiateWasm(d,a)}catch(f){return Ka("Module.instantiateWasm callback failed with error: "+
|
||||||
|
f),!1}(function(){return La||"function"!=typeof WebAssembly.instantiateStreaming||N.startsWith(gb)||N.startsWith("file://")||Aa||"function"!=typeof fetch?c(b):fetch(N,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,d).then(b,function(h){Ka("wasm streaming compile failed: "+h);Ka("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.J).apply(null,arguments)};
|
||||||
|
e._sqlite3_free=function(){return(e._sqlite3_free=e.asm.K).apply(null,arguments)};e._sqlite3_value_double=function(){return(e._sqlite3_value_double=e.asm.L).apply(null,arguments)};e._sqlite3_value_text=function(){return(e._sqlite3_value_text=e.asm.M).apply(null,arguments)};var dd=e.___errno_location=function(){return(dd=e.___errno_location=e.asm.N).apply(null,arguments)};e._sqlite3_prepare_v2=function(){return(e._sqlite3_prepare_v2=e.asm.O).apply(null,arguments)};
|
||||||
|
e._sqlite3_step=function(){return(e._sqlite3_step=e.asm.P).apply(null,arguments)};e._sqlite3_finalize=function(){return(e._sqlite3_finalize=e.asm.Q).apply(null,arguments)};e._sqlite3_reset=function(){return(e._sqlite3_reset=e.asm.R).apply(null,arguments)};e._sqlite3_value_int=function(){return(e._sqlite3_value_int=e.asm.S).apply(null,arguments)};e._sqlite3_clear_bindings=function(){return(e._sqlite3_clear_bindings=e.asm.T).apply(null,arguments)};
|
||||||
|
e._sqlite3_value_blob=function(){return(e._sqlite3_value_blob=e.asm.U).apply(null,arguments)};e._sqlite3_value_bytes=function(){return(e._sqlite3_value_bytes=e.asm.V).apply(null,arguments)};e._sqlite3_value_type=function(){return(e._sqlite3_value_type=e.asm.W).apply(null,arguments)};e._sqlite3_result_blob=function(){return(e._sqlite3_result_blob=e.asm.X).apply(null,arguments)};e._sqlite3_result_double=function(){return(e._sqlite3_result_double=e.asm.Y).apply(null,arguments)};
|
||||||
|
e._sqlite3_result_error=function(){return(e._sqlite3_result_error=e.asm.Z).apply(null,arguments)};e._sqlite3_result_int=function(){return(e._sqlite3_result_int=e.asm._).apply(null,arguments)};e._sqlite3_result_int64=function(){return(e._sqlite3_result_int64=e.asm.$).apply(null,arguments)};e._sqlite3_result_null=function(){return(e._sqlite3_result_null=e.asm.aa).apply(null,arguments)};e._sqlite3_result_text=function(){return(e._sqlite3_result_text=e.asm.ba).apply(null,arguments)};
|
||||||
|
e._sqlite3_sql=function(){return(e._sqlite3_sql=e.asm.ca).apply(null,arguments)};e._sqlite3_aggregate_context=function(){return(e._sqlite3_aggregate_context=e.asm.da).apply(null,arguments)};e._sqlite3_column_count=function(){return(e._sqlite3_column_count=e.asm.ea).apply(null,arguments)};e._sqlite3_data_count=function(){return(e._sqlite3_data_count=e.asm.fa).apply(null,arguments)};e._sqlite3_column_blob=function(){return(e._sqlite3_column_blob=e.asm.ga).apply(null,arguments)};
|
||||||
|
e._sqlite3_column_bytes=function(){return(e._sqlite3_column_bytes=e.asm.ha).apply(null,arguments)};e._sqlite3_column_double=function(){return(e._sqlite3_column_double=e.asm.ia).apply(null,arguments)};e._sqlite3_column_text=function(){return(e._sqlite3_column_text=e.asm.ja).apply(null,arguments)};e._sqlite3_column_type=function(){return(e._sqlite3_column_type=e.asm.ka).apply(null,arguments)};e._sqlite3_column_name=function(){return(e._sqlite3_column_name=e.asm.la).apply(null,arguments)};
|
||||||
|
e._sqlite3_bind_blob=function(){return(e._sqlite3_bind_blob=e.asm.ma).apply(null,arguments)};e._sqlite3_bind_double=function(){return(e._sqlite3_bind_double=e.asm.na).apply(null,arguments)};e._sqlite3_bind_int=function(){return(e._sqlite3_bind_int=e.asm.oa).apply(null,arguments)};e._sqlite3_bind_text=function(){return(e._sqlite3_bind_text=e.asm.pa).apply(null,arguments)};e._sqlite3_bind_parameter_index=function(){return(e._sqlite3_bind_parameter_index=e.asm.qa).apply(null,arguments)};
|
||||||
|
e._sqlite3_normalized_sql=function(){return(e._sqlite3_normalized_sql=e.asm.ra).apply(null,arguments)};e._sqlite3_errmsg=function(){return(e._sqlite3_errmsg=e.asm.sa).apply(null,arguments)};e._sqlite3_exec=function(){return(e._sqlite3_exec=e.asm.ta).apply(null,arguments)};e._sqlite3_changes=function(){return(e._sqlite3_changes=e.asm.ua).apply(null,arguments)};e._sqlite3_close_v2=function(){return(e._sqlite3_close_v2=e.asm.va).apply(null,arguments)};
|
||||||
|
e._sqlite3_create_function_v2=function(){return(e._sqlite3_create_function_v2=e.asm.wa).apply(null,arguments)};e._sqlite3_open=function(){return(e._sqlite3_open=e.asm.xa).apply(null,arguments)};var ea=e._malloc=function(){return(ea=e._malloc=e.asm.ya).apply(null,arguments)},ca=e._free=function(){return(ca=e._free=e.asm.za).apply(null,arguments)};e._RegisterExtensionFunctions=function(){return(e._RegisterExtensionFunctions=e.asm.Ba).apply(null,arguments)};
|
||||||
|
var Hb=e._emscripten_builtin_memalign=function(){return(Hb=e._emscripten_builtin_memalign=e.asm.Ca).apply(null,arguments)},oa=e.stackSave=function(){return(oa=e.stackSave=e.asm.Da).apply(null,arguments)},qa=e.stackRestore=function(){return(qa=e.stackRestore=e.asm.Ea).apply(null,arguments)},B=e.stackAlloc=function(){return(B=e.stackAlloc=e.asm.Fa).apply(null,arguments)};e.UTF8ToString=C;e.stackAlloc=B;e.stackSave=oa;e.stackRestore=qa;
|
||||||
|
e.cwrap=function(a,b,c,d){c=c||[];var f=c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!d?e["_"+a]:function(){return bd(a,b,c,arguments)}};var ed;fb=function fd(){ed||gd();ed||(fb=fd)};
|
||||||
|
function gd(){function a(){if(!ed&&(ed=!0,e.calledRun=!0,!Ta)){e.noFSInit||ic||(ic=!0,hc(),e.stdin=e.stdin,e.stdout=e.stdout,e.stderr=e.stderr,e.stdin?Mc("stdin",e.stdin):$b("/dev/tty","/dev/stdin"),e.stdout?Mc("stdout",null,e.stdout):$b("/dev/tty","/dev/stdout"),e.stderr?Mc("stderr",null,e.stderr):$b("/dev/tty1","/dev/stderr"),ka("/dev/stdin",0),ka("/dev/stdout",1),ka("/dev/stderr",1));Lb=!1;kb(ab);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&&
|
||||||
|
(e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();bb.unshift(b)}kb(bb)}}if(!(0<db)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)cb();kb($a);0<db||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1);a()},1)):a())}}if(e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();gd();
|
||||||
|
|
||||||
|
|
||||||
|
// The shell-pre.js and emcc-generated code goes above
|
||||||
|
return Module;
|
||||||
|
}); // The end of the promise being returned
|
||||||
|
|
||||||
|
return initSqlJsPromise;
|
||||||
|
} // The end of our initSqlJs function
|
||||||
|
|
||||||
|
// This bit below is copied almost exactly from what you get when you use the MODULARIZE=1 flag with emcc
|
||||||
|
// However, we don't want to use the emcc modularization. See shell-pre.js
|
||||||
|
if (typeof exports === 'object' && typeof module === 'object'){
|
||||||
|
module.exports = initSqlJs;
|
||||||
|
// This will allow the module to be used in ES6 or CommonJS
|
||||||
|
module.exports.default = initSqlJs;
|
||||||
|
}
|
||||||
|
else if (typeof define === 'function' && define['amd']) {
|
||||||
|
define([], function() { return initSqlJs; });
|
||||||
|
}
|
||||||
|
else if (typeof exports === 'object'){
|
||||||
|
exports["Module"] = initSqlJs;
|
||||||
|
}
|
||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
.netgis-attribution{position:absolute;left:0;bottom:0;padding:1mm;background:rgba(255,255,255,0.5);font-size:.8em!important;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;left:0;bottom:8mm;z-index:100}.netgis-controls button{font-size:6mm!important;width:100%;height:12mm;padding:0;border:none;background:none;cursor:pointer;color:white;text-shadow:-0.5mm 0 .3mm #000,.5mm 0 .3mm #000,0 -0.5mm .3mm #000,0 .5mm .3mm #000,0 1mm 3mm rgba(0,0,0,0.7)}.netgis-controls button:hover{text-shadow:-0.5mm 0 .3mm #a7233f,.5mm 0 .3mm #a7233f,0 -0.5mm .3mm #a7233f,0 .5mm .3mm #a7233f,0 1mm 3mm rgba(0,0,0,0.7)}.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-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:default}.netgis-map .netgis-toolbar,.netgis-map .netgis-dialog{cursor:auto}.netgis-map.netgis-mode-view,.netgis-map.netgis-mode-search-place{cursor:default;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.netgis-map.netgis-mode-panning{cursor:move;cursor:all-scroll;cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}.netgis-map.netgis-mode-zooming-in{cursor:zoom-in}.netgis-map.netgis-mode-zooming-out{cursor:zoom-out}.netgis-map.netgis-mode-draw-points,.netgis-map.netgis-mode-draw-lines,.netgis-map.netgis-mode-draw-polygons,.netgis-map.netgis-mode-cut-feature-draw,.netgis-map.netgis-mode-modify-features{cursor:pointer;cursor:crosshair}.netgis-map.netgis-mode-delete-features,.netgis-map.netgis-mode-cut-feature-begin,.netgis-map.netgis-mode-buffer-feature-begin{cursor:pointer}.netgis-map.netgis-mode-buffer-feature-edit{cursor:default}.netgis-menu{position:absolute;left:0;right:0;top:0;height:12mm;line-height:12mm;white-space:nowrap;font-size:0;z-index:1000;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;padding-right:0;padding-left:4mm}.netgis-menu span{padding:0 4mm 0 0}.netgis-menu button i{font-size:5mm;width:12mm;line-height:12mm;text-align:center}.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:5000;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 headLine truncated
|
.netgis-attribution{position:absolute;left:0;bottom:0;padding:1mm;background:rgba(255,255,255,0.5);font-size:.8em!important;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;left:0;bottom:8mm;z-index:100}.netgis-controls button{font-size:6mm!important;width:100%;height:12mm;padding:0;border:none;background:none;cursor:pointer;color:white;text-shadow:-0.5mm 0 .3mm #000,.5mm 0 .3mm #000,0 -0.5mm .3mm #000,0 .5mm .3mm #000,0 1mm 3mm rgba(0,0,0,0.7)}.netgis-controls button:hover{text-shadow:-0.5mm 0 .3mm #a7233f,.5mm 0 .3mm #a7233f,0 -0.5mm .3mm #a7233f,0 .5mm .3mm #a7233f,0 1mm 3mm rgba(0,0,0,0.7)}.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:default}.netgis-map .netgis-toolbar,.netgis-map .netgis-dialog{cursor:auto}.netgis-map.netgis-mode-view,.netgis-map.netgis-mode-search-place{cursor:default;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.netgis-map.netgis-mode-panning{cursor:move;cursor:all-scroll;cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}.netgis-map.netgis-mode-zooming-in{cursor:zoom-in}.netgis-map.netgis-mode-zooming-out{cursor:zoom-out}.netgis-map.netgis-mode-draw-points,.netgis-map.netgis-mode-draw-lines,.netgis-map.netgis-mode-draw-polygons,.netgis-map.netgis-mode-cut-feature-draw,.netgis-map.netgis-mode-modify-features{cursor:pointer;cursor:crosshair}.netgis-map.netgis-mode-delete-features,.netgis-map.netgis-mode-cut-feature-begin,.netgis-map.netgis-mode-buffer-feature-begin{cursor:pointer}.netgis-map.netgis-mode-buffer-feature-edit{cursor:default}.netgis-menu{position:absolute;left:0;right:0;top:0;height:12mm;line-height:12mm;white-space:nowrap;font-size:0;z-index:1000;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;padding-right:0;padding-left:4mm}.netgis-menu span{padding:0 4mm 0 0}.netgis-menu button i{font-size:5mm;width:12mm;line-height:12mm;text-align:center}.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:5000;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}.netgisLine truncated
|
||||||
Vendored
+147
-85
@@ -1,8 +1,14 @@
|
|||||||
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)};
|
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;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
$jscomp.getGlobal=function(a){a=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,a];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
||||||
$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Array.prototype.fill",function(a){return a?a:function(a,c,d){var b=this.length||0;0>c&&(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);c<d;c++)this[c]=a;return this}},"es6","es3");
|
$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Number.parseFloat",function(a){return a||parseFloat},"es6","es3");
|
||||||
$jscomp.polyfill("Number.parseInt",function(a){return a||parseInt},"es6","es3");$jscomp.polyfill("Number.parseFloat",function(a){return a||parseFloat},"es6","es3");$jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};$jscomp.assign="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)$jscomp.owns(d,e)&&(a[e]=d[e])}return a};
|
$jscomp.polyfill("Array.prototype.fill",function(a){return a?a:function(a,c,d){var b=this.length||0;0>c&&(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);c<d;c++)this[c]=a;return this}},"es6","es3");$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
|
||||||
$jscomp.polyfill("Object.assign",function(a){return a||$jscomp.assign},"es6","es3");var netgis=netgis||{};netgis.Attribution=function(){this.layers=this.client=null;this.items=[]};
|
$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.SymbolClass=function(a,b){this.$jscomp$symbol$id_=a;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:b})};$jscomp.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};
|
||||||
|
$jscomp.Symbol=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(c||"")+"_"+b++,c)}var b=0;return a}();
|
||||||
|
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
|
||||||
|
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.asyncIterator;a||(a=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};
|
||||||
|
$jscomp.iteratorFromArray=function(a,b){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var c=0,d={next:function(){if(c<a.length){var e=c++;return{value:b(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};$jscomp.polyfill("Array.prototype.values",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a,c){return c})}},"es8","es3");
|
||||||
|
$jscomp.polyfill("Number.parseInt",function(a){return a||parseInt},"es6","es3");$jscomp.owns=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};$jscomp.assign="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)$jscomp.owns(d,e)&&(a[e]=d[e])}return a};$jscomp.polyfill("Object.assign",function(a){return a||$jscomp.assign},"es6","es3");var netgis=netgis||{};
|
||||||
|
netgis.Attribution=function(){this.layers=this.client=null;this.items=[]};
|
||||||
netgis.Attribution.prototype.load=function(){this.root=document.createElement("section");this.root.className="netgis-attribution netgis-text-primary";netgis.util.isDefined(this.client.config.map)&&netgis.util.isDefined(this.client.config.map.attribution)&&this.items.push(this.client.config.map.attribution);this.update();this.client.root.appendChild(this.root);this.client.on(netgis.Events.CONTEXT_UPDATE,this.onContextUpdate.bind(this));this.client.on(netgis.Events.LAYER_SHOW,this.onLayerShow.bind(this));
|
netgis.Attribution.prototype.load=function(){this.root=document.createElement("section");this.root.className="netgis-attribution netgis-text-primary";netgis.util.isDefined(this.client.config.map)&&netgis.util.isDefined(this.client.config.map.attribution)&&this.items.push(this.client.config.map.attribution);this.update();this.client.root.appendChild(this.root);this.client.on(netgis.Events.CONTEXT_UPDATE,this.onContextUpdate.bind(this));this.client.on(netgis.Events.LAYER_SHOW,this.onLayerShow.bind(this));
|
||||||
this.client.on(netgis.Events.LAYER_HIDE,this.onLayerHide.bind(this))};netgis.Attribution.prototype.update=function(){this.root.innerHTML="© "+this.items.join(", ")};netgis.Attribution.prototype.onContextUpdate=function(a){this.layers=[];for(var b=0;b<a.layers.length;b++){var c=a.layers[b];c.attribution&&0<c.attribution.length&&(this.layers[b]=c.attribution)}};
|
this.client.on(netgis.Events.LAYER_HIDE,this.onLayerHide.bind(this))};netgis.Attribution.prototype.update=function(){this.root.innerHTML="© "+this.items.join(", ")};netgis.Attribution.prototype.onContextUpdate=function(a){this.layers=[];for(var b=0;b<a.layers.length;b++){var c=a.layers[b];c.attribution&&0<c.attribution.length&&(this.layers[b]=c.attribution)}};
|
||||||
netgis.Attribution.prototype.onLayerShow=function(a){if(a=this.layers[a.id]){for(var b=0;b<this.items.length;b++)if(this.items[b]===a)return;this.items.push(a);this.update()}};netgis.Attribution.prototype.onLayerHide=function(a){if(a=this.layers[a.id]){for(var b=0;b<this.items.length;b++)if(this.items[b]===a){this.items.splice(b,1);break}this.update()}};netgis=netgis||{};
|
netgis.Attribution.prototype.onLayerShow=function(a){if(a=this.layers[a.id]){for(var b=0;b<this.items.length;b++)if(this.items[b]===a)return;this.items.push(a);this.update()}};netgis.Attribution.prototype.onLayerHide=function(a){if(a=this.layers[a.id]){for(var b=0;b<this.items.length;b++)if(this.items[b]===a){this.items.splice(b,1);break}this.update()}};netgis=netgis||{};
|
||||||
@@ -21,120 +27,168 @@ netgis.Client.prototype.onMapExportEnd=function(a){this.hideLoader()};netgis=net
|
|||||||
netgis.Controls.prototype.load=function(){this.root=document.createElement("section");this.root.className="netgis-controls";var a=document.createElement("button");a.setAttribute("type","button");a.innerHTML="<i class='fas fa-search-plus'></i>";a.title="Hineinzoomen";a.addEventListener("click",this.onZoomIn.bind(this));this.root.appendChild(a);a=document.createElement("button");a.setAttribute("type","button");a.innerHTML="<i class='fas fa-search-minus'></i>";a.title="Herauszoomen";a.addEventListener("click",
|
netgis.Controls.prototype.load=function(){this.root=document.createElement("section");this.root.className="netgis-controls";var a=document.createElement("button");a.setAttribute("type","button");a.innerHTML="<i class='fas fa-search-plus'></i>";a.title="Hineinzoomen";a.addEventListener("click",this.onZoomIn.bind(this));this.root.appendChild(a);a=document.createElement("button");a.setAttribute("type","button");a.innerHTML="<i class='fas fa-search-minus'></i>";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||{};
|
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_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",
|
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_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",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",
|
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",
|
||||||
IMPORT_GEOJSON:"IMPORT_GEOJSON",IMPORT_GML:"IMPORT_GML",IMPORT_WKT:"IMPORT_WKT",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"});netgis=netgis||{};netgis.LayerTree=function(){this.folderDraw=this.folderImport=this.list=this.root=this.client=null};
|
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",
|
||||||
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,
|
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};
|
||||||
this.onLayerCreated.bind(this));this.client.on(netgis.Events.EDIT_FEATURES_CHANGE,this.onEditFeaturesChange.bind(this));this.client.on(netgis.Events.SET_MODE,this.onSetMode.bind(this))};netgis.LayerTree.prototype.clearAll=function(){this.list.innerHTML=""};
|
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="<hr/>";this.root.appendChild(this.tools);this.buttonAddService=document.createElement("button");this.buttonAddService.className=
|
||||||
|
"netgis-text-primary netgis-hover-primary";this.buttonAddService.innerHTML="<i class='fas fa-folder-plus'></i> Dienst hinzuf\u00fcgen";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";
|
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='<i class="fas fa-folder-open"></i>'+a;c.addEventListener("click",this.onFolderClick.bind(this));b.appendChild(c);a=document.createElement("ul");b.appendChild(a);return b};
|
c.innerHTML='<i class="fas fa-folder-open"></i>'+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));
|
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")};
|
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;d<c.length;d++){var e=c[d];e.checked=a;e=e.dataset.id;netgis.util.isDefined(e)&&(e=parseInt(e),this.client.invoke(a?netgis.Events.LAYER_SHOW:netgis.Events.LAYER_HIDE,{id:e}))}this.updateFolderChecks(b);a=b.parentElement.parentElement;-1!==a.className.search("netgis-folder")&&this.updateFolderChecks(a)};
|
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<c.length;d++){var e=c[d];e.checked=a;e=e.dataset.id;netgis.util.isDefined(e)&&(e=parseInt(e),this.client.invoke(a?netgis.Events.LAYER_SHOW:netgis.Events.LAYER_HIDE,{id:e}))}this.updateFolderChecks(b);a=b.parentElement.parentElement;-1!==a.className.search("netgis-folder")&&this.updateFolderChecks(a)};
|
||||||
netgis.LayerTree.prototype.updateFolderChecks=function(a){netgis.util.isDefined(a)||(a=this.list);for(var b=a.getElementsByClassName("netgis-folder-item"),c=0,d=0;d<b.length;d++){var e=b[d].getElementsByTagName("input")[0];e.checked&&c++}e=a.getElementsByTagName("input")[0];d=0;0<c&&(d=1);c===b.length&&(d=2);switch(d){case 0:e.checked=!1;e.classList.remove("netgis-partial");break;case 1:e.checked=!0;e.classList.add("netgis-partial");break;case 2:e.checked=!0,e.classList.remove("netgis-partial")}(a=
|
netgis.LayerTree.prototype.updateFolderChecks=function(a){netgis.util.isDefined(a)||(a=this.list);for(var b=a.getElementsByClassName("netgis-folder-item"),c=0,d=0;d<b.length;d++){var e=b[d].getElementsByTagName("input")[0];e.checked&&c++}e=a.getElementsByTagName("input")[0];d=0;0<c&&(d=1);c===b.length&&(d=2);switch(d){case 0:e.checked=!1;e.classList.remove("netgis-partial");break;case 1:e.checked=!0;e.classList.add("netgis-partial");break;case 2:e.checked=!0,e.classList.remove("netgis-partial")}(a=
|
||||||
a.parentElement)&&a!==this.list&&(a=a.parentElement)&&-1!==a.className.search("netgis-folder")&&this.updateFolderChecks(a)};
|
a.parentElement)&&a!==this.list&&(a=a.parentElement)&&-1!==a.className.search("netgis-folder")&&this.updateFolderChecks(a)};
|
||||||
netgis.LayerTree.prototype.onItemChange=function(a){var b=a.currentTarget;a=b.checked;var c=b.parentElement.parentElement.parentElement;b=parseInt(b.dataset.id);c=c.parentElement.parentElement;for(var d=c.getElementsByTagName("input"),e=0,f=1;f<d.length;f++)d[f].checked&&e++;-1!==c.className.search("netgis-folder")&&this.updateFolderChecks(c);this.client.invoke(a?netgis.Events.LAYER_SHOW:netgis.Events.LAYER_HIDE,{id:b})};netgis.LayerTree.prototype.onLayerListToggle=function(a){this.root.classList.toggle("netgis-hide")};
|
netgis.LayerTree.prototype.onItemChange=function(a){var b=a.currentTarget;a=b.checked;var c=b.parentElement.parentElement.parentElement;b=parseInt(b.dataset.id);c=c.parentElement.parentElement;for(var d=c.getElementsByTagName("input"),e=0,f=1;f<d.length;f++)d[f].checked&&e++;-1!==c.className.search("netgis-folder")&&this.updateFolderChecks(c);this.client.invoke(a?netgis.Events.LAYER_SHOW:netgis.Events.LAYER_HIDE,{id:b})};netgis.LayerTree.prototype.onLayerListToggle=function(a){this.root.classList.toggle("netgis-hide")};
|
||||||
netgis.LayerTree.prototype.onContextUpdate=function(a){this.clearAll();var b=a.folders;a=a.layers;for(var c=[],d=0;d<b.length;d++){var e=b[d],f=this.createFolder(e.title);c.push(f)}for(d=0;d<a.length;d++)e=a[d],f=this.createLayer(d,e.title,e.active),this.addToFolder(c[e.folder],f);for(d=0;d<b.length;d++)e=b[d],f=c[d],-1===e.parent?this.list.appendChild(f):this.addToFolder(c[e.parent],f);for(d=0;d<a.length;d++)e=a[d],e.active&&this.client.invoke(netgis.Events.LAYER_SHOW,{id:d});for(d=0;d<c.length;d++)this.updateFolderChecks(c[d])};
|
netgis.LayerTree.prototype.onContextUpdate=function(a){this.clearAll();var b=a.folders;a=a.layers;for(var c=[],d=0;d<b.length;d++){var e=b[d],f=this.createFolder(e.title);c.push(f)}for(d=0;d<a.length;d++)e=a[d],f=this.createLayer(d,e.title,e.active),this.addToFolder(c[e.folder],f);for(d=0;d<b.length;d++)e=b[d],f=c[d],-1===e.parent?this.list.appendChild(f):this.addToFolder(c[e.parent],f);for(d=0;d<a.length;d++)e=a[d],e.active&&this.client.invoke(netgis.Events.LAYER_SHOW,{id:d});for(d=0;d<c.length;d++)this.updateFolderChecks(c[d])};
|
||||||
netgis.LayerTree.prototype.onLayerCreated=function(a){var b=this.createLayer(a.id,a.title,a.checked);if("import"===a.folder){this.folderImport||(this.folderImport=this.createFolder("Importierte Ebenen"),this.list.insertBefore(this.folderImport,this.folderDraw?this.folderDraw.nextSibling:this.list.firstChild));var c=this.folderImport}else"draw"===a.folder&&(this.folderDraw||(this.folderDraw=this.createFolder("Zeichnung"),this.list.insertBefore(this.folderDraw,this.list.firstChild)),c=this.folderDraw);
|
netgis.LayerTree.prototype.onLayerCreated=function(a){var b=this.createLayer(a.id,a.title,a.checked);if("import"===a.folder){this.folderImport.classList.remove("netgis-hide");var c=this.folderImport}else"draw"===a.folder&&(this.folderDraw.classList.remove("netgis-hide"),c=this.folderDraw);this.addToFolder(c,b,!0);this.updateFolderChecks(c)};
|
||||||
this.addToFolder(c,b,!0);this.updateFolderChecks(c)};netgis.LayerTree.prototype.onEditFeaturesChange=function(a){if(this.folderDraw){a=this.folderDraw.getElementsByTagName("ul")[0].getElementsByTagName("input")[0];var b=parseInt(a.dataset.id);a.checked||(a.checked=!0,this.updateFolderChecks(this.folderDraw),this.client.invoke(netgis.Events.LAYER_SHOW,{id:b}))}};netgis.LayerTree.prototype.onSetMode=function(a){a===netgis.Modes.SEARCH_PARCEL&&this.root.classList.add("netgis-hide")};netgis=netgis||{};netgis.LayerTypes=Object.freeze({XYZ:"XYZ",OSM:"OSM",WMS:"WMS",WFS:"WFS",KML:"KML"});netgis=netgis||{};netgis.Map=function(){this.attribution=this.root=this.client=null};netgis.Map.prototype.load=function(){this.root=document.createElement("section");this.root.className="netgis-map";this.client.root.appendChild(this.root)};netgis=netgis||{};netgis.MapOpenLayers=function(){netgis.Map.call(this);this.mode=null;this.toolbars={};this.map=this.view=null;this.layers=[];this.interactions={};this.sketch=this.selected=this.hover=this.parcelLayer=this.editLayer=this.snapFeatures=this.snap=null;this.editEventsSilent=!1;this.importLayerID=1E3;this.editLayerID=2E3};netgis.MapOpenLayers.prototype=Object.create(netgis.Map.prototype);netgis.MapOpenLayers.prototype.constructor=netgis.MapOpenLayers;
|
netgis.LayerTree.prototype.onEditFeaturesChange=function(a){if(this.folderDraw){var b=this.folderDraw.getElementsByTagName("ul")[0],c=b.getElementsByTagName("input")[0],d=parseInt(c.dataset.id);c.checked||(c.checked=!0,this.updateFolderChecks(this.folderDraw),this.client.invoke(netgis.Events.LAYER_SHOW,{id:d}));b=b.getElementsByTagName("label")[0].getElementsByTagName("span");b[b.length-1].innerText=a.area&&0<a.area?" (Fl\u00e4che: "+netgis.util.formatArea(a.area,!0)+")":""}};
|
||||||
|
netgis.LayerTree.prototype.onAddServiceWMS=function(a){var b=this.createLayer(a.id,a.title,!0);this.folderServices.classList.remove("netgis-hide");this.addToFolder(this.folderServices,b,!0);this.updateFolderChecks(this.folderServices);this.client.invoke(netgis.Events.LAYER_SHOW,{id:a.id})};
|
||||||
|
netgis.LayerTree.prototype.onAddServiceWFS=function(a){var b=this.createLayer(a.id,a.title,!0);this.folderServices.classList.remove("netgis-hide");this.addToFolder(this.folderServices,b,!0);this.updateFolderChecks(this.folderServices);this.client.invoke(netgis.Events.LAYER_SHOW,{id:a.id})};netgis.LayerTree.prototype.onSetMode=function(a){a===netgis.Modes.SEARCH_PARCEL&&this.root.classList.add("netgis-hide")};
|
||||||
|
netgis.LayerTree.prototype.onAddServiceClick=function(a){this.client.invoke(netgis.Events.ADD_SERVICE_SHOW,null)};netgis=netgis||{};netgis.LayerTypes=Object.freeze({XYZ:"XYZ",OSM:"OSM",WMS:"WMS",WFS:"WFS",KML:"KML"});netgis=netgis||{};netgis.Map=function(){this.attribution=this.root=this.client=null};netgis.Map.prototype.load=function(){this.root=document.createElement("section");this.root.className="netgis-map";this.client.root.appendChild(this.root)};netgis=netgis||{};netgis.MapOpenLayers=function(){netgis.Map.call(this);this.mode=null;this.toolbars={};this.map=this.view=null;this.layers=[];this.interactions={};this.sketch=this.selected=this.hover=this.parcelLayer=this.editLayer=this.snapFeatures=this.snap=null;this.editEventsSilent=!1;this.importLayerID=2E4;this.editLayerID=3E4;this.labelFont="4mm Verdana, sans-serif";this.drawBufferRadius=100;this.drawBufferSegments=3};netgis.MapOpenLayers.prototype=Object.create(netgis.Map.prototype);
|
||||||
|
netgis.MapOpenLayers.prototype.constructor=netgis.MapOpenLayers;
|
||||||
netgis.MapOpenLayers.prototype.load=function(){netgis.Map.prototype.load.call(this);this.dropTarget=document.createElement("div");this.dropTarget.className="netgis-drop-target netgis-hide";this.dropTarget.innerHTML="Datei hier ablegen!";this.root.appendChild(this.dropTarget);this.root.addEventListener("dragenter",this.onDragEnter.bind(this));this.root.addEventListener("dragover",this.onDragEnter.bind(this));this.root.addEventListener("dragend",this.onDragLeave.bind(this));this.root.addEventListener("dragleave",
|
netgis.MapOpenLayers.prototype.load=function(){netgis.Map.prototype.load.call(this);this.dropTarget=document.createElement("div");this.dropTarget.className="netgis-drop-target netgis-hide";this.dropTarget.innerHTML="Datei hier ablegen!";this.root.appendChild(this.dropTarget);this.root.addEventListener("dragenter",this.onDragEnter.bind(this));this.root.addEventListener("dragover",this.onDragEnter.bind(this));this.root.addEventListener("dragend",this.onDragLeave.bind(this));this.root.addEventListener("dragleave",
|
||||||
this.onDragLeave.bind(this));this.root.addEventListener("drop",this.onDragDrop.bind(this));this.createMap();this.createDefaultLayers();this.createInteractions();this.client.on(netgis.Events.CONTEXT_UPDATE,this.onContextUpdate.bind(this));this.client.on(netgis.Events.MAP_UPDATE_STYLE,this.onUpdateStyle.bind(this));this.client.on(netgis.Events.EDIT_FEATURES_LOADED,this.onEditFeaturesLoaded.bind(this));this.client.on(netgis.Events.SET_MODE,this.onSetMode.bind(this));this.client.on(netgis.Events.SNAP_ON,
|
this.onDragLeave.bind(this));this.root.addEventListener("drop",this.onDragDrop.bind(this));this.initMap();this.initDefaultLayers();this.initInteractions();this.client.on(netgis.Events.CONTEXT_UPDATE,this.onContextUpdate.bind(this));this.client.on(netgis.Events.MAP_UPDATE_STYLE,this.onUpdateStyle.bind(this));this.client.on(netgis.Events.EDIT_FEATURES_LOADED,this.onEditFeaturesLoaded.bind(this));this.client.on(netgis.Events.SET_MODE,this.onSetMode.bind(this));this.client.on(netgis.Events.SNAP_ON,this.onSnapOn.bind(this));
|
||||||
this.onSnapOn.bind(this));this.client.on(netgis.Events.SNAP_OFF,this.onSnapOff.bind(this));this.client.on(netgis.Events.LAYER_SHOW,this.onLayerShow.bind(this));this.client.on(netgis.Events.LAYER_HIDE,this.onLayerHide.bind(this));this.client.on(netgis.Events.MAP_ZOOM_WKT,this.onZoomWKT.bind(this));this.client.on(netgis.Events.MAP_SET_EXTENT,this.onSetExtent.bind(this));this.client.on(netgis.Events.MAP_CHANGE_ZOOM,this.onChangeZoom.bind(this));this.client.on(netgis.Events.BUFFER_CHANGE,this.onBufferChange.bind(this));
|
this.client.on(netgis.Events.SNAP_OFF,this.onSnapOff.bind(this));this.client.on(netgis.Events.TRACING_ON,this.onTracingOn.bind(this));this.client.on(netgis.Events.TRACING_OFF,this.onTracingOff.bind(this));this.client.on(netgis.Events.LAYER_SHOW,this.onLayerShow.bind(this));this.client.on(netgis.Events.LAYER_HIDE,this.onLayerHide.bind(this));this.client.on(netgis.Events.MAP_ZOOM_WKT,this.onZoomWKT.bind(this));this.client.on(netgis.Events.MAP_SET_EXTENT,this.onSetExtent.bind(this));this.client.on(netgis.Events.MAP_CHANGE_ZOOM,
|
||||||
this.client.on(netgis.Events.BUFFER_ACCEPT,this.onBufferAccept.bind(this));this.client.on(netgis.Events.BUFFER_CANCEL,this.onBufferCancel.bind(this));this.client.on(netgis.Events.IMPORT_GEOJSON,this.onImportGeoJSON.bind(this));this.client.on(netgis.Events.IMPORT_GML,this.onImportGML.bind(this));this.client.on(netgis.Events.IMPORT_SHAPEFILE,this.onImportShapefile.bind(this));this.client.on(netgis.Events.IMPORT_WKT,this.onImportWKT.bind(this));this.client.on(netgis.Events.EXPORT_PDF,this.onExportPDF.bind(this));
|
this.onChangeZoom.bind(this));this.client.on(netgis.Events.BUFFER_CHANGE,this.onBufferChange.bind(this));this.client.on(netgis.Events.BUFFER_ACCEPT,this.onBufferAccept.bind(this));this.client.on(netgis.Events.BUFFER_CANCEL,this.onBufferCancel.bind(this));this.client.on(netgis.Events.IMPORT_GEOJSON,this.onImportGeoJSON.bind(this));this.client.on(netgis.Events.IMPORT_GML,this.onImportGML.bind(this));this.client.on(netgis.Events.IMPORT_SHAPEFILE,this.onImportShapefile.bind(this));this.client.on(netgis.Events.IMPORT_WKT,
|
||||||
this.client.on(netgis.Events.EXPORT_JPEG,this.onExportJPEG.bind(this));this.client.on(netgis.Events.EXPORT_PNG,this.onExportPNG.bind(this));this.client.on(netgis.Events.EXPORT_GIF,this.onExportGIF.bind(this));this.client.on(netgis.Events.PARCEL_SHOW_PREVIEW,this.onParcelShowPreview.bind(this));this.client.on(netgis.Events.PARCEL_HIDE_PREVIEW,this.onParcelHidePreview.bind(this))};
|
this.onImportWKT.bind(this));this.client.on(netgis.Events.IMPORT_SPATIALITE,this.onImportSpatialite.bind(this));this.client.on(netgis.Events.IMPORT_GEOPACKAGE,this.onImportGeopackage.bind(this));this.client.on(netgis.Events.EXPORT_PDF,this.onExportPDF.bind(this));this.client.on(netgis.Events.EXPORT_JPEG,this.onExportJPEG.bind(this));this.client.on(netgis.Events.EXPORT_PNG,this.onExportPNG.bind(this));this.client.on(netgis.Events.EXPORT_GIF,this.onExportGIF.bind(this));this.client.on(netgis.Events.PARCEL_SHOW_PREVIEW,
|
||||||
netgis.MapOpenLayers.prototype.createMap=function(){var a=this.client.config;"undefined"!==typeof proj4&&(proj4.defs(a.projections),proj4.defs("urn:ogc:def:crs:OGC:1.3:CRS84",proj4.defs("EPSG:4326")),ol.proj.proj4.register(proj4));this.view=new ol.View({projection:a.map.projection,center:a.map.center,minZoom:a.map.minZoom,maxZoom:a.map.maxZoom,zoom:a.map.zoom});this.map=new ol.Map({target:this.root,view:this.view,pixelRatio:1,moveTolerance:5,controls:[]});this.map.on("pointermove",this.onPointerMove.bind(this));
|
this.onParcelShowPreview.bind(this));this.client.on(netgis.Events.PARCEL_HIDE_PREVIEW,this.onParcelHidePreview.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.DRAW_BUFFER_ON,this.onDrawBufferOn.bind(this));this.client.on(netgis.Events.DRAW_BUFFER_OFF,this.onDrawBufferOff.bind(this));this.client.on(netgis.Events.DRAW_BUFFER_RADIUS_CHANGE,this.onDrawBufferRadiusChange.bind(this));
|
||||||
|
this.client.on(netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE,this.onDrawBufferSegmentsChange.bind(this))};
|
||||||
|
netgis.MapOpenLayers.prototype.initMap=function(){var a=this.client.config;"undefined"!==typeof proj4&&(proj4.defs(a.projections),proj4.defs("urn:ogc:def:crs:OGC:1.3:CRS84",proj4.defs("EPSG:4326")),ol.proj.proj4.register(proj4));this.view=new ol.View({projection:a.map.projection,center:a.map.center,minZoom:a.map.minZoom,maxZoom:a.map.maxZoom,zoom:a.map.zoom});this.map=new ol.Map({target:this.root,view:this.view,pixelRatio:1,moveTolerance:5,controls:[]});this.map.on("pointermove",this.onPointerMove.bind(this));
|
||||||
this.map.on("click",this.onSingleClick.bind(this));this.map.on("movestart",this.onMoveStart.bind(this));this.map.on("moveend",this.onMoveEnd.bind(this));this.view.on("change:resolution",this.onChangeResolution.bind(this))};
|
this.map.on("click",this.onSingleClick.bind(this));this.map.on("movestart",this.onMoveStart.bind(this));this.map.on("moveend",this.onMoveEnd.bind(this));this.view.on("change:resolution",this.onChangeResolution.bind(this))};
|
||||||
netgis.MapOpenLayers.prototype.createDefaultLayers=function(){this.editLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[]}),style:this.styleEdit.bind(this),zIndex:this.editLayerID});this.map.addLayer(this.editLayer);this.parcelLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[]}),style:this.styleParcel.bind(this),zIndex:this.editLayerID+10});this.map.addLayer(this.parcelLayer);this.editEventsOn()};
|
netgis.MapOpenLayers.prototype.initDefaultLayers=function(){this.editLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[]}),style:this.styleEdit.bind(this),zIndex:this.editLayerID});this.map.addLayer(this.editLayer);this.previewLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[]}),style:this.styleSketch.bind(this),zIndex:this.editLayerID+10});this.map.addLayer(this.previewLayer);this.parcelLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[]}),style:this.styleParcel.bind(this),
|
||||||
netgis.MapOpenLayers.prototype.editEventsOn=function(){this.editLayer.getSource().on("addfeature",this.onEditLayerAdd.bind(this));this.editLayer.getSource().on("removefeature",this.onEditLayerRemove.bind(this))};netgis.MapOpenLayers.prototype.editEventsOff=function(){};
|
zIndex:this.editLayerID+20});this.map.addLayer(this.parcelLayer);this.editEventsOn()};netgis.MapOpenLayers.prototype.editEventsOn=function(){this.editLayer.getSource().on("addfeature",this.onEditLayerAdd.bind(this));this.editLayer.getSource().on("removefeature",this.onEditLayerRemove.bind(this))};netgis.MapOpenLayers.prototype.editEventsOff=function(){};
|
||||||
netgis.MapOpenLayers.prototype.createInteractions=function(){this.interactions[netgis.Modes.VIEW]=[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.PANNING]=this.interactions[netgis.Modes.VIEW];this.interactions[netgis.Modes.ZOOMING_IN]=this.interactions[netgis.Modes.VIEW];this.interactions[netgis.Modes.ZOOMING_OUT]=this.interactions[netgis.Modes.VIEW];this.interactions[netgis.Modes.DRAW_POINTS]=[new ol.interaction.Draw({type:"Point",source:this.editLayer.getSource(),
|
netgis.MapOpenLayers.prototype.initInteractions=function(){this.interactions[netgis.Modes.VIEW]=[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.PANNING]=this.interactions[netgis.Modes.VIEW];this.interactions[netgis.Modes.ZOOMING_IN]=this.interactions[netgis.Modes.VIEW];this.interactions[netgis.Modes.ZOOMING_OUT]=this.interactions[netgis.Modes.VIEW];this.interactions[netgis.Modes.DRAW_POINTS]=[new ol.interaction.Draw({type:"Point",source:this.editLayer.getSource(),
|
||||||
style:this.styleSketch.bind(this)}),new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.DRAW_LINES]=[new ol.interaction.Draw({type:"LineString",source:this.editLayer.getSource(),style:this.styleSketch.bind(this)}),new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.DRAW_POLYGONS]=[new ol.interaction.Draw({type:"Polygon",source:this.editLayer.getSource(),style:this.styleSketch.bind(this)}),new ol.interaction.DragPan,
|
style:this.styleSketch.bind(this)}),new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.DRAW_POINTS][0].on("drawend",this.onDrawPointsEnd.bind(this));this.interactions[netgis.Modes.DRAW_LINES]=[new ol.interaction.Draw({type:"LineString",source:this.editLayer.getSource(),style:this.styleSketch.bind(this)}),new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.DRAW_LINES][0].on("drawend",this.onDrawLinesEnd.bind(this));
|
||||||
new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.CUT_FEATURE_BEGIN]=[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.CUT_FEATURE_DRAW]=[new ol.interaction.Draw({type:"Polygon",style:this.styleSketch.bind(this)}),new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.CUT_FEATURE_DRAW][0].on("drawend",this.onCutFeatureDrawEnd.bind(this));this.interactions[netgis.Modes.MODIFY_FEATURES]=[new ol.interaction.Modify({source:this.editLayer.getSource(),
|
this.interactions[netgis.Modes.DRAW_POLYGONS]=[new ol.interaction.Draw({type:"Polygon",source:this.editLayer.getSource(),style:this.styleSketch.bind(this)}),new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.CUT_FEATURE_BEGIN]=[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.CUT_FEATURE_DRAW]=[new ol.interaction.Draw({type:"Polygon",style:this.styleSketch.bind(this)}),new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];
|
||||||
deleteCondition:ol.events.condition.doubleClick,style:this.styleModify.bind(this)}),new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.MODIFY_FEATURES][0].on("modifyend",this.onModifyFeaturesEnd.bind(this));this.interactions[netgis.Modes.DELETE_FEATURES]=[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.BUFFER_FEATURE_BEGIN]=[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.BUFFER_FEATURE_EDIT]=
|
this.interactions[netgis.Modes.CUT_FEATURE_DRAW][0].on("drawend",this.onCutFeatureDrawEnd.bind(this));this.interactions[netgis.Modes.MODIFY_FEATURES]=[new ol.interaction.Modify({source:this.editLayer.getSource(),deleteCondition:ol.events.condition.doubleClick,style:this.styleModify.bind(this)}),new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.MODIFY_FEATURES][0].on("modifyend",this.onModifyFeaturesEnd.bind(this));this.interactions[netgis.Modes.DELETE_FEATURES]=[new ol.interaction.DragPan,
|
||||||
[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.snapFeatures=new ol.Collection;this.interactions[netgis.Modes.SEARCH_PLACE]=[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.SEARCH_PARCEL]=this.interactions[netgis.Modes.VIEW]};
|
new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.BUFFER_FEATURE_BEGIN]=[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.BUFFER_FEATURE_EDIT]=[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.snapFeatures=new ol.Collection;this.interactions[netgis.Modes.SEARCH_PLACE]=[new ol.interaction.DragPan,new ol.interaction.MouseWheelZoom];this.interactions[netgis.Modes.SEARCH_PARCEL]=this.interactions[netgis.Modes.VIEW]};
|
||||||
netgis.MapOpenLayers.prototype.createLayer=function(a){switch(a.type){case netgis.LayerTypes.XYZ:var b=new ol.layer.Tile({source:new ol.source.XYZ({url:a.url,crossOrigin:"anonymous"})});return b;case netgis.LayerTypes.OSM:return b=new ol.layer.Tile({source:new ol.source.XYZ({url:"https://{a-c}.tile.openstreetmap.de/{z}/{x}/{y}.png",crossOrigin:"anonymous"})});case netgis.LayerTypes.WMS:var c={url:a.url,params:{LAYERS:a.name,FORMAT:"image/png",TRANSPARENT:"true",VERSION:"1.1.1"},serverType:"mapserver",
|
netgis.MapOpenLayers.prototype.createLayer=function(a){var b=null;switch(a.type){case netgis.LayerTypes.XYZ:b=this.createLayerXYZ(a.url);break;case netgis.LayerTypes.OSM:b=this.createLayerOSM();break;case netgis.LayerTypes.WMS:b=this.createLayerWMS(a.url,a.name,a.format,a.username,a.password);break;case netgis.LayerTypes.WFS:b=this.createLayerWFS(a.url,a.name,this.client.config.map.projection,a.outputFormat)}b&&(a.minZoom&&b.setMinZoom(Number.parseFloat(a.minZoom)-1),a.maxZoom&&b.setMaxZoom(Number.parseFloat(a.maxZoom)));
|
||||||
crossOrigin:"anonymous",hidpi:!1};a.username&&a.password&&(c.imageLoadFunction=function(b,c){var d=new XMLHttpRequest;d.open("GET",c);d.setRequestHeader("Authorization","Basic "+window.btoa(a.username+":"+a.password));d.onload=function(){b.getImage().src=c};d.send()});c=new ol.source.ImageWMS(c);return b=new ol.layer.Image({source:c,opacity:1});case netgis.LayerTypes.WFS:var d=this.client.config,e=a.url+"service=WFS&version=1.1.0&request=GetFeature&outputformat=application/json";c=new ol.source.Vector({format:new ol.format.GeoJSON,
|
return b};netgis.MapOpenLayers.prototype.createLayerXYZ=function(a){return new ol.layer.Tile({source:new ol.source.XYZ({url:a,crossOrigin:"anonymous"})})};netgis.MapOpenLayers.prototype.createLayerOSM=function(){return new ol.layer.Tile({source:new ol.source.XYZ({url:"https://{a-c}.tile.openstreetmap.de/{z}/{x}/{y}.png",crossOrigin:"anonymous"})})};
|
||||||
strategy:ol.loadingstrategy.bbox,url:function(b){return e+"&typename="+a.name+"&srsname="+d.map.projection+"&bbox="+b.join(",")+","+d.map.projection}});b=new ol.layer.Vector({source:c});var f=this;c.on("featuresloadstart",function(a){f.removeSnapLayer(b)});c.on("featuresloadend",function(a){window.setTimeout(function(){f.addSnapLayer(b)},10)});return b}return null};
|
netgis.MapOpenLayers.prototype.createLayerWMS=function(a,b,c,d,e){a={url:a,params:{LAYERS:b,FORMAT:c?c:"image/png",TRANSPARENT:"true",VERSION:"1.1.1"},serverType:"mapserver",crossOrigin:"anonymous",hidpi:!1};d&&e&&(a.imageLoadFunction=function(a,b){var c=new XMLHttpRequest;c.open("GET",b);c.setRequestHeader("Authorization","Basic "+window.btoa(d+":"+e));c.onload=function(){a.getImage().src=b};c.send()});a=new ol.source.ImageWMS(a);return new ol.layer.Image({source:a,opacity:1})};
|
||||||
netgis.MapOpenLayers.prototype.clearAll=function(){for(var a=0;a<this.layers.length;a++)this.map.removeLayer(this.layers[a]);this.layers=[];this.snapFeatures.clear()};netgis.MapOpenLayers.prototype.onUpdateStyle=function(a){a=new ol.style.Style({fill:new ol.style.Fill({color:a.polygon.fill}),stroke:new ol.style.Stroke({color:a.polygon.stroke,width:a.polygon.strokeWidth})});this.editLayer.setStyle(a)};
|
netgis.MapOpenLayers.prototype.createLayerWFS=function(a,b,c,d){a+="service=WFS&version=1.1.0&request=GetFeature";d=d?netgis.util.replace(d," ","+"):"application/json";var e=new ol.source.Vector({format:new ol.format.GeoJSON,strategy:ol.loadingstrategy.bbox,url:function(e){return a+"&typename="+b+"&srsname="+c+"&bbox="+e.join(",")+","+c+"&outputFormat="+d}}),f=new ol.layer.Vector({source:e}),g=this;e.on("featuresloadstart",function(a){g.removeSnapLayer(f)});e.on("featuresloadend",function(a){window.setTimeout(function(){g.addSnapLayer(f)},
|
||||||
netgis.MapOpenLayers.prototype.styleEdit=function(){return new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.editLayer.pointRadius,fill:new ol.style.Fill({color:this.client.config.styles.editLayer.stroke})}),fill:new ol.style.Fill({color:this.client.config.styles.editLayer.fill}),stroke:new ol.style.Stroke({color:this.client.config.styles.editLayer.stroke,width:this.client.config.styles.editLayer.strokeWidth})})};
|
10)});return f};netgis.MapOpenLayers.prototype.clearAll=function(){for(var a=0;a<this.layers.length;a++)this.map.removeLayer(this.layers[a]);this.layers=[];this.snapFeatures.clear()};netgis.MapOpenLayers.prototype.onUpdateStyle=function(a){a=new ol.style.Style({fill:new ol.style.Fill({color:a.polygon.fill}),stroke:new ol.style.Stroke({color:a.polygon.stroke,width:a.polygon.strokeWidth})});this.editLayer.setStyle(a)};
|
||||||
netgis.MapOpenLayers.prototype.styleSelect=function(a){return new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.select.pointRadius,fill:new ol.style.Fill({color:this.client.config.styles.select.stroke})}),fill:new ol.style.Fill({color:this.client.config.styles.select.fill}),stroke:new ol.style.Stroke({color:this.client.config.styles.select.stroke,width:this.client.config.styles.select.strokeWidth})})};
|
netgis.MapOpenLayers.prototype.styleEdit=function(a){var b=this.client.config.styles.editLayer.pointRadius;a=a.getGeometry();b=new ol.style.Style({image:new ol.style.Circle({radius:b,fill:new ol.style.Fill({color:this.client.config.styles.editLayer.stroke})}),fill:new ol.style.Fill({color:this.client.config.styles.editLayer.fill}),stroke:new ol.style.Stroke({color:this.client.config.styles.editLayer.stroke,width:this.client.config.styles.editLayer.strokeWidth})});a instanceof ol.geom.Polygon&&(a=
|
||||||
|
a.getArea(),b.setText(new ol.style.Text({text:[netgis.util.formatArea(a,!0),"4mm sans-serif"],font:this.labelFont,fill:new ol.style.Fill({color:this.client.config.styles.editLayer.stroke}),backgroundFill:new ol.style.Fill({color:"rgba( 255, 255, 255, 0.5 )"}),padding:[2,4,2,4]})));return b};
|
||||||
|
netgis.MapOpenLayers.prototype.styleSelect=function(a){var b=a.getGeometry();a=new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.select.pointRadius,fill:new ol.style.Fill({color:this.client.config.styles.select.stroke})}),fill:new ol.style.Fill({color:this.client.config.styles.select.fill}),stroke:new ol.style.Stroke({color:this.client.config.styles.select.stroke,width:this.client.config.styles.select.strokeWidth})});b instanceof ol.geom.Polygon&&(b=b.getArea(),a.setText(new ol.style.Text({text:[netgis.util.formatArea(b,
|
||||||
|
!0),"4mm sans-serif"],font:this.labelFont,fill:new ol.style.Fill({color:this.client.config.styles.select.stroke}),backgroundFill:new ol.style.Fill({color:"rgba( 255, 255, 255, 0.5 )"}),padding:[2,4,2,4]})));return a};
|
||||||
netgis.MapOpenLayers.prototype.styleModify=function(a){var b=new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.modify.pointRadius,fill:new ol.style.Fill({color:this.client.config.styles.modify.stroke})}),fill:new ol.style.Fill({color:this.client.config.styles.modify.fill}),stroke:new ol.style.Stroke({color:this.client.config.styles.modify.stroke,width:this.client.config.styles.modify.strokeWidth})});a=new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.modify.pointRadius,
|
netgis.MapOpenLayers.prototype.styleModify=function(a){var b=new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.modify.pointRadius,fill:new ol.style.Fill({color:this.client.config.styles.modify.stroke})}),fill:new ol.style.Fill({color:this.client.config.styles.modify.fill}),stroke:new ol.style.Stroke({color:this.client.config.styles.modify.stroke,width:this.client.config.styles.modify.strokeWidth})});a=new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.modify.pointRadius,
|
||||||
fill:new ol.style.Fill({color:this.client.config.styles.modify.stroke})}),geometry:this.getGeometryPoints(a)});return[b,a]};
|
fill:new ol.style.Fill({color:this.client.config.styles.modify.stroke})}),geometry:this.getGeometryPoints(a)});return[b,a]};
|
||||||
netgis.MapOpenLayers.prototype.styleSketch=function(a){var b=new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.sketch.pointRadius,fill:new ol.style.Fill({color:this.client.config.styles.sketch.stroke})}),fill:new ol.style.Fill({color:this.client.config.styles.sketch.fill}),stroke:new ol.style.Stroke({color:this.client.config.styles.sketch.stroke,width:this.client.config.styles.sketch.strokeWidth})});a=new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.sketch.pointRadius,
|
netgis.MapOpenLayers.prototype.styleSketch=function(a){var b=a.getGeometry(),c=new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.sketch.pointRadius,fill:new ol.style.Fill({color:this.client.config.styles.sketch.stroke})}),fill:new ol.style.Fill({color:this.client.config.styles.sketch.fill}),stroke:new ol.style.Stroke({color:this.client.config.styles.sketch.stroke,width:this.client.config.styles.sketch.strokeWidth})});b instanceof ol.geom.Polygon&&(b=b.getArea(),c.setText(new ol.style.Text({text:[netgis.util.formatArea(b,
|
||||||
fill:new ol.style.Fill({color:this.client.config.styles.sketch.stroke})}),geometry:this.getGeometryPoints(a)});return[b,a]};netgis.MapOpenLayers.prototype.styleParcel=function(){return new ol.style.Style({fill:new ol.style.Fill({color:this.client.config.styles.parcel.fill}),stroke:new ol.style.Stroke({color:this.client.config.styles.parcel.stroke,width:this.client.config.styles.parcel.strokeWidth})})};
|
!0),"4mm sans-serif"],font:this.labelFont,fill:new ol.style.Fill({color:this.client.config.styles.sketch.stroke}),backgroundFill:new ol.style.Fill({color:"rgba( 255, 255, 255, 0.5 )"}),padding:[2,4,2,4]})));a=new ol.style.Style({image:new ol.style.Circle({radius:this.client.config.styles.sketch.pointRadius,fill:new ol.style.Fill({color:this.client.config.styles.sketch.stroke})}),geometry:this.getGeometryPoints(a)});return[c,a]};
|
||||||
|
netgis.MapOpenLayers.prototype.styleParcel=function(){return new ol.style.Style({fill:new ol.style.Fill({color:this.client.config.styles.parcel.fill}),stroke:new ol.style.Stroke({color:this.client.config.styles.parcel.stroke,width:this.client.config.styles.parcel.strokeWidth})})};
|
||||||
netgis.MapOpenLayers.prototype.getGeometryPoints=function(a){var b=a.getGeometry();if(b instanceof ol.geom.LineString)return new ol.geom.MultiPoint(b.getCoordinates());if(b instanceof ol.geom.Polygon){a=[];b=b.getCoordinates();for(var c=0;c<b.length;c++)for(var d=b[c],e=0;e<d.length;e++)a.push(d[e]);return new ol.geom.MultiPoint(a)}if(b instanceof ol.geom.MultiPolygon){a=[];for(var f=b.getPolygons(),g=0;g<f.length;g++)for(b=f[g].getCoordinates(),c=0;c<b.length;c++)for(d=b[c],e=0;e<d.length;e++)a.push(d[e]);
|
netgis.MapOpenLayers.prototype.getGeometryPoints=function(a){var b=a.getGeometry();if(b instanceof ol.geom.LineString)return new ol.geom.MultiPoint(b.getCoordinates());if(b instanceof ol.geom.Polygon){a=[];b=b.getCoordinates();for(var c=0;c<b.length;c++)for(var d=b[c],e=0;e<d.length;e++)a.push(d[e]);return new ol.geom.MultiPoint(a)}if(b instanceof ol.geom.MultiPolygon){a=[];for(var f=b.getPolygons(),g=0;g<f.length;g++)for(b=f[g].getCoordinates(),c=0;c<b.length;c++)for(d=b[c],e=0;e<d.length;e++)a.push(d[e]);
|
||||||
return new ol.geom.MultiPoint(a)}if(b instanceof ol.geom.MultiLineString){a=[];f=b.getPolygons();for(g=0;g<f.length;g++)for(b=f[g].getCoordinates(),c=0;c<b.length;c++)for(d=b[c],e=0;e<d.length;e++)a.push(d[e]);return new ol.geom.MultiPoint(a)}return b};netgis.MapOpenLayers.prototype.getActiveVectorLayers=function(){for(var a=[],b=this.map.getLayers().getArray(),c=this.layers,d=0;d<c.length;d++){var e=c[d];e instanceof ol.layer.Vector&&-1<b.indexOf(e)&&a.push(e)}return a};
|
return new ol.geom.MultiPoint(a)}if(b instanceof ol.geom.MultiLineString){a=[];f=b.getPolygons();for(g=0;g<f.length;g++)for(b=f[g].getCoordinates(),c=0;c<b.length;c++)for(d=b[c],e=0;e<d.length;e++)a.push(d[e]);return new ol.geom.MultiPoint(a)}return b};netgis.MapOpenLayers.prototype.getActiveVectorLayers=function(){for(var a=[],b=this.map.getLayers().getArray(),c=this.layers,d=0;d<c.length;d++){var e=c[d];e instanceof ol.layer.Vector&&-1<b.indexOf(e)&&a.push(e)}return a};
|
||||||
netgis.MapOpenLayers.prototype.setMode=function(a){switch(this.mode){case netgis.Modes.BUFFER_FEATURE_EDIT:this.onBufferCancel(null)}this.map.getInteractions().clear();var b=this.interactions[a];if(b)for(var c=0;c<b.length;c++)this.map.addInteraction(b[c]);this.snap&&(a===netgis.Modes.DRAW_POINTS||a===netgis.Modes.DRAW_LINES||a===netgis.Modes.DRAW_POLYGONS)&&this.map.addInteraction(this.snap);switch(a){default:this.editLayer.setStyle(this.styleEdit.bind(this));break;case netgis.Modes.MODIFY_FEATURES:this.editLayer.setStyle(this.styleModify.bind(this))}this.mode&&
|
netgis.MapOpenLayers.prototype.setMode=function(a){switch(this.mode){case netgis.Modes.BUFFER_FEATURE_EDIT:this.onBufferCancel(null);break;case netgis.Modes.DRAW_POINTS:case netgis.Modes.DRAW_LINES:this.onDrawBufferOff(null)}this.map.getInteractions().clear();var b=this.interactions[a];if(b)for(var c=0;c<b.length;c++)this.map.addInteraction(b[c]);this.snap&&(a===netgis.Modes.DRAW_POINTS||a===netgis.Modes.DRAW_LINES||a===netgis.Modes.DRAW_POLYGONS)&&this.map.addInteraction(this.snap);switch(a){default:this.editLayer.setStyle(this.styleEdit.bind(this));
|
||||||
this.root.classList.remove(this.getModeClassName(this.mode));a&&this.root.classList.add(this.getModeClassName(a));this.mode=a};netgis.MapOpenLayers.prototype.getModeClassName=function(a){a=a.toLowerCase();a=netgis.util.replace(a,"_","-");return"netgis-mode-"+a};netgis.MapOpenLayers.prototype.setSnapOn=function(){this.snap=new ol.interaction.Snap({features:this.snapFeatures});this.map.addInteraction(this.snap);this.snapFeatures.changed()};
|
break;case netgis.Modes.MODIFY_FEATURES:this.editLayer.setStyle(this.styleModify.bind(this))}this.mode&&this.root.classList.remove(this.getModeClassName(this.mode));a&&this.root.classList.add(this.getModeClassName(a));this.mode=a};netgis.MapOpenLayers.prototype.getModeClassName=function(a){a=a.toLowerCase();a=netgis.util.replace(a,"_","-");return"netgis-mode-"+a};
|
||||||
netgis.MapOpenLayers.prototype.setSnapOff=function(){this.snap&&(this.map.removeInteraction(this.snap),this.snap=null)};netgis.MapOpenLayers.prototype.addSnapLayer=function(a){a=a.getSource().getFeatures();for(var b=0;b<a.length;b++)this.snapFeatures.push(a[b])};netgis.MapOpenLayers.prototype.removeSnapLayer=function(a){a=a.getSource().getFeatures();for(var b=0;b<a.length;b++)this.snapFeatures.remove(a[b])};netgis.MapOpenLayers.prototype.onSnapOn=function(a){this.setSnapOn()};
|
netgis.MapOpenLayers.prototype.setSnapOn=function(){this.snap=new ol.interaction.Snap({features:this.snapFeatures});this.map.addInteraction(this.snap);this.snapFeatures.changed()};netgis.MapOpenLayers.prototype.setSnapOff=function(){this.snap&&(this.map.removeInteraction(this.snap),this.snap=null)};
|
||||||
netgis.MapOpenLayers.prototype.onSnapOff=function(a){this.setSnapOff()};netgis.MapOpenLayers.prototype.onLayerShow=function(a){if(a=this.layers[a.id])this.map.addLayer(a),a instanceof ol.layer.Vector&&this.addSnapLayer(a)};netgis.MapOpenLayers.prototype.onLayerHide=function(a){if(a=this.layers[a.id])this.map.removeLayer(a),a instanceof ol.layer.Vector&&this.removeSnapLayer(a)};
|
netgis.MapOpenLayers.prototype.setTracingOn=function(){var a=new ol.source.Vector({features:this.snapFeatures});this.tracing=new ol.interaction.Draw({type:"Polygon",source:this.editLayer.getSource(),style:this.styleSketch.bind(this),trace:!0,traceSource:a});a=this.interactions[netgis.Modes.DRAW_POLYGONS];a[0].setActive(!1);a.push(this.tracing);this.setMode(this.mode)};
|
||||||
|
netgis.MapOpenLayers.prototype.setTracingOff=function(){var a=this.interactions[netgis.Modes.DRAW_POLYGONS];a[0].setActive(!0);a.splice(a.indexOf(this.tracing),1);this.setMode(this.mode)};netgis.MapOpenLayers.prototype.addSnapLayer=function(a){a=a.getSource().getFeatures();for(var b=0;b<a.length;b++)this.snapFeatures.push(a[b])};netgis.MapOpenLayers.prototype.removeSnapLayer=function(a){a=a.getSource().getFeatures();for(var b=0;b<a.length;b++)this.snapFeatures.remove(a[b])};
|
||||||
|
netgis.MapOpenLayers.prototype.onSnapOn=function(a){this.setSnapOn()};netgis.MapOpenLayers.prototype.onSnapOff=function(a){this.setSnapOff()};netgis.MapOpenLayers.prototype.onTracingOn=function(a){this.setTracingOn()};netgis.MapOpenLayers.prototype.onTracingOff=function(a){this.setTracingOff()};netgis.MapOpenLayers.prototype.onLayerShow=function(a){if(a=this.layers[a.id])this.map.addLayer(a),a instanceof ol.layer.Vector&&this.addSnapLayer(a)};
|
||||||
|
netgis.MapOpenLayers.prototype.onLayerHide=function(a){if(a=this.layers[a.id])this.map.removeLayer(a),a instanceof ol.layer.Vector&&this.removeSnapLayer(a)};
|
||||||
netgis.MapOpenLayers.prototype.onContextUpdate=function(a){this.clearAll();var b=a.bbox;if(b){if(netgis.util.isDefined(this.client.config.map)&&netgis.util.isDefined(this.client.config.map.projection)){var c=ol.proj.fromLonLat([b[0],b[1]],this.client.config.map.projection);var d=ol.proj.fromLonLat([b[2],b[3]],this.client.config.map.projection)}else c=ol.proj.fromLonLat([b[0],b[1]]),d=ol.proj.fromLonLat([b[2],b[3]]);b[0]=c[0];b[1]=c[1];b[2]=d[0];b[3]=d[1];this.view.fit(b)}for(b=0;b<a.layers.length;b++)if(c=
|
netgis.MapOpenLayers.prototype.onContextUpdate=function(a){this.clearAll();var b=a.bbox;if(b){if(netgis.util.isDefined(this.client.config.map)&&netgis.util.isDefined(this.client.config.map.projection)){var c=ol.proj.fromLonLat([b[0],b[1]],this.client.config.map.projection);var d=ol.proj.fromLonLat([b[2],b[3]],this.client.config.map.projection)}else c=ol.proj.fromLonLat([b[0],b[1]]),d=ol.proj.fromLonLat([b[2],b[3]]);b[0]=c[0];b[1]=c[1];b[2]=d[0];b[3]=d[1];this.view.fit(b)}for(b=0;b<a.layers.length;b++)if(c=
|
||||||
this.createLayer(a.layers[b]))c.setZIndex(a.layers.length-b),this.layers[b]=c};netgis.MapOpenLayers.prototype.onSetMode=function(a){this.setMode(a)};netgis.MapOpenLayers.prototype.onSetExtent=function(a){var b=ol.proj.fromLonLat([a.minx,a.miny],this.client.config.map.projection);a=ol.proj.fromLonLat([a.maxx,a.maxy],this.client.config.map.projection);this.view.fit([b[0],b[1],a[0],a[1]])};netgis.MapOpenLayers.prototype.onChangeZoom=function(a){this.view.animate({zoom:this.view.getZoom()+a,duration:200})};
|
this.createLayer(a.layers[b]))c.setZIndex(a.layers.length-b),this.layers[b]=c};netgis.MapOpenLayers.prototype.onAddServiceWMS=function(a){var b=this.createLayerWMS(a.url,a.name,a.format);b.setZIndex(a.id);this.layers[a.id]=b};netgis.MapOpenLayers.prototype.onAddServiceWFS=function(a){var b=this.createLayerWFS(a.url,a.name,this.client.config.map.projection,a.format);b.setZIndex(a.id);this.layers[a.id]=b};netgis.MapOpenLayers.prototype.onSetMode=function(a){this.setMode(a)};
|
||||||
netgis.MapOpenLayers.prototype.onZoomWKT=function(a){a=(new ol.format.WKT).readGeometry(a);this.view.fit(a,{duration:300,padding:[40,40,40,40]})};
|
netgis.MapOpenLayers.prototype.onSetExtent=function(a){var b=ol.proj.fromLonLat([a.minx,a.miny],this.client.config.map.projection);a=ol.proj.fromLonLat([a.maxx,a.maxy],this.client.config.map.projection);this.view.fit([b[0],b[1],a[0],a[1]])};netgis.MapOpenLayers.prototype.onChangeZoom=function(a){this.view.animate({zoom:this.view.getZoom()+a,duration:200})};netgis.MapOpenLayers.prototype.onZoomWKT=function(a){a=(new ol.format.WKT).readGeometry(a);this.view.fit(a,{duration:300,padding:[40,40,40,40]})};
|
||||||
netgis.MapOpenLayers.prototype.onPointerMove=function(a){var b=this.hover,c=this.styleSelect.bind(this);b&&(b.setStyle(this.styleEdit.bind(this)),b=null);var d=this;switch(this.mode){case netgis.Modes.DELETE_FEATURES:this.map.forEachFeatureAtPixel(a.pixel,function(a,f){f===d.editLayer&&(b=a,a.setStyle(c));return!0});break;case netgis.Modes.CUT_FEATURE_BEGIN:this.map.forEachFeatureAtPixel(a.pixel,function(a,f){f===d.editLayer&&(b=a,a.setStyle(c));return!0});break;case netgis.Modes.BUFFER_FEATURE_BEGIN:this.map.forEachFeatureAtPixel(a.pixel,
|
netgis.MapOpenLayers.prototype.onPointerMove=function(a){a=a.pixel;var b=this.hover,c=this.styleSelect.bind(this);b&&(b.setStyle(this.styleEdit.bind(this)),b=null);var d=this;switch(this.mode){case netgis.Modes.DELETE_FEATURES:this.map.forEachFeatureAtPixel(a,function(a,f){f===d.editLayer&&(b=a,a.setStyle(c));return!0});break;case netgis.Modes.CUT_FEATURE_BEGIN:this.map.forEachFeatureAtPixel(a,function(a,f){f===d.editLayer&&(b=a,a.setStyle(c));return!0});break;case netgis.Modes.BUFFER_FEATURE_BEGIN:this.map.forEachFeatureAtPixel(a,
|
||||||
function(a,f){f===d.editLayer&&(b=a,a.setStyle(c));return!0})}this.hover=b};
|
function(a,f){f===d.editLayer&&(b=a,a.setStyle(c));return!0});break;case netgis.Modes.DRAW_POINTS:case netgis.Modes.DRAW_LINES:this.updateDrawBufferPreview()}this.hover=b};
|
||||||
netgis.MapOpenLayers.prototype.onSingleClick=function(a){switch(this.mode){case netgis.Modes.DELETE_FEATURES:this.hover&&(this.editLayer.getSource().removeFeature(this.hover),this.hover=null);break;case netgis.Modes.CUT_FEATURE_BEGIN:this.hover&&(this.selected=this.hover,this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.CUT_FEATURE_DRAW));break;case netgis.Modes.BUFFER_FEATURE_BEGIN:this.hover&&(this.selected=this.hover,this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.BUFFER_FEATURE_EDIT))}};
|
netgis.MapOpenLayers.prototype.onSingleClick=function(a){switch(this.mode){case netgis.Modes.DELETE_FEATURES:this.hover&&(this.editLayer.getSource().removeFeature(this.hover),this.hover=null);break;case netgis.Modes.CUT_FEATURE_BEGIN:this.hover&&(this.selected=this.hover,this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.CUT_FEATURE_DRAW));break;case netgis.Modes.BUFFER_FEATURE_BEGIN:this.hover&&(this.selected=this.hover,this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.BUFFER_FEATURE_EDIT))}};
|
||||||
netgis.MapOpenLayers.prototype.onMoveStart=function(a){};netgis.MapOpenLayers.prototype.onMoveEnd=function(a){};netgis.MapOpenLayers.prototype.onChangeResolution=function(a){};
|
netgis.MapOpenLayers.prototype.onMoveStart=function(a){};netgis.MapOpenLayers.prototype.onMoveEnd=function(a){};netgis.MapOpenLayers.prototype.onChangeResolution=function(a){};
|
||||||
netgis.MapOpenLayers.prototype.onCutFeatureDrawEnd=function(a){var b=a.feature;if(a=this.selected){var c=new jsts.io.OL3Parser,d=c.read(a.getGeometry());b=c.read(b.getGeometry());d=d.difference(b);c=c.write(d);c=new ol.Feature({geometry:c});d=this.editLayer.getSource();d.removeFeature(a);d.addFeature(c);this.selected=c}this.editEventsSilent=!0;this.splitMultiPolygons(this.editLayer);this.editEventsSilent=!1;this.updateEditOutput()};netgis.MapOpenLayers.prototype.onModifyFeaturesEnd=function(a){this.updateEditOutput()};
|
netgis.MapOpenLayers.prototype.onCutFeatureDrawEnd=function(a){var b=a.feature;if(a=this.selected){var c=new jsts.io.OL3Parser,d=c.read(a.getGeometry());b=c.read(b.getGeometry());d=d.difference(b);c=c.write(d);c=new ol.Feature({geometry:c});d=this.editLayer.getSource();d.removeFeature(a);d.addFeature(c);this.selected=c}this.editEventsSilent=!0;this.splitMultiPolygons(this.editLayer);this.editEventsSilent=!1;this.updateEditOutput()};
|
||||||
netgis.MapOpenLayers.prototype.onBufferChange=function(a){var b=a.radius,c=a.segments;a=this.editLayer.getSource();var d=this.selected;this.sketch&&a.removeFeature(this.sketch);if(d){var e=new jsts.io.OL3Parser;b=e.read(d.getGeometry()).buffer(b,c);b=e.write(b);b=new ol.Feature({geometry:b});a.addFeature(b);this.sketch=b}};netgis.MapOpenLayers.prototype.onBufferAccept=function(a){this.selected&&this.sketch&&this.editLayer.getSource().removeFeature(this.selected);this.selected=this.sketch=null};
|
netgis.MapOpenLayers.prototype.onModifyFeaturesEnd=function(a){this.updateEditOutput();this.updateEditArea()};netgis.MapOpenLayers.prototype.createBufferFeature=function(a,b,c){a=this.createBufferGeometry(a,b,c);return new ol.Feature({geometry:a})};netgis.MapOpenLayers.prototype.createBufferGeometry=function(a,b,c){var d=new jsts.io.OL3Parser;a=d.read(a).buffer(b,c);return d.write(a)};
|
||||||
netgis.MapOpenLayers.prototype.onBufferCancel=function(a){this.sketch&&(this.editLayer.getSource().removeFeature(this.sketch),this.sketch=null);this.selected=null};netgis.MapOpenLayers.prototype.onEditLayerAdd=function(a){this.updateEditOutput();this.updateEditLayerItem();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.onBufferChange=function(a){var b=this.editLayer.getSource(),c=this.selected;this.sketch&&b.removeFeature(this.sketch);c&&(a=this.createBufferFeature(c.getGeometry(),a.radius,a.segments),b.addFeature(a),this.sketch=a)};netgis.MapOpenLayers.prototype.onBufferAccept=function(a){this.selected&&this.sketch&&this.editLayer.getSource().removeFeature(this.selected);this.selected=this.sketch=null};
|
||||||
netgis.MapOpenLayers.prototype.updateEditOutput=function(){var a=this.editLayer.getSource().getFeatures();a=(new ol.format.GeoJSON).writeFeaturesObject(a);this.editEventsSilent||this.client.invoke(netgis.Events.EDIT_FEATURES_CHANGE,a)};netgis.MapOpenLayers.prototype.updateEditLayerItem=function(){var a=this.editLayerID;this.layers[a]||(this.layers[a]=this.editLayer,this.client.invoke(netgis.Events.LAYER_CREATED,{id:a,title:"Zeichnung",checked:!0,folder:"draw"}))};
|
netgis.MapOpenLayers.prototype.onBufferCancel=function(a){this.sketch&&(this.editLayer.getSource().removeFeature(this.sketch),this.sketch=null);this.selected=null};netgis.MapOpenLayers.prototype.onDrawPointsEnd=function(a){(a=this.previewLayer.getSource().getFeatures()[0])&&this.editLayer.getSource().addFeature(a.clone())};netgis.MapOpenLayers.prototype.onDrawLinesEnd=function(a){(a=this.previewLayer.getSource().getFeatures()[0])&&this.editLayer.getSource().addFeature(a.clone())};
|
||||||
netgis.MapOpenLayers.prototype.onEditFeaturesLoaded=function(a){a=(new ol.format.GeoJSON).readFeatures(a);this.editLayer.getSource().addFeatures(a);0<a.length&&this.view.fit(this.editLayer.getSource().getExtent(),{padding:[40,40,40,40]})};netgis.MapOpenLayers.prototype.onDragEnter=function(a){a.preventDefault();this.dropTarget.classList.remove("netgis-hide");return!1};netgis.MapOpenLayers.prototype.onDragLeave=function(a){this.dropTarget.classList.add("netgis-hide");return!1};
|
netgis.MapOpenLayers.prototype.onDrawBufferOn=function(a){a=this.createBufferFeature(new ol.geom.Point(this.client.config.map.center),this.drawBufferRadius,this.drawBufferSegments);this.previewLayer.getSource().addFeature(a)};netgis.MapOpenLayers.prototype.onDrawBufferOff=function(a){this.previewLayer.getSource().clear()};netgis.MapOpenLayers.prototype.onDrawBufferRadiusChange=function(a){this.drawBufferRadius=a;this.updateDrawBufferPreview()};
|
||||||
|
netgis.MapOpenLayers.prototype.onDrawBufferSegmentsChange=function(a){this.drawBufferSegments=a;this.updateDrawBufferPreview()};netgis.MapOpenLayers.prototype.updateDrawBufferPreview=function(){var a=this.interactions[this.mode][0].getOverlay().getSource().getFeatures();if(!(1>a.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.client.config.map.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;d<a.length;d++){var e=a[d].getGeometry();e instanceof ol.geom.Polygon&&(b+=e.getArea())}c.area=b;this.editEventsSilent||this.client.invoke(netgis.Events.EDIT_FEATURES_CHANGE,c)};
|
||||||
|
netgis.MapOpenLayers.prototype.updateEditLayerItem=function(){var a=this.editLayerID;this.layers[a]||(this.layers[a]=this.editLayer,this.client.invoke(netgis.Events.LAYER_CREATED,{id:a,title:"Zeichnung",checked:!0,folder:"draw"}))};netgis.MapOpenLayers.prototype.updateEditArea=function(){};netgis.MapOpenLayers.prototype.onEditFeaturesLoaded=function(a){var b=this;window.setTimeout(function(){b.createLayerGeoJSON("Import",a)},10)};
|
||||||
|
netgis.MapOpenLayers.prototype.onDragEnter=function(a){a.preventDefault();this.dropTarget.classList.remove("netgis-hide");return!1};netgis.MapOpenLayers.prototype.onDragLeave=function(a){this.dropTarget.classList.add("netgis-hide");return!1};
|
||||||
netgis.MapOpenLayers.prototype.onDragDrop=function(a){console.info("Drag Drop");this.dropTarget.classList.add("netgis-hide");a.preventDefault();a=a.dataTransfer.files[0];var b=new FileReader;b.onload=this.onDragLoad.bind(this);console.log("File:",a);b.readAsArrayBuffer(a);return!1};netgis.MapOpenLayers.prototype.onDragLoad=function(a){console.log("On Load:",a.target);this.loadShape(a.target.result)};netgis.MapOpenLayers.prototype.loadShape=function(a){var b=this;shp(a).then(function(a){b.onShapeLoad(a)})};
|
netgis.MapOpenLayers.prototype.onDragDrop=function(a){console.info("Drag Drop");this.dropTarget.classList.add("netgis-hide");a.preventDefault();a=a.dataTransfer.files[0];var b=new FileReader;b.onload=this.onDragLoad.bind(this);console.log("File:",a);b.readAsArrayBuffer(a);return!1};netgis.MapOpenLayers.prototype.onDragLoad=function(a){console.log("On Load:",a.target);this.loadShape(a.target.result)};netgis.MapOpenLayers.prototype.loadShape=function(a){var b=this;shp(a).then(function(a){b.onShapeLoad(a)})};
|
||||||
netgis.MapOpenLayers.prototype.onShapeLoad=function(a){console.info("Shapefile To Geojson:",a);a=(new ol.format.GeoJSON({dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"})).readFeatures(a);this.importLayer.getSource().addFeatures(a);this.view.fit(this.importLayer.getSource().getExtent(),{})};netgis.MapOpenLayers.prototype.onImportGeoJSON=function(a){var b=a.name,c=this,d=new FileReader;d.onload=function(a){c.createLayerGeoJSON(b,a.target.result)};d.readAsText(a)};
|
netgis.MapOpenLayers.prototype.onShapeLoad=function(a){console.info("Shapefile To Geojson:",a);a=(new ol.format.GeoJSON({dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"})).readFeatures(a);this.importLayer.getSource().addFeatures(a);this.view.fit(this.importLayer.getSource().getExtent(),{})};netgis.MapOpenLayers.prototype.onImportGeoJSON=function(a){var b=a.name,c=this,d=new FileReader;d.onload=function(a){c.createLayerGeoJSON(b,a.target.result)};d.readAsText(a)};
|
||||||
netgis.MapOpenLayers.prototype.onImportGML=function(a){var b=a.name,c=this,d=new FileReader;d.onload=function(a){c.createLayerGML(b,a.target.result)};d.readAsText(a)};netgis.MapOpenLayers.prototype.onImportShapefile=function(a){var b=a.name,c=this,d=new FileReader;d.onload=function(a){c.createLayerShapefile(b,a.target.result)};d.readAsArrayBuffer(a)};
|
netgis.MapOpenLayers.prototype.onImportGML=function(a){var b=a.name,c=this,d=new FileReader;d.onload=function(a){c.createLayerGML(b,a.target.result)};d.readAsText(a)};netgis.MapOpenLayers.prototype.onImportShapefile=function(a){var b=a.name,c=this,d=new FileReader;d.onload=function(a){c.createLayerShapefile(b,a.target.result)};d.readAsArrayBuffer(a)};
|
||||||
netgis.MapOpenLayers.prototype.createLayerGeoJSON=function(a,b){a=new ol.format.GeoJSON;a.readProjection(b);b=a.readFeatures(b,{featureProjection:this.client.config.map.projection});this.addImportedFeatures(b)};netgis.MapOpenLayers.prototype.createLayerGML=function(a,b){console.warn("GML support is experimental!");var c=new ol.format.WFS;a=c.readProjection(b);b=c.readFeatures(b,{featureProjection:this.client.config.map.projection});console.info("GML:",a,b);this.addImportedFeatures(b)};
|
netgis.MapOpenLayers.prototype.onImportSpatialite=function(a){var b=a.name,c=this,d=new FileReader;d.onload=function(a){c.createLayerSpatialite(b,a.target.result)};d.readAsArrayBuffer(a)};netgis.MapOpenLayers.prototype.onImportGeopackage=function(a){var b=a.name,c=this,d=new FileReader;d.onload=function(a){c.createLayerGeopackage(b,a.target.result)};d.readAsArrayBuffer(a)};
|
||||||
netgis.MapOpenLayers.prototype.createLayerShapefile=function(a,b){var c=this;shp(b).then(function(a){var b=new ol.format.GeoJSON;b.readProjection(a);a=b.readFeatures(a,{featureProjection:c.client.config.map.projection});c.addImportedFeatures(a)})};netgis.MapOpenLayers.prototype.addImportedFeatures=function(a){this.editEventsSilent=!0;this.editLayer.getSource().addFeatures(a);this.editEventsSilent=!1;this.updateEditOutput()};
|
netgis.MapOpenLayers.prototype.createLayerGeoJSON=function(a,b){var c=new ol.format.GeoJSON;a=c.readProjection(b);b=c.readFeatures(b,{featureProjection:this.client.config.map.projection});a=a.getCode();switch(a){case "EPSG:3857":case "EPSG:4326":case this.client.config.map.projection:break;default:console.warn("Unsupported Import Projection:",a)}this.addImportedFeatures(b)};
|
||||||
|
netgis.MapOpenLayers.prototype.createLayerGML=function(a,b){console.warn("GML support is experimental!");a=[];b=(new DOMParser).parseFromString(b,"text/xml").getElementsByTagName("gml:featureMember");for(var c=0;c<b.length;c++){for(var d={},e=b[c].children[0],f=0;f<e.attributes.length;f++){var g=e.attributes[f];d[g.nodeName]=g.nodeValue}for(f=0;f<e.children.length;f++)if(g=e.children[f],"ogr:geometryProperty"!==g.nodeName){var h=g.nodeName.split(":");d[h[h.length-1]]=g.innerHTML}e=e.getElementsByTagName("ogr:geometryProperty")[0].children[0];
|
||||||
|
(f=e.getAttribute("srsName"))&&"EPSG:4326"!==f&&f!==this.client.config.map.projection&&console.warn("Unsupported Import Projection:",f);switch(e.nodeName){case "gml:Polygon":d.geometry=this.gmlParsePolygon(e,f);break;case "gml:MultiPolygon":d.geometry=this.gmlParseMultiPolygon(e,f)}d=new ol.Feature(d);a.push(d)}this.addImportedFeatures(a)};
|
||||||
|
netgis.MapOpenLayers.prototype.gmlParsePolygon=function(a,b){var c=[];a=a.getElementsByTagName("gml:LinearRing");for(var d=0;d<a.length;d++){var e=a[d].getElementsByTagName("gml:coordinates")[0].innerHTML;c.push(this.gmlParseCoordinates(e,b))}return new ol.geom.Polygon(c)};
|
||||||
|
netgis.MapOpenLayers.prototype.gmlParseMultiPolygon=function(a,b){var c=[];a=a.getElementsByTagName("gml:polygonMember");for(var d=0;d<a.length;d++){var e=a[d].getElementsByTagName("gml:Polygon")[0];c.push(this.gmlParsePolygon(e,b))}return new ol.geom.MultiPolygon(c)};netgis.MapOpenLayers.prototype.gmlParseCoordinates=function(a,b){a=a.split(" ");for(var c=0;c<a.length;c++){a[c]=a[c].split(",");for(var d=0;d<a[c].length;d++)a[c][d]=Number.parseFloat(a[c][d]);b&&(a[c]=ol.proj.transform(a[c],b,this.client.config.map.projection))}return a};
|
||||||
|
netgis.MapOpenLayers.prototype.createLayerShapefile=function(a,b){var c=this;shp(b).then(function(a){var b=new ol.format.GeoJSON;b.readProjection(a);a=b.readFeatures(a,{featureProjection:c.client.config.map.projection});c.addImportedFeatures(a)})};
|
||||||
|
netgis.MapOpenLayers.prototype.createLayerSpatialite=function(a,b){var c=this;window.initSqlJs().then(function(a){var d=[],f=new Uint8Array(b);a=new a.Database(f);var g=a.exec("SELECT name FROM sqlite_schema WHERE type = 'table' \n\t\t\t\t\tAND name NOT LIKE 'sqlite_%' \n\t\t\t\t\tAND name NOT LIKE 'sql_%' \n\t\t\t\t\tAND name NOT LIKE 'idx_%' \n\t\t\t\t\tAND name NOT LIKE 'spatial_ref_sys%' \n\t\t\t\t\tAND name NOT LIKE 'spatialite_%' \n\t\t\t\t\tAND name NOT LIKE 'geometry_columns%' \n\t\t\t\t\tAND name NOT LIKE 'views_%' \n\t\t\t\t\tAND name NOT LIKE 'virts_%' \n\t\t\t\t\tAND name NOT LIKE 'SpatialIndex' \n\t\t\t\t\tAND name NOT LIKE 'ElementaryGeometries' \n\t\t\t\t;");f=
|
||||||
|
g[0].values;for(var h=0;h<f.length;h++){g=a.exec("SELECT * FROM "+f[h][0]);var k=g[0];g=null;for(var l=0;l<k.columns.length;l++){if("geometry"===k.columns[l].toLowerCase()){g=l;break}if("geom"===k.columns[l].toLowerCase()){g=l;break}}k=k.values;for(l=0;l<k.length;l++){var m=k[l][g],n=new Uint8Array(m.length-43-1+5);n[0]=m[1];n[1]=m[39];n[2]=m[40];n[3]=m[41];n[4]=m[42];for(var p=m.length-43-1,q=0;q<p;q++)n[5+q]=m[43+q];m=(new ol.format.WKB).readGeometry(n,{featureProjection:c.client.config.map.projection});
|
||||||
|
d.push(new ol.Feature({geometry:m}))}}c.addImportedFeatures(d)})};
|
||||||
|
netgis.MapOpenLayers.prototype.createLayerGeopackage=function(a,b){var c=this;a=new Uint8Array(b);window.GeoPackage.setSqljsWasmLocateFile(function(a){return c.client.config.import.geopackageLibURL+a});window.GeoPackage.GeoPackageAPI.open(a).then(function(a){for(var b=[],d=new ol.format.GeoJSON,g=a.getFeatureTables(),h=0;h<g.length;h++)for(var k=a.queryForGeoJSONFeaturesInTable(g[h]),l=0;l<k.length;l++){var m=d.readGeometry(k[l].geometry,{featureProjection:c.client.config.map.projection});m=new ol.Feature({geometry:m});
|
||||||
|
b.push(m)}c.addImportedFeatures(b)})};netgis.MapOpenLayers.prototype.addImportedFeatures=function(a){this.editEventsSilent=!0;this.editLayer.getSource().addFeatures(a);this.editEventsSilent=!1;this.updateEditOutput();if(0<a.length){for(var b=a[0].getGeometry().getExtent(),c=1;c<a.length;c++)ol.extent.extend(b,a[c].getGeometry().getExtent());this.view.fit(b,{duration:300,padding:[40,40,40,40]})}};
|
||||||
netgis.MapOpenLayers.prototype.onImportWKT=function(a){a=(new ol.format.WKT).readGeometry(a);a=new ol.Feature({geometry:a});this.addImportedFeatures([a])};netgis.MapOpenLayers.prototype.onExportPDF=function(a){this.exportImage("pdf",a.resx,a.resy,a.mode,a.margin)};netgis.MapOpenLayers.prototype.onExportJPEG=function(a){this.exportImage("jpeg",a.resx,a.resy)};netgis.MapOpenLayers.prototype.onExportPNG=function(a){this.exportImage("png",a.resx,a.resy)};
|
netgis.MapOpenLayers.prototype.onImportWKT=function(a){a=(new ol.format.WKT).readGeometry(a);a=new ol.Feature({geometry:a});this.addImportedFeatures([a])};netgis.MapOpenLayers.prototype.onExportPDF=function(a){this.exportImage("pdf",a.resx,a.resy,a.mode,a.margin)};netgis.MapOpenLayers.prototype.onExportJPEG=function(a){this.exportImage("jpeg",a.resx,a.resy)};netgis.MapOpenLayers.prototype.onExportPNG=function(a){this.exportImage("png",a.resx,a.resy)};
|
||||||
netgis.MapOpenLayers.prototype.onExportGIF=function(a){this.exportImage("gif",a.resx,a.resy)};netgis.MapOpenLayers.prototype.onParcelShowPreview=function(a){a=(new ol.format.WKT).readGeometry(a.geom);a=new ol.Feature({geometry:a});this.parcelLayer.getSource().clear();this.parcelLayer.getSource().addFeature(a)};netgis.MapOpenLayers.prototype.onParcelHidePreview=function(a){this.parcelLayer.getSource().clear()};netgis.MapOpenLayers.prototype.getWidth=function(){return this.map.getSize()[0]};
|
netgis.MapOpenLayers.prototype.onExportGIF=function(a){this.exportImage("gif",a.resx,a.resy)};netgis.MapOpenLayers.prototype.onParcelShowPreview=function(a){a=(new ol.format.WKT).readGeometry(a.geom);a=new ol.Feature({geometry:a});this.parcelLayer.getSource().clear();this.parcelLayer.getSource().addFeature(a)};netgis.MapOpenLayers.prototype.onParcelHidePreview=function(a){this.parcelLayer.getSource().clear()};netgis.MapOpenLayers.prototype.getWidth=function(){return this.map.getSize()[0]};
|
||||||
netgis.MapOpenLayers.prototype.getHeight=function(){return this.map.getSize()[1]};
|
netgis.MapOpenLayers.prototype.getHeight=function(){return this.map.getSize()[1]};
|
||||||
netgis.MapOpenLayers.prototype.exportImage=function(a,b,c,d,e){this.client.invoke(netgis.Events.EXPORT_BEGIN,null);var f=this,g=this.root,h=this.map,k=this.client.config,l=new Image;l.onload=function(){var m=document.createElement("div");m.style.position="fixed";m.style.top="0px";m.style.left="0px";m.style.width=b+"px";m.style.height=c+"px";m.style.background="white";m.style.zIndex=-1;m.style.opacity=0;m.style.pointerEvents="none";g.appendChild(m);h.setTarget(m);h.once("rendercomplete",function(){var n=
|
netgis.MapOpenLayers.prototype.exportImage=function(a,b,c,d,e){this.client.invoke(netgis.Events.EXPORT_BEGIN,null);var f=this,g=this.root,h=this.map,k=this.client.config,l=new Image;l.onload=function(){var m=document.createElement("div");m.style.position="fixed";m.style.top="0px";m.style.left="0px";m.style.width=b+"px";m.style.height=c+"px";m.style.background="white";m.style.zIndex=-1;m.style.opacity=0;m.style.pointerEvents="none";g.appendChild(m);h.setTarget(m);h.once("rendercomplete",function(){var n=
|
||||||
document.createElement("canvas");n.width=b;n.height=c;var w=n.getContext("2d");w.webkitImageSmoothingEnabled=!1;w.mozImageSmoothingEnabled=!1;w.imageSmoothingEnabled=!1;Array.prototype.forEach.call(document.querySelectorAll(".ol-layer canvas"),function(a){if(0<a.width){var b=a.parentNode.style.opacity;w.globalAlpha=""===b?1:Number(b);b=a.style.transform.match(/^matrix\(([^\(]*)\)$/)[1].split(",").map(Number);CanvasRenderingContext2D.prototype.setTransform.apply(w,b);w.drawImage(a,0,0)}});w.drawImage(l,
|
document.createElement("canvas");n.width=b;n.height=c;var p=n.getContext("2d");p.webkitImageSmoothingEnabled=!1;p.mozImageSmoothingEnabled=!1;p.imageSmoothingEnabled=!1;Array.prototype.forEach.call(document.querySelectorAll(".ol-layer canvas"),function(a){if(0<a.width){var b=a.parentNode.style.opacity;p.globalAlpha=""===b?1:Number(b);b=a.style.transform.match(/^matrix\(([^\(]*)\)$/)[1].split(",").map(Number);CanvasRenderingContext2D.prototype.setTransform.apply(p,b);p.drawImage(a,0,0)}});p.drawImage(l,
|
||||||
0,0);var t=document.createElement("a");switch(a){case "pdf":e=e?e:0;var p=297-e-e,q=210-e-e,u=n.width/n.height;if(!d){var r=p;p=q;q=r}if(n.height>n.width){var v=q;r=v*u;r>p&&(r=p,v=r/u)}else r=p,v=r/u,v>q&&(v=q,r=v*u);u=new jsPDF(d?"l":"p");var x=e;x+=(p-r)/2;p=e;p+=(q-v)/2;u.addImage(n.toDataURL("image/png,1.0",1),"PNG",x,p,r,v);u.setFontSize(8);u.text("Quelle: "+window.location.href,x+2,p+v-2);n=u.output("bloburl",{filename:k.export.defaultFilename+".pdf"});window.open(n,"_blank");break;case "jpeg":window.navigator.msSaveBlob?
|
0,0);p.fillStyle="#fff";p.fillRect(0,n.height-30,140,30);p.fillStyle="#000";p.font="4mm sans-serif";p.fillText(netgis.util.getTimeStamp(),10,n.height-10);var q=document.createElement("a");switch(a){case "pdf":e=e?e:0;var r=297-e-e,v=210-e-e,t=n.width/n.height;if(!d){var w=r;r=v;v=w}if(n.height>n.width){var u=v;w=u*t;w>r&&(w=r,u=w/t)}else w=r,u=w/t,u>v&&(u=v,w=u*t);t=new jsPDF(d?"l":"p");var x=e;x+=(r-w)/2;r=e;r+=(v-u)/2;t.addImage(n.toDataURL("image/png,1.0",1),"PNG",x,r,w,u);t.setFillColor(255,255,
|
||||||
window.navigator.msSaveBlob(n.msToBlob(),k.export.defaultFilename+".jpg"):(t.setAttribute("download",k.export.defaultFilename+".jpg"),t.setAttribute("href",n.toDataURL("image/jpeg",1)),t.click());break;case "png":window.navigator.msSaveBlob?window.navigator.msSaveBlob(n.msToBlob(),k.export.defaultFilename+".png"):(t.setAttribute("download",k.export.defaultFilename+".png"),t.setAttribute("href",n.toDataURL("image/png",1)),t.click());break;case "gif":t.setAttribute("download",k.export.defaultFilename+
|
255);t.rect(x,r+u-11,80,11,"F");t.setFontSize(8);t.text("Datum: "+netgis.util.getTimeStamp(),x+2,r+u-2-4);t.text("Quelle: "+window.location.href,x+2,r+u-2);n=t.output("bloburl",{filename:k.export.defaultFilename+".pdf"});window.open(n,"_blank");break;case "jpeg":window.navigator.msSaveBlob?window.navigator.msSaveBlob(n.msToBlob(),k.export.defaultFilename+".jpg"):(q.setAttribute("download",k.export.defaultFilename+".jpg"),q.setAttribute("href",n.toDataURL("image/jpeg",1)),q.click());break;case "png":window.navigator.msSaveBlob?
|
||||||
".gif"),q=new GIF({workerScript:k.export.gifWebWorker,quality:1}),q.addFrame(n),q.on("finished",function(a){t.setAttribute("href",window.URL.createObjectURL(a));t.click()}),q.render()}h.setTarget(g);g.removeChild(m);f.client.invoke(netgis.Events.EXPORT_END,null)});h.renderSync()};l.src=k.export.logo};
|
window.navigator.msSaveBlob(n.msToBlob(),k.export.defaultFilename+".png"):(q.setAttribute("download",k.export.defaultFilename+".png"),q.setAttribute("href",n.toDataURL("image/png",1)),q.click());break;case "gif":q.setAttribute("download",k.export.defaultFilename+".gif"),v=new GIF({workerScript:k.export.gifWebWorker,quality:1}),v.addFrame(n),v.on("finished",function(a){q.setAttribute("href",window.URL.createObjectURL(a));q.click()}),v.render()}h.setTarget(g);g.removeChild(m);f.client.invoke(netgis.Events.EXPORT_END,
|
||||||
netgis.MapOpenLayers.prototype.splitMultiPolygons=function(a){a=a.getSource();for(var b=a.getFeatures(),c=[],d=[],e=0;e<b.length;e++){var f=b[e],g=f.getGeometry();if(g instanceof ol.geom.MultiPolygon){g=g.getPolygons();for(var h=0;h<g.length;h++){var k=new ol.Feature({geometry:g[h]});d.push(k)}c.push(f)}}for(e=0;e<c.length;e++)a.removeFeature(c[e]);a.addFeatures(d)};netgis=netgis||{};netgis.Menu=function(){this.root=this.client=null;this.sections=[]};
|
null)});h.renderSync()};l.src=k.export.logo};netgis.MapOpenLayers.prototype.splitMultiPolygons=function(a){a=a.getSource();for(var b=a.getFeatures(),c=[],d=[],e=0;e<b.length;e++){var f=b[e],g=f.getGeometry();if(g instanceof ol.geom.MultiPolygon){g=g.getPolygons();for(var h=0;h<g.length;h++){var k=new ol.Feature({geometry:g[h]});d.push(k)}c.push(f)}}for(e=0;e<c.length;e++)a.removeFeature(c[e]);a.addFeatures(d)};netgis=netgis||{};netgis.Menu=function(){this.root=this.client=null;this.sections=[]};
|
||||||
netgis.Menu.prototype.load=function(){this.root=document.createElement("header");this.root.className="netgis-menu netgis-primary netgis-shadow";var a=document.createElement("div");this.root.appendChild(a);var b=this.createButton('Ebenen<i class="fab fa-buffer"></i>',!0);b.addEventListener("click",this.onToggleClick.bind(this));a.appendChild(b);b=this.createButton('Suche<i class="fas fa-search" style="position: relative; top: 0.3mm;"></i>',!0);b.addEventListener("click",this.onSearchPlaceClick.bind(this));
|
netgis.Menu.prototype.load=function(){this.root=document.createElement("header");this.root.className="netgis-menu netgis-primary netgis-shadow";var a=document.createElement("div");this.root.appendChild(a);var b=this.createButton('Ebenen<i class="fab fa-buffer"></i>',!0);b.addEventListener("click",this.onToggleClick.bind(this));a.appendChild(b);b=this.createButton('Suche<i class="fas fa-search" style="position: relative; top: 0.3mm;"></i>',!0);b.addEventListener("click",this.onSearchPlaceClick.bind(this));
|
||||||
a.appendChild(b);b=this.createButton('Flurst\u00fccke<i class="fas fa-vector-square" style="position: relative; top: 0.3mm;"></i>',!0);b.addEventListener("click",this.onSearchParcelClick.bind(this));a.appendChild(b);if(this.client.editable){b=this.createMenu('<i class="fas fa-caret-down"></i>Zeichnen');var c=b.getElementsByTagName("ul")[0];a.appendChild(b);c.appendChild(this.createMenuItem('<i class="fas fa-map-marker-alt"></i>Punkte',this.onDrawPointClick.bind(this)));c.appendChild(this.createMenuItem('<i class="fas fa-minus"></i>Linien',
|
a.appendChild(b);b=this.createButton('Flurst\u00fccke<i class="fas fa-vector-square" style="position: relative; top: 0.3mm;"></i>',!0);b.addEventListener("click",this.onSearchParcelClick.bind(this));a.appendChild(b);if(this.client.editable){b=this.createMenu('<i class="fas fa-caret-down"></i>Zeichnen');var c=b.getElementsByTagName("ul")[0];a.appendChild(b);c.appendChild(this.createMenuItem('<i class="fas fa-map-marker-alt"></i>Punkte',this.onDrawPointClick.bind(this)));c.appendChild(this.createMenuItem('<i class="fas fa-minus"></i>Linien',
|
||||||
this.onDrawLineClick.bind(this)));c.appendChild(this.createMenuItem('<i class="fas fa-vector-square"></i>Polygone',this.onDrawPolygonClick.bind(this)));b=this.createMenu('<i class="fas fa-caret-down"></i>Bearbeiten');c=b.getElementsByTagName("ul")[0];a.appendChild(b);c.appendChild(this.createMenuItem('<i class="fas fa-cut"></i>Ausschneiden',this.onCutFeatureClick.bind(this)));c.appendChild(this.createMenuItem('<i class="fas fa-arrows-alt"></i>Verschieben',this.onModifyFeaturesClick.bind(this)));c.appendChild(this.createMenuItem('<i class="fas fa-eraser"></i>L\u00f6schen',
|
this.onDrawLineClick.bind(this)));c.appendChild(this.createMenuItem('<i class="fas fa-vector-square"></i>Polygone',this.onDrawPolygonClick.bind(this)));b=this.createMenu('<i class="fas fa-caret-down"></i>Bearbeiten');c=b.getElementsByTagName("ul")[0];a.appendChild(b);c.appendChild(this.createMenuItem('<i class="fas fa-cut"></i>Ausschneiden',this.onCutFeatureClick.bind(this)));c.appendChild(this.createMenuItem('<i class="fas fa-arrows-alt"></i>Verschieben',this.onModifyFeaturesClick.bind(this)));c.appendChild(this.createMenuItem('<i class="fas fa-eraser"></i>L\u00f6schen',
|
||||||
this.onDeleteFeaturesClick.bind(this)));c.appendChild(this.createMenuItem('<i class="far fa-dot-circle"></i>Puffern',this.onBufferFeatureClick.bind(this)));b=this.createMenu('<i class="fas fa-caret-down"></i>Import');a.appendChild(b);b=b.getElementsByTagName("ul")[0];b.appendChild(this.createMenuItem('<i class="fas fa-file"></i>GeoJSON',this.onImportGeoJSONClick.bind(this)));b.appendChild(this.createMenuItem('<i class="fas fa-file"></i>GML',this.onImportGMLClick.bind(this)));b.appendChild(this.createMenuItem('<i class="fas fa-file"></i>Shapefile',
|
this.onDeleteFeaturesClick.bind(this)));c.appendChild(this.createMenuItem('<i class="far fa-dot-circle"></i>Puffern',this.onBufferFeatureClick.bind(this)));b=this.createMenu('<i class="fas fa-caret-down"></i>Import');a.appendChild(b);b=b.getElementsByTagName("ul")[0];b.appendChild(this.createMenuItem('<i class="fas fa-file"></i>GeoJSON',this.onImportGeoJSONClick.bind(this)));b.appendChild(this.createMenuItem('<i class="fas fa-file"></i>GML',this.onImportGMLClick.bind(this)));b.appendChild(this.createMenuItem('<i class="fas fa-file"></i>Shapefile',
|
||||||
this.onImportShapefileClick.bind(this)));b=this.createMenu('<i class="fas fa-caret-down"></i>Export');a.appendChild(b);a=b.getElementsByTagName("ul")[0];a.appendChild(this.createMenuItem('<i class="fas fa-file"></i>PDF',this.onExportPDFClick.bind(this)));a.appendChild(this.createMenuItem('<i class="fas fa-file"></i>JPEG',this.onExportJPEGClick.bind(this)));a.appendChild(this.createMenuItem('<i class="fas fa-file"></i>PNG',this.onExportPNGClick.bind(this)));a.appendChild(this.createMenuItem('<i class="fas fa-file"></i>GIF',
|
this.onImportShapefileClick.bind(this)));b.appendChild(this.createMenuItem('<i class="fas fa-file"></i>Spatialite',this.onImportSpatialiteClick.bind(this)));b.appendChild(this.createMenuItem('<i class="fas fa-file"></i>GeoPackage',this.onImportGeopackageClick.bind(this)));b=this.createMenu('<i class="fas fa-caret-down"></i>Export');a.appendChild(b);a=b.getElementsByTagName("ul")[0];a.appendChild(this.createMenuItem('<i class="fas fa-file"></i>PDF',this.onExportPDFClick.bind(this)));a.appendChild(this.createMenuItem('<i class="fas fa-file"></i>JPEG',
|
||||||
this.onExportGIFClick.bind(this)))}this.client.root.appendChild(this.root)};netgis.Menu.prototype.createButton=function(a,b){var c=document.createElement("button");c.setAttribute("type","button");c.className="netgis-primary netgis-hover-primary";b&&(c.className+=" netgis-right");c.innerHTML=a;return c};
|
this.onExportJPEGClick.bind(this)));a.appendChild(this.createMenuItem('<i class="fas fa-file"></i>PNG',this.onExportPNGClick.bind(this)));a.appendChild(this.createMenuItem('<i class="fas fa-file"></i>GIF',this.onExportGIFClick.bind(this)))}this.client.root.appendChild(this.root)};netgis.Menu.prototype.createButton=function(a,b){var c=document.createElement("button");c.setAttribute("type","button");c.className="netgis-primary netgis-hover-primary";b&&(c.className+=" netgis-right");c.innerHTML=a;return c};
|
||||||
netgis.Menu.prototype.createMenu=function(a){var b=document.createElement("div");b.className="netgis-dropdown";var c=document.createElement("button");c.setAttribute("type","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.Menu.prototype.createMenu=function(a){var b=document.createElement("div");b.className="netgis-dropdown";var c=document.createElement("button");c.setAttribute("type","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.Menu.prototype.createMenuItem=function(a,b){var c=document.createElement("li");c.className="netgis-hover-light";var d=document.createElement("button");d.setAttribute("type","button");d.innerHTML=a;d.addEventListener("click",b);c.appendChild(d);return c};netgis.Menu.prototype.onToggleClick=function(a){this.client.invoke(netgis.Events.LAYER_LIST_TOGGLE,null)};netgis.Menu.prototype.onDrawPointClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DRAW_POINTS)};
|
netgis.Menu.prototype.createMenuItem=function(a,b){var c=document.createElement("li");c.className="netgis-hover-light";var d=document.createElement("button");d.setAttribute("type","button");d.innerHTML=a;d.addEventListener("click",b);c.appendChild(d);return c};netgis.Menu.prototype.onToggleClick=function(a){this.client.invoke(netgis.Events.LAYER_LIST_TOGGLE,null)};netgis.Menu.prototype.onDrawPointClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DRAW_POINTS)};
|
||||||
netgis.Menu.prototype.onDrawLineClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DRAW_LINES)};netgis.Menu.prototype.onDrawPolygonClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DRAW_POLYGONS)};netgis.Menu.prototype.onCutFeatureClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.CUT_FEATURE_BEGIN)};netgis.Menu.prototype.onModifyFeaturesClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.MODIFY_FEATURES)};
|
netgis.Menu.prototype.onDrawLineClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DRAW_LINES)};netgis.Menu.prototype.onDrawPolygonClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DRAW_POLYGONS)};netgis.Menu.prototype.onCutFeatureClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.CUT_FEATURE_BEGIN)};netgis.Menu.prototype.onModifyFeaturesClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.MODIFY_FEATURES)};
|
||||||
netgis.Menu.prototype.onDeleteFeaturesClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DELETE_FEATURES)};netgis.Menu.prototype.onBufferFeatureClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.BUFFER_FEATURE_BEGIN)};netgis.Menu.prototype.onSearchPlaceClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.SEARCH_PLACE)};netgis.Menu.prototype.onSearchParcelClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.SEARCH_PARCEL)};
|
netgis.Menu.prototype.onDeleteFeaturesClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.DELETE_FEATURES)};netgis.Menu.prototype.onBufferFeatureClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.BUFFER_FEATURE_BEGIN)};netgis.Menu.prototype.onSearchPlaceClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.SEARCH_PLACE)};netgis.Menu.prototype.onSearchParcelClick=function(a){this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.SEARCH_PARCEL)};
|
||||||
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=<url>'")};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.onSearchDataClick=function(a){alert("TODO: data search interface")};netgis.Menu.prototype.onImportOWSClick=function(a){alert("TODO: ows import interface, try setting url parameter '?ows=<url>'")};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.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.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.onExportGIFClick=function(a){this.client.invoke(netgis.Events.EXPORT_GIF_SHOW,null)};netgis=netgis||{};netgis.Modal=function(){this.exportGIF=this.exportPNG=this.exportJPEG=this.exportPDF=this.importShapefile=this.importGML=this.importGeoJSON=this.client=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.exportPDF=this.createExportPDF();this.root.appendChild(this.exportPDF);
|
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.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.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.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.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.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:","<ul><li>World Geodetic System 1984 (EPSG:4326)</li><li>ETRS89 / UTM zone 32N (EPSG:25832)</li></ul>");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:",".geojson,.json",this.onImportGeoJSONChange.bind(this));this.createSpace(a);this.createButton(a,"<i class='fas fa-check'></i>Importieren",this.onImportGeoJSONAccept.bind(this));return a};
|
netgis.Modal.prototype.createImportGeoJSON=function(){var a=this.createContainer("Import GeoJSON");this.createText(a,"Unterst\u00fctzte Koordinatensysteme:","<ul><li>World Geodetic System 1984 (EPSG:4326)</li><li>ETRS89 / UTM zone 32N (EPSG:25832)</li></ul>");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:",".geojson,.json",this.onImportGeoJSONChange.bind(this));this.createSpace(a);this.createButton(a,"<i class='fas fa-check'></i>Importieren",this.onImportGeoJSONAccept.bind(this));return a};
|
||||||
netgis.Modal.prototype.createImportGML=function(){var a=this.createContainer("Import GML");this.createText(a,"Unterst\u00fctzte Koordinatensysteme:","<ul><li>World Geodetic System 1984 (EPSG:4326)</li><li>ETRS89 / UTM zone 32N (EPSG:25832)</li></ul>");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:",".gml,.xml",this.onImportGMLChange.bind(this));this.createSpace(a);this.createButton(a,"<i class='fas fa-check'></i>Importieren",this.onImportGMLAccept.bind(this));return a};
|
netgis.Modal.prototype.createImportGML=function(){var a=this.createContainer("Import GML");this.createText(a,"Unterst\u00fctzte Koordinatensysteme:","<ul><li>World Geodetic System 1984 (EPSG:4326)</li><li>ETRS89 / UTM zone 32N (EPSG:25832)</li></ul>");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:",".gml,.xml",this.onImportGMLChange.bind(this));this.createSpace(a);this.createButton(a,"<i class='fas fa-check'></i>Importieren",this.onImportGMLAccept.bind(this));return a};
|
||||||
netgis.Modal.prototype.createImportShapefile=function(){var a=this.createContainer("Import Shapefile");this.createText(a,"Unterst\u00fctzte Koordinatensysteme:","<ul><li>World Geodetic System 1984 (EPSG:4326)</li><li>ETRS89 / UTM zone 32N (EPSG:25832)</li></ul>");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:","application/zip",this.onImportShapefileChange.bind(this));this.createSpace(a);this.createButton(a,"<i class='fas fa-check'></i>Importieren",this.onImportShapefileAccept.bind(this));
|
netgis.Modal.prototype.createImportShapefile=function(){var a=this.createContainer("Import Shapefile");this.createText(a,"Unterst\u00fctzte Koordinatensysteme:","<ul><li>World Geodetic System 1984 (EPSG:4326)</li><li>ETRS89 / UTM zone 32N (EPSG:25832)</li></ul>");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:","application/zip",this.onImportShapefileChange.bind(this));this.createSpace(a);this.createButton(a,"<i class='fas fa-check'></i>Importieren",this.onImportShapefileAccept.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,"<i class='fas fa-check'></i>Exportieren",this.onExportPDFAccept.bind(this));return a};
|
return a};
|
||||||
|
netgis.Modal.prototype.createImportSpatialite=function(){var a=this.createContainer("Import Spatialite");this.createText(a,"Unterst\u00fctzte Koordinatensysteme:","<ul><li>World Geodetic System 1984 (EPSG:4326)</li><li>ETRS89 / UTM zone 32N (EPSG:25832)</li></ul>");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:",".sqlite",this.onImportSpatialiteChange.bind(this));this.createSpace(a);this.createButton(a,"<i class='fas fa-check'></i>Importieren",this.onImportSpatialiteAccept.bind(this));return a};
|
||||||
|
netgis.Modal.prototype.createImportGeopackage=function(){var a=this.createContainer("Import GeoPackage");this.createText(a,"Unterst\u00fctzte Koordinatensysteme:","<ul><li>World Geodetic System 1984 (EPSG:4326)</li><li>ETRS89 / UTM zone 32N (EPSG:25832)</li></ul>");this.createInputFile(a,"Datei ausw\u00e4hlen / ablegen:",".gpkg",this.onImportGeopackageChange.bind(this));this.createSpace(a);this.createButton(a,"<i class='fas fa-check'></i>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,"<i class='fas fa-check'></i>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,"<i class='fas fa-check'></i>Exportieren",this.onExportJPEGAccept.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,"<i class='fas fa-check'></i>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,"<i class='fas fa-check'></i>Exportieren",this.onExportPNGAccept.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,"<i class='fas fa-check'></i>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,"<i class='fas fa-check'></i>Exportieren",this.onExportGIFAccept.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,"<i class='fas fa-check'></i>Exportieren",this.onExportGIFAccept.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<b.length;c++)b[c].classList.remove("netgis-show");a.classList.add("netgis-show")};netgis.Modal.prototype.hide=function(){this.root.classList.remove("netgis-show")};
|
netgis.Modal.prototype.createAddService=function(){var a=this.createContainer("Dienst hinzuf\u00fcgen");this.createInputText(a,"WMS/WFS URL:");this.createSpace(a);this.createButton(a,"<i class='fas fa-cloud-download-alt'></i>Dienst laden",this.onAddServiceLoad.bind(this));this.createSpace(a);this.createInputHidden(a);this.createText(a,"Bezeichnung:","");this.createInputSelect(a,"Kartenebene:",[]);this.createInputSelect(a,"Format:",[]);this.createSpace(a);this.createButton(a,"<i class='fas fa-check'></i>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<b.length;c++)b[c].classList.remove("netgis-show");a.classList.add("netgis-show")};netgis.Modal.prototype.hide=function(){this.root.classList.remove("netgis-show")};
|
||||||
netgis.Modal.prototype.createContainer=function(a){var b=document.createElement("section");b.className="netgis-dialog netgis-shadow";var c=document.createElement("header"),d=document.createElement("button");d.setAttribute("type","button");d.className="netgis-primary netgis-hover-primary";d.innerHTML="<h3>"+a+"</h3>";d.addEventListener("click",this.onHeaderClick.bind(this));c.appendChild(d);a=document.createElement("span");a.innerHTML="<i class='fas fa-times'></i>";d.appendChild(a);b.appendChild(c);
|
netgis.Modal.prototype.createContainer=function(a){var b=document.createElement("section");b.className="netgis-dialog netgis-shadow";var c=document.createElement("header"),d=document.createElement("button");d.setAttribute("type","button");d.className="netgis-primary netgis-hover-primary";d.innerHTML="<h3>"+a+"</h3>";d.addEventListener("click",this.onHeaderClick.bind(this));c.appendChild(d);a=document.createElement("span");a.innerHTML="<i class='fas fa-times'></i>";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};
|
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.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.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);
|
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};
|
||||||
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);
|
||||||
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};
|
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.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);
|
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 e};
|
return g};
|
||||||
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.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.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.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);
|
||||||
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<a.value.length?!1:!0};
|
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<a.value.length?!1:!0};
|
||||||
netgis.Modal.prototype.onImportGeoJSONAccept=function(a){a=this.importGeoJSON.getElementsByTagName("input")[0].files[0];this.client.invoke(netgis.Events.IMPORT_GEOJSON,a);this.hide()};netgis.Modal.prototype.onImportGMLShow=function(a){a=this.importGML.getElementsByTagName("input")[0];var b=this.importGML.getElementsByTagName("button")[1];a.value="";b.disabled=!0;this.show(this.importGML)};
|
netgis.Modal.prototype.onImportGeoJSONAccept=function(a){a=this.importGeoJSON.getElementsByTagName("input")[0].files[0];this.client.invoke(netgis.Events.IMPORT_GEOJSON,a);this.hide()};netgis.Modal.prototype.onImportGMLShow=function(a){a=this.importGML.getElementsByTagName("input")[0];var b=this.importGML.getElementsByTagName("button")[1];a.value="";b.disabled=!0;this.show(this.importGML)};
|
||||||
netgis.Modal.prototype.onImportGMLChange=function(a){a=this.importGML.getElementsByTagName("input")[0];this.importGML.getElementsByTagName("button")[1].disabled=a.value&&0<a.value.length?!1:!0};netgis.Modal.prototype.onImportGMLAccept=function(a){a=this.importGML.getElementsByTagName("input")[0].files[0];this.client.invoke(netgis.Events.IMPORT_GML,a);this.hide()};
|
netgis.Modal.prototype.onImportGMLChange=function(a){a=this.importGML.getElementsByTagName("input")[0];this.importGML.getElementsByTagName("button")[1].disabled=a.value&&0<a.value.length?!1:!0};netgis.Modal.prototype.onImportGMLAccept=function(a){a=this.importGML.getElementsByTagName("input")[0].files[0];this.client.invoke(netgis.Events.IMPORT_GML,a);this.hide()};
|
||||||
netgis.Modal.prototype.onImportShapefileShow=function(a){a=this.importShapefile.getElementsByTagName("input")[0];var b=this.importShapefile.getElementsByTagName("button")[1];a.value="";b.disabled=!0;this.show(this.importShapefile)};netgis.Modal.prototype.onImportShapefileChange=function(a){a=this.importShapefile.getElementsByTagName("input")[0];this.importShapefile.getElementsByTagName("button")[1].disabled=a.value&&0<a.value.length?!1:!0};
|
netgis.Modal.prototype.onImportShapefileShow=function(a){a=this.importShapefile.getElementsByTagName("input")[0];var b=this.importShapefile.getElementsByTagName("button")[1];a.value="";b.disabled=!0;this.show(this.importShapefile)};netgis.Modal.prototype.onImportShapefileChange=function(a){a=this.importShapefile.getElementsByTagName("input")[0];this.importShapefile.getElementsByTagName("button")[1].disabled=a.value&&0<a.value.length?!1:!0};
|
||||||
netgis.Modal.prototype.onImportShapefileAccept=function(a){a=this.importShapefile.getElementsByTagName("input")[0].files[0];this.client.invoke(netgis.Events.IMPORT_SHAPEFILE,a);this.hide()};netgis.Modal.prototype.onExportPDFShow=function(a){a=this.exportPDF.getElementsByTagName("input");a[0].value=this.client.map.getWidth();a[1].value=this.client.map.getHeight();a[2].value=this.client.config.export.defaultMargin;a[3].checked=!0;this.show(this.exportPDF)};
|
netgis.Modal.prototype.onImportShapefileAccept=function(a){a=this.importShapefile.getElementsByTagName("input")[0].files[0];this.client.invoke(netgis.Events.IMPORT_SHAPEFILE,a);this.hide()};netgis.Modal.prototype.onImportSpatialiteShow=function(a){a=this.importShapefile.getElementsByTagName("input")[0];var b=this.importShapefile.getElementsByTagName("button")[1];a.value="";b.disabled=!0;this.show(this.importSpatialite)};
|
||||||
|
netgis.Modal.prototype.onImportSpatialiteChange=function(a){a=this.importSpatialite.getElementsByTagName("input")[0];this.importSpatialite.getElementsByTagName("button")[1].disabled=a.value&&0<a.value.length?!1:!0};netgis.Modal.prototype.onImportSpatialiteAccept=function(a){a=this.importSpatialite.getElementsByTagName("input")[0].files[0];this.client.invoke(netgis.Events.IMPORT_SPATIALITE,a);this.hide()};
|
||||||
|
netgis.Modal.prototype.onImportGeopackageShow=function(a){a=this.importGeopackage.getElementsByTagName("input")[0];var b=this.importGeopackage.getElementsByTagName("button")[1];a.value="";b.disabled=!0;this.show(this.importGeopackage)};netgis.Modal.prototype.onImportGeopackageChange=function(a){a=this.importGeopackage.getElementsByTagName("input")[0];this.importGeopackage.getElementsByTagName("button")[1].disabled=a.value&&0<a.value.length?!1:!0};
|
||||||
|
netgis.Modal.prototype.onImportGeopackageAccept=function(a){a=this.importGeopackage.getElementsByTagName("input")[0].files[0];this.client.invoke(netgis.Events.IMPORT_GEOPACKAGE,a);this.hide()};netgis.Modal.prototype.onExportPDFShow=function(a){a=this.exportPDF.getElementsByTagName("input");a[0].value=this.client.map.getWidth();a[1].value=this.client.map.getHeight();a[2].value=this.client.config.export.defaultMargin;a[3].checked=!0;this.show(this.exportPDF)};
|
||||||
netgis.Modal.prototype.onExportJPEGShow=function(a){a=this.exportJPEG.getElementsByTagName("input");a[0].value=this.client.map.getWidth();a[1].value=this.client.map.getHeight();this.show(this.exportJPEG)};netgis.Modal.prototype.onExportPNGShow=function(a){a=this.exportPNG.getElementsByTagName("input");a[0].value=this.client.map.getWidth();a[1].value=this.client.map.getHeight();this.show(this.exportPNG)};
|
netgis.Modal.prototype.onExportJPEGShow=function(a){a=this.exportJPEG.getElementsByTagName("input");a[0].value=this.client.map.getWidth();a[1].value=this.client.map.getHeight();this.show(this.exportJPEG)};netgis.Modal.prototype.onExportPNGShow=function(a){a=this.exportPNG.getElementsByTagName("input");a[0].value=this.client.map.getWidth();a[1].value=this.client.map.getHeight();this.show(this.exportPNG)};
|
||||||
netgis.Modal.prototype.onExportGIFShow=function(a){a=this.exportGIF.getElementsByTagName("input");a[0].value=this.client.map.getWidth();a[1].value=this.client.map.getHeight();this.show(this.exportGIF)};netgis.Modal.prototype.onExportPDFAccept=function(a){a=this.exportPDF.getElementsByTagName("input");var b=Number.parseInt(a[0].value),c=Number.parseInt(a[1].value),d=Number.parseInt(a[2].value);this.client.invoke(netgis.Events.EXPORT_PDF,{resx:b,resy:c,mode:a[3].checked,margin:d});this.hide()};
|
netgis.Modal.prototype.onExportGIFShow=function(a){a=this.exportGIF.getElementsByTagName("input");a[0].value=this.client.map.getWidth();a[1].value=this.client.map.getHeight();this.show(this.exportGIF)};netgis.Modal.prototype.onExportPDFAccept=function(a){a=this.exportPDF.getElementsByTagName("input");var b=Number.parseInt(a[0].value),c=Number.parseInt(a[1].value),d=Number.parseInt(a[2].value);this.client.invoke(netgis.Events.EXPORT_PDF,{resx:b,resy:c,mode:a[3].checked,margin:d});this.hide()};
|
||||||
netgis.Modal.prototype.onExportJPEGAccept=function(a){var b=this.exportJPEG.getElementsByTagName("input");a=Number.parseInt(b[0].value);b=Number.parseInt(b[1].value);this.client.invoke(netgis.Events.EXPORT_JPEG,{resx:a,resy:b});this.hide()};netgis.Modal.prototype.onExportPNGAccept=function(a){var b=this.exportPNG.getElementsByTagName("input");a=Number.parseInt(b[0].value);b=Number.parseInt(b[1].value);this.client.invoke(netgis.Events.EXPORT_PNG,{resx:a,resy:b});this.hide()};
|
netgis.Modal.prototype.onExportJPEGAccept=function(a){var b=this.exportJPEG.getElementsByTagName("input");a=Number.parseInt(b[0].value);b=Number.parseInt(b[1].value);this.client.invoke(netgis.Events.EXPORT_JPEG,{resx:a,resy:b});this.hide()};netgis.Modal.prototype.onExportPNGAccept=function(a){var b=this.exportPNG.getElementsByTagName("input");a=Number.parseInt(b[0].value);b=Number.parseInt(b[1].value);this.client.invoke(netgis.Events.EXPORT_PNG,{resx:a,resy:b});this.hide()};
|
||||||
netgis.Modal.prototype.onExportGIFAccept=function(a){var b=this.exportGIF.getElementsByTagName("input");a=Number.parseInt(b[0].value);b=Number.parseInt(b[1].value);this.client.invoke(netgis.Events.EXPORT_GIF,{resx:a,resy:b});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"});netgis=netgis||{};
|
netgis.Modal.prototype.onExportGIFAccept=function(a){var b=this.exportGIF.getElementsByTagName("input");a=Number.parseInt(b[0].value);b=Number.parseInt(b[1].value);this.client.invoke(netgis.Events.EXPORT_GIF,{resx:a,resy:b});this.hide()};netgis.Modal.prototype.onAddServiceShow=function(a){this.show(this.addService);a=this.addService.getElementsByTagName("tr");for(var b=3;b<a.length;b++)a[b].classList.add("netgis-hide")};
|
||||||
|
netgis.Modal.prototype.onAddServiceLoad=function(a){a=this.addService.getElementsByTagName("input")[0].value;var b=a.indexOf("?");-1<b&&(a=a.substr(0,b));netgis.util.request(a+"?request=GetCapabilities",this.onAddServiceCapsResponse.bind(this));console.info("Add Service Load:",a)};
|
||||||
|
netgis.Modal.prototype.onAddServiceCapsResponse=function(a){var b=(new DOMParser).parseFromString(a,"text/xml").documentElement;a=this.addService.getElementsByTagName("tr");var c=a[5],d=this.addService.getElementsByTagName("input")[1];a=this.addService.getElementsByTagName("select");var e=a[0];a=a[1];for(var f=e.options.length-1;0<=f;f--)e.options.remove(f);for(f=a.options.length-1;0<=f;f--)a.options.remove(f);switch(b.nodeName){case "WMS_Capabilities":d.value="wms";b.getAttribute("version");d=b.getElementsByTagName("Service")[0];
|
||||||
|
d=d.getElementsByTagName("Title")[0].textContent;c.children[1].innerHTML=d;f=b.getElementsByTagName("Layer");var g=[];for(d=0;d<f.length;d++){c=f[d];var h=c.getElementsByTagName("Name")[0].textContent,k=c.getElementsByTagName("Title")[0].textContent;g.push({name:h,title:k});c=document.createElement("option");c.text=k;c.value=h;e.options.add(c)}b=b.getElementsByTagName("GetMap")[0].getElementsByTagName("Format");e=[];for(d=0;d<b.length;d++)c=b[d],f=c.textContent,e.push(f),c=document.createElement("option"),
|
||||||
|
c.text=f,c.value=f,a.options.add(c);break;case "WFS_Capabilities":case "wfs:WFS_Capabilities":d.value="wfs";b.getAttribute("version");d=b.getElementsByTagName("ows:ServiceIdentification")[0];d=d.getElementsByTagName("ows:Title")[0].textContent;c.children[1].innerHTML=d;f=b.getElementsByTagName("FeatureType");g=[];for(d=0;d<f.length;d++)c=f[d],h=c.getElementsByTagName("Name")[0].textContent,k=c.getElementsByTagName("Title")[0].textContent,g.push({name:h,title:k}),c=document.createElement("option"),
|
||||||
|
c.text=k,c.value=h,e.options.add(c);b=b.getElementsByTagName("ows:Operation");e=null;for(c=0;c<b.length;c++)if("GetFeature"===b[c].getAttribute("name")){e=b[c];break}if(e)for(b=e.getElementsByTagName("ows:Parameter"),e=0;e<b.length;e++)if(c=b[e],"outputFormat"===c.getAttribute("name")){b=c.getElementsByTagName("ows:Value");for(d=0;d<b.length;d++)c=b[d],f=c.textContent,c=document.createElement("option"),c.text=f,c.value=f,a.options.add(c);break}a.value="application/json"}a=this.addService.getElementsByTagName("tr");
|
||||||
|
for(b=3;b<a.length;b++)a[b].classList.remove("netgis-hide")};
|
||||||
|
netgis.Modal.prototype.onAddServiceAccept=function(a){var b=this.addService.getElementsByTagName("input"),c=this.addService.getElementsByTagName("select");a=b[0].value;b=b[1].value;var d=c[0];c=c[1];d=d.options.item(d.options.selectedIndex);c=c.options.item(c.options.selectedIndex);a={id:this.addServiceID++,url:a,title:d.text,name:d.value,format:c.value};switch(b){case "wms":this.client.invoke(netgis.Events.ADD_SERVICE_WMS,a);break;case "wfs":this.client.invoke(netgis.Events.ADD_SERVICE_WFS,a)}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"});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;d<a.length;d++){var e=a[d];if("Feature"===e.type){var f=e.properties;f=f.folder;var g=!1;for(e=0;e<c.folders.length;e++)if(c.folders[e].id===f){g=!0;break}if(!g){e=f.split("/");f=[];for(g=0;g<e.length;g++){var h=e[g];0<h.length&&f.push(h)}var k=-1;for(g=0;g<f.length;g++){h=f[g];var l="/"+f.slice(0,g+1).join("/"),m=!1;for(e=0;e<c.folders.length;e++)if(c.folders[e].path===
|
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;d<a.length;d++){var e=a[d];if("Feature"===e.type){var f=e.properties;f=f.folder;var g=!1;for(e=0;e<c.folders.length;e++)if(c.folders[e].id===f){g=!0;break}if(!g){e=f.split("/");f=[];for(g=0;g<e.length;g++){var h=e[g];0<h.length&&f.push(h)}var k=-1;for(g=0;g<f.length;g++){h=f[g];var l="/"+f.slice(0,g+1).join("/"),m=!1;for(e=0;e<c.folders.length;e++)if(c.folders[e].path===
|
||||||
l){k=e;m=!0;break}m||(e=c.folders.length,c.folders.push({title:h,parent:k,path:l}),k=e)}}}}for(d=0;d<a.length;d++)if(e=a[d],"Feature"===e.type){f=e.properties;g=-1;for(e=0;e<c.folders.length;e++)if(c.folders[e].path===f.folder){g=e;break}e=f.offerings;for(h=0;h<e.length;h++)switch(k=e[h],l=k.operations,k.code){case "http://www.opengis.net/spec/owc-geojson/1.0/req/wms":c.layers.push({folder:g,type:netgis.LayerTypes.WMS,url:l[0].href,title:f.title,attribution:f.rights,active:f.active});break;case "http://www.opengis.net/spec/owc-geojson/1.0/req/xyz":k=
|
l){k=e;m=!0;break}m||(e=c.folders.length,c.folders.push({title:h,parent:k,path:l}),k=e)}}}}for(d=0;d<a.length;d++)if(e=a[d],"Feature"===e.type){f=e.properties;g=-1;for(e=0;e<c.folders.length;e++)if(c.folders[e].path===f.folder){g=e;break}e=f.offerings;for(h=0;h<e.length;h++)switch(k=e[h],l=k.operations,k.code){case "http://www.opengis.net/spec/owc-geojson/1.0/req/wms":c.layers.push({folder:g,type:netgis.LayerTypes.WMS,url:l[0].href,title:f.title,attribution:f.rights,active:f.active});break;case "http://www.opengis.net/spec/owc-geojson/1.0/req/xyz":k=
|
||||||
l[0];c.layers.push({folder:g,type:netgis.LayerTypes.XYZ,url:k.href,title:f.title,attribution:f.rights,active:f.active});break;case "http://www.opengis.net/spec/owc-geojson/1.0/req/osm":k=l[0],c.layers.push({folder:g,type:netgis.LayerTypes.XYZ,url:k.href,title:f.title,attribution:f.rights,active:f.active})}}b.invoke(netgis.Events.CONTEXT_UPDATE,c)}}}();netgis=netgis||{};netgis.SearchParcel=function(){this.client=null};
|
l[0];c.layers.push({folder:g,type:netgis.LayerTypes.XYZ,url:k.href,title:f.title,attribution:f.rights,active:f.active});break;case "http://www.opengis.net/spec/owc-geojson/1.0/req/osm":k=l[0],c.layers.push({folder:g,type:netgis.LayerTypes.XYZ,url:k.href,title:f.title,attribution:f.rights,active:f.active})}}b.invoke(netgis.Events.CONTEXT_UPDATE,c)}}}();netgis=netgis||{};netgis.SearchParcel=function(){this.client=null};
|
||||||
@@ -163,29 +217,37 @@ netgis.SearchPlace.prototype.request=function(a){if(this.client.config.search&&t
|
|||||||
netgis.SearchPlace.prototype.onSearchPlaceRequest=function(a){var b=a.query,c=this;this.lastRequest&&this.lastRequest.abort();this.timeout&&window.clearTimeout(this.timeout);this.timeout=window.setTimeout(function(){c.request(b)},300)};netgis.SearchPlace.prototype.onSearchPlaceResponse=function(a){a=JSON.parse(a);this.client.invoke(netgis.Events.SEARCH_PLACE_RESPONSE,a)};netgis=netgis||{};
|
netgis.SearchPlace.prototype.onSearchPlaceRequest=function(a){var b=a.query,c=this;this.lastRequest&&this.lastRequest.abort();this.timeout&&window.clearTimeout(this.timeout);this.timeout=window.setTimeout(function(){c.request(b)},300)};netgis.SearchPlace.prototype.onSearchPlaceResponse=function(a){a=JSON.parse(a);this.client.invoke(netgis.Events.SEARCH_PLACE_RESPONSE,a)};netgis=netgis||{};
|
||||||
netgis.SLD=function(){return{read:function(a,b){var c={};a=(new DOMParser).parseFromString(a,"text/xml").getElementsByTagName("NamedLayer");for(var d=0;d<a.length;d++){var e=a[d],f=e.getElementsByTagName("se:Name")[0].innerHTML;console.info("Layer:",f);e=e.getElementsByTagName("se:FeatureTypeStyle");for(f=0;f<e.length;f++)for(var g=e[f].getElementsByTagName("se:Rule"),h=0;h<g.length;h++){var k=g[h],l=k.getElementsByTagName("se:Name")[0].innerHTML;console.info("Rule:",l);l=k.getElementsByTagName("se:PolygonSymbolizer")[0];k=
|
netgis.SLD=function(){return{read:function(a,b){var c={};a=(new DOMParser).parseFromString(a,"text/xml").getElementsByTagName("NamedLayer");for(var d=0;d<a.length;d++){var e=a[d],f=e.getElementsByTagName("se:Name")[0].innerHTML;console.info("Layer:",f);e=e.getElementsByTagName("se:FeatureTypeStyle");for(f=0;f<e.length;f++)for(var g=e[f].getElementsByTagName("se:Rule"),h=0;h<g.length;h++){var k=g[h],l=k.getElementsByTagName("se:Name")[0].innerHTML;console.info("Rule:",l);l=k.getElementsByTagName("se:PolygonSymbolizer")[0];k=
|
||||||
l.getElementsByTagName("se:Fill")[0];l=l.getElementsByTagName("se:Stroke")[0];c.polygon={fill:k.querySelector("[name='fill']").innerHTML,stroke:l.querySelector("[name='stroke']").innerHTML,strokeWidth:Number.parseFloat(l.querySelector("[name='stroke-width']").innerHTML)}}}console.info("SLD:",c);b.invoke(netgis.Events.MAP_UPDATE_STYLE,c);return c}}}();netgis=netgis||{};netgis.Toolbar=function(){this.client=null;this.toolbars={};this.searchValue=""};
|
l.getElementsByTagName("se:Fill")[0];l=l.getElementsByTagName("se:Stroke")[0];c.polygon={fill:k.querySelector("[name='fill']").innerHTML,stroke:l.querySelector("[name='stroke']").innerHTML,strokeWidth:Number.parseFloat(l.querySelector("[name='stroke-width']").innerHTML)}}}console.info("SLD:",c);b.invoke(netgis.Events.MAP_UPDATE_STYLE,c);return c}}}();netgis=netgis||{};netgis.Toolbar=function(){this.client=null;this.toolbars={};this.searchValue=""};
|
||||||
netgis.Toolbar.prototype.load=function(){var a=this.client.config;this.root=document.createElement("section");this.root.className="netgis-toolbars";if(this.client.editable){this.toolbars[netgis.Modes.DRAW_POINTS]=this.createToolbar();this.append(this.toolbars[netgis.Modes.DRAW_POINTS],this.createToolbarButton('<i class="fas fa-times"></i><span>Punkte zeichnen:</span>',this.onToolbarClose.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_POINTS],this.createToolbarCheckbox("Einrasten",this.onSnapChange.bind(this)));
|
netgis.Toolbar.prototype.load=function(){var a=this.client.config;this.root=document.createElement("section");this.root.className="netgis-toolbars";if(this.client.editable){var b=1E3,c=3;netgis.util.isDefined(a.tools)&&(netgis.util.isDefined(a.tools.buffer.defaultRadius)&&(b=a.tools.buffer.defaultRadius),netgis.util.isDefined(a.tools.buffer.defaultSegments)&&(c=a.tools.buffer.defaultSegments));this.toolbars[netgis.Modes.DRAW_POINTS]=this.createToolbar();this.append(this.toolbars[netgis.Modes.DRAW_POINTS],
|
||||||
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('<i class="fas fa-times"></i><span>Linien zeichnen:</span>',this.onToolbarClose.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_LINES],this.createToolbarCheckbox("Einrasten",this.onSnapChange.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.DRAW_LINES]);this.toolbars[netgis.Modes.DRAW_POLYGONS]=
|
this.createToolbarButton('<i class="fas fa-times"></i><span>Punkte zeichnen:</span>',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.createToolbar();this.append(this.toolbars[netgis.Modes.DRAW_POLYGONS],this.createToolbarButton('<i class="fas fa-times"></i><span>Polygone zeichnen:</span>',this.onToolbarClose.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_POLYGONS],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.append(this.toolbars[netgis.Modes.CUT_FEATURE_BEGIN],
|
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('<i class="fas fa-times"></i><span>Linien zeichnen:</span>',this.onToolbarClose.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_LINES],this.createToolbarCheckbox("Einrasten",
|
||||||
this.createToolbarButton('<i class="fas fa-times"></i><span>Feature zum Ausschneiden w\u00e4hlen:</span>',this.onToolbarClose.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.CUT_FEATURE_BEGIN]);this.toolbars[netgis.Modes.CUT_FEATURE_DRAW]=this.createToolbar();this.append(this.toolbars[netgis.Modes.CUT_FEATURE_DRAW],this.createToolbarButton('<i class="fas fa-times"></i><span>Fl\u00e4che zum Ausschneiden zeichnen:</span>',this.onToolbarClose.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.CUT_FEATURE_DRAW]);
|
this.onSnapChange.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_LINES],this.createToolbarCheckbox("Puffern",this.onDrawBufferChange.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_LINES],this.createToolbarInput("Radius (Meter):",b,this.onDrawBufferRadiusChange.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_LINES],this.createToolbarInput("Segmente:",c,this.onDrawBufferSegmentsChange.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.DRAW_LINES]);this.showDrawBufferOptions(!1);
|
||||||
this.toolbars[netgis.Modes.MODIFY_FEATURES]=this.createToolbar();this.append(this.toolbars[netgis.Modes.MODIFY_FEATURES],this.createToolbarButton('<i class="fas fa-times"></i><span>Features verschieben:</span>',this.onToolbarClose.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.MODIFY_FEATURES]);this.toolbars[netgis.Modes.DELETE_FEATURES]=this.createToolbar();this.append(this.toolbars[netgis.Modes.DELETE_FEATURES],this.createToolbarButton('<i class="fas fa-times"></i><span>Features l\u00f6schen:</span>',
|
this.toolbars[netgis.Modes.DRAW_POLYGONS]=this.createToolbar();this.append(this.toolbars[netgis.Modes.DRAW_POLYGONS],this.createToolbarButton('<i class="fas fa-times"></i><span>Polygone zeichnen:</span>',this.onToolbarClose.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_POLYGONS],this.createToolbarCheckbox("Einrasten",this.onSnapChange.bind(this)));this.append(this.toolbars[netgis.Modes.DRAW_POLYGONS],this.createToolbarCheckbox("Tracing",this.onTracingChange.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.DRAW_POLYGONS]);
|
||||||
this.onToolbarClose.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.DELETE_FEATURES]);this.toolbars[netgis.Modes.BUFFER_FEATURE_BEGIN]=this.createToolbar();this.append(this.toolbars[netgis.Modes.BUFFER_FEATURE_BEGIN],this.createToolbarButton('<i class="fas fa-times"></i><span>Feature zum Puffern w\u00e4hlen:</span>',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.CUT_FEATURE_BEGIN]=this.createToolbar();this.append(this.toolbars[netgis.Modes.CUT_FEATURE_BEGIN],this.createToolbarButton('<i class="fas fa-times"></i><span>Feature zum Ausschneiden w\u00e4hlen:</span>',this.onToolbarClose.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.CUT_FEATURE_BEGIN]);this.toolbars[netgis.Modes.CUT_FEATURE_DRAW]=this.createToolbar();this.append(this.toolbars[netgis.Modes.CUT_FEATURE_DRAW],this.createToolbarButton('<i class="fas fa-times"></i><span>Fl\u00e4che zum Ausschneiden zeichnen:</span>',
|
||||||
var b=1E3,c=3;netgis.util.isDefined(a.tools)&&(netgis.util.isDefined(a.tools.buffer.defaultRadius)&&(b=a.tools.buffer.defaultRadius),netgis.util.isDefined(a.tools.buffer.defaultSegments)&&(c=a.tools.buffer.defaultSegments));this.append(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT],this.createToolbarButton('<i class="fas fa-times"></i><span>Feature puffern:</span>',this.onBufferCancel.bind(this)));this.append(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT],this.createToolbarInput("Radius in Meter:",
|
this.onToolbarClose.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.CUT_FEATURE_DRAW]);this.toolbars[netgis.Modes.MODIFY_FEATURES]=this.createToolbar();this.append(this.toolbars[netgis.Modes.MODIFY_FEATURES],this.createToolbarButton('<i class="fas fa-times"></i><span>Features verschieben:</span>',this.onToolbarClose.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.MODIFY_FEATURES]);this.toolbars[netgis.Modes.DELETE_FEATURES]=this.createToolbar();this.append(this.toolbars[netgis.Modes.DELETE_FEATURES],
|
||||||
b,this.onBufferChange.bind(this)));this.append(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT],this.createToolbarInput("Segmente:",c,this.onBufferChange.bind(this)));this.append(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT],this.createToolbarButton('<i class="fas fa-check"></i><span>OK</span>',this.onBufferAccept.bind(this)));a=this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT].getElementsByTagName("input");a[0].addEventListener("keyup",this.onBufferKeyUp.bind(this));a[1].addEventListener("keyup",
|
this.createToolbarButton('<i class="fas fa-times"></i><span>Features l\u00f6schen:</span>',this.onToolbarClose.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.DELETE_FEATURES]);this.toolbars[netgis.Modes.BUFFER_FEATURE_BEGIN]=this.createToolbar();this.append(this.toolbars[netgis.Modes.BUFFER_FEATURE_BEGIN],this.createToolbarButton('<i class="fas fa-times"></i><span>Feature zum Puffern w\u00e4hlen:</span>',this.onToolbarClose.bind(this)));this.root.appendChild(this.toolbars[netgis.Modes.BUFFER_FEATURE_BEGIN]);
|
||||||
this.onBufferKeyUp.bind(this));a[1].setAttribute("min",1);this.root.appendChild(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT])}this.toolbars[netgis.Modes.SEARCH_PLACE]=this.createToolbar();this.append(this.toolbars[netgis.Modes.SEARCH_PLACE],this.createToolbarButton('<i class="fas fa-times"></i><span>Suche:</span>',this.onToolbarClose.bind(this)));a=this.createToolbarInputText("Adresse...","",null);a.style.position="relative";this.searchInput=a.getElementsByTagName("input")[0];this.searchInput.addEventListener("keyup",
|
this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT]=this.createToolbar();this.append(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT],this.createToolbarButton('<i class="fas fa-times"></i><span>Feature puffern:</span>',this.onBufferCancel.bind(this)));this.append(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT],this.createToolbarInput("Radius (Meter):",b,this.onBufferChange.bind(this)));this.append(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT],this.createToolbarInput("Segmente:",c,this.onBufferChange.bind(this)));
|
||||||
this.onSearchKeyUp.bind(this));this.searchInput.addEventListener("focus",this.onSearchFocus.bind(this));this.searchInput.addEventListener("blur",this.onSearchBlur.bind(this));this.append(this.toolbars[netgis.Modes.SEARCH_PLACE],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.append(this.toolbars[netgis.Modes.SEARCH_PLACE],this.createToolbarButton('<i class="fas fa-undo"></i>',
|
this.append(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT],this.createToolbarButton('<i class="fas fa-check"></i><span>OK</span>',this.onBufferAccept.bind(this)));a=this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT].getElementsByTagName("input");a[0].addEventListener("keyup",this.onBufferKeyUp.bind(this));a[1].addEventListener("keyup",this.onBufferKeyUp.bind(this));a[1].setAttribute("min",1);this.root.appendChild(this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT])}this.toolbars[netgis.Modes.SEARCH_PLACE]=
|
||||||
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";var b=document.createElement("div");a.appendChild(b);return a};
|
this.createToolbar();this.append(this.toolbars[netgis.Modes.SEARCH_PLACE],this.createToolbarButton('<i class="fas fa-times"></i><span>Suche:</span>',this.onToolbarClose.bind(this)));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",
|
||||||
netgis.Toolbar.prototype.append=function(a,b){a.getElementsByTagName("div")[0].appendChild(b)};netgis.Toolbar.prototype.createToolbarButton=function(a,b){var c=document.createElement("button");c.setAttribute("type","button");c.className="netgis-hover-light";c.innerHTML=a;c.addEventListener("click",b);return c};
|
this.onSearchBlur.bind(this));this.append(this.toolbars[netgis.Modes.SEARCH_PLACE],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.append(this.toolbars[netgis.Modes.SEARCH_PLACE],this.createToolbarButton('<i class="fas fa-undo"></i>',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";var b=document.createElement("div");a.appendChild(b);return a};netgis.Toolbar.prototype.append=function(a,b){a.getElementsByTagName("div")[0].appendChild(b)};
|
||||||
|
netgis.Toolbar.prototype.createToolbarButton=function(a,b){var c=document.createElement("button");c.setAttribute("type","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.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.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.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.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();break;case netgis.Modes.DRAW_POINTS:case netgis.Modes.DRAW_LINES:this.toolbars[netgis.Modes.DRAW_POINTS].getElementsByTagName("input")[1].checked&&
|
||||||
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<a.length&&this.client.invoke(netgis.Events.SEARCH_PLACE_REQUEST,{query:a}))};netgis.Toolbar.prototype.searchClear=function(){this.searchInput.value="";this.searchList.innerHTML=""};
|
this.client.invoke(netgis.Events.DRAW_BUFFER_ON,null)}};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<a.length&&this.client.invoke(netgis.Events.SEARCH_PLACE_REQUEST,{query:a}))};netgis.Toolbar.prototype.searchClear=function(){this.searchInput.value="";this.searchList.innerHTML=""};
|
||||||
netgis.Toolbar.prototype.searchSelectFirst=function(){var a=this.searchList.getElementsByTagName("button");if(0<a.length)this.onSearchItemClick({target:a[0]})};netgis.Toolbar.prototype.onSearchKeyUp=function(a){var b=a.target;switch(a.keyCode){case 13:this.searchSelectFirst();this.searchList.classList.add("netgis-hide");break;case 27:this.searchClear();break;default:this.searchRequest(b.value)}};netgis.Toolbar.prototype.onSearchChange=function(a){this.searchRequest(a.target.value)};
|
netgis.Toolbar.prototype.searchSelectFirst=function(){var a=this.searchList.getElementsByTagName("button");if(0<a.length)this.onSearchItemClick({target:a[0]})};netgis.Toolbar.prototype.onSearchKeyUp=function(a){var b=a.target;switch(a.keyCode){case 13:this.searchSelectFirst();this.searchList.classList.add("netgis-hide");break;case 27:this.searchClear();break;default:this.searchRequest(b.value)}};netgis.Toolbar.prototype.onSearchChange=function(a){this.searchRequest(a.target.value)};
|
||||||
netgis.Toolbar.prototype.onSearchClear=function(a){this.searchClear();this.searchInput.focus()};netgis.Toolbar.prototype.onSearchFocus=function(a){this.searchList.classList.remove("netgis-hide")};netgis.Toolbar.prototype.onSearchBlur=function(a){this.searchList.classList.add("netgis-hide")};
|
netgis.Toolbar.prototype.onSearchClear=function(a){this.searchClear();this.searchInput.focus()};netgis.Toolbar.prototype.onSearchFocus=function(a){this.searchList.classList.remove("netgis-hide")};netgis.Toolbar.prototype.onSearchBlur=function(a){this.searchList.classList.add("netgis-hide")};
|
||||||
netgis.Toolbar.prototype.onSearchPlaceResponse=function(a){this.searchList.innerHTML="";a=a.geonames;for(var b=0;b<a.length;b++){var c=a[b],d=document.createElement("li");d.className="netgis-hover-light";var e=document.createElement("button");e.setAttribute("type","button");e.innerHTML=c.title;e.dataset.title=c.title;e.dataset.minx=c.minx;e.dataset.miny=c.miny;e.dataset.maxx=c.maxx;e.dataset.maxy=c.maxy;e.addEventListener("mousedown",this.onSearchItemClick.bind(this));d.appendChild(e);this.searchList.appendChild(d)}};
|
netgis.Toolbar.prototype.onSearchPlaceResponse=function(a){this.searchList.innerHTML="";a=a.geonames;for(var b=0;b<a.length;b++){var c=a[b],d=document.createElement("li");d.className="netgis-hover-light";var e=document.createElement("button");e.setAttribute("type","button");e.innerHTML=c.title;e.dataset.title=c.title;e.dataset.minx=c.minx;e.dataset.miny=c.miny;e.dataset.maxx=c.maxx;e.dataset.maxy=c.maxy;e.addEventListener("mousedown",this.onSearchItemClick.bind(this));d.appendChild(e);this.searchList.appendChild(d)}};
|
||||||
netgis.Toolbar.prototype.onSearchItemClick=function(a){var b=a.target;a=b.dataset.title;var c=Number.parseFloat(b.dataset.minx),d=Number.parseFloat(b.dataset.miny),e=Number.parseFloat(b.dataset.maxx);b=Number.parseFloat(b.dataset.maxy);this.client.invoke(netgis.Events.MAP_SET_EXTENT,{minx:c,miny:d,maxx:e,maxy:b});this.searchValue=a};
|
netgis.Toolbar.prototype.onSearchItemClick=function(a){var b=a.target;a=b.dataset.title;var c=Number.parseFloat(b.dataset.minx),d=Number.parseFloat(b.dataset.miny),e=Number.parseFloat(b.dataset.maxx);b=Number.parseFloat(b.dataset.maxy);this.client.invoke(netgis.Events.MAP_SET_EXTENT,{minx:c,miny:d,maxx:e,maxy:b});this.searchValue=a};
|
||||||
netgis.Toolbar.prototype.updateBuffer=function(){var a=this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT].getElementsByTagName("input"),b=Number.parseFloat(a[0].value);a=Number.parseInt(a[1].value);this.client.invoke(netgis.Events.BUFFER_CHANGE,{radius:b,segments:a})};netgis.Toolbar.prototype.onBufferChange=function(a){this.updateBuffer()};netgis.Toolbar.prototype.onBufferKeyUp=function(a){this.updateBuffer()};
|
netgis.Toolbar.prototype.updateBuffer=function(){var a=this.toolbars[netgis.Modes.BUFFER_FEATURE_EDIT].getElementsByTagName("input"),b=Number.parseFloat(a[0].value);a=Number.parseInt(a[1].value);this.client.invoke(netgis.Events.BUFFER_CHANGE,{radius:b,segments:a})};netgis.Toolbar.prototype.onBufferChange=function(a){this.updateBuffer()};netgis.Toolbar.prototype.onBufferKeyUp=function(a){this.updateBuffer()};
|
||||||
netgis.Toolbar.prototype.onBufferAccept=function(a){this.client.invoke(netgis.Events.BUFFER_ACCEPT,null);this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.VIEW)};netgis.Toolbar.prototype.onBufferCancel=function(a){this.client.invoke(netgis.Events.BUFFER_CANCEL,null);this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.VIEW)};
|
netgis.Toolbar.prototype.onBufferAccept=function(a){this.client.invoke(netgis.Events.BUFFER_ACCEPT,null);this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.VIEW)};netgis.Toolbar.prototype.onBufferCancel=function(a){this.client.invoke(netgis.Events.BUFFER_CANCEL,null);this.client.invoke(netgis.Events.SET_MODE,netgis.Modes.VIEW)};
|
||||||
netgis.Toolbar.prototype.onSnapChange=function(a){a=a.target.checked;this.toolbars[netgis.Modes.DRAW_POINTS].getElementsByTagName("input")[0].checked=a;this.toolbars[netgis.Modes.DRAW_LINES].getElementsByTagName("input")[0].checked=a;this.toolbars[netgis.Modes.DRAW_POLYGONS].getElementsByTagName("input")[0].checked=a;this.client.invoke(a?netgis.Events.SNAP_ON:netgis.Events.SNAP_OFF,null)};netgis=netgis||{};
|
netgis.Toolbar.prototype.onSnapChange=function(a){a=a.target.checked;this.toolbars[netgis.Modes.DRAW_POINTS].getElementsByTagName("input")[0].checked=a;this.toolbars[netgis.Modes.DRAW_LINES].getElementsByTagName("input")[0].checked=a;this.toolbars[netgis.Modes.DRAW_POLYGONS].getElementsByTagName("input")[0].checked=a;this.client.invoke(a?netgis.Events.SNAP_ON:netgis.Events.SNAP_OFF,null)};
|
||||||
|
netgis.Toolbar.prototype.onTracingChange=function(a){a=a.target.checked;var b=this.toolbars[netgis.Modes.DRAW_POLYGONS].getElementsByTagName("input")[0],c=b.checked;a&&!c&&(b.checked=a,this.client.invoke(netgis.Events.SNAP_ON,null));this.client.invoke(a?netgis.Events.TRACING_ON:netgis.Events.TRACING_OFF,null)};
|
||||||
|
netgis.Toolbar.prototype.onDrawBufferChange=function(a){a=a.target.checked;this.toolbars[netgis.Modes.DRAW_POINTS].getElementsByTagName("input")[1].checked=a;this.toolbars[netgis.Modes.DRAW_LINES].getElementsByTagName("input")[1].checked=a;this.client.invoke(a?netgis.Events.DRAW_BUFFER_ON:netgis.Events.DRAW_BUFFER_OFF,null);this.showDrawBufferOptions(a)};
|
||||||
|
netgis.Toolbar.prototype.onDrawBufferRadiusChange=function(a){a=a.target;var b=Number.parseFloat(a.value);this.client.invoke(netgis.Events.DRAW_BUFFER_RADIUS_CHANGE,b);var c=this.toolbars[netgis.Modes.DRAW_POINTS].getElementsByTagName("input")[2];a!==c&&(c.value=b);c=this.toolbars[netgis.Modes.DRAW_LINES].getElementsByTagName("input")[2];a!==c&&(c.value=b)};
|
||||||
|
netgis.Toolbar.prototype.onDrawBufferSegmentsChange=function(a){a=a.target;var b=Number.parseInt(a.value);this.client.invoke(netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE,b);var c=this.toolbars[netgis.Modes.DRAW_POINTS].getElementsByTagName("input")[3];a!==c&&(c.value=b);c=this.toolbars[netgis.Modes.DRAW_LINES].getElementsByTagName("input")[3];a!==c&&(c.value=b)};
|
||||||
|
netgis.Toolbar.prototype.showDrawBufferOptions=function(a){var b=this.toolbars[netgis.Modes.DRAW_POINTS].children[0].children,c=this.toolbars[netgis.Modes.DRAW_LINES].children[0].children;a?(b[3].classList.remove("netgis-hide"),b[4].classList.remove("netgis-hide"),c[3].classList.remove("netgis-hide"),c[4].classList.remove("netgis-hide")):(b[3].classList.add("netgis-hide"),b[4].classList.add("netgis-hide"),c[3].classList.add("netgis-hide"),c[4].classList.add("netgis-hide"))};netgis=netgis||{};
|
||||||
netgis.util=function(){var a=function(a,c){for(var b in a)a.hasOwnProperty(b)&&c(b,a[b])};return{isDefined:function(a){return"undefined"!==typeof a},isString:function(a){return"string"===typeof a||a instanceof String},replace:function(a,c,d){return a.replace(new RegExp(c,"g"),d)},foreach:a,template:function(b,c){a(c,function(a,c){b=b.replace(new RegExp("{"+a+"}","g"),c)});return b},newlines:function(a){return a.replace(/\n/g,"<br />")},create:function(a){var b=document.createElement("tbody");b.innerHTML=
|
netgis.util=function(){var a=function(a,c){for(var b in a)a.hasOwnProperty(b)&&c(b,a[b])};return{isDefined:function(a){return"undefined"!==typeof a},isString:function(a){return"string"===typeof a||a instanceof String},replace:function(a,c,d){return a.replace(new RegExp(c,"g"),d)},foreach:a,template:function(b,c){a(c,function(a,c){b=b.replace(new RegExp("{"+a+"}","g"),c)});return b},newlines:function(a){return a.replace(/\n/g,"<br />")},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<c;)a="0"+a;return a},merge:function(a,c){return Object.assign(a,c)}}}();
|
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<c;)a="0"+a;return a},merge:function(a,c){return Object.assign(a,c)},getTimeStamp:function(){var a=new Date,c=a.getDate()+"."+(a.getMonth()+1)+"."+a.getFullYear();return c+=" "+a.getHours()+
|
||||||
|
":"+a.getMinutes()},formatArea:function(a,c){var b=1E4<a;a=b?c?Math.round(a/1E6*1E3)/1E3:Math.round(a/1E6):c?Math.round(100*a)/100:Math.round(a);0===a&&(b=!1);return a+(b?" qkm":" qm")}}}();
|
||||||
Reference in new issue
Block a user