1803 lines
1.0 MiB
1803 lines
1.0 MiB
/*!
|
||
*
|
||
* iclient-leaflet.(https://iclient.supermap.io)
|
||
* Copyright© 2000 - 2020 SuperMap Software Co.Ltd
|
||
* license: Apache-2.0
|
||
* version: v10.1.0-beta
|
||
*
|
||
*/!function(e){var t={};function i(s){if(t[s])return t[s].exports;var r=t[s]={i:s,l:!1,exports:{}};return e[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,s){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(s,r,function(t){return e[t]}.bind(null,r));return s},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=14)}([function(e,t){e.exports=L},function(e,t){e.exports=function(){try{return echarts}catch(e){return{}}}()},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){var s=i(20),r="&&",n="||",a="and",o="or",l="=",h="~",u="!"+l,c="!"+h,d=">",p=">=",f="<",m="<=",y="*",g=",",v=".",S="(",b=")",_="where",x={pathway:[],groups:{}},C={},T={},M=console.log;function w(e){var t=A(e,_),i=t[0],s=t[1];x.pathway=A(i,g);for(var a=0,o=x.pathway.length;a<o;a++)x.pathway[a]=A(x.pathway[a],v),x.pathway[a][0]==y&&x.pathway[a].shift(),0===x.pathway[a].length&&x.pathway.splice(a,1);for(var T=-1,M=-1,w=0;w<s.length;){if(s[w]===S)T=w;else if(s[w]===b&&(M=w)>T&&-1!==T){var P="gr_"+(new Date).getTime();x.groups[P]=s.substring(T+1,M),s=s.replace(S+x.groups[P]+b,P),w=-1}w+=1}!function e(t,i){var s=E(i,r),a=E(i,n);if(s!==Number.MAX_VALUE||a!==Number.MAX_VALUE)if(s<a){t.and=t.and||[];var o=A(i,r);t.and.push(o[0]),e(t.and,o[1])}else{t.or=t.or||[];var o=A(i,n);t.or.push(o[0]),e(t.or,o[1])}else x.groups[i]?(i=x.groups[i],e(t,i)):(Array.isArray(t)?t.push(i):t.or=[i],function e(t){for(var i in t)if(t.hasOwnProperty(i))if(Array.isArray(t[i]))e(t[i]);else if("string"==typeof t[i])if(L(t[i],u)){var s=A(t[i],u);t[i]={ne:[s[0],s[1]]}}else if(L(t[i],c)){var s=A(t[i],c);t[i]={nreq:[s[0],s[1]]}}else if(L(t[i],h)){var s=A(t[i],h);t[i]={req:[s[0],s[1]]}}else if(L(t[i],p)){var s=A(t[i],p);t[i]={ge:[s[0],s[1]]}}else if(L(t[i],d)){var s=A(t[i],d);t[i]={gt:[s[0],s[1]]}}else if(L(t[i],m)){var s=A(t[i],m);t[i]={le:[s[0],s[1]]}}else if(L(t[i],f)){var s=A(t[i],f);t[i]={lt:[s[0],s[1]]}}else if(L(t[i],l)){var s=A(t[i],l);t[i]={eq:[s[0],s[1]]}}}(C.or?C.or:C.and))}(C,s)}function E(e,t){var i=e.indexOf(t);return-1===i?Number.MAX_VALUE:i}function A(e,t){return e.split(t).map(function(e){return e.trim()})}function L(e,t){return e.indexOf(t)>-1}function P(e,t){var i=A(t,v),r=e;for(var n in i){if(!r.hasOwnProperty(i[n]))return"";r=r[i[n]]}return r=s.isDate(r)?r.valueOf():s.isDateString(r)?s.parseDateFromString(r):r.toString()}function N(e,t){var i=!1;for(var s in e){if(i=i||(s===a?O:s===o?N:I)(e[s],t),T.trace&&M(x.step,"======((( or",e[s],i),i)return i}return i}function O(e,t){var i=!0;for(var s in e){if(i=i&&(s===a?O:s===o?N:I)(e[s],t),T.trace&&M(x.step,"======((( and",e[s],i),!i)return i}return i}function I(e,t){if(x.step+=1,e.or){var i=N(e.or,t);return T.trace&&M(x.step,"OR",e,i),i}if(e.and){i=O(e.and,t);return T.trace&&M(x.step,"AND",e,i),i}if("object"==typeof e)return e.eq?P(t,e.eq[0])===e.eq[1]:e.ne?P(t,e.ne[0])!==e.ne[1]:e.req?L(P(t,e.req[0]),e.req[1]):e.nreq?!L(P(t,e.nreq[0]),e.nreq[1]):e.gt?P(t,e.gt[0])>e.gt[1]:e.ge?P(t,e.ge[0])>=e.ge[1]:e.lt?P(t,e.lt[0])<e.lt[1]:e.le?P(t,e.le[0])<=e.le[1]:I(e,t)}function F(e,t,i){return x={pathway:[],groups:{},step:0},C={},T=i=i||{trace:!1},w(t),(s=function(e){var t=[];for(var i in e)I(C,e[i])&&t.push(e[i]);return t}(e))&&x.pathway.length>0?s.map(function(e){for(var t={},i=0,s=x.pathway.length;i<s;i++){var r=x.pathway[i].join(v);t[r]=P(e,r)}return t}):s;var s}void 0!==e.exports&&(e.exports=F),"undefined"!=typeof window&&(window.Query=F)},function(e,t,i){var s,r,n;r=[t,e],void 0===(n="function"==typeof(s=function(e,t){"use strict";var i={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function s(e){try{delete window[e]}catch(t){window[e]=void 0}}function r(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}t.exports=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=e,a=t.timeout||i.timeout,o=t.jsonpCallback||i.jsonpCallback,l=void 0;return new Promise(function(i,h){var u=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),c=o+"_"+u;window[u]=function(e){i({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),r(c),s(u)},n+=-1===n.indexOf("?")?"?":"&";var d=document.createElement("script");d.setAttribute("src",""+n+o+"="+u),t.charset&&d.setAttribute("charset",t.charset),d.id=c,document.getElementsByTagName("head")[0].appendChild(d),l=setTimeout(function(){h(new Error("JSONP request to "+e+" timed out")),s(u),r(c),window[u]=function(){s(u)}},a),d.onerror=function(){h(new Error("JSONP request to "+e+" failed")),s(u),r(c),l&&clearTimeout(l)}})}})?s.apply(t,r):s)||(e.exports=n)},function(e,t){e.exports=function(){try{return XLSX}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return mapv}catch(e){return{}}}()},function(e,t){e.exports=function(){try{return turf}catch(e){return{}}}()},function(e,t,i){"use strict";var s=i(9);function r(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(n,this,t),this.length=this._features.length}function n(e,t,i){15===e?t.version=i.readVarint():1===e?t.name=i.readString():5===e?t.extent=i.readVarint():2===e?t._features.push(i.pos):3===e?t._keys.push(i.readString()):4===e&&t._values.push(function(e){var t=null,i=e.readVarint()+e.pos;for(;e.pos<i;){var s=e.readVarint()>>3;t=1===s?e.readString():2===s?e.readFloat():3===s?e.readDouble():4===s?e.readVarint64():5===s?e.readVarint():6===s?e.readSVarint():7===s?e.readBoolean():null}return t}(i))}e.exports=r,r.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new s(this._pbf,t,this.extent,this._keys,this._values)}},function(e,t,i){"use strict";var s=i(23);function r(e,t,i,s,r){this.properties={},this.extent=i,this.type=0,this._pbf=e,this._geometry=-1,this._keys=s,this._values=r,e.readFields(n,this,t)}function n(e,t,i){1==e?t.id=i.readVarint():2==e?function(e,t){var i=e.readVarint()+e.pos;for(;e.pos<i;){var s=t._keys[e.readVarint()],r=t._values[e.readVarint()];t.properties[s]=r}}(i,t):3==e?t.type=i.readVarint():4==e&&(t._geometry=i.pos)}function a(e){for(var t,i,s=0,r=0,n=e.length,a=n-1;r<n;a=r++)t=e[r],s+=((i=e[a]).x-t.x)*(t.y+i.y);return s}e.exports=r,r.types=["Unknown","Point","LineString","Polygon"],r.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,i=e.readVarint()+e.pos,r=1,n=0,a=0,o=0,l=[];e.pos<i;){if(n<=0){var h=e.readVarint();r=7&h,n=h>>3}if(n--,1===r||2===r)a+=e.readSVarint(),o+=e.readSVarint(),1===r&&(t&&l.push(t),t=[]),t.push(new s(a,o));else{if(7!==r)throw new Error("unknown command "+r);t&&t.push(t[0].clone())}}return t&&l.push(t),l},r.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,s=0,r=0,n=0,a=1/0,o=-1/0,l=1/0,h=-1/0;e.pos<t;){if(s<=0){var u=e.readVarint();i=7&u,s=u>>3}if(s--,1===i||2===i)r+=e.readSVarint(),n+=e.readSVarint(),r<a&&(a=r),r>o&&(o=r),n<l&&(l=n),n>h&&(h=n);else if(7!==i)throw new Error("unknown command "+i)}return[a,l,o,h]},r.prototype.toGeoJSON=function(e,t,i){var s,n,o=this.extent*Math.pow(2,i),l=this.extent*e,h=this.extent*t,u=this.loadGeometry(),c=r.types[this.type];function d(e){for(var t=0;t<e.length;t++){var i=e[t],s=180-360*(i.y+h)/o;e[t]=[360*(i.x+l)/o-180,360/Math.PI*Math.atan(Math.exp(s*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(s=0;s<u.length;s++)p[s]=u[s][0];d(u=p);break;case 2:for(s=0;s<u.length;s++)d(u[s]);break;case 3:for(u=function(e){var t=e.length;if(t<=1)return[e];for(var i,s,r=[],n=0;n<t;n++){var o=a(e[n]);0!==o&&(void 0===s&&(s=o<0),s===o<0?(i&&r.push(i),i=[e[n]]):i.push(e[n]))}i&&r.push(i);return r}(u),s=0;s<u.length;s++)for(n=0;n<u[s].length;n++)d(u[s][n])}1===u.length?u=u[0]:c="Multi"+c;var f={type:"Feature",geometry:{type:c,coordinates:u},properties:this.properties};return"id"in this&&(f.id=this.id),f}},function(e,t){e.exports=function(){try{return elasticsearch}catch(e){return{}}}()},function(e,t,i){(function(t){var i=9007199254740991,s="[object Arguments]",r="[object Function]",n="[object GeneratorFunction]",a="[object Map]",o="[object Set]",l=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,u="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,d=u||c||Function("return this")();function p(e,t){return function(e,t){for(var i=-1,s=e?e.length:0,r=Array(s);++i<s;)r[i]=t(e[i],i,e);return r}(t,function(t){return[t,e[t]]})}var f,m,y,g=Function.prototype,v=Object.prototype,S=d["__core-js_shared__"],b=(f=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",_=g.toString,x=v.hasOwnProperty,C=v.toString,T=RegExp("^"+_.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=v.propertyIsEnumerable,w=(m=Object.keys,y=Object,function(e){return m(y(e))}),E=G(d,"DataView"),A=G(d,"Map"),L=G(d,"Promise"),P=G(d,"Set"),N=G(d,"WeakMap"),O=V(E),I=V(A),F=V(L),R=V(P),D=V(N);function k(e,t){var i=H(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&J(e)}(e)&&x.call(e,"callee")&&(!M.call(e,"callee")||C.call(e)==s)}(e)?function(e,t){for(var i=-1,s=Array(e);++i<e;)s[i]=t(i);return s}(e.length,String):[],r=i.length,n=!!r;for(var a in e)!t&&!x.call(e,a)||n&&("length"==a||z(a,r))||i.push(a);return i}function B(e){return!(!W(e)||b&&b in e)&&(q(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?T:l).test(V(e))}function U(e){if(i=(t=e)&&t.constructor,s="function"==typeof i&&i.prototype||v,t!==s)return w(e);var t,i,s,r=[];for(var n in Object(e))x.call(e,n)&&"constructor"!=n&&r.push(n);return r}function G(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return B(i)?i:void 0}var j=function(e){return C.call(e)};function z(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e<t}function V(e){if(null!=e){try{return _.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(E&&"[object DataView]"!=j(new E(new ArrayBuffer(1)))||A&&j(new A)!=a||L&&"[object Promise]"!=j(L.resolve())||P&&j(new P)!=o||N&&"[object WeakMap]"!=j(new N))&&(j=function(e){var t=C.call(e),i="[object Object]"==t?e.constructor:void 0,s=i?V(i):void 0;if(s)switch(s){case O:return"[object DataView]";case I:return a;case F:return"[object Promise]";case R:return o;case D:return"[object WeakMap]"}return t});var H=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!q(e)}function q(e){var t=W(e)?C.call(e):"";return t==r||t==n}function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var Y,Q=(Y=function(e){return J(e)?k(e):U(e)},function(e){var t,i,s,r=j(e);return r==a?(t=e,i=-1,s=Array(t.size),t.forEach(function(e,t){s[++i]=[t,e]}),s):r==o?function(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=[e,e]}),i}(e):p(e,Y(e))});e.exports=Q}).call(this,i(2))},function(e,t,i){"use strict";e.exports=r;var s=i(21);function r(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var n="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function a(e){return e.type===r.Bytes?e.readVarint()+e.pos:e.pos+1}function o(e,t,i){return i?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function l(e,t,i){var s=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));i.realloc(s);for(var r=i.pos-1;r>=e;r--)i.buf[r+s]=i.buf[r]}function h(e,t){for(var i=0;i<e.length;i++)t.writeVarint(e[i])}function u(e,t){for(var i=0;i<e.length;i++)t.writeSVarint(e[i])}function c(e,t){for(var i=0;i<e.length;i++)t.writeFloat(e[i])}function d(e,t){for(var i=0;i<e.length;i++)t.writeDouble(e[i])}function p(e,t){for(var i=0;i<e.length;i++)t.writeBoolean(e[i])}function f(e,t){for(var i=0;i<e.length;i++)t.writeFixed32(e[i])}function m(e,t){for(var i=0;i<e.length;i++)t.writeSFixed32(e[i])}function y(e,t){for(var i=0;i<e.length;i++)t.writeFixed64(e[i])}function g(e,t){for(var i=0;i<e.length;i++)t.writeSFixed64(e[i])}function v(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function S(e,t,i){e[i]=t,e[i+1]=t>>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function b(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos<i;){var s=this.readVarint(),r=s>>3,n=this.pos;this.type=7&s,e(r,t,this),this.pos===n&&this.skip(s)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=v(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=b(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=v(this.buf,this.pos)+4294967296*v(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=v(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=s.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=s.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,s=this.buf;return t=127&(i=s[this.pos++]),i<128?t:(t|=(127&(i=s[this.pos++]))<<7,i<128?t:(t|=(127&(i=s[this.pos++]))<<14,i<128?t:(t|=(127&(i=s[this.pos++]))<<21,i<128?t:function(e,t,i){var s,r,n=i.buf;if(r=n[i.pos++],s=(112&r)>>4,r<128)return o(e,s,t);if(r=n[i.pos++],s|=(127&r)<<3,r<128)return o(e,s,t);if(r=n[i.pos++],s|=(127&r)<<10,r<128)return o(e,s,t);if(r=n[i.pos++],s|=(127&r)<<17,r<128)return o(e,s,t);if(r=n[i.pos++],s|=(127&r)<<24,r<128)return o(e,s,t);if(r=n[i.pos++],s|=(1&r)<<31,r<128)return o(e,s,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(i=s[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&n?function(e,t,i){return n.decode(e.subarray(t,i))}(this.buf,t,e):function(e,t,i){var s="",r=t;for(;r<i;){var n,a,o,l=e[r],h=null,u=l>239?4:l>223?3:l>191?2:1;if(r+u>i)break;1===u?l<128&&(h=l):2===u?128==(192&(n=e[r+1]))&&(h=(31&l)<<6|63&n)<=127&&(h=null):3===u?(n=e[r+1],a=e[r+2],128==(192&n)&&128==(192&a)&&((h=(15&l)<<12|(63&n)<<6|63&a)<=2047||h>=55296&&h<=57343)&&(h=null)):4===u&&(n=e[r+1],a=e[r+2],o=e[r+3],128==(192&n)&&128==(192&a)&&128==(192&o)&&((h=(15&l)<<18|(63&n)<<12|(63&a)<<6|63&o)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,u=1):h>65535&&(h-=65536,s+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),s+=String.fromCharCode(h),r+=u}return s}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==r.Bytes)return e.push(this.readVarint(t));var i=a(this);for(e=e||[];this.pos<i;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==r.Bytes)return e.push(this.readSVarint());var t=a(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==r.Bytes)return e.push(this.readBoolean());var t=a(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==r.Bytes)return e.push(this.readFloat());var t=a(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==r.Bytes)return e.push(this.readDouble());var t=a(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==r.Bytes)return e.push(this.readFixed32());var t=a(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==r.Bytes)return e.push(this.readSFixed32());var t=a(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==r.Bytes)return e.push(this.readFixed64());var t=a(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==r.Bytes)return e.push(this.readSFixed64());var t=a(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===r.Varint)for(;this.buf[this.pos++]>127;);else if(t===r.Bytes)this.pos=this.readVarint()+this.pos;else if(t===r.Fixed32)this.pos+=4;else{if(t!==r.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var i=new Uint8Array(t);i.set(this.buf),this.buf=i,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),S(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),S(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),S(this.buf,-1&e,this.pos),S(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),S(this.buf,-1&e,this.pos),S(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(e,t){var i,s;e>=0?(i=e%4294967296|0,s=e/4294967296|0):(s=~(-e/4294967296),4294967295^(i=~(-e%4294967296))?i=i+1|0:(i=0,s=s+1|0));if(e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,i){i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}(i,0,t),function(e,t){var i=(7&e)<<4;if(t.buf[t.pos++]|=i|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(s,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,i){for(var s,r,n=0;n<t.length;n++){if((s=t.charCodeAt(n))>55295&&s<57344){if(!r){s>56319||n+1===t.length?(e[i++]=239,e[i++]=191,e[i++]=189):r=s;continue}if(s<56320){e[i++]=239,e[i++]=191,e[i++]=189,r=s;continue}s=r-55296<<10|s-56320|65536,r=null}else r&&(e[i++]=239,e[i++]=191,e[i++]=189,r=null);s<128?e[i++]=s:(s<2048?e[i++]=s>>6|192:(s<65536?e[i++]=s>>12|224:(e[i++]=s>>18|240,e[i++]=s>>12&63|128),e[i++]=s>>6&63|128),e[i++]=63&s|128)}return i}(this.buf,e,this.pos);var i=this.pos-t;i>=128&&l(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),s.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),s.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i<t;i++)this.buf[this.pos++]=e[i]},writeRawMessage:function(e,t){this.pos++;var i=this.pos;e(t,this);var s=this.pos-i;s>=128&&l(i,s,this),this.pos=i-1,this.writeVarint(s),this.pos+=s},writeMessage:function(e,t,i){this.writeTag(e,r.Bytes),this.writeRawMessage(t,i)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,u,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,c,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,d,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,f,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,m,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,y,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,g,t)},writeBytesField:function(e,t){this.writeTag(e,r.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,r.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,r.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,r.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,r.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,r.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,r.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,r.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,r.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,r.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}},function(e,t,i){e.exports.VectorTile=i(22),e.exports.VectorTileFeature=i(9),e.exports.VectorTileLayer=i(8)},function(e,t,i){i(24),e.exports=i(25)},function(e,t,i){(function(e,t){(function(){"use strict";function i(e){var t=this.constructor;return this.then(function(i){return t.resolve(e()).then(function(){return i})},function(i){return t.resolve(e()).then(function(){return t.reject(i)})})}var s=setTimeout;function r(e){return Boolean(e&&void 0!==e.length)}function n(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn(function(){var i=1===e._state?t.onFulfilled:t.onRejected;if(null!==i){var s;try{s=i(e._value)}catch(e){return void h(t.promise,e)}l(t.promise,s)}else(1===e._state?l:h)(t.promise,e._value)})):e._deferreds.push(t)}function l(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var i=t.then;if(t instanceof a)return e._state=3,e._value=t,void u(e);if("function"==typeof i)return void c((s=i,r=t,function(){s.apply(r,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){h(e,t)}var s,r}function h(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,i=e._deferreds.length;t<i;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t){var i=!1;try{e(function(e){i||(i=!0,l(t,e))},function(e){i||(i=!0,h(t,e))})}catch(e){if(i)return;i=!0,h(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var i=new this.constructor(n);return o(this,new function(e,t,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=i}(e,t,i)),i},a.prototype.finally=i,a.all=function(e){return new a(function(t,i){if(!r(e))return i(new TypeError("Promise.all accepts an array"));var s=Array.prototype.slice.call(e);if(0===s.length)return t([]);var n=s.length;function a(e,r){try{if(r&&("object"==typeof r||"function"==typeof r)){var o=r.then;if("function"==typeof o)return void o.call(r,function(t){a(e,t)},i)}s[e]=r,0==--n&&t(s)}catch(e){i(e)}}for(var o=0;o<s.length;o++)a(o,s[o])})},a.resolve=function(e){return e&&"object"==typeof e&&e.constructor===a?e:new a(function(t){t(e)})},a.reject=function(e){return new a(function(t,i){i(e)})},a.race=function(e){return new a(function(t,i){if(!r(e))return i(new TypeError("Promise.race accepts an array"));for(var s=0,n=e.length;s<n;s++)a.resolve(e[s]).then(t,i)})},a._immediateFn="function"==typeof e&&function(t){e(t)}||function(e){s(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var d=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}();"Promise"in d?d.Promise.prototype.finally||(d.Promise.prototype.finally=i):d.Promise=a})()}).call(this,i(16).setImmediate,i(2))},function(e,t,i){(function(e){var s=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function n(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new n(r.call(setTimeout,s,arguments),clearTimeout)},t.setInterval=function(){return new n(r.call(setInterval,s,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(s,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},i(17),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,i(2))},function(e,t,i){(function(e,t){!function(e,i){"use strict";if(!e.setImmediate){var s,r,n,a,o,l=1,h={},u=!1,c=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?s=function(e){t.nextTick(function(){f(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}}()?e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){f(e.data)},s=function(e){n.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(r=c.documentElement,s=function(e){var t=c.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):s=function(e){setTimeout(f,0,e)}:(a="setImmediate$"+Math.random()+"$",o=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&f(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",o,!1):e.attachEvent("onmessage",o),s=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var r={callback:e,args:t};return h[l]=r,s(l),l++},d.clearImmediate=p}function p(e){delete h[e]}function f(e){if(u)setTimeout(f,0,e);else{var t=h[e];if(t){u=!0;try{!function(e){var t=e.callback,s=e.args;switch(s.length){case 0:t();break;case 1:t(s[0]);break;case 2:t(s[0],s[1]);break;case 3:t(s[0],s[1],s[2]);break;default:t.apply(i,s)}}(t)}finally{p(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,i(2),i(18))},function(e,t){var i,s,r=e.exports={};function n(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(i===setTimeout)return setTimeout(e,0);if((i===n||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:n}catch(e){i=n}try{s="function"==typeof clearTimeout?clearTimeout:a}catch(e){s=a}}();var l,h=[],u=!1,c=-1;function d(){u&&l&&(u=!1,l.length?h=l.concat(h):c=-1,h.length&&p())}function p(){if(!u){var e=o(d);u=!0;for(var t=h.length;t;){for(l=h,h=[];++c<t;)l&&l[c].run();c=-1,t=h.length}l=null,u=!1,function(e){if(s===clearTimeout)return clearTimeout(e);if((s===a||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];h.push(new f(e,t)),1!==h.length||u||o(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,i){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){o.prototype.append=function(e,t){e=n(e),t=a(t);var i=this.map[e];i||(i=[],this.map[e]=i),i.push(t)},o.prototype.delete=function(e){delete this.map[n(e)]},o.prototype.get=function(e){var t=this.map[n(e)];return t?t[0]:null},o.prototype.getAll=function(e){return this.map[n(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(n(e))},o.prototype.set=function(e,t){this.map[n(e)]=[a(t)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(i){this.map[i].forEach(function(s){e.call(t,s,i,this)},this)},this)};var i={blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t},s=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this)},c.call(d.prototype),c.call(f.prototype),f.prototype.clone=function(){return new f(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},f.error=function(){var e=new f(null,{status:0,statusText:""});return e.type="error",e};var r=[301,302,303,307,308];f.redirect=function(e,t){if(-1===r.indexOf(t))throw new RangeError("Invalid status code");return new f(null,{status:t,headers:{location:e}})},t.Headers=o,t.Request=d,t.Response=f,t.fetch=function(e,t){return new Promise(function(s,r){var n;n=d.prototype.isPrototypeOf(e)&&!t?e:new d(e,t);var a=new XMLHttpRequest;var l=!1;function h(){if(4===a.readyState){var e=1223===a.status?204:a.status;if(e<100||e>599){if(l)return;return l=!0,void r(new TypeError("Network request failed"))}var t={status:e,statusText:a.statusText,headers:function(e){var t=new o;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var i=e.trim().split(":"),s=i.shift().trim(),r=i.join(":").trim();t.append(s,r)}),t}(a),url:"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0},i="response"in a?a.response:a.responseText;l||(l=!0,s(new f(i,t)))}}a.onreadystatechange=h,a.onload=h,a.onerror=function(){l||(l=!0,r(new TypeError("Network request failed")))},a.open(n.method,n.url,!0);try{"include"===n.credentials&&("withCredentials"in a?a.withCredentials=!0:console&&console.warn&&console.warn("withCredentials is not supported, you can ignore this warning"))}catch(e){console&&console.warn&&console.warn("set withCredentials error:"+e)}"responseType"in a&&i.blob&&(a.responseType="blob"),n.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===n._bodyInit?null:n._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function n(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function u(e){var t=new FileReader;return t.readAsArrayBuffer(e),h(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(i.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(i.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!i.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},i.blob?(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(u)},this.text=function(){var e,t,i,s,r,n,a,o=l(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,i=new FileReader,s=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",r=/charset\=[0-9a-zA-Z\-\_]*;?/,n=e.type.match(r)||s.match(r),a=[e],n&&a.push(n[0].replace(/^charset\=/,"").replace(/;$/,"")),i.readAsText.apply(i,a),h(i);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=l(this);return e||Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function d(e,t){var i,r,n=(t=t||{}).body;if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=(i=t.method||this.method||"GET",r=i.toUpperCase(),s.indexOf(r)>-1?r:i),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n,t)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),s=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(r))}}),t}function f(e,t){t||(t={}),this._initBody(e,t),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},function(e,t){function i(e){return Object.prototype.toString.call(e)}function s(e){return"[object String]"===i(e)}e.exports={getObjectType:i,isDate:function(e){return"[object Date]"===i(e)},isString:s,isDateString:function(e){return s(e)&&!isNaN(Date.parse(e))},parseDateFromString:function(e){return Date.parse(e)},isNumber:function(e){return"number"==typeof e}}},function(e,t){t.read=function(e,t,i,s,r){var n,a,o=8*r-s-1,l=(1<<o)-1,h=l>>1,u=-7,c=i?r-1:0,d=i?-1:1,p=e[t+c];for(c+=d,n=p&(1<<-u)-1,p>>=-u,u+=o;u>0;n=256*n+e[t+c],c+=d,u-=8);for(a=n&(1<<-u)-1,n>>=-u,u+=s;u>0;a=256*a+e[t+c],c+=d,u-=8);if(0===n)n=1-h;else{if(n===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,s),n-=h}return(p?-1:1)*a*Math.pow(2,n-s)},t.write=function(e,t,i,s,r,n){var a,o,l,h=8*n-r-1,u=(1<<h)-1,c=u>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=s?0:n-1,f=s?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+c>=1?d/l:d*Math.pow(2,1-c))*l>=2&&(a++,l/=2),a+c>=u?(o=0,a=u):a+c>=1?(o=(t*l-1)*Math.pow(2,r),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,r),a=0));r>=8;e[i+p]=255&o,p+=f,o/=256,r-=8);for(a=a<<r|o,h+=r;h>0;e[i+p]=255&a,p+=f,a/=256,h-=8);e[i+p-f]|=128*m}},function(e,t,i){"use strict";var s=i(8);function r(e,t,i){if(3===e){var r=new s(i,i.readVarint()+i.pos);r.length&&(t[r.name]=r)}}e.exports=function(e,t){this.layers=e.readFields(r,{},t)}},function(e,t,i){"use strict";function s(e,t){this.x=e,this.y=t}e.exports=s,s.prototype={clone:function(){return new s(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,i=e.y-this.y;return t*t+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,i=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=i,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),i=Math.sin(e),s=t*this.x-i*this.y,r=i*this.x+t*this.y;return this.x=s,this.y=r,this},_rotateAround:function(e,t){var i=Math.cos(e),s=Math.sin(e),r=t.x+i*(this.x-t.x)-s*(this.y-t.y),n=t.y+s*(this.x-t.x)+i*(this.y-t.y);return this.x=r,this.y=n,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},s.convert=function(e){return e instanceof s?e:Array.isArray(e)?new s(e[0],e[1]):e}},function(e,t,i){"use strict";i.r(t),i.d(t,"OpenFileView",function(){return Jd}),i.d(t,"openFileView",function(){return qd}),i.d(t,"OpenFileViewModel",function(){return Vd}),i.d(t,"openFileViewModel",function(){return Hd}),i.d(t,"SearchView",function(){return Xd}),i.d(t,"searchView",function(){return Kd}),i.d(t,"DataFlowView",function(){return $d}),i.d(t,"dataFlowView",function(){return ep}),i.d(t,"clientComputationView",function(){return np}),i.d(t,"ClientComputationView",function(){return rp}),i.d(t,"ClientComputationViewModel",function(){return sp}),i.d(t,"ClientComputationLayer",function(){return ap}),i.d(t,"clientComputationLayer",function(){return op}),i.d(t,"GeoJSONLayerWithName",function(){return tp}),i.d(t,"geoJSONLayerWithName",function(){return ip}),i.d(t,"GeoJsonLayersDataModel",function(){return Wd}),i.d(t,"GeoJsonLayerDataModel",function(){return Yd}),i.d(t,"DistributedAnalysisView",function(){return up}),i.d(t,"distributedAnalysisView",function(){return cp}),i.d(t,"DistributedAnalysisViewModel",function(){return hp}),i.d(t,"DataServiceQueryView",function(){return fp}),i.d(t,"dataServiceQueryView",function(){return mp}),i.d(t,"DataServiceQueryViewModel",function(){return dp}),i.d(t,"dataServiceQueryViewModel",function(){return pp}),i.d(t,"SuperMap",function(){return s}),i.d(t,"DataFormat",function(){return r}),i.d(t,"ServerType",function(){return n}),i.d(t,"GeometryType",function(){return a}),i.d(t,"QueryOption",function(){return o}),i.d(t,"JoinType",function(){return l}),i.d(t,"EngineType",function(){return f}),i.d(t,"MeasureMode",function(){return c}),i.d(t,"SpatialRelationType",function(){return u}),i.d(t,"DataReturnMode",function(){return D}),i.d(t,"Unit",function(){return d}),i.d(t,"BufferRadiusUnit",function(){return p}),i.d(t,"SpatialQueryMode",function(){return h}),i.d(t,"ThemeGraphTextFormat",function(){return m}),i.d(t,"ThemeGraphType",function(){return y}),i.d(t,"GraphAxesTextDisplayMode",function(){return g}),i.d(t,"GraduatedMode",function(){return v}),i.d(t,"RangeMode",function(){return S}),i.d(t,"ThemeType",function(){return b}),i.d(t,"ColorGradientType",function(){return _}),i.d(t,"TextAlignment",function(){return x}),i.d(t,"FillGradientMode",function(){return C}),i.d(t,"SideType",function(){return A}),i.d(t,"AlongLineDirection",function(){return T}),i.d(t,"LabelBackShape",function(){return M}),i.d(t,"LabelOverLengthMode",function(){return w}),i.d(t,"DirectionType",function(){return E}),i.d(t,"OverlayOperationType",function(){return O}),i.d(t,"SupplyCenterType",function(){return L}),i.d(t,"TurnType",function(){return P}),i.d(t,"BufferEndType",function(){return N}),i.d(t,"SmoothMethod",function(){return F}),i.d(t,"SurfaceAnalystMethod",function(){return R}),i.d(t,"ColorSpaceType",function(){return j}),i.d(t,"ChartType",function(){return K}),i.d(t,"EditType",function(){return k}),i.d(t,"TransferTactic",function(){return B}),i.d(t,"TransferPreference",function(){return U}),i.d(t,"GridType",function(){return G}),i.d(t,"ClientType",function(){return X}),i.d(t,"LayerType",function(){return z}),i.d(t,"UGCLayerType",function(){return V}),i.d(t,"StatisticMode",function(){return H}),i.d(t,"PixelFormat",function(){return J}),i.d(t,"SearchMode",function(){return q}),i.d(t,"SummaryType",function(){return ie}),i.d(t,"InterpolationAlgorithmType",function(){return W}),i.d(t,"VariogramMode",function(){return Y}),i.d(t,"Exponent",function(){return Q}),i.d(t,"ClipAnalystMode",function(){return Z}),i.d(t,"AnalystAreaUnit",function(){return $}),i.d(t,"AnalystSizeUnit",function(){return ee}),i.d(t,"StatisticAnalystMode",function(){return te}),i.d(t,"TopologyValidatorRule",function(){return se}),i.d(t,"OutputType",function(){return I}),i.d(t,"AggregationQueryBuilderType",function(){return ne}),i.d(t,"AggregationType",function(){return re}),i.d(t,"GetFeatureMode",function(){return ae}),i.d(t,"TimeFlowControl",function(){return Je}),i.d(t,"IManager",function(){return tt}),i.d(t,"IManagerServiceBase",function(){return $e}),i.d(t,"IManagerCreateNodeParam",function(){return et}),i.d(t,"IPortal",function(){return ot}),i.d(t,"IPortalQueryParam",function(){return st}),i.d(t,"IPortalResource",function(){return nt}),i.d(t,"IPortalQueryResult",function(){return rt}),i.d(t,"IPortalShareParam",function(){return at}),i.d(t,"IPortalShareEntity",function(){return lt}),i.d(t,"IPortalServiceBase",function(){return it}),i.d(t,"IPortalUser",function(){return mt}),i.d(t,"IPortalAddResourceParam",function(){return ht}),i.d(t,"IPortalRegisterServiceParam",function(){return ut}),i.d(t,"IPortalAddDataParam",function(){return ct}),i.d(t,"IPortalDataMetaInfoParam",function(){return dt}),i.d(t,"IPortalDataStoreInfoParam",function(){return pt}),i.d(t,"IPortalDataConnectionInfoParam",function(){return ft}),i.d(t,"Online",function(){return Cn}),i.d(t,"OnlineData",function(){return xn}),i.d(t,"OnlineQueryDatasParameter",function(){return Tn}),i.d(t,"ServiceStatus",function(){return gn}),i.d(t,"DataItemType",function(){return vn}),i.d(t,"DataItemOrderBy",function(){return Sn}),i.d(t,"FilterField",function(){return bn}),i.d(t,"OnlineServiceBase",function(){return _n}),i.d(t,"KeyServiceParameter",function(){return Mn}),i.d(t,"SecurityManager",function(){return Ze}),i.d(t,"ServerInfo",function(){return wn}),i.d(t,"TokenServiceParameter",function(){return En}),i.d(t,"ElasticSearch",function(){return Pn}),i.d(t,"FetchRequest",function(){return Ke}),i.d(t,"ColorsPickerUtil",function(){return Fn}),i.d(t,"ArrayStatistic",function(){return Rn}),i.d(t,"AreaSolarRadiationParameters",function(){return xt}),i.d(t,"AggregationParameter",function(){return _t}),i.d(t,"AggQueryBuilderParameter",function(){return bt}),i.d(t,"BufferAnalystParameters",function(){return Et}),i.d(t,"BufferDistance",function(){return Mt}),i.d(t,"BuffersAnalystJobsParameter",function(){return Bt}),i.d(t,"BufferSetting",function(){return wt}),i.d(t,"BurstPipelineAnalystParameters",function(){return jt}),i.d(t,"ChartQueryFilterParameter",function(){return Jt}),i.d(t,"ChartQueryParameters",function(){return qt}),i.d(t,"ClipParameter",function(){return Qt}),i.d(t,"ColorDictionary",function(){return Xt}),i.d(t,"ComputeWeightMatrixParameters",function(){return $t}),i.d(t,"DataReturnOption",function(){return At}),i.d(t,"DatasetBufferAnalystParameters",function(){return It}),i.d(t,"DatasetInfo",function(){return ii}),i.d(t,"DatasetOverlayAnalystParameters",function(){return ri}),i.d(t,"DatasetSurfaceAnalystParameters",function(){return oi}),i.d(t,"DatasetThiessenAnalystParameters",function(){return hi}),i.d(t,"DatasourceConnectionInfo",function(){return Pt}),i.d(t,"DensityKernelAnalystParameters",function(){return ui}),i.d(t,"EditFeaturesParameters",function(){return di}),i.d(t,"FacilityAnalyst3DParameters",function(){return fi}),i.d(t,"FacilityAnalystSinks3DParameters",function(){return mi}),i.d(t,"FacilityAnalystSources3DParameters",function(){return gi}),i.d(t,"FacilityAnalystStreamParameters",function(){return Si}),i.d(t,"FacilityAnalystTracedown3DParameters",function(){return _i}),i.d(t,"FacilityAnalystTraceup3DParameters",function(){return Ci}),i.d(t,"FacilityAnalystUpstream3DParameters",function(){return Mi}),i.d(t,"FieldParameters",function(){return Ai}),i.d(t,"FilterAggParameter",function(){return Ei}),i.d(t,"FieldStatisticsParameters",function(){return Li}),i.d(t,"FilterParameter",function(){return Ot}),i.d(t,"FindClosestFacilitiesParameters",function(){return Ni}),i.d(t,"FindLocationParameters",function(){return Ii}),i.d(t,"FindMTSPPathsParameters",function(){return Ri}),i.d(t,"FindPathParameters",function(){return ki}),i.d(t,"FindServiceAreasParameters",function(){return Ui}),i.d(t,"FindTSPPathsParameters",function(){return ji}),i.d(t,"GenerateSpatialDataParameters",function(){return Vi}),i.d(t,"GeoBoundingBoxQueryBuilderParameter",function(){return Ji}),i.d(t,"GeoCodingParameter",function(){return gt}),i.d(t,"GeoDecodingParameter",function(){return vt}),i.d(t,"GeoHashGridAggParameter",function(){return qi}),i.d(t,"GeometryBufferAnalystParameters",function(){return Ft}),i.d(t,"GeometryOverlayAnalystParameters",function(){return Wi}),i.d(t,"GeometrySurfaceAnalystParameters",function(){return Yi}),i.d(t,"GeometryThiessenAnalystParameters",function(){return Qi}),i.d(t,"GeoRelationAnalystParameters",function(){return Xi}),i.d(t,"GetFeaturesByBoundsParameters",function(){return $i}),i.d(t,"GetFeaturesByBufferParameters",function(){return is}),i.d(t,"GetFeaturesByGeometryParameters",function(){return rs}),i.d(t,"GetFeaturesByIDsParameters",function(){return as}),i.d(t,"GetFeaturesBySQLParameters",function(){return ls}),i.d(t,"GetGridCellInfosParameters",function(){return cs}),i.d(t,"Grid",function(){return js}),i.d(t,"Image",function(){return Wn}),i.d(t,"InterpolationAnalystParameters",function(){return Js}),i.d(t,"InterpolationIDWAnalystParameters",function(){return Ys}),i.d(t,"InterpolationKrigingAnalystParameters",function(){return Qs}),i.d(t,"InterpolationRBFAnalystParameters",function(){return qs}),i.d(t,"JoinItem",function(){return Lt}),i.d(t,"KernelDensityJobParameter",function(){return Ks}),i.d(t,"LabelImageCell",function(){return er}),i.d(t,"LabelMatrixCell",function(){return $s}),i.d(t,"LabelMixedTextStyle",function(){return bs}),i.d(t,"LabelSymbolCell",function(){return tr}),i.d(t,"LabelThemeCell",function(){return ir}),i.d(t,"LayerStatus",function(){return sr}),i.d(t,"LinkItem",function(){return Nt}),i.d(t,"MathExpressionAnalysisParameters",function(){return nr}),i.d(t,"MeasureParameters",function(){return or}),i.d(t,"OutputSetting",function(){return Dt}),i.d(t,"MappingParameters",function(){return kt}),i.d(t,"OverlapDisplayedOptions",function(){return ks}),i.d(t,"OverlayAnalystParameters",function(){return si}),i.d(t,"OverlayGeoJobParameter",function(){return ur}),i.d(t,"PointWithMeasure",function(){return Ge}),i.d(t,"QueryByBoundsParameters",function(){return dr}),i.d(t,"QueryByDistanceParameters",function(){return mr}),i.d(t,"QueryByGeometryParameters",function(){return gr}),i.d(t,"QueryBySQLParameters",function(){return Sr}),i.d(t,"QueryParameters",function(){return Wt}),i.d(t,"Route",function(){return je}),i.d(t,"RouteCalculateMeasureParameters",function(){return _r}),i.d(t,"RouteLocatorParameters",function(){return Cr}),i.d(t,"ServerColor",function(){return Be}),i.d(t,"ServerFeature",function(){return Mr}),i.d(t,"ServerGeometry",function(){return ze}),i.d(t,"ServerStyle",function(){return Ue}),i.d(t,"ServerTextStyle",function(){return ms}),i.d(t,"ServerTheme",function(){return Gs}),i.d(t,"SetLayerInfoParameters",function(){return wr}),i.d(t,"SetLayersInfoParameters",function(){return Ar}),i.d(t,"SetLayerStatusParameters",function(){return Pr}),i.d(t,"SingleObjectQueryJobsParameter",function(){return Or}),i.d(t,"StopQueryParameters",function(){return Fr}),i.d(t,"SummaryAttributesJobsParameter",function(){return Dr}),i.d(t,"SummaryMeshJobParameter",function(){return Br}),i.d(t,"SummaryRegionJobParameter",function(){return Gr}),i.d(t,"SupplyCenter",function(){return zr}),i.d(t,"SurfaceAnalystParameters",function(){return ai}),i.d(t,"SurfaceAnalystParametersSetting",function(){return ni}),i.d(t,"TerrainCurvatureCalculationParameters",function(){return Hr}),i.d(t,"Theme",function(){return fs}),i.d(t,"ThemeDotDensity",function(){return Ns}),i.d(t,"ThemeFlow",function(){return vs}),i.d(t,"ThemeGraduatedSymbol",function(){return Is}),i.d(t,"ThemeGraduatedSymbolStyle",function(){return Os}),i.d(t,"ThemeGraph",function(){return Ps}),i.d(t,"ThemeGraphAxes",function(){return ws}),i.d(t,"ThemeGraphItem",function(){return Ls}),i.d(t,"ThemeGraphSize",function(){return Es}),i.d(t,"ThemeGraphText",function(){return As}),i.d(t,"ThemeGridRange",function(){return Wr}),i.d(t,"ThemeGridRangeItem",function(){return qr}),i.d(t,"ThemeGridUnique",function(){return Qr}),i.d(t,"ThemeGridUniqueItem",function(){return Yr}),i.d(t,"ThemeLabel",function(){return Ts}),i.d(t,"ThemeLabelAlongLine",function(){return xs}),i.d(t,"ThemeLabelBackground",function(){return Cs}),i.d(t,"ThemeLabelItem",function(){return ys}),i.d(t,"ThemeLabelText",function(){return _s}),i.d(t,"ThemeLabelUniqueItem",function(){return Xr}),i.d(t,"ThemeMemoryData",function(){return ps}),i.d(t,"ThemeOffset",function(){return Ss}),i.d(t,"ThemeParameters",function(){return Kr}),i.d(t,"ThemeRange",function(){return Rs}),i.d(t,"ThemeRangeItem",function(){return Fs}),i.d(t,"ThemeUnique",function(){return Ms}),i.d(t,"ThemeUniqueItem",function(){return gs}),i.d(t,"ThiessenAnalystParameters",function(){return li}),i.d(t,"TopologyValidatorJobsParameter",function(){return sn}),i.d(t,"TransferLine",function(){return nn}),i.d(t,"TransferPathParameters",function(){return an}),i.d(t,"TransferSolutionParameters",function(){return ln}),i.d(t,"TransportationAnalystParameter",function(){return Zt}),i.d(t,"TransportationAnalystResultSetting",function(){return Kt}),i.d(t,"UGCLayer",function(){return Ds}),i.d(t,"UGCMapLayer",function(){return Bs}),i.d(t,"UGCSubLayer",function(){return Us}),i.d(t,"UpdateEdgeWeightParameters",function(){return un}),i.d(t,"UpdateTurnNodeWeightParameters",function(){return dn}),i.d(t,"Vector",function(){return Vs}),i.d(t,"VectorClipJobsParameter",function(){return fn}),i.d(t,"FileTypes",function(){return wa}),i.d(t,"FileConfig",function(){return Ea}),i.d(t,"FileModel",function(){return Aa}),i.d(t,"MessageBox",function(){return La}),i.d(t,"CommonContainer",function(){return Ga}),i.d(t,"DropDownBox",function(){return za}),i.d(t,"Select",function(){return ja}),i.d(t,"AttributesPopContainer",function(){return Ha}),i.d(t,"PopContainer",function(){return Va}),i.d(t,"IndexTabsPageContainer",function(){return Ja}),i.d(t,"CityTabsPage",function(){return qa}),i.d(t,"NavTabsPage",function(){return Wa}),i.d(t,"PaginationContainer",function(){return Ya}),i.d(t,"ComponentsUtil",function(){return Qa}),i.d(t,"FileReaderUtil",function(){return Ra}),i.d(t,"ChartView",function(){return Ba}),i.d(t,"ChartViewModel",function(){return ka}),i.d(t,"Logo",function(){return Su}),i.d(t,"logo",function(){return bu}),i.d(t,"ChangeTileVersion",function(){return gu}),i.d(t,"changeTileVersion",function(){return vu}),i.d(t,"CommontypesConversion",function(){return _u}),i.d(t,"BaiduCRS",function(){return lu}),i.d(t,"TianDiTu_WGS84CRS",function(){return uu}),i.d(t,"TianDiTu_MercatorCRS",function(){return du}),i.d(t,"NonProjection",function(){return Za}),i.d(t,"nonProjection",function(){return $a}),i.d(t,"NonEarthCRS",function(){return eo}),i.d(t,"nonEarthCRS",function(){return to}),i.d(t,"CRS",function(){return nu}),i.d(t,"crs",function(){return au}),i.d(t,"toGeoJSON",function(){return xu}),i.d(t,"toSuperMapGeometry",function(){return Cu}),i.d(t,"getMeterPerMapUnit",function(){return Tu}),i.d(t,"resolutionToScale",function(){return Mu}),i.d(t,"scaleToResolution",function(){return wu}),i.d(t,"GetResolutionFromScaleDpi",function(){return Eu}),i.d(t,"NormalizeScale",function(){return Au}),i.d(t,"BaiduTileLayer",function(){return Lu}),i.d(t,"baiduTileLayer",function(){return Pu}),i.d(t,"CloudTileLayer",function(){return Nu}),i.d(t,"cloudTileLayer",function(){return Ou}),i.d(t,"ImageMapLayer",function(){return Iu}),i.d(t,"imageMapLayer",function(){return Fu}),i.d(t,"TiandituTileLayer",function(){return ku}),i.d(t,"tiandituTileLayer",function(){return Bu}),i.d(t,"TiledMapLayer",function(){return Uu}),i.d(t,"tiledMapLayer",function(){return Gu}),i.d(t,"WMTSLayer",function(){return Ru}),i.d(t,"wmtsLayer",function(){return Du}),i.d(t,"WebMap",function(){return uc}),i.d(t,"webMap",function(){return cc}),i.d(t,"DataFlowLayer",function(){return _c}),i.d(t,"dataFlowLayer",function(){return xc}),i.d(t,"EchartsLayer",function(){return Cc}),i.d(t,"echartsLayer",function(){return Mc}),i.d(t,"LeafletMapCoordSys",function(){return Tc}),i.d(t,"GraphicLayer",function(){return Gc}),i.d(t,"graphicLayer",function(){return jc}),i.d(t,"GraphThemeLayer",function(){return zc}),i.d(t,"graphThemeLayer",function(){return Vc}),i.d(t,"LabelThemeLayer",function(){return rc}),i.d(t,"labelThemeLayer",function(){return nc}),i.d(t,"MapVLayer",function(){return gc}),i.d(t,"mapVLayer",function(){return vc}),i.d(t,"RangeThemeLayer",function(){return ic}),i.d(t,"rangeThemeLayer",function(){return sc}),i.d(t,"RankSymbolThemeLayer",function(){return Hc}),i.d(t,"rankSymbolThemeLayer",function(){return Jc}),i.d(t,"TileVectorLayer",function(){return hd}),i.d(t,"tiledVectorLayer",function(){return ud}),i.d(t,"TurfLayer",function(){return dd}),i.d(t,"turfLayer",function(){return pd}),i.d(t,"UnicodeMarker",function(){return lc}),i.d(t,"unicodeMarker",function(){return hc}),i.d(t,"UniqueThemeLayer",function(){return ec}),i.d(t,"uniqueThemeLayer",function(){return tc}),i.d(t,"VectorTileFormat",function(){return ad}),i.d(t,"CartoCSSToLeaflet",function(){return Wu}),i.d(t,"DefaultStyle",function(){return Vu}),i.d(t,"CartoStyleMap",function(){return Hu}),i.d(t,"ServerStyleMap",function(){return Ju}),i.d(t,"CompOpMap",function(){return qu}),i.d(t,"ImageStyle",function(){return Nc}),i.d(t,"imageStyle",function(){return Oc}),i.d(t,"CircleStyle",function(){return Lc}),i.d(t,"circleStyle",function(){return Pc}),i.d(t,"Graphic",function(){return Yu}),i.d(t,"graphic",function(){return Qu}),i.d(t,"CloverStyle",function(){return Ec}),i.d(t,"cloverStyle",function(){return Ac}),i.d(t,"MapVRenderer",function(){return yc}),i.d(t,"GeoFeatureThemeLayer",function(){return $u}),i.d(t,"ThemeFeature",function(){return Xu}),i.d(t,"themeFeature",function(){return Ku}),i.d(t,"ThemeLayer",function(){return Zu}),i.d(t,"CanvasRenderer",function(){return Wc}),i.d(t,"LineSymbolizer",function(){return $c}),i.d(t,"PointSymbolizer",function(){return Kc}),i.d(t,"RegionSymbolizer",function(){return ed}),i.d(t,"SVGRenderer",function(){return qc}),i.d(t,"Symbolizer",function(){return Qc}),i.d(t,"PolyBase",function(){return Zc}),i.d(t,"TextSymbolizer",function(){return Xc}),i.d(t,"VectorFeatureType",function(){return Yc}),i.d(t,"VectorGrid",function(){return ld}),i.d(t,"VectorTile",function(){return od}),i.d(t,"VectorTileJSON",function(){return nd}),i.d(t,"VectorTilePBF",function(){return rd}),i.d(t,"AddressMatchService",function(){return yd}),i.d(t,"addressMatchService",function(){return gd}),i.d(t,"ChartService",function(){return vd}),i.d(t,"chartService",function(){return Sd}),i.d(t,"DataFlowService",function(){return dc}),i.d(t,"dataFlowService",function(){return pc}),i.d(t,"FeatureService",function(){return ac}),i.d(t,"featureService",function(){return oc}),i.d(t,"FieldService",function(){return bd}),i.d(t,"fieldService",function(){return _d}),i.d(t,"GridCellInfosService",function(){return xd}),i.d(t,"gridCellInfosService",function(){return Cd}),i.d(t,"LayerInfoService",function(){return Td}),i.d(t,"layerInfoService",function(){return Md}),i.d(t,"MapService",function(){return mu}),i.d(t,"mapService",function(){return yu}),i.d(t,"MeasureService",function(){return wd}),i.d(t,"measureService",function(){return Ed}),i.d(t,"NetworkAnalyst3DService",function(){return Ad}),i.d(t,"networkAnalyst3DService",function(){return Ld}),i.d(t,"NetworkAnalystService",function(){return Pd}),i.d(t,"networkAnalystService",function(){return Nd}),i.d(t,"ProcessingService",function(){return Od}),i.d(t,"processingService",function(){return Id}),i.d(t,"QueryService",function(){return Fd}),i.d(t,"queryService",function(){return Rd}),i.d(t,"ServiceBase",function(){return fu}),i.d(t,"SpatialAnalystService",function(){return Dd}),i.d(t,"spatialAnalystService",function(){return kd}),i.d(t,"ThemeService",function(){return Bd}),i.d(t,"themeService",function(){return Ud}),i.d(t,"TrafficTransferAnalystService",function(){return Gd}),i.d(t,"trafficTransferAnalystService",function(){return jd});
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var s=window.SuperMap=window.SuperMap||{};s.Components=window.SuperMap.Components||{};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var r=s.DataFormat={GEOJSON:"GEOJSON",ISERVER:"ISERVER"},n=s.ServerType={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},a=s.GeometryType={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN"},o=s.QueryOption={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},l=s.JoinType={INNERJOIN:"INNERJOIN",LEFTJOIN:"LEFTJOIN"},h=s.SpatialQueryMode={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"},u=s.SpatialRelationType={CONTAIN:"CONTAIN",INTERSECT:"INTERSECT",WITHIN:"WITHIN"},c=s.MeasureMode={DISTANCE:"DISTANCE",AREA:"AREA"},d=s.Unit={METER:"METER",KILOMETER:"KILOMETER",MILE:"MILE",YARD:"YARD",DEGREE:"DEGREE",MILLIMETER:"MILLIMETER",CENTIMETER:"CENTIMETER",INCH:"INCH",DECIMETER:"DECIMETER",FOOT:"FOOT",SECOND:"SECOND",MINUTE:"MINUTE",RADIAN:"RADIAN"},p=s.BufferRadiusUnit={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},f=s.EngineType={IMAGEPLUGINS:"IMAGEPLUGINS",OGC:"OGC",ORACLEPLUS:"ORACLEPLUS",SDBPLUS:"SDBPLUS",SQLPLUS:"SQLPLUS",UDB:"UDB"},m=s.ThemeGraphTextFormat={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"},y=s.ThemeGraphType={AREA:"AREA",BAR:"BAR",BAR3D:"BAR3D",LINE:"LINE",PIE:"PIE",PIE3D:"PIE3D",POINT:"POINT",RING:"RING",ROSE:"ROSE",ROSE3D:"ROSE3D",STACK_BAR:"STACK_BAR",STACK_BAR3D:"STACK_BAR3D",STEP:"STEP"},g=s.GraphAxesTextDisplayMode={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},v=s.GraduatedMode={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},S=s.RangeMode={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"},b=s.ThemeType={DOTDENSITY:"DOTDENSITY",GRADUATEDSYMBOL:"GRADUATEDSYMBOL",GRAPH:"GRAPH",LABEL:"LABEL",RANGE:"RANGE",UNIQUE:"UNIQUE"},_=s.ColorGradientType={BLACK_WHITE:"BLACKWHITE",BLUE_BLACK:"BLUEBLACK",BLUE_RED:"BLUERED",BLUE_WHITE:"BLUEWHITE",CYAN_BLACK:"CYANBLACK",CYAN_BLUE:"CYANBLUE",CYAN_GREEN:"CYANGREEN",CYAN_WHITE:"CYANWHITE",GREEN_BLACK:"GREENBLACK",GREEN_BLUE:"GREENBLUE",GREEN_ORANGE_VIOLET:"GREENORANGEVIOLET",GREEN_RED:"GREENRED",GREEN_WHITE:"GREENWHITE",PINK_BLACK:"PINKBLACK",PINK_BLUE:"PINKBLUE",PINK_RED:"PINKRED",PINK_WHITE:"PINKWHITE",RAIN_BOW:"RAINBOW",RED_BLACK:"REDBLACK",RED_WHITE:"REDWHITE",SPECTRUM:"SPECTRUM",TERRAIN:"TERRAIN",YELLOW_BLACK:"YELLOWBLACK",YELLOW_BLUE:"YELLOWBLUE",YELLOW_GREEN:"YELLOWGREEN",YELLOW_RED:"YELLOWRED",YELLOW_WHITE:"YELLOWWHITE"},x=s.TextAlignment={TOPLEFT:"TOPLEFT",TOPCENTER:"TOPCENTER",TOPRIGHT:"TOPRIGHT",BASELINELEFT:"BASELINELEFT",BASELINECENTER:"BASELINECENTER",BASELINERIGHT:"BASELINERIGHT",BOTTOMLEFT:"BOTTOMLEFT",BOTTOMCENTER:"BOTTOMCENTER",BOTTOMRIGHT:"BOTTOMRIGHT",MIDDLELEFT:"MIDDLELEFT",MIDDLECENTER:"MIDDLECENTER",MIDDLERIGHT:"MIDDLERIGHT"},C=s.FillGradientMode={NONE:"NONE",LINEAR:"LINEAR",RADIAL:"RADIAL",CONICAL:"CONICAL",SQUARE:"SQUARE"},T=s.AlongLineDirection={NORMAL:"ALONG_LINE_NORMAL",LB_TO_RT:"LEFT_BOTTOM_TO_RIGHT_TOP",LT_TO_RB:"LEFT_TOP_TO_RIGHT_BOTTOM",RB_TO_LT:"RIGHT_BOTTOM_TO_LEFT_TOP",RT_TO_LB:"RIGHT_TOP_TO_LEFT_BOTTOM"},M=s.LabelBackShape={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},w=s.LabelOverLengthMode={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},E=s.DirectionType={EAST:"EAST",NONE:"NONE",NORTH:"NORTH",SOURTH:"SOURTH",WEST:"WEST"},A=s.SideType={LEFT:"LEFT",MIDDLE:"MIDDLE",NONE:"NONE",RIGHT:"RIGHT"},L=s.SupplyCenterType={FIXEDCENTER:"FIXEDCENTER",NULL:"NULL",OPTIONALCENTER:"OPTIONALCENTER"},P=s.TurnType={AHEAD:"AHEAD",BACK:"BACK",END:"END",LEFT:"LEFT",NONE:"NONE",RIGHT:"RIGHT"},N=s.BufferEndType={FLAT:"FLAT",ROUND:"ROUND"},O=s.OverlayOperationType={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},I=s.OutputType={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"},F=s.SmoothMethod={BSPLINE:"BSPLINE",POLISH:"POLISH"},R=s.SurfaceAnalystMethod={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},D=s.DataReturnMode={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},k=s.EditType={ADD:"add",UPDATE:"update",DELETE:"delete"},B=s.TransferTactic={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},U=s.TransferPreference={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},G=s.GridType={CROSS:"CROSS",GRID:"GRID",POINT:"POINT"},j=s.ColorSpaceType={CMYK:"CMYK",RGB:"RGB"},z=s.LayerType={UGC:"UGC",WMS:"WMS",WFS:"WFS",CUSTOM:"CUSTOM"},V=s.UGCLayerType={THEME:"THEME",VECTOR:"VECTOR",GRID:"GRID",IMAGE:"IMAGE"},H=s.StatisticMode={AVERAGE:"AVERAGE",MAX:"MAX",MIN:"MIN",STDDEVIATION:"STDDEVIATION",SUM:"SUM",VARIANCE:"VARIANCE"},J=s.PixelFormat={BIT16:"BIT16",BIT32:"BIT32",BIT64:"BIT64",SINGLE:"SINGLE",DOUBLE:"DOUBLE",UBIT1:"UBIT1",UBIT4:"UBIT4",UBIT8:"UBIT8",UBIT24:"UBIT24",UBIT32:"UBIT32"},q=s.SearchMode={KDTREE_FIXED_COUNT:"KDTREE_FIXED_COUNT",KDTREE_FIXED_RADIUS:"KDTREE_FIXED_RADIUS",NONE:"NONE",QUADTREE:"QUADTREE"},W=s.InterpolationAlgorithmType={KRIGING:"KRIGING",SimpleKriging:"SimpleKriging",UniversalKriging:"UniversalKriging"},Y=s.VariogramMode={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"},Q=s.Exponent={EXP1:"EXP1",EXP2:"EXP2"},X=s.ClientType={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},K=s.ChartType={BAR:"Bar",BAR3D:"Bar3D",CIRCLE:"Circle",PIE:"Pie",POINT:"Point",LINE:"Line",RING:"Ring"},Z=s.ClipAnalystMode={CLIP:"clip",INTERSECT:"intersect"},$=s.AnalystAreaUnit={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},ee=s.AnalystSizeUnit={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},te=s.StatisticAnalystMode={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},ie=s.SummaryType={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},se=s.TopologyValidatorRule={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"},re=s.AggregationType={GEOHASH_GRID:"geohash_grid",FILTER:"filter"},ne=s.AggregationQueryBuilderType={GEO_BOUNDING_BOX:"geo_bounding_box"},ae=s.GetFeatureMode={BOUNDS:"BOUNDS",BUFFER:"BUFFER",ID:"ID",SPATIAL:"SPATIAL",SQL:"SQL"},oe=s.RasterFunctionType={NDVI:"NDVI",HILLSHADE:"HILLSHADE"};s.ResourceType={MAP:"MAP",SERVICE:"SERVICE",SCENE:"SCENE",DATA:"DATA",INSIGHTS_WORKSPACE:"INSIGHTS_WORKSPACE",MAP_DASHBOARD:"MAP_DASHBOARD"},s.OrderBy={UPDATETIME:"UPDATETIME",HEATLEVEL:"HEATLEVEL",RELEVANCE:"RELEVANCE"},s.OrderType={ASC:"ASC",DESC:"DESC"},s.SearchType={PUBLIC:"PUBLIC",MY_RES:"MY_RES",MYGROUP_RES:"MYGROUP_RES",MYDEPARTMENT_RES:"MYDEPARTMENT_RES",SHARETOME_RES:"SHARETOME_RES"},s.AggregationTypes={TAG:"TAG",TYPE:"TYPE"},s.PermissionType={SEARCH:"SEARCH",READ:"READ",READWRITE:"READWRITE",DELETE:"DELETE",DOWNLOAD:"DOWNLOAD"},s.EntityType={DEPARTMENT:"DEPARTMENT",GROUP:"GROUP",IPORTALGROUP:"IPORTALGROUP",ROLE:"ROLE",USER:"USER"},s.DataItemType={WORKSPACE:"WORKSPACE",UDB:"UDB",SHP:"SHP",EXCEL:"EXCEL",CSV:"CSV",GEOJSON:"GEOJSON",SMTILES:"SMTILES",SVTILES:"SVTILES",MBTILES:"MBTILES",TPK:"TPK",UGCV5:"UGCV5",UGCV5_MVT:"UGCV5_MVT",JSON:"JSON"};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class le{constructor(e,t){this.w=e?parseFloat(e):0,this.h=e?parseFloat(t):0,this.CLASS_NAME="SuperMap.Size"}toString(){return"w="+this.w+",h="+this.h}clone(){return new le(this.w,this.h)}equals(e){var t=!1;return null!=e&&(t=this.w===e.w&&this.h===e.h||isNaN(this.w)&&isNaN(this.h)&&isNaN(e.w)&&isNaN(e.h)),t}destroy(){this.w=null,this.h=null}}s.Size=le;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class he{constructor(e,t,i){this.x=e?parseFloat(e):0,this.y=t?parseFloat(t):0,this.mode=i,this.CLASS_NAME="SuperMap.Pixel",s.Pixel.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"}}toString(){return"x="+this.x+",y="+this.y}clone(){return new he(this.x,this.y,this.mode)}equals(e){var t=!1;return null!=e&&(t=this.x==e.x&&this.y==e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}add(e,t){if(null==e||null==t)throw new TypeError("Pixel.add cannot receive null values");return new he(this.x+e,this.y+t)}offset(e){var t=this.clone();return e&&(t=this.add(e.x,e.y)),t}destroy(){this.x=null,this.y=null,this.mode=null}}s.Pixel=he,
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
s.inherit=function(e,t){var i,r,n,a=function(){};for(a.prototype=t.prototype,e.prototype=new a,i=2,r=arguments.length;i<r;i++)"function"==typeof(n=arguments[i])&&(n=n.prototype),s.Util.extend(e.prototype,n)},s.mixin=function(...e){class t{constructor(t){for(var i=0;i<e.length;i++)r(this,new e[i](t))}}for(var i=0;i<e.length;i++){var s=e[i];r(t,s),r(t.prototype,s.prototype),r(t.prototype,new s)}return t;function r(e,t){var i=Object.getOwnPropertyNames(t);Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t)));for(var s=0;s<i.length;s++){var r=i[s];if("constructor"!==r&&"prototype"!==r&&"name"!==r&&"length"!==r){let i=Object.getOwnPropertyDescriptor(t,r);window.ActiveXObject?Object.defineProperty(e,r,i||{}):Object.defineProperty(e,r,i)}}}};var ue=s.String={startsWith:function(e,t){return 0==e.indexOf(t)},contains:function(e,t){return-1!=e.indexOf(t)},trim:function(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},camelize:function(e){for(var t=e.split("-"),i=t[0],s=1,r=t.length;s<r;s++){var n=t[s];i+=n.charAt(0).toUpperCase()+n.substring(1)}return i},format:function(e,t,i){t||(t=window);return e.replace(s.String.tokenRegEx,function(e,s){for(var r,n=s.split(/\.+/),a=0;a<n.length;a++)0==a&&(r=t),r=r[n[a]];return"function"==typeof r&&(r=i?r.apply(null,i):r()),void 0===r?"undefined":r})},tokenRegEx:/\$\{([\w.]+?)\}/g,numberRegEx:/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,isNumeric:function(e){return s.String.numberRegEx.test(e)},numericIf:function(e){return s.String.isNumeric(e)?parseFloat(e):e}},ce=s.Number={decimalSeparator:".",thousandsSeparator:",",limitSigDigs:function(e,t){var i=0;return t>0&&(i=parseFloat(e.toPrecision(t))),i},format:function(e,t,i,r){t=void 0!==t?t:0,i=void 0!==i?i:s.Number.thousandsSeparator,r=void 0!==r?r:s.Number.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var n=e.toString().split(".");1===n.length&&null==t&&(t=0);var a,o=n[0];if(i)for(var l=/(-?[0-9]+)([0-9]{3})/;l.test(o);)o=o.replace(l,"$1"+i+"$2");if(0==t)a=o;else{var h=n.length>1?n[1]:"0";null!=t&&(h+=new Array(t-h.length+1).join("0")),a=o+r+h}return a}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return ce.limitSigDigs(this,e)});var de,pe,fe,me=s.Function={bind:function(e,t){var i=Array.prototype.slice.apply(arguments,[2]);return function(){var s=i.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,s)}},bindAsEventListener:function(e,t){return function(i){return e.call(t,i||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},ye=(s.Array={filter:function(e,t,i){var s=[];if(Array.prototype.filter)s=e.filter(t,i);else{var r=e.length;if("function"!=typeof t)throw new TypeError;for(var n=0;n<r;n++)if(n in e){var a=e[n];t.call(i,a,n,e)&&s.push(a)}}return s}},s.Util=s.Util||{});s.Util.extend=function(e,t){if(e=e||{},t){for(var i in t){var s=t[i];void 0!==s&&(e[i]=s)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},s.Util.copy=function(e,t){var i;if(e=e||{},t)for(var s in e)void 0!==(i=t[s])&&(e[s]=i)},s.Util.reset=function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"==typeof e[t]&&e[t]instanceof Array){for(var i in e[t])e[t][i].destroy&&e[t][i].destroy();e[t].length=0}else"object"==typeof e[t]&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},s.Util.getElement=function(){for(var e=[],t=0,i=arguments.length;t<i;t++){var s=arguments[t];if("string"==typeof s&&(s=document.getElementById(s)),1===arguments.length)return s;e.push(s)}return e},s.Util.isElement=function(e){return!(!e||1!==e.nodeType)},s.Util.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.Util.removeItem=function(e,t){for(var i=e.length-1;i>=0;i--)e[i]===t&&e.splice(i,1);return e},s.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var i=0,s=e.length;i<s;i++)if(e[i]===t)return i;return-1},s.Util.modifyDOMElement=function(e,t,i,s,r,n,a,o){t&&(e.id=t),i&&(e.style.left=i.x+"px",e.style.top=i.y+"px"),s&&(e.style.width=s.w+"px",e.style.height=s.h+"px"),r&&(e.style.position=r),n&&(e.style.border=n),a&&(e.style.overflow=a),parseFloat(o)>=0&&parseFloat(o)<1?(e.style.filter="alpha(opacity="+100*o+")",e.style.opacity=o):1===parseFloat(o)&&(e.style.filter="",e.style.opacity="")},s.Util.applyDefaults=function(e,t){e=e||{};var i="function"==typeof window.Event&&t instanceof window.Event;for(var s in t)(void 0===e[s]||!i&&t.hasOwnProperty&&t.hasOwnProperty(s)&&!e.hasOwnProperty(s))&&(e[s]=t[s]);return!i&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},s.Util.getParameterString=function(e){var t=[];for(var i in e){var s,r=e[i];if(null!=r&&"function"!=typeof r)s=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+s)}return t.join("&")},s.Util.urlAppend=function(e,t){var i=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var s=(e+" ").split(/[?&]/);i+=" "===s.pop()?t:s.length?"&"+t:"?"+t}return i},s.Util.urlPathAppend=function(e,t){let i=e;if(!t)return i;0===t.indexOf("/")&&(t=t.substring(1));const s=e.split("?");return s[0].indexOf("/",s[0].length-1)<0&&(s[0]+="/"),i=`${s[0]}${t}${s.length>1?`?${s[1]}`:""}`},s.Util.DEFAULT_PRECISION=14,s.Util.toFloat=function(e,t){return null==t&&(t=s.Util.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},s.Util.rad=function(e){return e*Math.PI/180},s.Util.getParameters=function(e){e=null===e||void 0===e?window.location.href:e;var t="";if(s.String.contains(e,"?")){var i=e.indexOf("?")+1,r=s.String.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(i,r)}for(var n={},a=t.split(/[&;]/),o=0,l=a.length;o<l;++o){var h=a[o].split("=");if(h[0]){var u=h[0];try{u=decodeURIComponent(u)}catch(e){u=unescape(u)}var c=(h[1]||"").replace(/\+/g," ");try{c=decodeURIComponent(c)}catch(e){c=unescape(c)}1==(c=c.split(",")).length&&(c=c[0]),n[u]=c}}return n},s.Util.lastSeqID=0,s.Util.createUniqueID=function(e){return null==e&&(e="id_"),s.Util.lastSeqID+=1,e+s.Util.lastSeqID},s.INCHES_PER_UNIT={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36},s.INCHES_PER_UNIT.in=s.INCHES_PER_UNIT.inches,s.INCHES_PER_UNIT.degrees=s.INCHES_PER_UNIT.dd,s.INCHES_PER_UNIT.nmi=1852*s.INCHES_PER_UNIT.m,s.METERS_PER_INCH=.0254000508001016,s.Util.extend(s.INCHES_PER_UNIT,{Inch:s.INCHES_PER_UNIT.inches,Meter:1/s.METERS_PER_INCH,Foot:.3048006096012192/s.METERS_PER_INCH,IFoot:.3048/s.METERS_PER_INCH,ClarkeFoot:.3047972651151/s.METERS_PER_INCH,SearsFoot:.30479947153867626/s.METERS_PER_INCH,GoldCoastFoot:.3047997101815088/s.METERS_PER_INCH,IInch:.0254/s.METERS_PER_INCH,MicroInch:254e-7/s.METERS_PER_INCH,Mil:2.54e-8/s.METERS_PER_INCH,Centimeter:.01/s.METERS_PER_INCH,Kilometer:1e3/s.METERS_PER_INCH,Yard:.9144018288036576/s.METERS_PER_INCH,SearsYard:.914398414616029/s.METERS_PER_INCH,IndianYard:.9143985307444408/s.METERS_PER_INCH,IndianYd37:.91439523/s.METERS_PER_INCH,IndianYd62:.9143988/s.METERS_PER_INCH,IndianYd75:.9143985/s.METERS_PER_INCH,IndianFoot:.30479951/s.METERS_PER_INCH,IndianFt37:.30479841/s.METERS_PER_INCH,IndianFt62:.3047996/s.METERS_PER_INCH,IndianFt75:.3047995/s.METERS_PER_INCH,Mile:1609.3472186944373/s.METERS_PER_INCH,IYard:.9144/s.METERS_PER_INCH,IMile:1609.344/s.METERS_PER_INCH,NautM:1852/s.METERS_PER_INCH,"Lat-66":110943.31648893273/s.METERS_PER_INCH,"Lat-83":110946.25736872235/s.METERS_PER_INCH,Decimeter:.1/s.METERS_PER_INCH,Millimeter:.001/s.METERS_PER_INCH,Dekameter:10/s.METERS_PER_INCH,Decameter:10/s.METERS_PER_INCH,Hectometer:100/s.METERS_PER_INCH,GermanMeter:1.0000135965/s.METERS_PER_INCH,CaGrid:.999738/s.METERS_PER_INCH,ClarkeChain:20.1166194976/s.METERS_PER_INCH,GunterChain:20.11684023368047/s.METERS_PER_INCH,BenoitChain:20.116782494375872/s.METERS_PER_INCH,SearsChain:20.11676512155/s.METERS_PER_INCH,ClarkeLink:.201166194976/s.METERS_PER_INCH,GunterLink:.2011684023368047/s.METERS_PER_INCH,BenoitLink:.20116782494375873/s.METERS_PER_INCH,SearsLink:.2011676512155/s.METERS_PER_INCH,Rod:5.02921005842012/s.METERS_PER_INCH,IntnlChain:20.1168/s.METERS_PER_INCH,IntnlLink:.201168/s.METERS_PER_INCH,Perch:5.02921005842012/s.METERS_PER_INCH,Pole:5.02921005842012/s.METERS_PER_INCH,Furlong:201.1684023368046/s.METERS_PER_INCH,Rood:3.778266898/s.METERS_PER_INCH,CapeFoot:.3047972615/s.METERS_PER_INCH,Brealey:375/s.METERS_PER_INCH,ModAmFt:.304812252984506/s.METERS_PER_INCH,Fathom:1.8288/s.METERS_PER_INCH,"NautM-UK":1853.184/s.METERS_PER_INCH,"50kilometers":5e4/s.METERS_PER_INCH,"150kilometers":15e4/s.METERS_PER_INCH}),s.Util.extend(s.INCHES_PER_UNIT,{mm:s.INCHES_PER_UNIT.Meter/1e3,cm:s.INCHES_PER_UNIT.Meter/100,dm:100*s.INCHES_PER_UNIT.Meter,km:1e3*s.INCHES_PER_UNIT.Meter,kmi:s.INCHES_PER_UNIT.nmi,fath:s.INCHES_PER_UNIT.Fathom,ch:s.INCHES_PER_UNIT.IntnlChain,link:s.INCHES_PER_UNIT.IntnlLink,"us-in":s.INCHES_PER_UNIT.inches,"us-ft":s.INCHES_PER_UNIT.Foot,"us-yd":s.INCHES_PER_UNIT.Yard,"us-ch":s.INCHES_PER_UNIT.GunterChain,"us-mi":s.INCHES_PER_UNIT.Mile,"ind-yd":s.INCHES_PER_UNIT.IndianYd37,"ind-ft":s.INCHES_PER_UNIT.IndianFt37,"ind-ch":20.11669506/s.METERS_PER_INCH}),s.DOTS_PER_INCH=96,s.Util.normalizeScale=function(e){return e>1?1/e:e},s.Util.getResolutionFromScale=function(e,t){var i;e&&(null==t&&(t="degrees"),i=1/(s.Util.normalizeScale(e)*s.INCHES_PER_UNIT[t]*s.DOTS_PER_INCH));return i},s.Util.getScaleFromResolution=function(e,t){return null==t&&(t="degrees"),e*s.INCHES_PER_UNIT[t]*s.DOTS_PER_INCH},s.IS_GECKO=-1===(de=navigator.userAgent.toLowerCase()).indexOf("webkit")&&-1!==de.indexOf("gecko"),s.Browser=function(){var e,t="",i="",s="pc",r=navigator.userAgent.toLowerCase();return r.indexOf("msie")>-1||r.indexOf("trident")>-1&&r.indexOf("rv")>-1?(t="msie",e=r.match(/msie ([\d.]+)/)||r.match(/rv:([\d.]+)/)):r.indexOf("chrome")>-1?(t="chrome",e=r.match(/chrome\/([\d.]+)/)):r.indexOf("firefox")>-1?(t="firefox",e=r.match(/firefox\/([\d.]+)/)):r.indexOf("opera")>-1?(t="opera",e=r.match(/version\/([\d.]+)/)):r.indexOf("safari")>-1&&(t="safari",e=r.match(/version\/([\d.]+)/)),i=e?e[1]:"",r.indexOf("ipad")>-1||r.indexOf("ipod")>-1||r.indexOf("iphone")>-1?s="apple":r.indexOf("android")>-1&&(i=(e=r.match(/version\/([\d.]+)/))?e[1]:"",s="android"),{name:t,version:i,device:s}}(),s.Util.getBrowser=function(){return s.Browser},s.Util.isSupportCanvas=(pe=!0,fe=s.Util.getBrowser(),document.createElement("canvas").getContext?("firefox"===fe.name&&parseFloat(fe.version)<5&&(pe=!1),"safari"===fe.name&&parseFloat(fe.version)<4&&(pe=!1),"opera"===fe.name&&parseFloat(fe.version)<10&&(pe=!1),"msie"===fe.name&&parseFloat(fe.version)<9&&(pe=!1)):pe=!1,pe),s.Util.supportCanvas=function(){return s.Util.isSupportCanvas},s.INCHES_PER_UNIT.degree=s.INCHES_PER_UNIT.dd,s.INCHES_PER_UNIT.meter=s.INCHES_PER_UNIT.m,s.INCHES_PER_UNIT.foot=s.INCHES_PER_UNIT.ft,s.INCHES_PER_UNIT.inch=s.INCHES_PER_UNIT.inches,s.INCHES_PER_UNIT.mile=s.INCHES_PER_UNIT.mi,s.INCHES_PER_UNIT.kilometer=s.INCHES_PER_UNIT.km,s.INCHES_PER_UNIT.yard=s.INCHES_PER_UNIT.yd,s.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),i=document.location.toString(),s=i.indexOf("//");if(-1===t)return!0;var r,n=r=e.substring(0,t),a=i.substring(s+2);s=a.indexOf("/");var o=a.indexOf(":"),l=a.substring(0,s),h=document.location.protocol;if(-1!==o||(l+=":"+("http:"===h.toLowerCase()?80:443)),h.toLowerCase()!==n.toLowerCase())return!1;var u=(n=e.substring(t+2)).indexOf(":");t=n.indexOf("/");var c,d=n.substring(0,t);return-1!==u?c=n.substring(0,u):(c=n.substring(0,t),d+=":"+("http:"===r.toLowerCase()?80:443)),c===document.domain&&d===l},s.Util.calculateDpi=function(e,t,i,s,r){if(e&&t&&i){var n,a=e.getWidth(),o=e.getHeight(),l=t.w,h=t.h;if(r=r||6378137,"degree"===(s=s||"degrees").toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()){let e=a/l,t=o/h;n=254/(e>t?e:t)/i/(2*Math.PI*r/360)/1e4}else{n=254/(a/l)/i/1e4}return n}},s.Util.toJSON=function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var i=[],r=0,n=t.length;r<n;r++)i.push(s.Util.toJSON(t[r]));return"["+i.join(",")+"]";case Number:return isFinite(t)?String(t):null;case Boolean:return String(t);case Date:return"{'__type':\"System.DateTime\",'Year':"+t.getFullYear()+",'Month':"+(t.getMonth()+1)+",'Day':"+t.getDate()+",'Hour':"+t.getHours()+",'Minute':"+t.getMinutes()+",'Second':"+t.getSeconds()+",'Millisecond':"+t.getMilliseconds()+",'TimezoneOffset':"+t.getTimezoneOffset()+"}";default:if(null!=t.toJSON&&"function"==typeof t.toJSON)return t.toJSON();if("object"==typeof t){if(t.length){let e=[];for(let i=0,r=t.length;i<r;i++)e.push(s.Util.toJSON(t[i]));return"["+e.join(",")+"]"}let e=[];for(let i in t)"function"!=typeof t[i]&&"CLASS_NAME"!==i&&"parent"!==i&&e.push("'"+i+"':"+s.Util.toJSON(t[i]));return e.length>0?"{"+e.join(",")+"}":"{}"}return t.toString()}},s.Util.getResolutionFromScaleDpi=function(e,t,i,r){return r=r||6378137,i=i||"",e>0&&t>0?(e=s.Util.normalizeScale(e),"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*r/360)/1e4:254/t/e/1e4):-1},s.Util.getScaleFromResolutionDpi=function(e,t,i,s){return s=s||6378137,i=i||"",e>0&&t>0?"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*s/360)/1e4:254/t/e/1e4:-1},s.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},s.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var i in t){var s=t[i];void 0!==s&&"CLASS_NAME"!==i&&"function"!=typeof s&&(e[i]=s)}return e},s.Util.copyAttributesWithClip=function(e,t,i){if(e=e||{},t)for(var s in t){var r=!1;if(i&&i.length)for(var n=0,a=i.length;n<a;n++)if(s===i[n]){r=!0;break}if(!0!==r){var o=t[s];void 0!==o&&"CLASS_NAME"!==s&&"function"!=typeof o&&(e[s]=o)}}return e},s.Util.cloneObject=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Date){let t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array){return e.slice(0)}if(e instanceof Object){let i={};for(var t in e)e.hasOwnProperty(t)&&(i[t]=s.Util.cloneObject(e[t]));return i}throw new Error("Unable to copy obj! Its type isn't supported.")},s.Util.lineIntersection=function(e,t,i,r){var n,a,o=null,l=(r.x-i.x)*(e.y-i.y)-(r.y-i.y)*(e.x-i.x),h=(t.x-e.x)*(e.y-i.y)-(t.y-e.y)*(e.x-i.x),u=(r.y-i.y)*(t.x-e.x)-(r.x-i.x)*(t.y-e.y);if(0!=u)a=h/u,o=(n=l/u)>=0&&a<=1&&n<=1&&a>=0?new s.Geometry.Point(e.x+n*(t.x-e.x),e.y+n*(t.y-e.y)):"No Intersection";else if(0==l&&0==h){var c=Math.max(e.y,t.y),d=Math.min(e.y,t.y),p=Math.max(e.x,t.x),f=Math.min(e.x,t.x);o=(i.y>=d&&i.y<=c||r.y>=d&&r.y<=c)&&i.x>=f&&i.x<=p||r.x>=f&&r.x<=p?"Coincident":"Parallel"}else o="Parallel";return o},s.Util.getTextBounds=function(e,t,i){document.body.appendChild(i),i.style.width="auto",i.style.height="auto",e.fontSize&&(i.style.fontSize=e.fontSize),e.fontFamily&&(i.style.fontFamily=e.fontFamily),e.fontWeight&&(i.style.fontWeight=e.fontWeight),i.style.position="relative",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=t;var s=i.clientWidth,r=i.clientHeight;return document.body.removeChild(i),{textWidth:s,textHeight:r}};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ge{constructor(e,t){ye.isArray(e)&&(t=e[1],e=e[0]),this.lon=e?ye.toFloat(e):0,this.lat=t?ye.toFloat(t):0,this.CLASS_NAME="SuperMap.LonLat"}toString(){return"lon="+this.lon+",lat="+this.lat}toShortString(){return this.lon+","+this.lat}clone(){return new ge(this.lon,this.lat)}add(e,t){if(null==e||null==t)throw new TypeError("LonLat.add cannot receive null values");return new ge(this.lon+ye.toFloat(e),this.lat+ye.toFloat(t))}equals(e){var t=!1;return null!=e&&(t=this.lon===e.lon&&this.lat===e.lat||isNaN(this.lon)&&isNaN(this.lat)&&isNaN(e.lon)&&isNaN(e.lat)),t}wrapDateLine(e){var t=this.clone();if(e){for(;t.lon<e.left;)t.lon+=e.getWidth();for(;t.lon>e.right;)t.lon-=e.getWidth()}return t}destroy(){this.lon=null,this.lat=null}static fromString(e){var t=e.split(",");return new ge(t[0],t[1])}static fromArray(e){var t=ye.isArray(e),i=t&&e[0],s=t&&e[1];return new ge(i,s)}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ve{constructor(e,t,i,s){ye.isArray(e)&&(s=e[3],i=e[2],t=e[1],e=e[0]),this.left=null!=e?ye.toFloat(e):this.left,this.bottom=null!=t?ye.toFloat(t):this.bottom,this.right=null!=i?ye.toFloat(i):this.right,this.top=null!=s?ye.toFloat(s):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new ve(this.left,this.bottom,this.right,this.top)}equals(e){var t=!1;return null!=e&&(t=this.left===e.left&&this.right===e.right&&this.top===e.top&&this.bottom===e.bottom),t}toString(){return[this.left,this.bottom,this.right,this.top].join(",")}toArray(e){return!0===e?[this.bottom,this.left,this.top,this.right]:[this.left,this.bottom,this.right,this.top]}toBBOX(e,t){null==e&&(e=6);var i=Math.pow(10,e),s=Math.round(this.left*i)/i,r=Math.round(this.bottom*i)/i,n=Math.round(this.right*i)/i,a=Math.round(this.top*i)/i;return!0===t?r+","+s+","+a+","+n:s+","+r+","+n+","+a}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new le(this.getWidth(),this.getHeight())}getCenterPixel(){return new he((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new ge((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var i,s;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(i=t.lon,s=t.lat):(i=t.x,s=t.y);var r=(this.left-i)*e+i,n=(this.bottom-s)*e+s,a=(this.right-i)*e+i,o=(this.top-s)*e+s;return new ve(r,n,a,o)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new ve(this.left+e,this.bottom+t,this.right+e,this.top+t)}extend(e){var t=null;if(e){switch(e.CLASS_NAME){case"SuperMap.LonLat":t=new ve(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new ve(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.left<this.left)&&(this.left=t.left),(null==this.bottom||t.bottom<this.bottom)&&(this.bottom=t.bottom),(null==this.right||t.right>this.right)&&(this.right=t.right),(null==this.top||t.top>this.top)&&(this.top=t.top))}}containsLonLat(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var i=this.contains(e.lon,e.lat,t.inclusive),s=t.worldBounds;if(s&&!i){var r=s.getWidth(),n=(s.left+s.right)/2,a=Math.round((e.lon-n)/r);i=this.containsLonLat({lon:e.lon-a*r,lat:e.lat},{inclusive:t.inclusive})}return i}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,i){if(null==i&&(i=!0),null==e||null==t)return!1;return i?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&e<this.right&&t>this.bottom&&t<this.top}intersectsBounds(e,t){if("boolean"==typeof t&&(t={inclusive:t}),(t=t||{}).worldBounds){var i=this.wrapDateLine(t.worldBounds);e=e.wrapDateLine(t.worldBounds)}else i=this;null==t.inclusive&&(t.inclusive=!0);var s=!1,r=i.left===e.right||i.right===e.left||i.top===e.bottom||i.bottom===e.top;if(t.inclusive||!r){var n=e.bottom>=i.bottom&&e.bottom<=i.top||i.bottom>=e.bottom&&i.bottom<=e.top,a=e.top>=i.bottom&&e.top<=i.top||i.top>e.bottom&&i.top<e.top,o=e.left>=i.left&&e.left<=i.right||i.left>=e.left&&i.left<=e.right,l=e.right>=i.left&&e.right<=i.right||i.right>=e.left&&i.right<=e.right;s=(n||a)&&(o||l)}if(t.worldBounds&&!s){var h=t.worldBounds,u=h.getWidth(),c=!h.containsBounds(i),d=!h.containsBounds(e);c&&!d?(e=e.add(-u,0),s=i.intersectsBounds(e,{inclusive:t.inclusive})):d&&!c&&(i=i.add(-u,0),s=e.intersectsBounds(i,{inclusive:t.inclusive}))}return s}containsBounds(e,t,i){null==t&&(t=!1),null==i&&(i=!0);var s=this.contains(e.left,e.bottom,i),r=this.contains(e.right,e.bottom,i),n=this.contains(e.left,e.top,i),a=this.contains(e.right,e.top,i);return t?s||r||n||a:s&&r&&n&&a}determineQuadrant(e){var t="",i=this.getCenterLonLat();return t+=e.lat<i.lat?"b":"t",t+=e.lon<i.lon?"l":"r"}wrapDateLine(e,t){var i=(t=t||{}).leftTolerance||0,s=t.rightTolerance||0,r=this.clone();if(e){for(var n=e.getWidth();r.left<e.left&&r.right-s<=e.left;)r=r.add(n,0);for(;r.left+i>=e.right&&r.right>e.right;)r=r.add(-n,0);var a=r.left+i;a<e.right&&a>e.left&&r.right-s>e.right&&(r=r.add(-n,0))}return r}toServerJSONObject(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}destroy(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}static fromString(e,t){var i=e.split(",");return ve.fromArray(i,t)}static fromArray(e,t){return!0===t?new ve(e[1],e[0],e[3],e[2]):new ve(e[0],e[1],e[2],e[3])}static fromSize(e){return new ve(0,e.h,e.w,0)}static oppositeQuadrant(e){var t="";return t+="t"===e.charAt(0)?"b":"t",t+="l"===e.charAt(1)?"r":"l"}}s.Bounds=ve;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Se{constructor(){this.CLASS_NAME="SuperMap.Geometry",this.id=ye.createUniqueID(this.CLASS_NAME+"_"),this.parent=null,this.bounds=null,this.SRID=null}destroy(){this.id=null,this.bounds=null,this.SRID=null}clone(){return new Se}setBounds(e){e&&(this.bounds=e.clone())}clearBounds(){this.bounds=null,this.parent&&this.parent.clearBounds()}extendBounds(e){this.getBounds()?this.bounds.extend(e):this.setBounds(e)}getBounds(){return null==this.bounds&&this.calculateBounds(),this.bounds}calculateBounds(){}getVertices(e){}getArea(){return 0}}s.Geometry=Se;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class be extends Se{constructor(e){super(),this.components=[],this.componentTypes=null,null!=e&&this.addComponents(e),this.CLASS_NAME="SuperMap.Geometry.Collection",this.geometryType="Collection"}destroy(){this.components.length=0,this.components=null,super.destroy()}clone(){for(var e=new be,t=0,i=this.components.length;t<i;t++)e.addComponent(this.components[t].clone());return ye.applyDefaults(e,this),e}getComponentsString(){for(var e=[],t=0,i=this.components.length;t<i;t++)e.push(this.components[t].toShortString());return e.join(",")}calculateBounds(){this.bounds=null;var e=new ve,t=this.components;if(t)for(var i=0,s=t.length;i<s;i++)e.extend(t[i].getBounds());null!=e.left&&null!=e.bottom&&null!=e.right&&null!=e.top&&this.setBounds(e)}addComponents(e){ye.isArray(e)||(e=[e]);for(var t=0,i=e.length;t<i;t++)this.addComponent(e[t])}addComponent(e,t){var i=!1;if(e&&(null==this.componentTypes||ye.indexOf(this.componentTypes,e.CLASS_NAME)>-1)){if(null!=t&&t<this.components.length){var s=this.components.slice(0,t),r=this.components.slice(t,this.components.length);s.push(e),this.components=s.concat(r)}else this.components.push(e);e.parent=this,this.clearBounds(),i=!0}return i}removeComponents(e){var t=!1;ye.isArray(e)||(e=[e]);for(var i=e.length-1;i>=0;--i)t=this.removeComponent(e[i])||t;return t}removeComponent(e){return ye.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,i=this.components.length;t<i;t++)e+=this.components[t].getArea();return e}equals(e){var t=!0;if(e&&e.CLASS_NAME&&this.CLASS_NAME===e.CLASS_NAME)if(ye.isArray(e.components)&&e.components.length===this.components.length){for(var i=0,s=this.components.length;i<s;++i)if(!this.components[i].equals(e.components[i])){t=!1;break}}else t=!1;else t=!1;return t}getVertices(e){for(var t=[],i=0,s=this.components.length;i<s;++i)Array.prototype.push.apply(t,this.components[i].getVertices(e));return t}}s.Geometry.Collection=be;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class _e extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.MultiPoint",this.geometryType="MultiPoint"}addPoint(e,t){this.addComponent(e,t)}removePoint(e){this.removeComponent(e)}}s.Geometry.MultiPoint=_e;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class xe extends _e{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point","SuperMap.PointWithMeasure"],this.CLASS_NAME="SuperMap.Geometry.Curve",this.geometryType="Curve"}}s.Geometry.Curve=xe;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ce extends Se{constructor(e,t,i,s){super(e,t,i,s),this.x=parseFloat(e),this.y=parseFloat(t),this.tag=s||0==s?parseFloat(s):null,this.type=i||"Point",this.CLASS_NAME="SuperMap.Geometry.Point",this.geometryType="Point"}clone(e){return null==e&&(e=new Ce(this.x,this.y)),ye.applyDefaults(e,this),e}calculateBounds(){this.bounds=new ve(this.x,this.y,this.x,this.y)}equals(e){var t=!1;return null!=e&&(t=this.x===e.x&&this.y===e.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(e.x)&&isNaN(e.y)),t}move(e,t){this.x=this.x+e,this.y=this.y+t,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(e){return[this]}}s.Geometry.Point=Ce;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Te extends xe{constructor(e){super(e),this.CLASS_NAME="SuperMap.Geometry.LineString",this.geometryType="LineString"}removeComponent(e){var t=this.components&&this.components.length>2;return t&&super.removeComponent.apply(this,arguments),t}getSortedSegments(){for(var e,t,i=this.components.length-1,s=new Array(i),r=0;r<i;++r)e=this.components[r],t=this.components[r+1],e.x<t.x?s[r]={x1:e.x,y1:e.y,x2:t.x,y2:t.y}:s[r]={x1:t.x,y1:t.y,x2:e.x,y2:e.y};return s.sort(function(e,t){return e.x1-t.x1})}getVertices(e){return!0===e?[this.components[0],this.components[this.components.length-1]]:!1===e?this.components.slice(1,this.components.length-1):this.components.slice()}static calculateCircle(e){if(e.length<3)return e;var t={},i=e[0],s=e[1],r=e[2],n=0,a=0,o=!0,l=0,h=0,u=0,c=[],d=(r.y-i.y)/(r.x-i.x),p=r.y-d*r.x;if(r.x!=i.x&&r.y!=i.y&&s.y==d*s.x+p||r.x==i.x&&s.x==i.x||r.y==i.y&&s.y==i.y||r.x==i.x&&r.y==i.y||r.x==s.x&&r.y==s.y||i.x==s.x&&i.y==s.y)c.push(i),c.push(s),c.push(r);else{var f=(s.x*s.x+s.y*s.y-(i.x*i.x+i.y*i.y))*(2*(r.y-i.y))-(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))*(2*(s.y-i.y)),m=2*(s.x-i.x)*(r.x*r.x+r.y*r.y-(i.x*i.x+i.y*i.y))-2*(r.x-i.x)*(s.x*s.x+s.y*s.y-(i.x*i.x+i.y*i.y)),y=4*((s.x-i.x)*(r.y-i.y)-(r.x-i.x)*(s.y-i.y));t.x=f/y,t.y=m/y;var g=(2*(n=Math.sqrt((i.x-t.x)*(i.x-t.x)+(i.y-t.y)*(i.y-t.y)))*n-((i.x-r.x)*(i.x-r.x)+(i.y-r.y)*(i.y-r.y)))/(2*n*n);g=(g=g>=1?1:g)<=-1?-1:g,u=180*Math.acos(g)/Math.PI,a=(u=r.x==i.x?t.x>i.x&&s.x>i.x||t.x<i.x&&s.x<i.x?360-u:u:t.y>d*t.x+p&&s.y>d*s.x+p||t.y<d*t.x+p&&s.y<d*s.x+p?360-u:u)/72,r.y!=i.y?r.x==i.x?r.y>i.y?s.x<i.x&&(o=!1):s.x>i.x&&(o=!1):r.x<i.x?s.y<d*s.x+p&&(o=!1):s.y>d*s.x+p&&(o=!1):r.x>i.x?s.y>i.y&&(o=!1):s.y<i.y&&(o=!1);var v=(i.y-t.y)/(i.x-t.x),S=v>=0?180*Math.atan(v)/Math.PI:Math.abs(180*Math.atan(v)/Math.PI)+90,b=Math.abs(t.y);i.y==b&&b==r.y&&i.x<r.x&&(S+=180);var _=i.y-t.y;c.push(i);for(var x=1;x<72;x++){l=a*x,h=S,o?_>=0?v>=0?h+=l:h=180-(h-90)+l:h=v>0?h-180+l:90-h+l:_>=0?v>=0?h-=l:h=180-(h-90)-l:h=v>=0?h-180-l:90-h-l,h=h*Math.PI/180;var C=t.x+n*Math.cos(h),T=t.y+n*Math.sin(h);c.push(new Ce(C,T))}c.push(r)}return c}static createLineEPS(e){var t=[],i=e.length;if(i<2)return e;for(var s=0;s<i;){if("LTypeArc"==e[s].type){var r=Te.createLineArc(t,s,i,e);t=r[0],s=r[1]}else t.push(e[s]),s++}return t}static createLineArc(e,t,i,s){if(0==t){let r=Te.addPointEPS(s,t,i,"LTypeArc");Array.prototype.push.apply(e,r[0]),t=r[1]+1}else if(t==i-1){var r=[s[t-1],s[t]],n=Te.calculateCircle(r);Array.prototype.push.apply(e,n),t++}else{let r=Te.addPointEPS(s,t,i,"LTypeArc");e.pop(),Array.prototype.push.apply(e,r[0]),t=r[1]+1}return[e,t]}static addPointEPS(e,t,i,s){var r,n=[],a=t+1;return 0==t?Array.prototype.push.apply(n,[e[t],e[t+1]]):t==i-1?Array.prototype.push.apply(n,[e[t-1],e[t]]):Array.prototype.push.apply(n,[e[t-1],e[t],e[t+1]]),"LTypeCurve"==s?r=Te.calculatePointsFBZN(n):"LTypeArc"==s&&(r=Te.calculateCircle(n)),[r,a]}}s.Geometry.LineString=Te;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Me extends Se{constructor(e,t,i){super(e,t,i),this.x=parseFloat(e),this.y=parseFloat(t),this.text=i.toString(),this.bsInfo={h:null,w:null},this.element=document.createElement("span"),this.CLASS_NAME="SuperMap.Geometry.GeoText",this.geometryType="GeoText"}destroy(){super.destroy(),this.x=null,this.y=null,this.text=null}getCentroid(){return new Ce(this.x,this.y)}clone(e){return null==e&&(e=new Me(this.x,this.y,this.text)),ye.applyDefaults(e,this),e}calculateBounds(){this.bounds=new ve(this.x,this.y,this.x,this.y)}getLabelPxBoundsByLabel(e,t,i,s){var r,n,a,o,l=ye.cloneObject(e),h=(s.label||this.text).split("\n").length;if(t=parseFloat(t),i=parseFloat(i),h>1&&(i=parseFloat(i)*h),s.labelAlign&&"cm"!==s.labelAlign)switch(s.labelAlign){case"lt":l.x+=t/2,l.y+=i/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=i/2;break;case"ct":l.y+=i/2;break;case"cb":l.y-=i/2;break;case"rt":l.x-=t/2,l.y+=i/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=i/2}return this.bsInfo.h=i,this.bsInfo.w=t,r=l.x-parseFloat(t)/2,n=l.y+parseFloat(i)/2,o=l.x+parseFloat(t)/2,a=l.y-parseFloat(i)/2,new ve(r,n,o,a)}getLabelPxBoundsByText(e,t){var i,s,r,n,a=this.getLabelPxSize(t),o=ye.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":o.x+=a.w/2,o.y+=a.h/2;break;case"lm":o.x+=a.w/2;break;case"lb":o.x+=a.w/2,o.y-=a.h/2;break;case"ct":o.y+=a.h/2;break;case"cb":o.y-=a.h/2;break;case"rt":o.x-=a.w/2,o.y+=a.h/2;break;case"rm":o.x-=a.w/2;break;case"rb":o.x-=a.w/2,o.y-=a.h/2}return this.bsInfo.h=a.h,this.bsInfo.w=a.w,i=o.x-a.w/2,s=o.y+a.h/2,n=t.fontStyle&&"italic"===t.fontStyle?o.x+a.w/2+parseInt(parseFloat(t.fontSize)/2):o.x+a.w/2,r=o.y-a.h/2,new ve(i,s,n,r)}getLabelPxSize(e){var t,i,s,r,n=parseFloat(e.strokeWidth);t=e.label||this.text,i=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var a=t.split("\n"),o=a.length;r=o>1?i*o+o+n+.2*i:i+n+.2*i+1,s=0,this.labelWTmp&&s<this.labelWTmp&&(s=this.labelWTmp);for(var l=0;l<o;l++){var h=this.getTextCount(a[l]),u=this.labelWTmp=ye.getTextBounds(e,a[l],this.element).textWidth+1*h.textC+n;s<u&&(s=u)}var c=new Object;return c.h=r,c.w=s,c}getTextCount(e){for(var t={},i=0,s=0,r=0;r<e.length;r++)e.charCodeAt(r)>255?i++:s++;return t.cnC=i,t.enC=s,t.textC=e.length,t}}s.Geometry.GeoText=Me;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class we extends Te{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var i=!1,s=this.components.pop();null==t&&e.equals(s)||(i=super.addComponent.apply(this,arguments));var r=this.components[0];return super.addComponent.apply(this,[r]),i}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),super.removeComponent.apply(this,arguments);var i=this.components[0];super.addComponent.apply(this,[i])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,i=0,s=this.components.length;i<s-1;i++){var r=this.components[i],n=this.components[i+1];t+=(r.x+n.x)*(n.y-r.y)}e=-t/2}return e}getVertices(e){return!0===e?[]:this.components.slice(0,this.components.length-1)}}s.Geometry.LinearRing=we;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ee extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LineString"],this.CLASS_NAME="SuperMap.Geometry.MultiLineString",this.geometryType="MultiLineString"}}s.Geometry.MultiLineString=Ee;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ae extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Polygon"],this.CLASS_NAME="SuperMap.Geometry.MultiPolygon",this.geometryType="MultiPolygon"}}s.Geometry.MultiPolygon=Ae;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Le extends be{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.LinearRing"],this.CLASS_NAME="SuperMap.Geometry.Polygon",this.geometryType="Polygon"}getArea(){var e=0;if(this.components&&this.components.length>0){e+=Math.abs(this.components[0].getArea());for(var t=1,i=this.components.length;t<i;t++)e-=Math.abs(this.components[t].getArea())}return e}}s.Geometry.Polygon=Le;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Pe extends Se{constructor(e,t,i,s){super(e,t,i,s),this.x=e,this.y=t,this.width=i,this.height=s,this.CLASS_NAME="SuperMap.Geometry.Rectangle",this.geometryType="Rectangle"}calculateBounds(){this.bounds=new ve(this.x,this.y,this.x+this.width,this.y+this.height)}getArea(){return this.width*this.height}}s.Geometry.Rectangle=Pe;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ne{constructor(e,t){this.value=e||"",this.name=t||"token",this.CLASS_NAME="SuperMap.Credential"}getUrlParameters(){return this.name+"="+this.value}getValue(){return this.value}destroy(){this.value=null,this.name=null}}Ne.CREDENTIAL=null,s.Credential=Ne;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
s.Date={toISOString:function(){if("toISOString"in Date.prototype)return function(e){return e.toISOString()};{function e(e,t){for(var i=e+"";i.length<t;)i="0"+i;return i}return function(t){return isNaN(t.getTime())?"Invalid Date":t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1,2)+"-"+e(t.getUTCDate(),2)+"T"+e(t.getUTCHours(),2)+":"+e(t.getUTCMinutes(),2)+":"+e(t.getUTCSeconds(),2)+"."+e(t.getUTCMilliseconds(),3)+"Z"}}}(),parse:function(e){var t,i=e.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))|Z)?$/);if(i&&(i[1]||i[7])){var s=parseInt(i[1],10)||0,r=parseInt(i[2],10)-1||0,n=parseInt(i[3],10)||1;t=new Date(Date.UTC(s,r,n));var a=i[7];if(a){var o=parseInt(i[4],10),l=parseInt(i[5],10),h=parseFloat(i[6]),u=0|h,c=Math.round(1e3*(h-u));if(t.setUTCHours(o,l,u,c),"Z"!==a){var d=-1e3*(60*parseInt(a,10)*60+60*(parseInt(i[8],10)||0));t=new Date(t.getTime()+d)}}}else t=new Date("invalid");return t}};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/var Oe=s.Event={observers:!1,KEY_SPACE:32,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(e){return e.target||e.srcElement},isSingleTouch:function(e){return e.touches&&1===e.touches.length},isMultiTouch:function(e){return e.touches&&e.touches.length>1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var i=s.Event.element(e);i.parentNode&&(!i.tagName||i.tagName.toUpperCase()!=t.toUpperCase());)i=i.parentNode;return i},observe:function(e,t,i,s){var r=ye.getElement(e);if(s=s||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||r.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!r._eventCacheID){var n="eventCacheID_";r.id&&(n=r.id+"_"+n),r._eventCacheID=ye.createUniqueID(n)}var a=r._eventCacheID;this.observers[a]||(this.observers[a]=[]),this.observers[a].push({element:r,name:t,observer:i,useCapture:s}),r.addEventListener?"mousewheel"===t?r.addEventListener(t,i,{useCapture:s,passive:!1}):r.addEventListener(t,i,s):r.attachEvent&&r.attachEvent("on"+t,i)},stopObservingElement:function(e){var t=ye.getElement(e)._eventCacheID;this._removeElementObservers(s.Event.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var i=e[t],r=new Array(i.element,i.name,i.observer,i.useCapture);s.Event.stopObserving.apply(this,r)}},stopObserving:function(e,t,i,r){r=r||!1;var n=ye.getElement(e),a=n._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||n.detachEvent)&&(t="keydown");var o=!1,l=s.Event.observers[a];if(l)for(var h=0;!o&&h<l.length;){var u=l[h];if(u.name===t&&u.observer===i&&u.useCapture===r){l.splice(h,1),0==l.length&&delete s.Event.observers[a],o=!0;break}h++}return o&&(n.removeEventListener?n.removeEventListener(t,i,r):n&&n.detachEvent&&n.detachEvent("on"+t,i)),o},unloadCache:function(){if(s.Event&&s.Event.observers){for(var e in s.Event.observers){var t=s.Event.observers[e];s.Event._removeElementObservers.apply(this,[t])}s.Event.observers=!1}},CLASS_NAME:"SuperMap.Event"};s.Event=Oe,s.Event.observe(window,"unload",s.Event.unloadCache,!1);
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ie{constructor(e,t,i,s,r){if(this.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"],this.listeners={},this.object=e,this.element=null,this.eventTypes=[],this.eventHandler=null,this.fallThrough=s,this.includeXY=!1,this.extensions={},this.extensionCount={},this.clearMouseListener=null,ye.extend(this,r),null!=i)for(var n=0,a=i.length;n<a;n++)this.addEventType(i[n]);null!=t&&this.attachToElement(t),this.CLASS_NAME="SuperMap.Events"}destroy(){for(var e in this.extensions)"boolean"!=typeof this.extensions[e]&&this.extensions[e].destroy();this.extensions=null,this.element&&(Oe.stopObservingElement(this.element),this.element.hasScrollEvent&&Oe.stopObserving(window,"scroll",this.clearMouseListener)),this.element=null,this.listeners=null,this.object=null,this.eventTypes=null,this.fallThrough=null,this.eventHandler=null}addEventType(e){this.listeners[e]||(this.eventTypes.push(e),this.listeners[e]=[])}attachToElement(e){this.element?Oe.stopObservingElement(this.element):(this.eventHandler=me.bindAsEventListener(this.handleBrowserEvent,this),this.clearMouseListener=me.bind(this.clearMouseCache,this)),this.element=e;for(var t=0,i=this.BROWSER_EVENTS.length;t<i;t++){var s=this.BROWSER_EVENTS[t];this.addEventType(s),Oe.observe(e,s,this.eventHandler)}Oe.observe(e,"dragstart",Oe.stop)}on(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.register(t,e.scope,e[t])}register(e,t,i,s){if(e in Ie&&!this.extensions[e]&&(this.extensions[e]=new Ie[e](this)),null!=i&&-1!==ye.indexOf(this.eventTypes,e)){null==t&&(t=this.object);var r=this.listeners[e];r||(r=[],this.listeners[e]=r,this.extensionCount[e]=0);var n={obj:t,func:i};s?(r.splice(this.extensionCount[e],0,n),"object"==typeof s&&s.extension&&this.extensionCount[e]++):r.push(n)}}registerPriority(e,t,i){this.register(e,t,i,!0)}un(e){for(var t in e)"scope"!==t&&e.hasOwnProperty(t)&&this.unregister(t,e.scope,e[t])}unregister(e,t,i){null==t&&(t=this.object);var s=this.listeners[e];if(null!=s)for(var r=0,n=s.length;r<n;r++)if(s[r].obj===t&&s[r].func===i){s.splice(r,1);break}}remove(e){null!=this.listeners[e]&&(this.listeners[e]=[])}triggerEvent(e,t){var i=this.listeners[e];if(i&&0!=i.length){var s;null==t&&(t={}),t.object=this.object,t.element=this.element,t.type||(t.type=e);for(var r=0,n=(i=i.slice()).length;r<n;r++){var a=i[r];if(void 0!=(s=a.func.apply(a.obj,[t]))&&!1===s)break}return this.fallThrough||Oe.stop(t,!0),s}}handleBrowserEvent(e){var t=e.type,i=this.listeners[t];if(i&&0!=i.length){var s=e.touches;if(s&&s[0]){for(var r,n=0,a=0,o=s.length,l=0;l<o;++l)n+=(r=s[l]).clientX,a+=r.clientY;e.clientX=n/o,e.clientY=a/o}this.includeXY&&(e.xy=this.getMousePosition(e)),this.triggerEvent(t,e)}}clearMouseCache(){this.element.scrolls=null,this.element.lefttop=null;var e=document.body;e&&(0==e.scrollTop&&0==e.scrollLeft||!navigator.userAgent.match(/iPhone/i))&&(this.element.offsets=null)}getMousePosition(e){if(this.includeXY?this.element.hasScrollEvent||(Oe.observe(window,"scroll",this.clearMouseListener),this.element.hasScrollEvent=!0):this.clearMouseCache(),!this.element.scrolls){var t=ye.getViewportElement();this.element.scrolls=[t.scrollLeft,t.scrollTop]}return this.element.lefttop||(this.element.lefttop=[document.documentElement.clientLeft||0,document.documentElement.clientTop||0]),this.element.offsets||(this.element.offsets=ye.pagePosition(this.element)),new he(e.clientX+this.element.scrolls[0]-this.element.offsets[0]-this.element.lefttop[0],e.clientY+this.element.scrolls[1]-this.element.offsets[1]-this.element.lefttop[1])}}s.Events=Ie,s.Events.prototype.BROWSER_EVENTS=["mouseover","mouseout","mousedown","mouseup","mousemove","click","dblclick","rightclick","dblrightclick","resize","focus","blur","touchstart","touchmove","touchend","keydown","MSPointerDown","MSPointerUp","pointerdown","pointerup","MSGestureStart","MSGestureChange","MSGestureEnd","contextmenu"];
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Fe{constructor(e,t,i){this.CLASS_NAME="SuperMap.Feature",this.layer=e,this.id=ye.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=t,this.data=null!=i?i:{}}destroy(){this.id=null,this.lonlat=null,this.data=null}}s.Feature=Fe;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Re extends Fe{constructor(e,t,i){super(null,null,t),this.fid=null,this.geometry=e||null,this.attributes={},t&&(this.attributes=ye.extend(this.attributes,t)),this.bounds=null,this.state=null,this.style=i||null,this.url=null,this.lonlat=null,this.CLASS_NAME="SuperMap.Feature.Vector",s.State={UNKNOWN:"Unknown",INSERT:"Insert",UPDATE:"Update",DELETE:"Delete"},Re.style={default:{fillColor:"#ee9900",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},select:{fillColor:"blue",fillOpacity:.4,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},temporary:{fillColor:"#66cccc",fillOpacity:.2,hoverFillColor:"white",hoverFillOpacity:.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"default",fontColor:"#000000",labelAlign:"cm",labelOutlineColor:"white",labelOutlineWidth:3},delete:{display:"none"}}}destroy(){this.layer&&(this.layer.removeFeatures(this),this.layer=null),this.geometry=null,super.destroy()}clone(){return new Re(this.geometry?this.geometry.clone():null,this.attributes,this.style)}toState(e){if(e===s.State.UPDATE)switch(this.state){case s.State.UNKNOWN:case s.State.DELETE:this.state=e;break;case s.State.UPDATE:case s.State.INSERT:}else if(e===s.State.INSERT)switch(this.state){case s.State.UNKNOWN:break;default:this.state=e}else if(e===s.State.DELETE)switch(this.state){case s.State.INSERT:case s.State.DELETE:break;case s.State.UNKNOWN:case s.State.UPDATE:this.state=e}else e===s.State.UNKNOWN&&(this.state=e)}}s.Feature.Vector=Re;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class De{constructor(e){this.data=null,this.keepData=!1,ye.extend(this,e),this.options=e,this.CLASS_NAME="SuperMap.Format"}destroy(){}read(e){}write(e){}}s.Format=s.Format||De;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ke extends De{constructor(e){super(e),this.indent=" ",this.space=" ",this.newline="\n",this.level=0,this.pretty=!1,this.nativeJSON=!(!window.JSON||"function"!=typeof JSON.parse||"function"!=typeof JSON.stringify),this.CLASS_NAME="SuperMap.Format.JSON",this.serialize={object:function(e){if(null==e)return"null";if(e.constructor===Date)return this.serialize.date.apply(this,[e]);if(e.constructor===Array)return this.serialize.array.apply(this,[e]);var t,i,s,r=["{"];this.level+=1;var n=!1;for(t in e)e.hasOwnProperty(t)&&(i=this.write.apply(this,[t,this.pretty]),s=this.write.apply(this,[e[t],this.pretty]),null!=i&&null!=s&&(n&&r.push(","),r.push(this.writeNewline(),this.writeIndent(),i,":",this.writeSpace(),s),n=!0));return this.level-=1,r.push(this.writeNewline(),this.writeIndent(),"}"),r.join("")},array:function(e){var t,i=["["];this.level+=1;for(var s=0,r=e.length;s<r;++s)null!=(t=this.write.apply(this,[e[s],this.pretty]))&&(s>0&&i.push(","),i.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,i.push(this.writeNewline(),this.writeIndent(),"]"),i.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,function(e,i){var s=t[i];return s||(s=i.charCodeAt(),"\\u00"+Math.floor(s/16).toString(16)+(s%16).toString(16))})+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}}}read(e,t){var i;if(this.nativeJSON)try{i=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=i),i}write(e,t){this.pretty=!!t;var i=null,s=typeof e;if(this.serialize[s])try{i=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[s].apply(this,[e])}catch(e){}return i}writeIndent(){var e=[];if(this.pretty)for(var t=0;t<this.level;++t)e.push(this.indent);return e.join("")}writeNewline(){return this.pretty?this.newline:""}writeSpace(){return this.pretty?this.space:""}}s.Format.JSON=ke;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Be{constructor(e,t,i){this.red=e||0==e?e:255,this.green=t||0,this.blue=i||0,this.CLASS_NAME="SuperMap.ServerColor"}destroy(){this.red=null,this.green=null,this.blue=null}static fromJson(e){if(e){var t=new Be,i=255;null!==e.red&&(i=Number(e.red)),t.red=i;var s=0;null!==e.green&&(s=Number(e.green)),t.green=s;var r=0;return null!==e.blue&&(r=Number(e.blue)),t.blue=r,t}}}s.ServerColor=Be;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ue{constructor(e){this.fillBackColor=new Be(255,255,255),this.fillBackOpaque=!1,this.fillForeColor=new Be(255,0,0),this.fillGradientMode=null,this.fillGradientAngle=0,this.fillGradientOffsetRatioX=0,this.fillGradientOffsetRatioY=0,this.fillOpaqueRate=100,this.fillSymbolID=0,this.lineColor=new Be(0,0,0),this.lineSymbolID=0,this.lineWidth=1,this.markerAngle=0,this.markerSize=1,this.markerSymbolID=-1,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerStyle"}destroy(){var e=this;e.fillBackColor&&(e.fillBackColor.destroy(),e.fillBackColor=null),e.fillBackOpaque=null,e.fillForeColor&&(e.fillForeColor.destroy(),e.fillForeColor=null),e.fillGradientMode=null,e.fillGradientAngle=null,e.fillGradientOffsetRatioX=null,e.fillGradientOffsetRatioY=null,e.fillOpaqueRate=null,e.fillSymbolID=null,e.lineColor&&(e.lineColor.destroy(),e.lineColor=null),e.lineSymbolID=null,e.lineWidth=null,e.markerAngle=null,e.markerSize=null,e.markerSymbolID=null}toServerJSONObject(){var e={};return e=ye.copyAttributes(e,this)}static fromJson(e){if(e)return new Ue({fillBackColor:Be.fromJson(e.fillBackColor),fillBackOpaque:e.fillBackOpaque,fillForeColor:Be.fromJson(e.fillForeColor),fillGradientMode:e.fillGradientMode,fillGradientAngle:e.fillGradientAngle,fillGradientOffsetRatioX:e.fillGradientOffsetRatioX,fillGradientOffsetRatioY:e.fillGradientOffsetRatioY,fillOpaqueRate:e.fillOpaqueRate,fillSymbolID:e.fillSymbolID,lineColor:Be.fromJson(e.lineColor),lineSymbolID:e.lineSymbolID,lineWidth:e.lineWidth,markerAngle:e.markerAngle,markerSize:e.markerSize,markerSymbolID:e.markerSymbolID})}}s.ServerStyle=Ue;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ge extends Ce{constructor(e){super(e),this.measure=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.PointWithMeasure"}equals(e){var t=!1;if(null!=e){var i=this.x===e.x&&this.y===e.y&&this.measure===e.measure,s=isNaN(this.x)&&isNaN(this.y)&&isNaN(this.measure),r=isNaN(e.x)&&isNaN(e.y)&&isNaN(e.measure);t=i||s&&r}return t}toJson(){var e="{";return null!=this.measure&&void 0!=this.measure&&(e+='"measure":'+this.measure+","),e+='"x":'+this.x+",",e+='"y":'+this.y,e+="}"}destroy(){this.measure=null,this.x=null,this.y=null}static fromJson(e){if(e)return new Ge({x:e.x,y:e.y,measure:e.measure})}}s.PointWithMeasure=Ge;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class je extends be{constructor(e,t){super(e,t),this.id=null,this.center=null,this.style=null,this.length=null,this.maxM=null,this.minM=null,this.parts=null,this.points=null,this.type=null,this.componentTypes=["SuperMap.Geometry.LinearRing","SuperMap.Geometry.LineString"],t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.Route",this.geometryType="LINEM"}toJson(){var e="{";if(null!=this.id&&void 0!=this.id&&(e+='"id":'+this.id+","),null!=this.center&&void 0!=this.center&&(e+='"center":'+this.center+","),null!=this.style&&void 0!=this.style&&(e+='"style":'+this.style+","),null!=this.length&&void 0!=this.length&&(e+='"length":'+this.length+","),null!=this.maxM&&void 0!=this.maxM&&(e+='"maxM":'+this.maxM+","),null!=this.minM&&void 0!=this.minM&&(e+='"minM":'+this.minM+","),null!=this.type&&void 0!=this.type&&(e+='"type":"'+this.type+'",'),null!=this.parts&&void 0!=this.parts){e+='"parts":['+this.parts[0];for(var t=1;t<this.parts.length;t++)e+=","+this.parts[t];e+="],"}if(null!=this.components&&this.components.length>0){e+='"points":[';for(var i=0,s=this.components.length;i<s;i++)for(var r=0,n=this.components[i].components.length;r<n;r++)e+=this.components[i].components[r].toJson()+",";e=e.replace(/,$/g,""),e+="]"}return e=e.replace(/,$/g,""),e+="}"}destroy(){var e=this;e.id=null,e.center=null,e.style=null,e.length=null,e.maxM=null,e.minM=null,e.type=null,e.parts=null,e.components.length=0,e.components=null,e.componentTypes=null}static fromJson(e){if(e){var t=e.parts||[],i=e.points||[],s=t.length,r=[];if(!(s>0))return null;for(var n=0,a=0,o=[];n<s;n++){for(var l=0;l<t[n];l++)o.push(Ge.fromJson(i[a+l]));a+=t[n],o[0].equals(o[t[n]-1])?r.push(new we(o)):r.push(new Te(o)),o=[]}return new je(r,{id:e.id,center:e.center,style:e.style,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type,parts:e.parts})}}}s.Route=je;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ze{constructor(e){this.id=0,this.style=null,this.parts=null,this.points=null,this.type=null,this.prjCoordSys=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerGeometry"}destroy(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}toGeometry(){var e=this;switch(e.type.toUpperCase()){case a.POINT:return e.toGeoPoint();case a.LINE:return e.toGeoLine();case a.LINEM:return e.toGeoLinem();case a.REGION:return e.toGeoRegion();case a.POINTEPS:return e.toGeoPoint();case a.LINEEPS:return e.toGeoLineEPS();case a.REGIONEPS:return e.toGeoRegionEPS()}}toGeoPoint(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i)return new Ce(t[0].x,t[0].y);var s=[];for(let e=0;e<i;e++)s.push(new Ce(t[e].x,t[e].y));return new _e(s)}return null}toGeoLine(){var e=this.parts||[],t=this.points||[],i=e.length;if(i>0){if(1===i){let i=[];for(let s=0;s<e[0];s++)i.push(new Ce(t[s].x,t[s].y));return i[0].equals(i[e[0]-1])?new we(i):new Te(i)}{let s=[];for(let r=0;r<i;r++){let i=[];for(let s=0;s<e[r];s++)i.push(new Ce(t[s].x,t[s].y));s.push(new Te(i)),t.splice(0,e[r])}return new Ee(s)}}return null}toGeoLineEPS(){var e,t,i,s,r,n=this.parts||[],a=this.points||[],o=n.length;if(o>0){if(1===o){for(e=0,i=[];e<n[0];e++)i.push(new Ce(a[e].x,a[e].y,a[e].type));return i[0].equals(i[n[0]-1])?(r=Te.createLineEPS(i),new we(r)):(r=Te.createLineEPS(i),new Te(r))}for(e=0,s=[];e<o;e++){for(t=0,i=[];t<n[e];t++)i.push(new Ce(a[t].x,a[t].y));r=Te.createLineEPS(i),s.push(new Te(r)),a.splice(0,n[e])}return new Ee(s)}return null}toGeoLinem(){return je.fromJson(this)}toGeoRegion(){var e=this.parts||[],t=this.partTopo||[],i=this.points||[],s=e.length;if(s<=0)return null;var r=[],n=[];if(1==s){for(let e=0;e<i.length;e++)n.push(new Ce(i[e].x,i[e].y));return r.push(new Le([new we(n)])),new Ae(r)}var a=[],o=[],l=[],h=[],u=[];for(let r=0,a=0;r<s;r++){for(let t=0;t<e[r];t++)n.push(new Ce(i[a+t].x,i[a+t].y));a+=e[r];var c=new Le([new we(n)]);n=[],l.push(c),0===t.length&&h.push(c.getBounds()),u.push(1),o.push(c.getArea())}if(ze.bubbleSort(o,l,t,h),0===t.length){var d=[];for(let e=1;e<l.length;e++)for(let t=e-1;t>=0;t--)if(d[e]=-1,h[t].containsBounds(h[e])){u[e]=-1*u[t],u[e]<0&&(d[e]=t);break}for(let e=0;e<l.length;e++)u[e]>0?r.push(l[e]):(r[d[e]].components=r[d[e]].components.concat(l[e].components),r.push(""))}else{r=new Array;for(let e=0;e<l.length;e++)if(t[e]&&-1==t[e]?a=a.concat(l[e].components):(a.length>0&&r.length>0&&(r[r.length-1].components=r[r.length-1].components.concat(a),a=[]),r.push(l[e])),e==s-1){var p=r.length;if(p)r[p-1].components=r[p-1].components.concat(a);else for(let e=0,t=a.length;e<t;e++)r.push(new Le(a))}}return new Ae(r)}toGeoRegionEPS(){var e=this.parts||[],t=this.partTopo||[],i=this.points||[],s=e.length;if(s<=0)return null;var r,n=[],a=[];if(1==s){for(var o=0;o<i.length;o++)a.push(new Ce(i[o].x,i[o].y));return r=Te.createLineEPS(a),n.push(new Le([new we(r)])),new Ae(n)}var l=[],h=[],u=[],c=[],d=[];for(let n=0,o=0;n<s;n++){for(let t=0;t<e[n];t++)a.push(new Ce(i[o+t].x,i[o+t].y));o+=e[n],r=Te.createLineEPS(a);var p=new Le([new we(r)]);a=[],u.push(p),0===t.length&&c.push(p.getBounds()),d.push(1),h.push(p.getArea())}if(ze.bubbleSort(h,u,t,c),0===t.length){var f=[];for(let e=1;e<u.length;e++)for(let t=e-1;t>=0;t--)if(f[e]=-1,c[t].containsBounds(c[e])){d[e]=-1*d[t],d[e]<0&&(f[e]=t);break}for(let e=0;e<u.length;e++)d[e]>0?n.push(u[e]):(n[f[e]].components=n[f[e]].components.concat(u[e].components),n.push(""))}else{n=new Array;for(let e=0;e<u.length;e++)if(t[e]&&-1==t[e]?l=l.concat(u[e].components):(l.length>0&&n.length>0&&(n[n.length-1].components=n[n.length-1].components.concat(l),l=[]),n.push(u[e])),e==s-1){var m=n.length;if(m)n[m-1].components=n[m-1].components.concat(l);else for(let e=0,t=l.length;e<t;e++)n.push(new Le(l))}}return new Ae(n)}static fromJson(e){if(e)return new ze({id:e.id,style:Ue.fromJson(e.style),parts:e.parts,partTopo:e.partTopo,points:e.points,center:e.center,length:e.length,maxM:e.maxM,minM:e.minM,type:e.type})}static fromGeometry(e){if(e){var t=0,i=[],s=[],r=null,n=e.components,o=e.CLASS_NAME,l={epsgCode:e.SRID};if(isNaN(e.id)||(t=e.id),"SuperMap.Geometry.LinearRing"!=o&&"SuperMap.Geometry.LineString"!=o&&(e instanceof _e||e instanceof Ee)){let e=n.length;for(let t=0;t<e;t++){let e=n[t].getVertices().length;i.push(e);for(let i=0;i<e;i++)s.push(new Ce(n[t].getVertices()[i].x,n[t].getVertices()[i].y))}r="SuperMap.Geometry.MultiPoint"==o?a.POINT:a.LINE}else if(e instanceof Ae){let e=n.length;for(let t=0;t<e;t++){let e=n[t].components,r=e.length;for(let t=0;t<r;t++){let r=e[t].getVertices().length+1;i.push(r);for(let i=0;i<r-1;i++)s.push(new Ce(e[t].getVertices()[i].x,e[t].getVertices()[i].y));s.push(new Ce(e[t].getVertices()[0].x,e[t].getVertices()[0].y))}}r=a.REGION}else if(e instanceof Le){let e=n.length;for(let t=0;t<e;t++){let e=n[t].getVertices().length+1;i.push(e);for(let i=0;i<e-1;i++)s.push(new Ce(n[t].getVertices()[i].x,n[t].getVertices()[i].y));s.push(new Ce(n[t].getVertices()[0].x,n[t].getVertices()[0].y))}r=a.REGION}else{let t=e.getVertices().length;for(let i=0;i<t;i++)s.push(new Ce(e.getVertices()[i].x,e.getVertices()[i].y));e instanceof we&&(s.push(new Ce(e.getVertices()[0].x,e.getVertices()[0].y)),t++),i.push(t),r=e instanceof Ce?a.POINT:a.LINE}return new ze({id:t,style:null,parts:i,points:s,type:r,prjCoordSys:l})}}static IsClockWise(e){var t=e.length;if(t<3)return 0;var i=e[0].y*(e[t-1].x-e[1].x);e.push(e[0]);for(var s=1;s<t;s++)i+=e[s].y*(e[s-1].x-e[s+1].x);return.5*i}static bubbleSort(e,t,i,s){for(var r=0;r<e.length;r++)for(var n=0;n<e.length;n++)if(e[r]>e[n]){var a=e[n];e[n]=e[r],e[r]=a;var o=t[n];if(t[n]=t[r],t[r]=o,i&&i.length>0){var l=i[n];i[n]=i[r],i[r]=l}if(s&&s.length>0){var h=s[n];s[n]=s[r],s[r]=h}}}}s.ServerGeometry=ze;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ve extends ke{constructor(e){super(e),this.ignoreExtraDims=!0,this.CLASS_NAME="SuperMap.Format.GeoJSON",this.parseCoords={point:function(e){if(!1===this.ignoreExtraDims&&2!=e.length)throw"Only 2D points are supported: "+e;return new Ce(e[0],e[1])},multipoint:function(e){for(var t=[],i=null,s=0,r=e.length;s<r;++s){try{i=this.parseCoords.point.apply(this,[e[s]])}catch(e){throw e}t.push(i)}return new _e(t)},linestring:function(e){for(var t=[],i=null,s=0,r=e.length;s<r;++s){try{i=this.parseCoords.point.apply(this,[e[s]])}catch(e){throw e}t.push(i)}return new Te(t)},multilinestring:function(e){for(var t=[],i=null,s=0,r=e.length;s<r;++s){try{i=this.parseCoords.linestring.apply(this,[e[s]])}catch(e){throw e}t.push(i)}return new Ee(t)},polygon:function(e){for(var t,i,s=[],r=0,n=e.length;r<n;++r){try{i=this.parseCoords.linestring.apply(this,[e[r]])}catch(e){throw e}t=new we(i.components),s.push(t)}return new Le(s)},multipolygon:function(e){for(var t=[],i=null,s=0,r=e.length;s<r;++s){try{i=this.parseCoords.polygon.apply(this,[e[s]])}catch(e){throw e}t.push(i)}return new Ae(t)},box:function(e){if(2!=e.length)throw"GeoJSON box coordinates must have 2 elements";return new Le([new we([new Ce(e[0][0],e[0][1]),new Ce(e[1][0],e[0][1]),new Ce(e[1][0],e[1][1]),new Ce(e[0][0],e[1][1]),new Ce(e[0][0],e[0][1])])])}},this.extract={feature:function(e){var t=this.extract.geometry.apply(this,[e.geometry]),i={type:"Feature",properties:this.createAttributes(e),geometry:t};return e.geometry&&"TEXT"===e.geometry.type&&(i.properties.texts=e.geometry.texts,i.properties.textStyle=e.geometry.textStyle),e.fid&&(i.id=e.fid),e.ID&&(i.id=e.ID),i},geometry:function(e){if(null==e)return null;!e.parts&&e.points&&(e.parts=[e.points.length]);var t,i=new ze(e).toGeometry()||e,s=i.geometryType||i.type;return"LinearRing"===s&&(s="LineString"),"LINEM"===s&&(s="MultiLineString"),t=this.extract[s.toLowerCase()].apply(this,[i]),"Collection"===(s="TEXT"===s?"Point":s)?{type:"GeometryCollection",geometries:t}:{type:s,coordinates:t}},point:function(e){var t=[e.x,e.y];for(var i in e)"x"===i||"y"===i||null===e[i]||isNaN(e[i])||t.push(e[i]);return t},text:function(e){return[e.points[0].x,e.points[0].y]},multipoint:function(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},linestring:function(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t},multilinestring:function(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},polygon:function(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push(this.extract.linestring.apply(this,[e.components[i]]));return t},multipolygon:function(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push(this.extract.polygon.apply(this,[e.components[i]]));return t},collection:function(e){for(var t=e.components.length,i=new Array(t),s=0;s<t;++s)i[s]=this.extract.geometry.apply(this,[e.components[s]]);return i}}}read(e,t,i){t=t||"FeatureCollection";var s=null,r=null;if(r="string"==typeof e?super.read(e,i):e){if("string"!=typeof r.type);else if(this.isValidType(r,t))switch(t){case"Geometry":try{s=this.parseGeometry(r)}catch(e){}break;case"Feature":try{(s=this.parseFeature(r)).type="Feature"}catch(e){}break;case"FeatureCollection":switch(s=[],r.type){case"Feature":try{s.push(this.parseFeature(r))}catch(e){s=null}break;case"FeatureCollection":for(var n=0,a=r.features.length;n<a;++n)try{s.push(this.parseFeature(r.features[n]))}catch(e){s=null}break;default:try{var o=this.parseGeometry(r);s.push(new Re(o))}catch(e){s=null}}}}else;return s}write(e,t){return super.write(this.toGeoJSON(e),t)}fromGeoJSON(e,t,i){let s=this.read(e,t,i);return ye.isArray(s)?s.map(e=>this._toiSevrerFeature(e)):this._toiSevrerFeature(s)}toGeoJSON(e){var t={type:null};if(ye.isArray(e)){t.type="FeatureCollection";var i=e.length;t.features=new Array(i);for(var s=0;s<i;++s){var r=e[s];if(n(r)){let e={};e.geometry=r,t.features[s]=this.extract.feature.apply(this,[e])}else t.features[s]=this.extract.feature.apply(this,[r])}}else if(n(e)){let i={};i.geometry=e,t=this.extract.feature.apply(this,[i])}else t=this.extract.feature.apply(this,[e]);function n(e){return e.hasOwnProperty("parts")&&e.hasOwnProperty("points")}return t}isValidType(e,t){var i=!1;switch(t){case"Geometry":-1==ye.indexOf(["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon","Box","GeometryCollection"],e.type)||(i=!0);break;case"FeatureCollection":i=!0;break;default:e.type==t&&(i=!0)}return i}parseFeature(e){var t,i,s,r;s=e.properties?e.properties:{},r=e.geometry&&e.geometry.bbox||e.bbox;try{i=this.parseGeometry(e.geometry)}catch(e){throw e}return t=new Re(i,s),r&&(t.bounds=ve.fromArray(r)),e.id&&(t.fid=e.id),t}parseGeometry(e){if(null==e)return null;var t;if("GeometryCollection"==e.type){if(!ye.isArray(e.geometries))throw"GeometryCollection must have geometries array: "+e;for(var i=e.geometries.length,s=new Array(i),r=0;r<i;++r)s[r]=this.parseGeometry.apply(this,[e.geometries[r]]);t=new be(s)}else{if(!ye.isArray(e.coordinates))throw"Geometry must have coordinates array: "+e;if(!this.parseCoords[e.type.toLowerCase()])throw"Unsupported geometry type: "+e.type;try{t=this.parseCoords[e.type.toLowerCase()].apply(this,[e.coordinates])}catch(e){throw e}}return t}createCRSObject(e){var t=e.layer.projection.toString(),i={};if(t.match(/epsg:/i)){var s=parseInt(t.substring(t.indexOf(":")+1));i=4326==s?{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}}:{type:"name",properties:{name:"EPSG:"+s}}}return i}_toiSevrerFeature(e){const t=e.attributes,i=[],s=[];for(var r in t)i.push(r),s.push(t[r]);const n={fieldNames:i,fieldValues:s,geometry:ze.fromGeometry(e.geometry)};return n.geometry.id=e.fid,n}createAttributes(e){if(!e)return null;var t={};!function(e,t){if(!e.hasOwnProperty("fieldNames")||!e.hasOwnProperty("fieldValues"))return;var i=e.fieldNames,s=e.fieldValues;for(var r in i)t[i[r]]=s[r]}(e,t);var i=["fieldNames","fieldValues","geometry","stringID","ID"];for(var s in e)i.indexOf(s)>-1||(t[s]=e[s]);return t}}s.Format.GeoJSON=Ve;s.Format.WKT=
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class extends De{constructor(e){super(e),this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},this.CLASS_NAME="SuperMap.Format.WKT",this.extract={point:function(e){return e.x+" "+e.y},multipoint(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push("("+this.extract.point.apply(this,[e.components[i]])+")");return t.join(",")},linestring(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push(this.extract.point.apply(this,[e.components[i]]));return t.join(",")},multilinestring(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push("("+this.extract.linestring.apply(this,[e.components[i]])+")");return t.join(",")},polygon(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push("("+this.extract.linestring.apply(this,[e.components[i]])+")");return t.join(",")},multipolygon(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push("("+this.extract.polygon.apply(this,[e.components[i]])+")");return t.join(",")},collection(e){for(var t=[],i=0,s=e.components.length;i<s;++i)t.push(this.extractGeometry.apply(this,[e.components[i]]));return t.join(",")}},this.parse={point:function(e){var t=ue.trim(e).split(this.regExes.spaces);return new Re(new Ce(t[0],t[1]))},multipoint:function(e){for(var t,i=ue.trim(e).split(","),s=[],r=0,n=i.length;r<n;++r)t=i[r].replace(this.regExes.trimParens,"$1"),s.push(this.parse.point.apply(this,[t]).geometry);return new Re(new _e(s))},linestring:function(e){for(var t=ue.trim(e).split(","),i=[],s=0,r=t.length;s<r;++s)i.push(this.parse.point.apply(this,[t[s]]).geometry);return new Re(new Te(i))},multilinestring:function(e){for(var t,i=ue.trim(e).split(this.regExes.parenComma),s=[],r=0,n=i.length;r<n;++r)t=i[r].replace(this.regExes.trimParens,"$1"),s.push(this.parse.linestring.apply(this,[t]).geometry);return new Re(new Ee(s))},polygon:function(e){for(var t,i,s,r=ue.trim(e).split(this.regExes.parenComma),n=[],a=0,o=r.length;a<o;++a)t=r[a].replace(this.regExes.trimParens,"$1"),i=this.parse.linestring.apply(this,[t]).geometry,s=new we(i.components),n.push(s);return new Re(new Le(n))},multipolygon:function(e){for(var t,i=ue.trim(e).split(this.regExes.doubleParenComma),s=[],r=0,n=i.length;r<n;++r)t=i[r].replace(this.regExes.trimParens,"$1"),s.push(this.parse.polygon.apply(this,[t]).geometry);return new Re(new Ae(s))},geometrycollection:function(e){e=e.replace(/,\s*([A-Za-z])/g,"|$1");for(var t=ue.trim(e).split("|"),i=[],s=0,r=t.length;s<r;++s)i.push(this.read(t[s]));return i}}}read(e){var t,i,s;e=e.replace(/[\n\r]/g," ");var r=this.regExes.typeStr.exec(e);return r&&(i=r[1].toLowerCase(),s=r[2],this.parse[i]&&(t=this.parse[i].apply(this,[s]))),t}write(e){var t,i,s;e.constructor===Array?(t=e,s=!0):(t=[e],s=!1);var r=[];s&&r.push("GEOMETRYCOLLECTION(");for(var n=0,a=t.length;n<a;++n)s&&n>0&&r.push(","),i=t[n].geometry,r.push(this.extractGeometry(i));return s&&r.push(")"),r.join("")}extractGeometry(e){var t=e.CLASS_NAME.split(".")[2].toLowerCase();return this.extract[t]?("collection"===t?"GEOMETRYCOLLECTION":t.toUpperCase())+"("+this.extract[t].apply(this,[e])+")":null}};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class He{constructor(e){var t=this;e=e||{},this.speed=e.speed&&e.speed>=0?e.speed:1,this.frequency=e.speed&&e.frequency>=0?e.frequency:1e3,this.startTime=e.startTime&&null!=e.startTime?e.startTime:0,this.endTime=e.endTime&&null!=e.endTime&&e.endTime>=t.startTime?e.endTime:+new Date,this.repeat=void 0===e.repeat||e.repeat,this.reverse=void 0!==e.reverse&&e.reverse,this.currentTime=null,this.oldTime=null,this.running=!1,this.EVENT_TYPES=["start","pause","stop"],t.events=new Ie(this,null,this.EVENT_TYPES),t.speed=Number(t.speed),t.frequency=Number(t.frequency),t.startTime=Number(t.startTime),t.endTime=Number(t.endTime),t.startTime=Date.parse(new Date(t.startTime)),t.endTime=Date.parse(new Date(t.endTime)),t.currentTime=t.startTime,this.CLASS_NAME="SuperMap.TimeControlBase"}updateOptions(e){var t=this;(e=e||{}).speed&&e.speed>=0&&(t.speed=e.speed,t.speed=Number(t.speed)),e.speed&&e.frequency>=0&&(t.frequency=e.frequency,t.frequency=Number(t.frequency)),e.startTime&&null!=e.startTime&&(t.startTime=e.startTime,t.startTime=Date.parse(new Date(t.startTime))),e.endTime&&null!=e.endTime&&e.endTime>=t.startTime&&(t.endTime=e.endTime,t.endTime=Date.parse(new Date(t.endTime))),null!=e.repeat&&(t.repeat=e.repeat),null!=e.reverse&&(t.reverse=e.reverse)}start(){var e=this;e.running||(e.running=!0,e.tick(),e.events.triggerEvent("start",e.currentTime))}pause(){this.running=!1,this.events.triggerEvent("pause",this.currentTime)}stop(){var e=this;e.currentTime=e.startTime,e.running&&(e.running=!1),e.events.triggerEvent("stop",e.currentTime)}toggle(){this.running?this.pause():this.start()}setSpeed(e){return e>=0&&(this.speed=e,!0)}getSpeed(){return this.speed}setFrequency(e){return e>=0&&(this.frequency=e,!0)}getFrequency(){return this.frequency}setStartTime(e){var t=this;return!((e=Date.parse(new Date(e)))>t.endTime)&&(t.startTime=e,t.currentTime<t.startTime&&(t.currentTime=t.startTime,t.tick()),!0)}getStartTime(){return this.startTime}setEndTime(e){var t=this;return t.endTime=Date.parse(new Date(t.endTime)),!(e<t.startTime)&&(t.endTime=e,t.currentTime>=t.endTime&&(t.currentTime=t.startTime,t.tick()),!0)}getEndTime(){return this.endTime}setCurrentTime(e){var t=this;return t.currentTime=Date.parse(new Date(t.currentTime)),e>=t.startTime&&e<=t.endTime&&(t.currentTime=e,t.startTime=t.currentTime,t.tick(),!0)}getCurrentTime(){return this.currentTime}setRepeat(e){this.repeat=e}getRepeat(){return this.repeat}setReverse(e){this.reverse=e}getReverse(){return this.reverse}getRunning(){return this.running}destroy(){var e=this;e.speed=null,e.frequency=null,e.startTime=null,e.endTime=null,e.currentTime=null,e.repeat=null,e.running=!1,e.reverse=null}tick(){}}s.TimeControlBase=He;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Je extends He{constructor(e,t){super(t);var i=this;i.callback=e,Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),i=this,s=function(){},r=function(){return i.apply(this instanceof s&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return s.prototype=this.prototype,r.prototype=new s,r}),i.update=i.update.bind(i),i.oldTime=i.currentTime,i.CLASS_NAME="SuperMap.TimeFlowControl"}updateOptions(e){e=e||{},super.updateOptions(e)}start(){var e=this;e.running||(e.running=!0,e.reverse?e.currentTime===e.startTime&&(e.oldTime=e.endTime,e.currentTime=e.oldTime):e.oldTime===e.endTime&&(e.currentTime=e.startTime,e.oldTime=e.currentTime),e.tick())}stop(){super.stop();var e=this;e.oldTime=e.currentTime,e.running&&(e.running=!1),e.intervalId&&window.clearTimeout(e.intervalId)}destroy(){super.destroy();this.oldTime=null,this.callback=null}tick(){var e=this;e.intervalId&&window.clearInterval(e.intervalId),e.intervalId=null,e.update(),e.intervalId=window.setInterval(e.update,e.frequency)}update(){var e=this;if(e.running)if(e.callback&&e.callback(e.currentTime),e.reverse){if(e.currentTime===e.startTime){if(!e.repeat)return e.running=!1,null;e.oldTime=e.endTime,e.currentTime=e.oldTime}else e.currentTime=e.oldTime,e.oldTime-=e.speed;e.oldTime<=e.startTime&&(e.oldTime=e.startTime)}else{if(e.currentTime===e.endTime){if(!e.repeat)return e.running=!1,e.stop(),null;e.stop(),e.currentTime=e.startTime,e.oldTime=e.currentTime,e.start()}else e.oldTime=e.currentTime,e.currentTime+=e.speed;e.currentTime>=e.endTime&&(e.currentTime=e.endTime)}}}s.TimeFlowControl=Je;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
i(15),i(19);var qe=i(4),We=i.n(qe);
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
let Ye=window.fetch;s.setCORS=function(e){s.CORS=e};var Qe=s.isCORS=function(){return void 0!=s.CORS?s.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},Xe=(s.setRequestTimeout=function(e){return s.RequestTimeout=e},s.getRequestTimeout=function(){return s.RequestTimeout||45e3}),Ke=s.FetchRequest={commit:function(e,t,i,s){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,i,s);case"POST":return this.post(t,i,s);case"PUT":return this.put(t,i,s);case"DELETE":return this.delete(t,i,s);default:return this.get(t,i,s)}},supportDirectRequest:function(e,t){return!!ye.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:Qe()||t.proxy)},get:function(e,t,i){i=i||{};if(e=ye.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){var r={url:e=e.replace(".json",".jsonp"),data:t};return s.Util.RequestJSONPPromise.GET(r)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,"GET")},delete:function(e,t,i){i=i||{};if(e=ye.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=DELETE",data:t};return s.Util.RequestJSONPPromise.DELETE(r)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")-1),t,i):this._fetch(e,t,i,"DELETE")},post:function(e,t,i){if(i=i||{},!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=POST",data:t};return s.Util.RequestJSONPPromise.POST(r)}return this._fetch(this._processUrl(e,i),t,i,"POST")},put:function(e,t,i){if(i=i||{},e=this._processUrl(e,i),!this.supportDirectRequest(e,i)){e=e.replace(".json",".jsonp");var r={url:e+="&_method=PUT",data:t};return s.Util.RequestJSONPPromise.PUT(r)}return this._fetch(e,t,i,"PUT")},urlIsLong:function(e){for(var t=0,i=null,s=0,r=e.length;s<r;s++)(i=e.charCodeAt(s))<127?t++:128<=i&&i<=2047?t+=2:2048<=i&&i<=65535&&(t+=3);return!(t<2e3)},_postSimulatie:function(e,t,i,s){return t+=(t.indexOf("?")>-1?"&":"?")+"_method="+e,"string"!=typeof i&&(i=JSON.stringify(i)),this.post(t,i,s)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var i=e.split("?");2===i.length&&(e=i[0]+".json?"+i[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,i,s){return(i=i||{}).headers=i.headers||{},i.headers["Content-Type"]||(i.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),i.timeout?this._timeout(i.timeout,Ye(e,{method:s,headers:i.headers,body:"PUT"===s||"POST"===s?t:void 0,credentials:this._getWithCredentials(i),mode:"cors",timeout:Xe()}).then(function(e){return e})):Ye(e,{method:s,body:"PUT"===s||"POST"===s?t:void 0,headers:i.headers,credentials:this._getWithCredentials(i),mode:"cors",timeout:Xe()}).then(function(e){return e})},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},We()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(i,s){setTimeout(function(){s(new Error("timeout"))},e),t.then(i,s)})},_getParameterString:function(e){var t=[];for(var i in e){var s,r=e[i];if(null!=r&&"function"!=typeof r)s=Array.isArray(r)||"[object Object]"===r.toString()?encodeURIComponent(JSON.stringify(r)):encodeURIComponent(r),t.push(encodeURIComponent(i)+"="+s)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};s.Util.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=s.Util.toJSON(e[t]));var i=encodeURIComponent(e[t]);this.queryValues.push(i)}},issue:function(e){for(var t=this,i=t.getUid(),s=e.url,r=[],n=new Promise(function(e){t.supermap_callbacks[i]=function(s){delete t.supermap_callbacks[i],e(s)}}),a=s,o=0,l=t.queryKeys?t.queryKeys.length:0,h=0;h<l;h++)if(a.length+t.queryKeys[h].length+2>=t.limitLength){if(0==o)return!1;r.push(a),a=s,o=0,h--}else if(a.length+t.queryKeys[h].length+2+t.queryValues[h].length>t.limitLength)for(var u=t.queryValues[h];u.length>0;){var c=t.limitLength-a.length-t.queryKeys[h].length-2;a.indexOf("?")>-1?a+="&":a+="?";var d=u.substring(0,c);"%"===d.substring(c-1,c)?(c-=1,d=u.substring(0,c)):"%"===d.substring(c-2,c-1)&&(c-=2,d=u.substring(0,c)),a+=t.queryKeys[h]+"="+d,u=u.substring(c),d.length>0&&(r.push(a),a=s,o=0)}else o++,a.indexOf("?")>-1?a+="&":a+="?",a+=t.queryKeys[h]+"="+t.queryValues[h];return r.push(a),t.send(r,"SuperMap.Util.RequestJSONPPromise.supermap_callbacks["+i+"]",e&&e.proxy),n},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,i){var s=e.length;if(s>0)for(var r=(new Date).getTime(),n=0;n<s;n++){var a=e[n];a.indexOf("?")>-1?a+="&":a+="?",a+="sectionCount="+s,a+="§ionIndex="+n,a+="&jsonpUserID="+r,i&&(a=decodeURIComponent(a),a=i+encodeURIComponent(a)),We()(a,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings(e.params),this.issue(e)},POST:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},PUT:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},DELETE:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)}};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ze{static generateToken(e,t){var i=this.servers[e];if(i)return Ke.post(i.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}static registerServers(e){this.servers=this.servers||{},ye.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++){var i=e[t];this.servers[i.server]=i}}static registerToken(e,t){if(this.tokens=this.tokens||{},e&&t){var i=this._getTokenStorageKey(e);this.tokens[i]=t}}static registerKey(e,t){if(this.keys=this.keys||{},e&&!(e.length<1)&&t){e=ye.isArray(e)?e:[e];for(var i=0;i<e.length;i++){var s=this._getUrlRestString(e[0])||e[0];this.keys[s]=t}}}static getServerInfo(e){return this.servers=this.servers||{},this.servers[e]}static getToken(e){if(e){this.tokens=this.tokens||{};var t=this._getTokenStorageKey(e);return this.tokens[t]}}static getKey(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;return this.keys[t]}static loginiServer(e,t,i,s){e=ye.urlPathAppend(e,"services/security/login");var r={username:t&&t.toString(),password:i&&i.toString(),rememberme:s};r=JSON.stringify(r);return Ke.post(e,r,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(e){return e.json()})}static logoutiServer(e){e=ye.urlPathAppend(e,"services/security/logout");return Ke.get(e,"",{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withoutFormatSuffix:!0}).then(function(){return!0}).catch(function(){return!1})}static loginOnline(e,t){var i=Ze.SSO+"/login?service="+e;this._open(i,t)}static loginiPortal(e,t,i){e=ye.urlPathAppend(e,"web/login");var s={username:t&&t.toString(),password:i&&i.toString()};s=JSON.stringify(s);return Ke.post(e,s,{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0}).then(function(e){return e.json()})}static logoutiPortal(e){e=ye.urlPathAppend(e,"services/security/logout");return Ke.get(e,"",{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},withCredentials:!0,withoutFormatSuffix:!0}).then(function(){return!0}).catch(function(){return!1})}static loginManager(e,t,i){if(ye.isInTheSameDomain(e)){var s=ye.urlPathAppend(e,"icloud/security/tokens"),r=t||{},n={username:r.userName&&r.userName.toString(),password:r.password&&r.password.toString()};n=JSON.stringify(n);var a=this;return Ke.post(s,n,{headers:{Accept:"*/*","Content-Type":"application/json"}}).then(function(e){e.text().then(function(e){return a.imanagerToken=e,e})})}var o=!i||i.isNewTab;this._open(e,o)}static destroyAllCredentials(){this.keys=null,this.tokens=null,this.servers=null}static destroyToken(e){if(e){var t=this._getTokenStorageKey(e);this.tokens=this.tokens||{},this.tokens[t]&&delete this.tokens[t]}}static destroyKey(e){if(e){this.keys=this.keys||{};var t=this._getUrlRestString(e)||e;this.keys[t]&&delete this.keys[t]}}static _open(e,t){t=null==t||t;var i=window.screen.availWidth/2-this.INNER_WINDOW_WIDTH/2,s=window.screen.availHeight/2-this.INNER_WINDOW_HEIGHT/2,r="height="+this.INNER_WINDOW_HEIGHT+", width="+this.INNER_WINDOW_WIDTH+",top="+s+", left="+i+",toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no";t?window.open(e,"login"):window.open(e,"login",r)}static _getTokenStorageKey(e){var t=e.match(/(.*?):\/\/([^\/]+)/i);return t?t[0]:e}static _getUrlRestString(e){if(!e)return e;var t=e.match(/(http|https):\/\/(.*\/rest)/i);return t?t[0]:e}}Ze.INNER_WINDOW_WIDTH=600,Ze.INNER_WINDOW_HEIGHT=600,Ze.SSO="https://sso.supermap.com",Ze.ONLINE="https://www.supermapol.com",s.SecurityManager=Ze;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class $e{constructor(e,t){if(e){var i=e.substr(e.length-1,1);this.serviceUrl="/"===i?e.substr(0,e.length-2):e}this.options=t||{},this.CLASS_NAME="SuperMap.iManagerServiceBase"}request(e,t,i,s){(s=s||{headers:{Accept:"*/*","Content-Type":"application/json"}}).hasOwnProperty("withCredentials")||(s.withCredentials=!0),s.crossOrigin=this.options.crossOrigin,s.headers=this.options.headers;var r=Ze.imanagerToken;return r&&(s.headers||(s.headers=[]),s.headers["X-Auth-Token"]=r),i&&(i=JSON.stringify(i)),Ke.commit(e,t,i,s).then(function(e){return e.json()})}}s.iManagerServiceBase=$e;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class et{constructor(e){e=e||{},this.nodeSpec="SMALL",this.nodeCount=1,this.nodeName="",this.password="",this.description="",this.physicalMachineName="",this.ips=[],this.userName="",ye.extend(this,e)}}s.iManagerCreateNodeParam=et;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class tt extends $e{constructor(e){super(e)}load(){return this.request("GET",this.serviceUrl+"/web/api/service.json")}createIServer(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/server.json",new et(e))}createIPortal(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/portal.json",new et(e))}iServerList(){return this.request("GET",this.serviceUrl+"/icloud/web/nodes/server.json")}iPortalList(){return this.request("GET",this.serviceUrl+"/icloud/web/nodes/portal.json")}startNodes(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/started.json",e)}stopNodes(e){return this.request("POST",this.serviceUrl+"/icloud/web/nodes/stopped.json",e)}}s.iManager=tt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class it{constructor(e,t){t=t||{},this.serviceUrl=e,this.serverType=n.iPortal,this.CLASS_NAME="SuperMap.iPortalServiceBase",this.withCredentials=t.withCredentials||!1,this.crossOrigin=t.crossOrigin,this.headers=t.headers}request(e,t,i,s={headers:this.headers,crossOrigin:this.crossOrigin,withCredentials:this.withCredentials}){return t=this.createCredentialUrl(t),Ke.commit(e,t,i,s).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,i=this.getCredential();if(i){var s=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===s?t+=i.getUrlParameters():t.indexOf("?")>-1&&"?"!==s?t+="&"+i.getUrlParameters():t+="?"+i.getUrlParameters()}return t}getCredential(){var e,t=Ze.getToken(this.serviceUrl);return(e=t?new Ne(t,"token"):null)||(e=(t=this.getKey())?new Ne(t,"key"):null),e}getKey(){}}s.iPortalServiceBase=it;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class st{constructor(e){e=e||{},this.resourceType="",this.pageSize=12,this.currentPage=1,this.orderBy="UPDATETIME",this.orderType="DESC",this.searchType="PUBLIC",this.tags=[],this.dirIds=[],this.resourceSubTypes=[],this.aggregationTypes=[],this.text="",this.groupIds=[],this.departmentIds=[],ye.extend(this,e)}}s.iPortalQueryParam=st;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class rt{constructor(e){e=e||{},this.content=[],this.total=0,this.currentPage=1,this.pageSize=12,this.aggregations=null,ye.extend(this,e)}}s.iPortalQueryResult=rt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class nt extends it{constructor(e,t){super(e),t=t||{},this.authorizeSetting=[],this.bounds="",this.bounds4326="",this.checkStatus="",this.createTime=0,this.description=null,this.dirId=null,this.epsgCode=0,this.heatLevel=0,this.id=0,this.name="",this.personalDirId=null,this.resourceId=0,this.resourceSubType=null,this.resourceType=null,this.serviceRootUrlId=null,this.tags=null,this.thumbnail=null,this.updateTime=0,this.userName="",this.sourceJSON={},ye.extend(this,t),this.resourceUrl=e+"/web/"+this.resourceType.replace("_","").toLowerCase()+"s/"+this.resourceId,this.withCredentials&&(this.resourceUrl=e+"/web/mycontent/"+this.resourceType.replace("_","").toLowerCase()+"s/"+this.resourceId)}load(){var e=this;return e.request("GET",e.resourceUrl+".json").then(function(t){if(t.error)return t;e.sourceJSON=t})}update(){var e=this.resourceType.replace("_","").toLowerCase();"data"===e&&(this.resourceUrl=this.resourceUrl+"/attributes.json");var t=JSON.stringify(this.sourceJSON);if("service"===e){var i={authorizeSetting:this.sourceJSON.authorizeSetting,metadata:this.sourceJSON.metadata,tags:this.sourceJSON.tags,thumbnail:this.sourceJSON.thumbnail,tokenRefreshUrl:this.sourceJSON.tokenRefreshUrl};t=JSON.stringify(i)}return this.request("PUT",this.resourceUrl,t,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}}s.iPortalResource=nt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class at{constructor(e){e=e||{},this.ids=[],this.entities=[],this.resourceType="",ye.extend(this,e)}}s.iPortalShareParam=at;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ot extends it{constructor(e,t){super(e,t),this.iportalUrl=e,t=t||{},this.withCredentials=t.withCredentials||!1}load(){return Ke.get(this.iportalUrl+"/web")}queryResources(e){if(!(e instanceof st))return new Promise(function(e){e("queryParams is not instanceof iPortalQueryParam !")});var t=this,i=this.iportalUrl+"/gateway/catalog/resource/search.json";return e.t=(new Date).getTime(),this.request("GET",i,e).then(function(e){var i=[];e.content.forEach(function(e){i.push(new nt(t.iportalUrl,e))});let s=new rt;return s.content=i,s.total=e.total,s.currentPage=e.currentPage,s.pageSize=e.pageSize,s.aggregations=e.aggregations,s})}updateResourcesShareSetting(e){if(!(e instanceof at))return new Promise(function(e){e("shareParams is not instanceof iPortalShareParam !")});var t=e.resourceType.replace("_","").toLowerCase()+"s";"datas"===t&&(t="mycontent/"+t);var i={ids:e.ids,entities:e.entities},s=this.iportalUrl+"/web/"+t+"/sharesetting.json";return this.request("PUT",s,JSON.stringify(i)).then(function(e){return e})}}s.iPortal=ot;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class lt{constructor(e){e=e||{},this.permissionType="",this.entityType="",this.entityName="GUEST",this.entityId=null,ye.extend(this,e)}}s.iPortalShareEntity=lt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ht{constructor(e){e=e||{},this.rootUrl="",this.tags=[],this.entities=[],ye.extend(this,e)}}s.iPortalAddResourceParam=ht;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ut{constructor(e){e=e||{},this.type="",this.tags=[],this.entities=[],this.metadata={},this.addedMapNames=[],this.addedSceneNames=[],ye.extend(this,e)}}s.iPortalRegisterServiceParam=ut;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ct{constructor(e){e=e||{},this.fileName="",this.type="",this.tags=[],this.dataMetaInfo={},ye.extend(this,e)}}s.iPortalAddDataParam=ct;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class dt{constructor(e){e=e||{},this.xField="",this.yField="",this.fileEncoding="UTF-8",this.xIndex=1,this.yIndex=1,this.fieldTypes=[],this.separator="",this.firstRowIsHead=!0,this.url="",this.dataStoreInfo={},ye.extend(this,e)}}s.iPortalDataMetaInfoParam=dt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class pt{constructor(e){e=e||{},this.type="",this.url="",this.connectionInfo={},ye.extend(this,e)}}s.iPortalDataStoreInfoParam=pt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ft{constructor(e){e=e||{},this.dataBase="",this.server="",ye.extend(this,e)}}s.iPortalDataConnectionInfoParam=ft;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class mt extends it{constructor(e){super(e),this.iportalUrl=e}deleteResources(e){var t=e.resourceType.replace("_","").toLowerCase(),i=this.iportalUrl+"/web/"+t+"s.json?ids="+encodeURI(JSON.stringify(e.ids));return"data"===t?(i=this.iportalUrl+"/web/mycontent/datas/delete.json",this.request("POST",i,JSON.stringify(e.ids))):this.request("DELETE",i)}addMap(e){e instanceof ht||this.getErrMsgPromise("addMapParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},i=this.iportalUrl+"/web/maps/batchaddmaps.json";return this.request("POST",i,JSON.stringify(t)).then(function(e){return e})}addScene(e){e instanceof ht||this.getErrMsgPromise("addSceneParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},i=this.iportalUrl+"/web/scenes/batchaddscenes.json";return this.request("POST",i,JSON.stringify(t)).then(function(e){return e})}registerService(e){e instanceof ut||this.getErrMsgPromise("registerParams is not instanceof IPortalRegisterServiceParam !");let t={type:e.type,tags:e.tags,authorizeSetting:e.entities,metadata:e.metadata,addedMapNames:e.addedMapNames,addedSceneNames:e.addedSceneNames},i=this.iportalUrl+"/web/services.json";return this.request("POST",i,JSON.stringify(t)).then(e=>e)}getErrMsgPromise(e){return new Promise(t=>{t(e)})}uploadDataRequest(e,t){var i=this.iportalUrl+"/web/mycontent/datas/"+e+"/upload.json";return this.request("POST",i,t)}addData(e,t){e instanceof ct||this.getErrMsgPromise("params is not instanceof iPortalAddDataParam !");var i,s=this.iportalUrl+"/web/mycontent/datas.json",r={fileName:e.fileName,tags:e.tags,type:e.type},n=e.type.toLowerCase();if("excel"===n||"csv"===n)e.dataMetaInfo instanceof dt||this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !"),i={xField:e.dataMetaInfo.xField,yField:e.dataMetaInfo.yField},"csv"===n&&(i.fileEncoding=e.dataMetaInfo.fileEncoding),r.coordType="WGS84",r.dataMetaInfo=i;else if("hdfs"===n||"hbase"===n){e.dataMetaInfo instanceof dt||this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !"),e.dataMetaInfo.dataStoreInfo instanceof pt||this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo is not instanceof iPortalDataStoreInfoParam !");var a={type:e.dataMetaInfo.dataStoreInfo.type};switch(n){case"hdfs":a.url=e.dataMetaInfo.dataStoreInfo.url,i={url:e.dataMetaInfo.url,dataStoreInfo:a};break;case"hbase":e.dataMetaInfo.dataStoreInfo.connectionInfo instanceof ft||this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo.connectionInfo is not instanceof iPortalDataConnectionInfoParam !"),a.connectionInfo={dataBase:e.dataMetaInfo.dataStoreInfo.connectionInfo.dataBase,server:e.dataMetaInfo.dataStoreInfo.connectionInfo.server,engineType:"HBASE"},a.datastoreType="SPATIAL",i={dataStoreInfo:a}}r.dataMetaInfo=i}return this.request("POST",s,JSON.stringify(r)).then(e=>"hdfs"===n||"hbase"===n?e:e.childID?this.uploadDataRequest(e.childID,t):e.customResult)}publishOrUnpublish(e,t){e.dataId&&e.serviceType||this.getErrMsgPromise("option.dataID and option.serviceType are Required!");var i=e.dataId,s=e.dataServiceId,r=e.serviceType,n=this.iportalUrl+"/web/mycontent/datas/"+i+"/publishstatus.json?serviceType="+r;return s&&(n+="&dataServiceId="+s),this.request("PUT",n,JSON.stringify(t)).then(e=>t?(s||(s=e.customResult),s):e)}getDataPublishedStatus(e,t){var i=this.iportalUrl+"/web/mycontent/datas/"+e+"/publishstatus.json?dataServiceId="+t+"&forPublish=true";return this.request("GET",i)}unPublishDataService(e){return this.publishOrUnpublish(e,!1)}publishDataService(e){return this.publishOrUnpublish(e,!0)}}s.iPortalUser=mt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class yt{constructor(e,t){let i=this;this.EVENT_TYPES=["processCompleted","processFailed"],this.events=null,this.eventListeners=null,this.url=null,this.urls=null,this.proxy=null,this.serverType=null,this.index=null,this.length=null,this.options=null,this.totalTimes=null,this.POLLING_TIMES=3,this._processSuccess=null,this._processFailed=null,this.isInTheSameDomain=null,this.withCredentials=!1,ye.isArray(e)?(i.urls=e,i.length=e.length,i.totalTimes=i.length,1===i.length?i.url=e[0]:(i.index=parseInt(Math.random()*i.length),i.url=e[i.index])):(i.totalTimes=1,i.url=e),ye.isArray(e)&&!i.isServiceSupportPolling()&&(i.url=e[0],i.totalTimes=1),i.serverType=i.serverType||n.ISERVER,t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,ye.extend(this,t),i.isInTheSameDomain=ye.isInTheSameDomain(i.url),i.events=new Ie(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){let e=this;ye.isArray(e.urls)&&(e.urls=null,e.index=null,e.length=null,e.totalTimes=null),e.url=null,e.options=null,e._processSuccess=null,e._processFailed=null,e.isInTheSameDomain=null,e.EVENT_TYPES=null,e.events&&(e.events.destroy(),e.events=null),e.eventListeners&&(e.eventListeners=null)}request(e){let t=this;e.url=e.url||t.url,e.proxy=e.proxy||t.proxy,e.withCredentials=void 0!=e.withCredentials?e.withCredentials:t.withCredentials,e.crossOrigin=void 0!=e.crossOrigin?e.crossOrigin:t.crossOrigin,e.headers=e.headers||t.headers,e.isInTheSameDomain=t.isInTheSameDomain;let i=this.getCredential(e.url);i&&(e.url=ye.urlAppend(e.url,i.getUrlParameters())),t.calculatePollingTimes(),t._processSuccess=e.success,t._processFailed=e.failure,e.scope=t,e.success=t.getUrlCompleted,e.failure=t.getUrlFailed,t.options=e,t._commit(t.options)}getCredential(e){let t,i,s=e;switch(this.serverType){case n.IPORTAL:(t=(i=Ze.getToken(s))?new Ne(i,"token"):null)||(t=(i=Ze.getKey(s))?new Ne(i,"key"):null);break;case n.ONLINE:t=(i=Ze.getKey(s))?new Ne(i,"key"):null;break;default:t=(i=Ze.getToken(s))?new Ne(i,"token"):null}return t}getUrlCompleted(e){this._processSuccess(e)}getUrlFailed(e){let t=this;t.totalTimes>0?(t.totalTimes--,t.ajaxPolling()):t._processFailed(e)}ajaxPolling(){let e=this,t=e.options.url,i=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(i,i.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=ye.isInTheSameDomain(t),e._commit(e.options)}calculatePollingTimes(){let e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.times<e.totalTimes&&(e.totalTimes=e.times):e.totalTimes>e.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}isServiceSupportPolling(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}serviceProcessCompleted(e){e=ye.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){let t=(e=ye.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){"POST"!==e.method&&"PUT"!==e.method||(e.params&&(e.url=ye.urlAppend(e.url,ye.getParameterString(e.params||{}))),e.params=e.data),Ke.commit(e.method,e.url,e.params,{headers:e.headers,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then(function(e){return e.text?e.text():e.json?e.json():e}).then(function(t){var i=t;("string"==typeof t&&(i=(new ke).read(t)),(!i||i.error||i.code>=300&&304!==i.code)&&(i=i&&i.error?{error:i.error}:{error:i}),i.error)?(e.scope?me.bind(e.failure,e.scope):e.failure)(i):(i.succeed=void 0==i.succeed||i.succeed,(e.scope?me.bind(e.success,e.scope):e.success)(i))}).catch(function(t){(e.scope?me.bind(e.failure,e.scope):e.failure)(t)})}}s.CommonServiceBase=yt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class gt{constructor(e){e.filters&&"string"==typeof e.filters&&(e.filters=e.filters.split(",")),this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,ye.extend(this,e)}destroy(){this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null}}s.GeoCodingParameter=gt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class vt{constructor(e){e.filters&&(e.filters=e.filters.split(",")),this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null,ye.extend(this,e)}destroy(){this.x=null,this.y=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null,this.geoDecodingRadius=null}}s.GeoDecodingParameter=vt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class St extends yt{constructor(e,t){super(e,t),this.options=t||{},this.CLASS_NAME="SuperMap.AddressMatchService"}destroy(){super.destroy()}code(e,t){t instanceof gt&&this.processAsync(e,t)}decode(e,t){t instanceof vt&&this.processAsync(e,t)}processAsync(e,t){this.request({method:"GET",url:e,params:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}serviceProcessCompleted(e){e.succeed&&delete e.succeed,super.serviceProcessCompleted(e)}serviceProcessFailed(e){super.serviceProcessFailed(e)}}s.AddressMatchService=St;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class bt{constructor(e){this.name=null,this.queryType=null,this.CLASS_NAME="SuperMap.AggQueryBuilderParameter",ye.extend(this,e)}destroy(){this.name=null,this.queryType=null}}s.AggQueryBuilderParameter=bt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class _t{constructor(e){this.aggName=null,this.aggType=null,this.aggFieldName=null,this.subAgg=null,this.CLASS_NAME="SuperMap.AggregationParameter",ye.extend(this,e)}destroy(){var e=this;e.aggName=null,e.aggFieldName=null,e.aggType=null,e.subAgg&&(e.subAgg=null)}}s.AggregationParameter=_t;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class xt{constructor(e){this.dataset=null,this.targetDatasourceName=null,this.totalGridName=null,this.diffuseDatasetGridName=null,this.durationDatasetGridName=null,this.directDatasetGridName=null,this.latitude=null,this.timeMode="MULTIDAYS",this.dayStart=null,this.dayEnd=null,this.hourStart=null,this.hourEnd=null,this.transmittance=null,this.hourInterval=null,this.dayInterval=null,this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.AreaSolarRadiationParameters"}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){var i={};for(var s in e){if("dataset"!==s)"latitude"===s||"timeMode"===s||"dayStart"===s||("dayEnd"===s||"hourStart"===s||"hourEnd"===s)||("transmittance"===s||"hourInterval"===s||"dayInterval"===s)?i[s]=e[s]:t[s]=e[s]}t.parameter=i}}s.AreaSolarRadiationParameters=xt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ct extends yt{constructor(e,t){super(e,t),this.format=r.GEOJSON,this.CLASS_NAME="SuperMap.SpatialAnalystBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t,i=this;if((e=ye.transformResult(e))&&i.format===r.GEOJSON&&"function"==typeof i.toGeoJSONResult)if(ye.isArray(e)){for(var s=0;s<e.length;s++)e[s]=i.toGeoJSONResult(e[s]);t=e}else t=i.toGeoJSONResult(e);t||(t=e),i.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){if(!e)return null;e.result&&e.result.resultGeometry&&(e=e.result);var t=new Ve;if(e.recordsets)for(var i=0,s=e.recordsets,r=s.length;i<r;i++)s[i].features&&(s[i].features=t.toGeoJSON(s[i].features));else e.recordset&&e.recordset.features&&(e.recordset.features=t.toGeoJSON(e.recordset.features));return e.resultGeometry&&(e.resultGeometry=t.toGeoJSON(e.resultGeometry)),e.regions&&(e.regions=t.toGeoJSON(e.regions)),e}}s.SpatialAnalystBase=Ct;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Tt extends Ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.AreaSolarRadiationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof xt){var t=this,i={};e instanceof xt&&(t.url=ye.urlPathAppend(t.url,`datasets/${e.dataset}/solarradiation`)),t.url=ye.urlAppend(t.url,"returnContent=true"),xt.toObject(e,i);var s=ye.toJSON(i);t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}s.AreaSolarRadiationService=Tt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Mt{constructor(e){this.exp=null,this.value=100,ye.extend(this,e),this.CLASS_NAME="SuperMap.BufferDistance"}destroy(){this.exp=null,this.value=null}}s.BufferDistance=Mt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class wt{constructor(e){this.endType=N.FLAT,this.leftDistance=new Mt,this.rightDistance=new Mt,this.semicircleLineSegment=4,this.radiusUnit=p.METER,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.BufferSetting"}destroy(){let e=this;e.endType=null,e.leftDistance&&(e.leftDistance.destroy(),e.leftDistance=null),e.rightDistance&&(e.rightDistance.destroy(),e.rightDistance=null),e.semicircleLineSegment=null,e.radiusUnit=null}}s.BufferSetting=wt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Et{constructor(e){this.bufferSetting=new wt,ye.extend(this,e),this.CLASS_NAME="SuperMap.BufferAnalystParameters"}destroy(){this.bufferSetting&&(this.bufferSetting.destroy(),this.bufferSetting=null)}}s.BufferAnalystParameters=Et;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class At{constructor(e){this.expectCount=1e3,this.dataset=null,this.dataReturnMode=D.RECORDSET_ONLY,this.deleteExistResultDataset=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.DataReturnOption"}destroy(){this.expectCount=null,this.dataset=null,this.dataReturnMode=null,this.deleteExistResultDataset=null}}s.DataReturnOption=At;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Lt{constructor(e){this.foreignTableName=null,this.joinFilter=null,this.joinType=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.JoinItem"}destroy(){this.foreignTableName=null,this.joinFilter=null,this.joinType=null}toServerJSONObject(){var e={};return e=ye.copyAttributes(e,this)}}s.JoinItem=Lt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Pt{constructor(e){this.alias=null,this.connect=null,this.dataBase=null,this.driver=null,this.engineType=null,this.exclusive=null,this.OpenLinkTable=null,this.password=null,this.readOnly=null,this.server=null,this.user=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasourceConnectionInfo"}destroy(){var e=this;e.alias=null,e.connect=null,e.dataBase=null,e.driver=null,e.engineType=null,e.exclusive=null,e.OpenLinkTable=null,e.password=null,e.readOnly=null,e.server=null,e.user=null}}s.DatasourceConnectionInfo=Pt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Nt{constructor(e){this.datasourceConnectionInfo=null,this.foreignKeys=null,this.foreignTable=null,this.linkFields=null,this.linkFilter=null,this.name=null,this.primaryKeys=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LinkItem"}destroy(){var e=this;e.datasourceConnectionInfo instanceof Pt&&(e.datasourceConnectionInfo.destroy(),e.datasourceConnectionInfo=null),e.foreignKeys=null,e.foreignTable=null,e.linkFields=null,e.linkFilter=null,e.name=null,e.primaryKeys=null}}s.LinkItem=Nt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ot{constructor(e){this.attributeFilter=null,this.name=null,this.joinItems=null,this.linkItems=null,this.ids=null,this.orderBy=null,this.groupBy=null,this.fields=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.FilterParameter"}destroy(){var e=this;if(e.attributeFilter=null,e.name=null,e.joinItems){for(let t=0,i=e.joinItems,s=i.length;t<s;t++)i[t].destroy();e.joinItems=null}if(e.linkItems){for(let t=0,i=e.linkItems,s=i.length;t<s;t++)i[t].destroy();e.linkItems=null}e.ids=null,e.orderBy=null,e.groupBy=null,e.fields=null}}s.FilterParameter=Ot;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class It extends Et{constructor(e){super(e),this.dataset=null,this.filterQueryParameter=new Ot,this.resultSetting=new At,this.isAttributeRetained=!0,this.isUnion=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetBufferAnalystParameters"}destroy(){super.destroy();var e=this;e.dataset=null,e.filterQueryParameter&&(e.filterQueryParameter.destroy(),e.filterQueryParameter=null),e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.isAttributeRetained=null,e.isUnion=null}static toObject(e,t){for(var i in e)if("bufferSetting"===i)e.bufferSetting.radiusUnit=e.bufferSetting.radiusUnit.toUpperCase(),t.bufferAnalystParameter=e.bufferSetting;else if("resultSetting"===i)t.dataReturnOption=e.resultSetting;else{if("dataset"===i)continue;t[i]=e[i]}}}s.DatasetBufferAnalystParameters=It;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ft extends Et{constructor(e){super(e),this.sourceGeometry=null,this.sourceGeometrySRID=null,e&&ye.extend(this,e),this.CLASS_NAME=" SuperMap.GeometryBufferAnalystParameters"}destroy(){super.destroy();this.sourceGeometry&&(this.sourceGeometry.destroy(),this.sourceGeometry=null)}static toObject(e,t){for(var i in e)if("bufferSetting"===i){var s={};for(var r in e.bufferSetting)s[r]=e.bufferSetting[r];t.analystParameter=s}else"sourceGeometry"===i?t.sourceGeometry=ze.fromGeometry(e.sourceGeometry):t[i]=e[i]}}s.GeometryBufferAnalystParameters=Ft;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Rt extends Ct{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.BufferAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},i=this;e instanceof It?(i.mode="datasets",i.url=ye.urlPathAppend(i.url,"datasets/"+e.dataset+"/buffer"),It.toObject(e,t)):e instanceof Ft&&(i.mode="geometry",i.url=ye.urlPathAppend(i.url,"geometry/buffer"),Ft.toObject(e,t));var s=ye.toJSON(t);i.url=ye.urlAppend(i.url,"returnContent=true"),i.request({method:"POST",data:s,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}s.BufferAnalystService=Rt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Dt{constructor(e){this.type=I.UDB,this.datasetName="analystResult",this.datasourceInfo=null,this.outputPath="",ye.extend(this,e),this.CLASS_NAME="SuperMap.OutputSetting"}destroy(){var e=this;e.type=null,e.datasetName=null,e.outputPath=null,e.datasourceInfo instanceof Pt&&(e.datasourceInfo.destroy(),e.datasourceInfo=null)}}s.OutputSetting=Dt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class kt{constructor(e){this.items=null,this.numericPrecision=1,this.rangeMode=S.EQUALINTERVAL,this.rangeCount="",this.colorGradientType=_.YELLOW_RED,ye.extend(this,e),this.CLASS_NAME="SuperMap.MappingParameters"}destroy(){var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.numericPrecision=null,e.rangeMode=null,e.rangeCount=null,e.colorGradientType=null}}s.MappingParameters=kt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Bt{constructor(e){if(this.datasetName="",this.bounds="",this.distance="",this.distanceField="",this.distanceUnit=ee.METER,this.dissolveField="",this.output=null,this.mappingParameters=null,!e)return this;ye.extend(this,e),this.CLASS_NAME="SuperMap.BuffersAnalystJobsParameter"}destroy(){this.datasetName=null,this.bounds=null,this.distance=null,this.distanceField=null,this.distanceUnit=null,this.dissolveField=null,this.output instanceof Dt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof kt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var i in e)"datasetName"!==i?"output"!==i?(t.analyst=t.analyst||{},"bounds"===i&&e[i]?t.analyst[i]=e[i].toBBOX():t.analyst[i]=e[i],"mappingParameters"===i&&(t.analyst[i]=t.analyst[i]||{},t.analyst.mappingParameters=e[i])):(t.output=t.output||{},t.output=e[i]):(t.input=t.input||{},t.input[i]=e[i])}}s.BuffersAnalystJobsParameter=Bt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ut extends yt{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.ProcessingServiceBase"}destroy(){super.destroy()}getJobs(e){var t=this;Ke.get(t._processUrl(e),null,{proxy:t.proxy}).then(function(e){return e.json()}).then(function(e){t.events.triggerEvent("processCompleted",{result:e})}).catch(function(e){t.eventListeners.processFailed({error:e})})}addJob(e,t,i,s){var r=this,n=null;t&&t instanceof i&&(n=new Object,i.toObject(t,n));let a=Object.assign({"Content-Type":"application/x-www-form-urlencoded"},r.headers||{});var o={proxy:r.proxy,headers:a,withCredentials:r.withCredentials,crossOrigin:r.crossOrigin,isInTheSameDomain:r.isInTheSameDomain};Ke.post(r._processUrl(e),JSON.stringify(n),o).then(function(e){return e.json()}).then(function(e){e.succeed?r.serviceProcessCompleted(e,s):r.serviceProcessFailed(e)}).catch(function(e){r.serviceProcessFailed({error:e})})}serviceProcessCompleted(e,t){e=ye.transformResult(e),t=t||1e3;var i=this;if(e)var s=setInterval(function(){Ke.get(i._processUrl(e.newResourceLocation),{_t:(new Date).getTime()}).then(function(e){return e.json()}).then(function(e){i.events.triggerEvent("processRunning",{id:e.id,state:e.state}),"LOST"!==e.state.runState&&"KILLED"!==e.state.runState&&"FAILED"!==e.state.runState||(clearInterval(s),i.events.triggerEvent("processFailed",{error:e.state.errorMsg,state:e.state.runState})),"FINISHED"===e.state.runState&&e.setting.serviceInfo&&(clearInterval(s),i.events.triggerEvent("processCompleted",{result:e}))}).catch(function(e){clearInterval(s),i.events.triggerEvent("processFailed",{error:e})})},t)}serviceProcessFailed(e){super.serviceProcessFailed(e)}_processUrl(e){return Ze.getToken(e)&&(e=ye.urlAppend(e,"token="+Ze.getToken(e))),e}}s.ProcessingServiceBase=Ut;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Gt extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/buffers"),this.CLASS_NAME="SuperMap.BuffersAnalystJobsService"}destroy(){super.destroy()}getBuffersJobs(){super.getJobs(this.url)}getBuffersJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addBuffersJob(e,t){super.addJob(this.url,e,Bt,t)}}s.BuffersAnalystJobsService=Gt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class jt{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.BurstPipelineAnalystParameters"}destroy(){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=null}}s.BurstPipelineAnalystParameters=jt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class zt extends yt{constructor(e,t){super(e,t),this.format=r.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var t;(e=ye.transformResult(e))&&this.format===r.GEOJSON&&"function"==typeof this.toGeoJSONResult&&(t=this.toGeoJSONResult(e)),t||(t=e),this.events.triggerEvent("processCompleted",{result:t})}toGeoJSONResult(e){return null}}s.NetworkAnalystServiceBase=zt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Vt extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof jt))return null;var t,i=this;if(i.url=ye.urlPathAppend(i.url,"burstAnalyse"),t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");if(null===e.edgeID&&null===e.nodeID)throw new Error("edgeID and nodeID cannot be null at the same time.");null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}s.BurstPipelineAnalystService=Vt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ht extends yt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ChartFeatureInfoSpecsService"}destroy(){super.destroy(),ye.reset(this)}processAsync(){var e=this;e.isTempLayers||ye.urlPathAppend(e.url,"chartFeatureInfoSpecs"),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}s.ChartFeatureInfoSpecsService=Ht;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Jt{constructor(e){this.isQueryPoint=null,this.isQueryLine=null,this.isQueryRegion=null,this.attributeFilter=null,this.chartFeatureInfoSpecCode=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryFilterParameter"}destroy(){var e=this;e.isQueryPoint=null,e.isQueryLine=null,e.isQueryRegion=null,e.attributeFilter=null,e.chartFeatureInfoSpecCode=null}toJson(){var e="";return e+='"isQueryPoint":'+this.isQueryPoint+",",e+='"isQueryLine":'+this.isQueryLine+",",e+='"isQueryRegion":'+this.isQueryRegion+",",this.attributeFilter&&(e+='"attributeFilter": "'+this.attributeFilter+'",'),e="{"+(e+='"chartFeatureInfoSpecCode":'+this.chartFeatureInfoSpecCode)+"}"}}s.ChartQueryFilterParameter=Jt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class qt{constructor(e){this.queryMode=null,this.bounds=null,this.chartLayerNames=null,this.chartQueryFilterParameters=null,this.returnContent=!0,this.startRecord=0,this.expectCount=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.ChartQueryParameters"}destroy(){var e=this;e.queryMode=null,e.bounds=null,e.chartLayerNames=null,e.chartQueryFilterParameters=null,e.returnContent=!0,e.startRecord=0,e.expectCount=null}getVariablesJson(){var e="";if(e+='"queryMode":"'+this.queryMode+'",',this.chartLayerNames&&this.chartLayerNames.length){for(var t=[],i=this.chartLayerNames.length,s=0;s<i;s++)t.push('"'+this.chartLayerNames[s]+'"');e+='"chartLayerNames":'+("["+t.join(",")+"]")+","}if("ChartBoundsQuery"===this.queryMode&&this.bounds&&(e+='"bounds":{"leftBottom":{"x":'+this.bounds.left+',"y":'+this.bounds.bottom+'},"rightTop":{"x":'+this.bounds.right+',"y":'+this.bounds.top+"}},"),this.chartQueryFilterParameters&&this.chartQueryFilterParameters.length){for(var r=[],n=this.chartQueryFilterParameters.length,a=0;a<n;a++){var o=this.chartQueryFilterParameters[a];o instanceof Jt&&r.push(o.toJson())}var l="["+r.join(",")+"]";l='"chartQueryParams":'+l+",",l+='"startRecord":'+this.startRecord+",",e+='"chartQueryParameters":'+(l="{"+(l+='"expectCount":'+this.expectCount)+"}")}return e="{"+e+"}"}}s.ChartQueryParameters=qt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Wt{constructor(e){e&&(this.customParams=null,this.prjCoordSys=null,this.expectCount=1e5,this.networkType=a.LINE,this.queryOption=o.ATTRIBUTEANDGEOMETRY,this.queryParams=null,this.startRecord=0,this.holdTime=10,this.returnCustomResult=!1,this.returnFeatureWithFieldCaption=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryParameters")}destroy(){var e=this;if(e.customParams=null,e.expectCount=null,e.networkType=null,e.queryOption=null,e.queryParams){for(var t=0,i=e.queryParams,s=i.length;t<s;t++)i[t].destroy();e.queryParams=null}e.startRecord=null,e.holdTime=null,e.returnCustomResult=null,e.prjCoordSys=null}}s.QueryParameters=Wt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Yt extends yt{constructor(e,t){super(e,t),t=t||{},this.returnContent=null,this.format=r.GEOJSON,ye.extend(this,t);t.format&&(this.format=t.format.toUpperCase()),this.url&&(this.url=ye.urlPathAppend(this.url,"queryResults"),this.CLASS_NAME="SuperMap.ChartQueryService")}destroy(){yt.prototype.destroy.apply(this,arguments),this.returnContent=null,this.format=null}processAsync(e){if(e instanceof qt){var t,i=this;i.returnContent=e.returnContent,t=e.getVariablesJson(),i.returnContent&&(i.url=ye.urlAppend(i.url,"returnContent=true")),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}serviceProcessCompleted(e){if((e=ye.transformResult(e))&&e.recordsets&&this.format===r.GEOJSON)for(var t=0,i=e.recordsets,s=i.length;t<s;t++)if(i[t].features){var n=new Ve;i[t].features=n.toGeoJSON(i[t].features)}this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new Wt({queryMode:e.queryMode,bounds:e.bounds,chartLayerNames:e.chartLayerNames,chartQueryFilterParameters:e.chartQueryFilterParameters,returnContent:e.returnContent})}}s.ChartQueryService=Yt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Qt{constructor(e){this.clipDatasetName=null,this.clipDatasourceName=null,this.clipRegion=null,this.isClipInRegion=!0,this.isExactClip=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ClipParameter"}destroy(){var e=this;e.clipDatasetName=null,e.clipDatasourceName=null,e.clipRegion=null,e.isClipInRegion=null,e.isExactClip=null}toJSON(){return ye.toJSON({isClipInRegion:this.isClipInRegion,clipDatasetName:this.clipDatasetName,clipDatasourceName:this.clipDatasourceName,isExactClip:this.isExactClip,clipRegion:ze.fromGeometry(this.clipRegion)})}}s.ClipParameter=Qt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Xt{constructor(e){e=e||{},this.elevation=null,this.color=null,ye.extend(this,e);var t=this.color;t&&(this.color=new Be(t.red,t.green,t.blue)),this.CLASS_NAME="SuperMap.ColorDictionary"}destroy(){ye.reset(this)}toServerJSONObject(){var e={};return e=ye.copyAttributes(e,this)}}s.ColorDictionary=Xt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Kt{constructor(e){e&&(this.returnEdgeFeatures=!1,this.returnEdgeGeometry=!1,this.returnEdgeIDs=!1,this.returnNodeFeatures=!1,this.returnNodeGeometry=!1,this.returnNodeIDs=!1,this.returnPathGuides=!1,this.returnRoutes=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystResultSetting")}destroy(){var e=this;e.returnEdgeFeatures=null,e.returnEdgeGeometry=null,e.returnEdgeIDs=null,e.returnNodeFeatures=null,e.returnNodeGeometry=null,e.returnNodeIDs=null,e.returnPathGuides=null,e.returnRoutes=null}}s.TransportationAnalystResultSetting=Kt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Zt{constructor(e){e&&(this.barrierEdgeIDs=null,this.barrierNodeIDs=null,this.barrierPoints=null,this.weightFieldName=null,this.turnWeightField=null,this.resultSetting=new Kt,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransportationAnalystParameter")}destroy(){var e=this;if(e.barrierEdgeIDs=null,e.barrierNodeIDs=null,e.weightFieldName=null,e.turnWeightField=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.barrierPoints&&e.barrierPoints.length)for(var t in e.barrierPoints)e.barrierPoints[t].destroy();e.barrierPoints=null}}s.TransportationAnalystParameter=Zt;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class $t{constructor(e){this.isAnalyzeById=!1,this.nodes=null,this.parameter=new Zt,ye.extend(this,e),this.CLASS_NAME="SuperMap.ComputeWeightMatrixParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.ComputeWeightMatrixParameters=$t;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ei extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ComputeWeightMatrixService"}destroy(){super.destroy()}processAsync(e){if(e instanceof $t){var t,i=this;i.url=ye.urlPathAppend(i.url,"weightmatrix"),t={parameter:ye.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",s=t?t.length:0;if(!1===e)for(let e=0;e<s;e++)e>0&&(i+=","),i+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<s;e++)e>0&&(i+=","),i+=t[e];return i+="]"}}s.ComputeWeightMatrixService=ei;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ti extends yt{constructor(e,t){(t=t||{}).EVENT_TYPES=["broadcastSocketConnected","broadcastSocketError","broadcastFailed","broadcastSucceeded","subscribeSocketConnected","subscribeSocketError","messageSucceeded","setFilterParamSucceeded"],super(e,t),this.geometry=null,this.prjCoordSys=null,this.excludeField=null,ye.extend(this,t),this.CLASS_NAME="SuperMap.DataFlowService"}initBroadcast(){var e=this;return this.broadcastWebSocket=this._connect(ye.urlPathAppend(e.url,"broadcast")),this.broadcastWebSocket.onopen=function(t){e.broadcastWebSocket.isOpen=!0,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onclose=function(t){e.broadcastWebSocket.isOpen=!1,t.eventType="broadcastSocketConnected",e.events.triggerEvent("broadcastSocketConnected",t)},this.broadcastWebSocket.onerror=function(t){t.eventType="broadcastSocketError",e.events.triggerEvent("broadcastSocketError",t)},this}broadcast(e){this.broadcastWebSocket&&this.broadcastWebSocket.isOpen?(this.broadcastWebSocket.send(JSON.stringify(e)),this.events.triggerEvent("broadcastSucceeded")):this.events.triggerEvent("broadcastFailed")}initSubscribe(){var e=this;return this.subscribeWebSocket=this._connect(ye.urlPathAppend(e.url,"subscribe")),this.subscribeWebSocket.onopen=function(t){e.subscribeWebSocket.send(e._getFilterParams()),t.eventType="subscribeSocketConnected",e.events.triggerEvent("subscribeSocketConnected",t)},this.subscribeWebSocket.onerror=function(t){t.eventType="subscribeSocketError",e.events.triggerEvent("subscribeSocketError",t)},this.subscribeWebSocket.onmessage=function(t){e._onMessage(t)},this}setExcludeField(e){return this.excludeField=e,this.subscribeWebSocket.send(this._getFilterParams()),this}setGeometry(e){return this.geometry=e,this.subscribeWebSocket.send(this._getFilterParams()),this}unSubscribe(){this.subscribeWebSocket&&(this.subscribeWebSocket.close(),this.subscribeWebSocket=null)}unBroadcast(){this.broadcastWebSocket&&(this.broadcastWebSocket.close(),this.broadcastWebSocket=null)}destroy(){yt.prototype.destroy.apply(this,arguments);this.geometry=null,this.prjCoordSys=null,this.excludeField=null,this.unBroadcast(),this.unSubscribe()}_getFilterParams(){var e={filterParam:{prjCoordSys:this.prjCoordSys,excludeField:this.excludeField,geometry:this.geometry}};return ye.toJSON(e)}_onMessage(e){if(e.data&&e.data.indexOf("filterParam")>=0){var t=JSON.parse(e.data);return e.filterParam=t,e.eventType="setFilterParamSucceeded",void this.events.triggerEvent("setFilterParamSucceeded",e)}var i=JSON.parse(e.data);e.featureResult=i,e.eventType="messageSucceeded",this.events.triggerEvent("messageSucceeded",e)}_connect(e){return e=this._appendCredentials(e),"WebSocket"in window?new WebSocket(e):"MozWebSocket"in window?new(0,window.MozWebSocket)(e):(console.log("no WebSocket"),null)}_appendCredentials(e){var t=Ze.getToken(e);return t&&(e=ye.urlAppend(e,"token="+t)),e}}s.DataFlowService=ti;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ii{constructor(e){e=e||{},this.bounds=null,this.dataSourceName=null,this.description=null,this.encodeType=null,this.isReadOnly=null,this.name=null,this.prjCoordSys=null,this.tableName=null,this.type=null,ye.extend(this,e);var t=this.bounds;t&&(this.bounds=new ve(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y)),this.CLASS_NAME="SuperMap.DatasetInfo"}destroy(){ye.reset(this)}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}s.DatasetInfo=ii;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class si{constructor(e){this.operation=O.UNION,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.OverlayAnalystParameters"}destroy(){this.operation=null}}s.OverlayAnalystParameters=si;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ri extends si{constructor(e){super(e),this.operateDataset=null,this.operateDatasetFields=[],this.operateDatasetFilter=new Ot,this.operateRegions=[],this.sourceDataset=null,this.sourceDatasetFields=[],this.sourceDatasetFilter=new Ot,this.tolerance=0,this.resultSetting=new At,ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetOverlayAnalystParameters"}destroy(){super.destroy();var e=this;if(e.operateDataset=null,e.operateDatasetFields=null,e.operateDatasetFilter&&(e.operateDatasetFilter.destroy(),e.operateDatasetFilter=null),e.operateRegions){for(var t=0,i=e.operateRegions,s=i.length;t<s;t++)i[t].destroy();e.operateRegions=null}e.sourceDataset=null,e.sourceDatasetFields=null,e.sourceDatasetFilter&&(e.sourceDatasetFilter.destroy(),e.sourceDatasetFilter=null),e.tolerance=null,e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null)}static toObject(e,t){for(var i in e)if("sourceDataset"!==i)if("operateRegions"===i){t.operateRegions=[];var s=e.operateRegions;for(var r in s)s.hasOwnProperty(r)&&(t.operateRegions[r]=ze.fromGeometry(s[r]))}else"resultSetting"===i?t.dataReturnOption=e.resultSetting:t[i]=e[i]}}s.DatasetOverlayAnalystParameters=ri;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ni{constructor(e){this.clipRegion=null,this.datumValue=0,this.expectedZValues=null,this.interval=0,this.resampleTolerance=0,this.smoothMethod=F.BSPLINE,this.smoothness=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.SurfaceAnalystParametersSetting"}destroy(){var e=this;e.clipRegion&&(e.clipRegion.destroy(),e.clipRegion=null),e.datumValue=null,e.expectedZValues=null,e.interval=null,e.resampleTolerance=null,e.smoothMethod=null,e.smoothness=null}toJSON(){let e="'datumValue':"+ye.toJSON(this.datumValue);if(e+=",'interval':"+ye.toJSON(this.interval),e+=",'resampleTolerance':"+ye.toJSON(this.resampleTolerance),e+=",'smoothMethod':"+ye.toJSON(this.smoothMethod),e+=",'smoothness':"+ye.toJSON(this.smoothness),null!=this.expectedZValues&&(e+=",'expectedZValues':"+ye.toJSON(this.expectedZValues)),null!=this.clipRegion){var t=this.clipRegion;this.clipRegion instanceof Se&&this.clipRegion.components&&(t=ze.fromGeometry(this.clipRegion)),e+=",'clipRegion':"+ye.toJSON(t)}return"{"+e+"}"}}s.SurfaceAnalystParametersSetting=ni;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ai{constructor(e){this.resolution=0,this.extractParameter=new ni,this.resultSetting=new At,this.surfaceAnalystMethod=R.ISOLINE,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.SurfaceAnalystParameters"}destroy(){var e=this;e.resolution=null,e.extractParameter&&(e.extractParameter.destroy(),e.extractParameter=null),e.resultSetting&&(e.resultSetting.destroy(),e.resultSetting=null),e.surfaceAnalystMethod=null}}s.SurfaceAnalystParameters=ai;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class oi extends ai{constructor(e){super(e),this.dataset=null,this.filterQueryParameter=new Ot,this.zValueFieldName=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetSurfaceAnalystParameters"}destroy(){super.destroy();var e=this;e.dataset=null,e.filterQueryParameter&&(e.filterQueryParameter.destroy(),e.filterQueryParameter=null),e.zValueFieldName=null}static toObject(e,t){for(var i in e)if("filterQueryParameter"===i&&(t.filterQueryParameter=e.filterQueryParameter),"extractParameter"===i)e.extractParameter.clipRegion instanceof Se&&e.extractParameter.clipRegion.components&&(e.extractParameter.clipRegion=ze.fromGeometry(e.extractParameter.clipRegion)),t.extractParameter=e.extractParameter;else{if("dataset"===i)continue;if("surfaceAnalystMethod"===i)continue;t[i]=e[i]}}}s.DatasetSurfaceAnalystParameters=oi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class li{constructor(e){e&&(this.clipRegion=null,this.createResultDataset=!1,this.resultDatasetName=null,this.resultDatasourceName=null,this.returnResultRegion=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.ThiessenAnalystParameters")}destroy(){var e=this;e.clipRegion&&(e.clipRegion.destroy(),e.clipRegion=null),e.createResultDataset=null,e.resultDatasetName=null,e.resultDatasourceName=null,e.returnResultRegion=null}}s.ThiessenAnalystParameters=li;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class hi extends li{constructor(e){super(e),this.filterQueryParameter=null,this.dataset=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.DatasetThiessenAnalystParameters"}destroy(){super.destroy();this.filterQueryParameter&&(this.filterQueryParameter.destroy(),this.filterQueryParameter=null)}static toObject(e,t){for(var i in e)"clipRegion"===i?t.clipRegion=ze.fromGeometry(e.clipRegion):t[i]=e[i]}}s.DatasetThiessenAnalystParameters=hi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ui{constructor(e){this.dataset=null,this.bounds=null,this.fieldName=null,this.resultGridDatasetResolution=null,this.searchRadius=null,this.targetDatasource=null,this.resultGridName=null,this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.DensityKernelAnalystParameters"}destroy(){var e=this;e.dataset=null,e.bounds=null,e.fieldName=null,e.resultGridDatasetResolution=null,e.searchRadius=null,e.targetDatasource=null,e.resultGridName=null,e.deleteExistResultDataset=null}static toObject(e,t){for(var i in e)"dataset"!==i&&(t[i]=e[i])}}s.DensityKernelAnalystParameters=ui;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ci extends Ct{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.DensityAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t=this,i=new Object;e instanceof ui&&(t.url=ye.urlPathAppend(t.url,"datasets/"+e.dataset+"/densityanalyst/kernel"),t.mode="kernel"),ui.toObject(e,i);var s=ye.toJSON(i);t.url=ye.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}s.DensityAnalystService=ci;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class di{constructor(e){this.dataSourceName=null,this.dataSetName=null,this.features=null,this.editType=k.ADD,this.IDs=null,this.returnContent=!1,this.isUseBatch=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.EditFeaturesParameters"}destroy(){var e=this;e.dataSourceName=null,e.dataSetName=null,e.features=null,e.editType=null,e.IDs=null,e.returnContent=null}static toJsonParameters(e){var t,i,s;if(e.editType===k.DELETE){if(null===e.IDs)return;s={ids:e.IDs}}else if(s=[],e.features){i=e.features.length;for(var r=0;r<i;r++)(t=e.features[r]).geometry=ze.fromGeometry(t.geometry),s.push(t)}return ye.toJSON(s)}}s.EditFeaturesParameters=di;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class pi extends yt{constructor(e,t){super(e,t),this.returnContent=!1,this.isUseBatch=!1,t&&ye.extend(this,t),this.url=ye.urlPathAppend(this.url,"features"),this.CLASS_NAME="SuperMap.EditFeaturesService"}destroy(){super.destroy();this.returnContent=null,this.isUseBatch=null,this.fromIndex=null,this.toIndex=null}processAsync(e){if(e instanceof di){var t=this,i="POST",s="",r=e.editType,n=null;t.returnContent=e.returnContent,t.isUseBatch=e.isUseBatch,n=di.toJsonParameters(e),r===k.DELETE?(s=ye.toJSON(e.IDs),t.url=ye.urlAppend(t.url,"ids="+s),i="DELETE",n=s):r===k.UPDATE?i="PUT":(t.isUseBatch&&(t.url=ye.urlAppend(t.url,`isUseBatch=${t.isUseBatch}`),t.returnContent=!1),t.returnContent&&(t.url=ye.urlAppend(t.url,"returnContent=true"),i="POST")),t.request({method:i,data:n,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}s.EditFeaturesService=pi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class fi{constructor(e){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalyst3DParameters"}destroy(){this.edgeID=null,this.nodeID=null,this.weightName=null,this.isUncertainDirectionValid=null}}s.FacilityAnalyst3DParameters=fi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class mi extends fi{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystSinks3DParameters"}destroy(){super.destroy()}}s.FacilityAnalystSinks3DParameters=mi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class yi extends yt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystSinks3DService"}destroy(){yt.prototype.destroy.apply(this,arguments)}processAsync(e){if(e instanceof mi){var t,i=this;i.url=ye.urlPathAppend(i.url,"sinks"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}s.FacilityAnalystSinks3DService=yi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class gi extends fi{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystSources3DParameters"}destroy(){super.destroy()}}s.FacilityAnalystSources3DParameters=gi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class vi extends yt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystSources3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof gi){var t,i=this;i.url=ye.urlPathAppend(i.url,"sources"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}s.FacilityAnalystSources3DService=vi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Si{constructor(e){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,this.queryType=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystStreamParameters"}destroy(){var e=this;e.edgeID=null,e.nodeID=null,e.weightName=null,e.isUncertainDirectionValid=null,e.type=null}}s.FacilityAnalystStreamParameters=Si;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class bi extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystStreamService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Si){var t,i=this;if(0===e.queryType)i.url=ye.urlPathAppend(i.url,"upstreamcirticalfaclilities");else{if(1!==e.queryType)return;i.url=ye.urlPathAppend(i.url,"downstreamcirticalfaclilities")}t={sourceNodeIDs:e.sourceNodeIDs,isUncertainDirectionValid:e.isUncertainDirectionValid},null!==e.edgeID&&null!==e.nodeID||null===e.edgeID&&null===e.nodeID||(null!==e.edgeID?t.edgeID=e.edgeID:t.nodeID=e.nodeID,i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed}))}}}s.FacilityAnalystStreamService=bi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class _i extends fi{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DParameters"}destroy(){super.destroy()}}s.FacilityAnalystTracedown3DParameters=_i;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class xi extends yt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTracedown3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _i){var t,i=this;i.url=ye.urlPathAppend(i.url,"tracedownresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}s.FacilityAnalystTracedown3DService=xi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ci extends fi{constructor(e){super(e),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DParameters"}destroy(){super.destroy()}}s.FacilityAnalystTraceup3DParameters=Ci;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ti extends yt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystTraceup3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ci){var t,i=this;i.url=ye.urlPathAppend(i.url,"traceupresult"),t={edgeID:e.edgeID,nodeID:e.nodeID,weightName:e.weightName,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}s.FacilityAnalystTraceup3DService=Ti;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Mi extends fi{constructor(e){super(e),e=e||{},this.sourceNodeIDs=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.FacilityAnalystUpstream3DParameters"}destroy(){super.destroy(),this.sourceNodeIDs=null}}s.FacilityAnalystUpstream3DParameters=Mi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class wi extends yt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FacilityAnalystUpstream3DService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Mi){var t,i=this;i.url=ye.urlPathAppend(i.url,"upstreamcirticalfaclilities"),t={sourceNodeIDs:e.sourceNodeIDs,edgeID:e.edgeID,nodeID:e.nodeID,isUncertainDirectionValid:e.isUncertainDirectionValid},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}s.FacilityAnalystUpstream3DService=wi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ei extends _t{constructor(e){super(e),this.filterParam=null,this.aggType=re.FILTER,this.CLASS_NAME="SuperMap.FilterAggParameter",ye.extend(this,e)}destroy(){super.destroy();this.filterParam&&(this.filterParam=null)}}s.FilterAggParameter=Ei;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ai{constructor(e){this.datasource=null,this.dataset=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.FieldParameters"}destroy(){this.datasource=null,this.dataset=null}}s.FieldParameters=Ai;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Li extends Ai{constructor(e){super(e),this.fieldName=null,this.statisticMode=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.FieldStatisticsParameters"}destroy(){this.fieldName=null,this.statisticMode=null}}s.FieldStatisticsParameters=Li;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Pi extends yt{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,this.field=null,this.statisticMode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.FieldStatisticService"}destroy(){super.destroy();this.datasource=null,this.dataset=null,this.field=null,this.statisticMode=null}processAsync(){var e=this,t="datasources/"+e.datasource+"/datasets/"+e.dataset+"/fields/"+e.field+"/"+e.statisticMode;e.url=ye.urlPathAppend(e.url,t),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}s.FieldStatisticService=Pi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ni{constructor(e){this.event=null,this.expectFacilityCount=1,this.facilities=null,this.fromEvent=!1,this.isAnalyzeById=!1,this.maxWeight=0,this.parameter=new Zt,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindClosestFacilitiesParameters"}destroy(){var e=this;e.event=null,e.expectFacilityCount=null,e.facilities=null,e.fromEvent=null,e.isAnalyzeById=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.FindClosestFacilitiesParameters=Ni;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Oi extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindClosestFacilitiesService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ni){var t,i=this;i.url=ye.urlPathAppend(i.url,"closestfacility"),t={expectFacilityCount:e.expectFacilityCount,fromEvent:e.fromEvent,maxWeight:e.maxWeight,parameter:ye.toJSON(e.parameter),event:ye.toJSON(e.event),facilities:i.getJson(e.isAnalyzeById,e.facilities)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",s=t?t.length:0;if(!1===e)for(let e=0;e<s;e++)e>0&&(i+=","),i+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<s;e++)e>0&&(i+=","),i+=t[e];return i+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new Ve;return e.facilityPathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}s.FindClosestFacilitiesService=Oi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ii{constructor(e){this.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindLocationParameters"}destroy(){var e=this;if(e.expectedSupplyCenterCount=null,e.isFromCenter=null,e.turnWeightField=null,e.weightName=null,e.supplyCenters){for(var t=0,i=e.supplyCenters,s=i.length;t<s;t++)i[t].destroy();e.supplyCenters=null}}}s.FindLocationParameters=Ii;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Fi extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindLocationService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ii){var t,i=this;i.url=ye.urlPathAppend(i.url,"location"),t={isFromCenter:e.isFromCenter,expectedSupplyCenterCount:e.expectedSupplyCenterCount,weightName:e.weightName,turnWeightField:e.turnWeightField,returnEdgeFeature:!0,returnEdgeGeometry:!0,returnNodeFeature:!0,mapParameter:ye.toJSON(e.mapParameter),supplyCenters:i.getCentersJson(e.supplyCenters)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getCentersJson(e){for(var t="[",i=e?e.length:0,s=0;s<i;s++)s>0&&(t+=","),t+=ye.toJSON(e[s]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new Ve;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}s.FindLocationService=Fi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ri{constructor(e){this.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new Zt,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindMTSPPathsParameters"}destroy(){var e=this;e.centers=null,e.hasLeastTotalCost=null,e.isAnalyzeById=null,e.nodes=null,e.maxWeight=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.FindMTSPPathsParameters=Ri;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Di extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ri){var t,i=this,s=i.getJson(e.isAnalyzeById,e.centers),r=i.getJson(e.isAnalyzeById,e.nodes);i.url=ye.urlPathAppend(i.url,"mtsppath"),t={centers:s,nodes:r,parameter:ye.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",s=t?t.length:0;if(!1===e)for(let e=0;e<s;e++)e>0&&(i+=","),i+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<s;e++)e>0&&(i+=","),i+=t[e];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new Ve;return e.pathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}s.FindMTSPPathsService=Di;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ki{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new Zt,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindPathParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.hasLeastEdgeCount=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.FindPathParameters=ki;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Bi extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ki){var t,i=this;i.url=ye.urlPathAppend(i.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:ye.toJSON(e.parameter),nodes:i.getJson(e.isAnalyzeById,e.nodes)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",s=t?t.length:0;if(!1===e)for(let e=0;e<s;e++)e>0&&(i+=","),i+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<s;e++)e>0&&(i+=","),i+=t[e];return i+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new Ve;return e.pathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}s.FindPathService=Bi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ui{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new Zt,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindServiceAreasParameters"}destroy(){var e=this;e.isAnalyzeById=null,e.isCenterMutuallyExclusive=null,e.centers=null,e.isFromCenter=null,e.weights=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.FindServiceAreasParameters=Ui;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Gi extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Ui){var t,i=this;i.url=ye.urlPathAppend(i.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:ye.toJSON(e.parameter),centers:i.getJson(e.isAnalyzeById,e.centers),weights:i.getJson(!0,e.weights)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJson(e,t){var i="[",s=t?t.length:0;if(!1===e)for(let e=0;e<s;e++)e>0&&(i+=","),i+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e<s;e++)e>0&&(i+=","),i+=t[e];return i+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new Ve;return e.serviceAreaList.map(function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e}),e}}s.FindServiceAreasService=Gi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ji{constructor(e){this.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new Zt,ye.extend(this,e),this.CLASS_NAME="SuperMap.FindTSPPathsParameters"}destroy(){var e=this;e.endNodeAssigned=null,e.isAnalyzeById=null,e.nodes=null,e.parameter&&(e.parameter.destroy(),e.parameter=null)}}s.FindTSPPathsParameters=ji;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class zi extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ji){var t,i=this;i.url=ye.urlPathAppend(i.url,"tsppath"),t={parameter:s.Util.toJSON(e.parameter),endNodeAssigned:e.endNodeAssigned,nodes:i.getNodesJson(e)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getNodesJson(e){var t,i,s,r,n="";if(!1===e.isAnalyzeById){for(t="[",i=0,s=(r=e.nodes).length;i<s;i++)i>0&&(t+=","),t+='{"x":'+r[i].x+',"y":'+r[i].y+"}";n+=t+="]"}else if(!0===e.isAnalyzeById){let t="[",i=e.nodes,s=i.length;for(let e=0;e<s;e++)e>0&&(t+=","),t+=i[e];n+=t+="]"}return n}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new Ve;return e.tspPathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}s.FindTSPPathsService=zi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Vi{constructor(e){this.routeTable=null,this.routeIDField=null,this.attributeFilter=null,this.eventTable=null,this.eventRouteIDField=null,this.measureField=null,this.measureStartField=null,this.measureEndField=null,this.measureOffsetField=null,this.errorInfoField=null,this.retainedFields=null,this.dataReturnOption=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GenerateSpatialDataParameters"}destroy(){var e=this;e.routeTable&&(e.routeTable=null),e.routeIDField=null,e.attributeFilter=null,e.eventTable=null,e.eventRouteIDField=null,e.measureField=null,e.measureStartField=null,e.measureEndField=null,e.measureOffsetField=null,e.errorInfoField=null,e.dataReturnOption&&(e.dataReturnOption.destroy(),e.dataReturnOption=null)}}s.GenerateSpatialDataParameters=Vi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Hi extends Ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GenerateSpatialDataService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Vi){var t,i=this;t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata";return this.url=ye.urlPathAppend(this.url,t),this.url=ye.urlAppend(this.url,"returnContent=true"),ye.toJSON(e)}}s.GenerateSpatialDataService=Hi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ji extends bt{constructor(e){super(e),this.bounds=null,this.queryType=ne.GEO_BOUNDING_BOX,this.CLASS_NAME="SuperMap.GeoBoundingBoxQueryBuilderParameter",ye.extend(this,e)}destroy(){super.destroy(),this.bounds=null,this.queryType=null}}s.GeoBoundingBoxQueryBuilderParameter=Ji;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class qi extends _t{constructor(e){super(e),this.precision=5,this.aggType=re.GEOHASH_GRID,ye.extend(this,e),this.CLASS_NAME="SuperMap.GeoHashGridAggParameter"}destroy(){super.destroy(),this.aggType=null}static toJsonParameters(e){var t={aggName:e.aggName,aggFieldName:e.aggFieldName,aggType:e.aggType,precision:e.precision};return e.subAgg&&(t.subAgg=e.subAgg),ye.toJson(t)}}s.GeoHashGridAggParameter=qi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Wi extends si{constructor(e){super(e),e&&e.operateGeometry&&(this.operateGeometry=e.operateGeometry),e&&e.sourceGeometry&&(this.sourceGeometry=e.sourceGeometry),e&&e.operateGeometries&&(this.operateGeometries=e.operateGeometries),e&&e.sourceGeometries&&(this.sourceGeometries=e.sourceGeometries),e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeometryOverlayAnalystParameters"}destroy(){super.destroy();var e=this;e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.sourceGeometries&&(e.sourceGeometries.destroy(),e.sourceGeometries=null),e.sourceGeometry&&(e.sourceGeometry.destroy(),e.sourceGeometry=null),e.operateGeometries&&(e.operateGeometries.destroy(),e.operateGeometries=null)}static toObject(e,t){for(var i in e)if("sourceGeometry"===i)t.sourceGeometry=ze.fromGeometry(e.sourceGeometry);else if("sourceGeometries"===i){for(var s=[],r=0;r<e.sourceGeometries.length;r++)s.push(ze.fromGeometry(e.sourceGeometries[r]));t.sourceGeometries=s}else if("operateGeometry"===i)t.operateGeometry=ze.fromGeometry(e.operateGeometry);else if("operateGeometries"===i){for(var n=[],a=0;a<e.operateGeometries.length;a++)n.push(ze.fromGeometry(e.operateGeometries[a]));t.operateGeometries=n}else t[i]=e[i]}}s.GeometryOverlayAnalystParameters=Wi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Yi extends ai{constructor(e){super(e),this.points=null,this.zValues=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeometrySurfaceAnalystParameters"}destroy(){super.destroy();if(this.points){for(var e=0,t=this.points,i=t.length;e<i;e++)t[e].destroy();this.points=null}this.zValues=null}}s.GeometrySurfaceAnalystParameters=Yi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Qi extends li{constructor(e){super(e),this.points=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeometryThiessenAnalystParameters"}destroy(){super.destroy();if(this.points){for(var e=this.points.length-1;e>=0;e--)this.points[e].destroy();this.points=null}}static toObject(e,t){for(var i in e)"clipRegion"===i?t.clipRegion=ze.fromGeometry(e.clipRegion):t[i]=e[i]}}s.GeometryThiessenAnalystParameters=Qi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Xi{constructor(e){this.dataset=null,this.sourceFilter=null,this.referenceFilter=null,this.spatialRelationType=null,this.isBorderInside=null,this.returnFeature=null,this.returnGeoRelatedOnly=null,this.startRecord=0,this.expectCount=500,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.GeoRelationAnalystParameters"}destroy(){var e=this;e.sourceFilter&&e.sourceFilter.destroy(),e.sourceFilter=null,e.referenceFilter&&e.referenceFilter.destroy(),e.referenceFilter=null,e.dataset=null,e.spatialRelationType=null,e.isBorderInside=null,e.returnFeature=null,e.returnGeoRelatedOnly=null,e.startRecord=null,e.expectCount=null}}s.GeoRelationAnalystParameters=Xi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ki extends Ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GeoRelationAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Xi){var t=this;t.url=ye.urlPathAppend(t.url,"datasets/"+e.dataset+"/georelation");var i=s.Util.toJSON(e);t.url=ye.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:i,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}s.GeoRelationAnalystService=Ki;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Zi{constructor(e){this.datasetNames=null,this.targetEpsgCode=null,this.targetPrj=null,this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.returnCountOnly=!1,this.maxFeatures=null,this.aggregations=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesParametersBase"}destroy(){var e=this;e.datasetNames=null,e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.targetEpsgCode=null,e.targetPrj=null,e.aggregation&&(e.aggregation=null)}}s.GetFeaturesParametersBase=Zi;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class $i extends Zi{constructor(e){super(e),this.getFeatureMode=$i.getFeatureMode.BOUNDS,this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=h.CONTAIN,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsParameters"}destroy(){super.destroy();var e=this;if(e.bounds&&(e.bounds.destroy(),e.bounds=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,i,s;return i={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},s={datasetNames:e.datasetNames,getFeatureMode:$i.getFeatureMode.BOUNDS,bounds:i,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new Ot).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode=$i.getFeatureMode.BOUNDS_ATTRIBUTEFILTER),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(s.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(s.targetPrj=e.targetPrj),ye.toJSON(s)}}$i.getFeatureMode={BOUNDS:"BOUNDS",BOUNDS_ATTRIBUTEFILTER:"BOUNDS_ATTRIBUTEFILTER"},s.GetFeaturesByBoundsParameters=$i;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class es extends yt{constructor(e,t){super(e,t),t=t||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.maxFeatures=null,this.format=r.GEOJSON,ye.extend(this,t),this.url=ye.urlPathAppend(this.url,"featureResults"),this.CLASS_NAME="SuperMap.GetFeaturesServiceBase"}destroy(){super.destroy();var e=this;e.returnContent=null,e.fromIndex=null,e.toIndex=null,e.maxFeatures=null,e.format=null}processAsync(e){if(e){var t,i=this,s=!0;i.returnContent=e.returnContent,i.fromIndex=e.fromIndex,i.toIndex=e.toIndex,i.maxFeatures=e.maxFeatures,i.returnContent&&(i.url=ye.urlAppend(i.url,"returnContent="+i.returnContent),s=!1),null!=i.fromIndex&&null!=i.toIndex&&!isNaN(i.fromIndex)&&!isNaN(i.toIndex)&&i.fromIndex>=0&&i.toIndex>=0&&!s&&(i.url=ye.urlAppend(i.url,`fromIndex=${i.fromIndex}&toIndex=${i.toIndex}`)),e.returnCountOnly&&(i.url=ye.urlAppend(i.url,"&returnCountOnly="+e.returnContent)),t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}serviceProcessCompleted(e){if(e=ye.transformResult(e),this.format===r.GEOJSON&&e.features){var t=new Ve;e.features=t.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}s.GetFeaturesServiceBase=es;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ts extends es{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return $i.toJsonParameters(e)}}s.GetFeaturesByBoundsService=ts;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class is extends Zi{constructor(e){super(e),this.bufferDistance=null,this.attributeFilter=null,this.geometry=null,this.fields=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByBufferParameters"}destroy(){super.destroy();var e=this;if(e.bufferDistance=null,e.attributeFilter=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}static toJsonParameters(e){var t,i,s;return s=ze.fromGeometry(e.geometry),i={datasetNames:e.datasetNames,getFeatureMode:"BUFFER",bufferDistance:e.bufferDistance,geometry:s},e.fields&&((t=new Ot).name=e.datasetNames,t.fields=e.fields,i.queryParameter=t),e.attributeFilter&&(i.attributeFilter=e.attributeFilter,i.getFeatureMode="BUFFER_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(i.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(i.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(i.targetPrj=e.targetPrj),ye.toJSON(i)}}s.GetFeaturesByBufferParameters=is;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ss extends es{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBufferService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof is)return s.GetFeaturesByBufferParameters.toJsonParameters(e)}}s.GetFeaturesByBufferService=ss;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class rs extends Zi{constructor(e){super(e),this.getFeatureMode="SPATIAL",this.geometry=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=h.CONTAIN,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryParameters"}destroy(){super.destroy();var e=this;if(e.geometry&&(e.geometry.destroy(),e.geometry=null),e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}static toJsonParameters(e){var t,i,s;return i=ze.fromGeometry(e.geometry),s={datasetNames:e.datasetNames,getFeatureMode:"SPATIAL",geometry:i,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new Ot).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode="SPATIAL_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(s.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(s.targetPrj=e.targetPrj),ye.toJSON(s)}}s.GetFeaturesByGeometryParameters=rs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ns extends es{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){return rs.toJsonParameters(e)}}s.GetFeaturesByGeometryService=ns;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class as extends Zi{constructor(e){super(e),this.getFeatureMode="ID",this.IDs=null,this.fields=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesByIDsParameters"}destroy(){super.destroy();var e=this;if(e.IDs=null,e.getFeatureMode=null,e.fields){for(;e.fields.length>0;)e.fields.pop();e.fields=null}}static toJsonParameters(e){var t,i;return t={datasetNames:e.datasetNames,getFeatureMode:"ID",ids:e.IDs},e.fields&&((i=new Ot).name=e.datasetNames,i.fields=e.fields,t.queryParameter=i),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),ye.toJSON(t)}}s.GetFeaturesByIDsParameters=as;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class os extends es{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByIDsService"}destroy(){super.destroy()}getJsonParameters(e){return as.toJsonParameters(e)}}s.GetFeaturesByIDsService=os;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ls extends Zi{constructor(e){super(e),this.getFeatureMode="SQL",this.queryParameter=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetFeaturesBySQLParameters"}destroy(){super.destroy();this.getFeatureMode=null,this.queryParameter&&(this.queryParameter.destroy(),this.queryParameter=null)}static toJsonParameters(e){var t={datasetNames:e.datasetNames,getFeatureMode:"SQL",queryParameter:e.queryParameter};return e.maxFeatures&&!isNaN(e.maxFeatures)&&(t.maxFeatures=e.maxFeatures),e.aggregations&&(t.aggregations=e.aggregations),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),ye.toJSON(t)}}s.GetFeaturesBySQLParameters=ls;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class hs extends es{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesBySQLService"}destroy(){super.destroy()}getJsonParameters(e){return ls.toJsonParameters(e)}}s.GetFeaturesBySQLService=hs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class us extends yt{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GetFieldsService"}destroy(){super.destroy();this.datasource=null,this.dataset=null}processAsync(){var e=this;e.url=ye.urlPathAppend(e.url,`datasources/${e.datasource}/datasets/${e.dataset}/fields`),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}s.GetFieldsService=us;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class cs{constructor(e){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.GetGridCellInfosParameters"}destroy(){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null}}s.GetGridCellInfosParameters=cs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ds extends yt{constructor(e,t){super(e,t),this.datasetName=null,this.dataSourceName=null,this.datasetType=null,this.X=null,this.Y=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GetGridCellInfosService"}destroy(){super.destroy();var e=this;e.X=null,e.Y=null,e.datasetName=null,e.dataSourceName=null,e.datasetType=null}processAsync(e){if(e instanceof cs){ye.extend(this,e);var t=this;t.url=ye.urlPathAppend(t.url,`datasources/${t.dataSourceName}/datasets/${t.datasetName}`),t.queryRequest(t.getDatasetInfoCompleted,t.getDatasetInfoFailed)}}queryRequest(e,t){this.request({method:"GET",data:null,scope:this,success:e,failure:t})}getDatasetInfoCompleted(e){e=ye.transformResult(e),this.datasetType=e.datasetInfo.type,this.queryGridInfos()}queryGridInfos(){var e=this;e.url=ye.urlPathAppend(e.url,"GRID"==e.datasetType?"gridValue":"imageValue"),null!=e.X&&null!=e.Y&&(e.url=ye.urlAppend(e.url,`x=${e.X}&y=${e.Y}`)),e.queryRequest(e.serviceProcessCompleted,e.serviceProcessFailed)}getDatasetInfoFailed(e){this.serviceProcessFailed(e)}}s.GetGridCellInfosService=ds;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ps{constructor(e,t){this.srcData=e,this.targetData=t,this.CLASS_NAME="SuperMap.ThemeMemoryData"}destroy(){this.srcData=null,this.targetData=null}toJSON(){if(this.srcData&&this.targetData){for(var e="",t=Math.min(this.srcData.length,this.targetData.length),i=0;i<t;i++)e+="'"+this.srcData[i]+"':'"+this.targetData[i]+"',";return i>0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}}s.ThemeMemoryData=ps;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class fs{constructor(e,t){if(!e)return this;this.memoryData=null,this.type=e,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.Theme"}destroy(){this.memoryData&&(this.memoryData.destroy(),this.memoryData=null),this.type=null}toServerJSONObject(){}}s.Theme=fs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ms{constructor(e){this.align=x.BASELINECENTER,this.backColor=new Be(255,255,255),this.foreColor=new Be(0,0,0),this.backOpaque=!1,this.sizeFixed=!0,this.fontHeight=6,this.fontWidth=0,this.fontWeight=400,this.fontName="Times New Roman",this.bold=!1,this.italic=!1,this.italicAngle=0,this.shadow=!1,this.strikeout=!1,this.outline=!1,this.opaqueRate=0,this.underline=!1,this.rotation=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerTextStyle"}destroy(){var e=this;e.align=null,e.backColor&&(e.backColor.destroy(),e.backColor=null),e.foreColor&&(e.foreColor.destroy(),e.foreColor=null),e.backOpaque=null,e.sizeFixed=null,e.fontHeight=null,e.fontWidth=null,e.fontWeight=null,e.fontName=null,e.bold=null,e.italic=null,e.italicAngle=null,e.shadow=null,e.strikeout=null,e.outline=null,e.opaqueRate=null,e.underline=null,e.rotation=null}static fromObj(e){var t=new ms(e);return ye.copy(t,e),t.backColor=Be.fromJson(e.backColor),t.foreColor=Be.fromJson(e.foreColor),t}}s.ServerTextStyle=ms;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ys{constructor(e){this.caption=null,this.end=0,this.start=0,this.visible=!0,this.style=new ms,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}static fromObj(e){if(e){var t=new ys;return ye.copy(t,e),t}}}s.ThemeLabelItem=ys;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class gs{constructor(e){this.caption=null,this.style=new Ue,this.unique=null,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeUniqueItem"}destroy(){var e=this;e.caption=null,e.unique=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){var t=new gs;return ye.copy(t,e),t.style=Ue.fromJson(e.style),t}}s.ThemeUniqueItem=gs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class vs{constructor(e){this.flowEnabled=!1,this.leaderLineDisplayed=!1,this.leaderLineStyle=new Ue,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeFlow"}destroy(){var e=this;e.flowEnabled=null,e.leaderLineDisplayed=null,e.leaderLineStyle&&(e.leaderLineStyle.destroy(),e.leaderLineStyle=null)}static fromObj(e){if(e){var t=new vs;return ye.copy(t,e),t.leaderLineStyle=Ue.fromJson(e.leaderLineStyle),t}}}s.ThemeFlow=vs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ss{constructor(e){this.offsetFixed=!1,this.offsetX="0.0",this.offsetY="0.0",e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeOffset"}destroy(){this.offsetFixed=null,this.offsetX=null,this.offsetY=null}static fromObj(e){if(e){var t=new Ss;return ye.copy(t,e),t}}}s.ThemeOffset=Ss;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class bs{constructor(e){this.defaultStyle=null,this.separator=null,this.separatorEnabled=!1,this.splitIndexes=null,this.styles=new ms,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LabelMixedTextStyle"}destroy(){var e=this;if(e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null),e.separator=null,e.separatorEnabled=null,e.splitIndexes&&(e.splitIndexes=null),e.styles){for(var t=0,i=e.styles,s=i.length;t<s;t++)i[t].destroy();e.styles=null}}static fromObj(e){if(e){var t=new bs,i=e.styles;if(ye.copy(t,e),t.defaultStyle=new ms(e.defaultStyle),i){t.styles=[];for(var s=0,r=i.length;s<r;s++)t.styles.push(new ms(i[s]))}return t}}}s.LabelMixedTextStyle=bs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class _s{constructor(e){this.maxTextHeight=0,this.maxTextWidth=0,this.minTextHeight=0,this.minTextWidth=0,this.uniformStyle=new ms,this.uniformMixedStyle=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelText"}destroy(){var e=this;e.maxTextHeight=null,e.maxTextWidth=null,e.minTextHeight=null,e.minTextWidth=null,e.uniformStyle&&(e.uniformStyle.destroy(),e.uniformStyle=null),e.uniformMixedStyle&&(e.uniformMixedStyle.destroy(),e.uniformMixedStyle=null)}static fromObj(e){if(e){var t=new _s;return ye.copy(t,e),t.uniformStyle=ms.fromObj(e.uniformStyle),t.uniformMixedStyle=bs.fromObj(e.uniformMixedStyle),t}}}s.ThemeLabelText=_s;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class xs{constructor(e){this.isAlongLine=!0,this.alongLineDirection=T.LB_TO_RT,this.angleFixed=!1,this.repeatedLabelAvoided=!1,this.repeatIntervalFixed=!1,this.labelRepeatInterval=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelAlongLine"}destroy(){var e=this;e.isAlongLine=null,e.alongLineDirection=null,e.angleFixed=null,e.repeatedLabelAvoided=null,e.repeatIntervalFixed=null,e.labelRepeatInterval=null}static fromObj(e){if(e){var t=new xs;return ye.copy(t,e),t}}}s.ThemeLabelAlongLine=xs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Cs{constructor(e){this.labelBackShape=M.NONE,this.backStyle=new Ue,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelBackground"}destroy(){this.labelBackShape=null,this.backStyle&&(this.backStyle.destroy(),this.backStyle=null)}static fromObj(e){if(e){var t=new Cs;return t.labelBackShape=e.labelBackShape,t.backStyle=Ue.fromJson(e.backStyle),t}}}s.ThemeLabelBackground=Cs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ts extends fs{constructor(e){super("LABEL",e),this.alongLine=new xs,this.background=new Cs,this.flow=new vs,this.items=null,this.uniqueItems=null,this.labelExpression=null,this.labelOverLengthMode=w.NONE,this.matrixCells=null,this.maxLabelLength=256,this.numericPrecision=0,this.offset=new Ss,this.overlapAvoided=!0,this.rangeExpression=null,this.uniqueExpression=null,this.smallGeometryLabeled=!1,this.text=new _s,this.textSpace=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabel"}destroy(){super.destroy();var e=this;if(e.alongLine=null,e.background&&(e.background.destroy(),e.background=null),e.flow=null,e.items){for(var t=0,i=e.items,s=i.length;t<s;t++)i[t].destroy();e.items=null}if(e.uniqueItems){for(var r=0,n=e.uniqueItems,a=n.length;r<a;r++)n[r].destory();e.uniqueItems=null}e.labelExpression=null,e.labelOverLengthMode=null,e.matrixCells=null,e.maxLabelLength=null,e.numericPrecision=null,e.overlapAvoided=null,e.rangeExpression=null,e.uniqueExpression=null,e.offset&&(e.offset.destroy(),e.offset=null),e.overlapAvoided=null,e.smallGeometryLabeled=null,e.text&&(e.text.destroy(),e.text=null),e.textSpace=null}toJSON(){return ye.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,e.memoryData=this.memoryData,this.alongLine&&(e.alongLine=this.alongLine.isAlongLine,e.alongLineDirection=this.alongLine.alongLineDirection,e.angleFixed=this.alongLine.angleFixed,e.isLabelRepeated=this.alongLine.isLabelRepeated,e.labelRepeatInterval=this.alongLine.labelRepeatInterval,e.repeatedLabelAvoided=this.alongLine.repeatedLabelAvoided,e.repeatIntervalFixed=this.alongLine.repeatIntervalFixed),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.text&&(e.maxTextHeight=this.text.maxTextHeight,e.maxTextWidth=this.text.maxTextWidth,e.minTextHeight=this.text.minTextHeight,e.minTextWidth=this.text.minTextWidth,e.uniformStyle=this.text.uniformStyle,e.uniformMixedStyle=this.text.uniformMixedStyle),this.background&&(e.labelBackShape=this.background.labelBackShape,e.backStyle=this.background.backStyle),e.labelOverLengthMode=this.labelOverLengthMode,e.maxLabelLength=this.maxLabelLength,e.smallGeometryLabeled=this.smallGeometryLabeled,e.rangeExpression=this.rangeExpression,e.uniqueExpression=this.uniqueExpression,e.numericPrecision=this.numericPrecision,e.items=this.items,e.uniqueItems=this.uniqueItems,e.labelExpression=this.labelExpression,e.overlapAvoided=this.overlapAvoided,e.matrixCells=this.matrixCells,e.textSpace=this.textSpace,e}static fromObj(e){if(e){var t=new Ts,i=e.items,s=e.uniqueItems,r=e.matrixCells;if(e.matrixCells=null,ye.copy(t,e),t.alongLine=xs.fromObj(e),t.background=Cs.fromObj(e),t.flow=new vs({flowEnabled:e.flowEnabled,leaderLineDisplayed:e.leaderLineDisplayed,leaderLineStyle:e.leaderLineStyle}),i){t.items=[];for(var n=0,a=i.length;n<a;n++)t.items.push(ys.fromObj(i[n]))}if(s){t.uniqueItems=[];for(let e=0,i=s.length;e<i;e++)t.uniqueItems.push(gs.fromObj(s[e]))}if(r){t.matrixCells=[];for(let e=0,t=r.length;e<t;e++);}return t.offset=Ss.fromObj(e),t.text=_s.fromObj(e),t}}}s.ThemeLabel=Ts;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ms extends fs{constructor(e){super("UNIQUE",e),this.defaultStyle=new Ue,this.items=null,this.uniqueExpression=null,this.colorGradientType=_.YELLOW_RED,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeUnique"}destroy(){super.destroy();var e=this;if(e.uniqueExpression=null,e.colorGradientType=null,e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null)}toServerJSONObject(){var e={};if((e=ye.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],i=e.items.length,s=0;s<i;s++)t.push(e.items[s].toServerJSONObject());e.items=t}return e}static fromObj(e){var t=new Ms,i=e.items,s=i?i.length:0;ye.extend(t,e),t.items=[],t.defaultStyle=Ue.fromJson(e.defaultStyle);for(var r=0;r<s;r++)t.items.push(gs.fromObj(i[r]));return t}}s.ThemeUnique=Ms;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ws{constructor(e){this.axesColor=new Be(0,0,0),this.axesDisplayed=!1,this.axesGridDisplayed=!1,this.axesTextDisplayed=!1,this.axesTextStyle=new ms,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphAxes"}destroy(){var e=this;e.axesColor&&(e.axesColor.destroy(),e.axesColor=null),e.axesDisplayed=null,e.axesGridDisplayed=null,e.axesTextDisplayed=null,e.axesTextStyle&&(e.axesTextStyle.destroy(),e.axesTextStyle=null)}static fromObj(e){if(e){var t=new ws;return ye.copy(t,e),t.axesColor=Be.fromJson(e.axesColor),t.axesTextStyle=ms.fromObj(e.axesTextStyle),t}}}s.ThemeGraphAxes=ws;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Es{constructor(e){this.maxGraphSize=0,this.minGraphSize=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphSize"}destroy(){this.maxGraphSize=null,this.minGraphSize=null}static fromObj(e){var t=new Es;return ye.copy(t,e),t}}s.ThemeGraphSize=Es;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class As{constructor(e){this.graphTextDisplayed=!1,this.graphTextFormat=m.CAPTION,this.graphTextStyle=new ms,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphText"}destroy(){var e=this;e.graphTextDisplayed=null,e.graphTextFormat=null,e.graphTextStyle&&(e.graphTextStyle.destroy(),e.graphTextStyle=null)}static fromObj(e){var t=new As;return ye.copy(t,e),t.graphTextStyle=ms.fromObj(e.graphTextStyle),t}}s.ThemeGraphText=As;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ls{constructor(e){this.caption=null,this.graphExpression=null,this.memoryDoubleValues=null,this.uniformStyle=new Ue,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraphItem"}destroy(){this.caption=null,this.graphExpression=null,this.memoryDoubleValues=null,this.uniformStyle=null}static fromObj(e){if(e){var t=new Ls;return ye.copy(t,e),t.uniformStyle=Ue.fromJson(e.uniformStyle),t}}}s.ThemeGraphItem=Ls;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ps extends fs{constructor(e){super("GRAPH",e),this.barWidth=0,this.flow=new vs,this.graduatedMode=v.CONSTANT,this.graphAxes=new ws,this.graphSize=new Es,this.graphSizeFixed=!1,this.graphText=new As,this.graphType=y.AREA,this.graphAxesTextDisplayMode=g.NONE,this.items=null,this.memoryKeys=null,this.negativeDisplayed=!1,this.offset=new Ss,this.overlapAvoided=!0,this.roseAngle=0,this.startAngle=0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraph"}destroy(){super.destroy();var e=this;if(e.barWidth=null,e.flow&&(e.flow.destroy(),e.flow=null),e.graduatedMode=null,e.graphAxes&&(e.graphAxes.destroy(),e.graphAxes=null),e.graphSize&&(e.graphSize.destroy(),e.graphSize=null),e.graphSizeFixed=null,e.graphText&&(e.graphText.destroy(),e.graphText=null),e.graphType=null,e.items){for(var t=0,i=e.items,s=i.length;t<s;t++)i[t].destroy();e.items=null}e.memoryKeys=null,e.negativeDisplayed=null,e.offset&&(e.offset.destroy(),e.offset=null),e.overlapAvoided=null,e.roseAngle=null,e.startAngle=null,e.graphAxesTextDisplayMode=null}toJSON(){return ye.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,this.graphText&&(e.graphTextDisplayed=this.graphText.graphTextDisplayed,e.graphTextFormat=this.graphText.graphTextFormat,e.graphTextStyle=this.graphText.graphTextStyle),this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.graphAxes&&(e.axesColor=this.graphAxes.axesColor,e.axesDisplayed=this.graphAxes.axesDisplayed,e.axesGridDisplayed=this.graphAxes.axesGridDisplayed,e.axesTextDisplayed=this.graphAxes.axesTextDisplayed,e.axesTextStyle=this.graphAxes.axesTextStyle),this.graphSize&&(e.maxGraphSize=this.graphSize.maxGraphSize,e.minGraphSize=this.graphSize.minGraphSize),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),e.barWidth=this.barWidth,e.graduatedMode=this.graduatedMode,e.graphSizeFixed=this.graphSizeFixed,e.graphType=this.graphType,e.graphAxesTextDisplayMode=this.graphAxesTextDisplayMode,e.items=this.items,e.memoryKeys=this.memoryKeys,e.negativeDisplayed=this.negativeDisplayed,e.overlapAvoided=this.overlapAvoided,e.roseAngle=this.roseAngle,e.startAngle=this.startAngle,e}static fromObj(e){var t=new Ps,i=e.items,s=i?i.length:0;ye.copy(t,e),t.items=[],t.flow=vs.fromObj(e),t.graphAxes=ws.fromObj(e),t.graphSize=Es.fromObj(e),t.graphText=As.fromObj(e),t.offset=Ss.fromObj(e);for(var r=0;r<s;r++)t.items.push(Ls.fromObj(i[r]));return t}}s.ThemeGraph=Ps;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ns extends fs{constructor(e){super("DOTDENSITY",e),this.dotExpression=null,this.style=new Ue,this.value=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeDotDensity"}destroy(){var e=this;e.dotExpression=null,e.value=null,e.style&&(e.style.destroy(),e.style=null)}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){if(e){var t=new Ns;return ye.copy(t,e),t.style=Ue.fromJson(e.style),t}}}s.ThemeDotDensity=Ns;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Os{constructor(e){this.negativeDisplayed=!1,this.negativeStyle=new Ue,this.positiveStyle=new Ue,this.zeroDisplayed=!1,this.zeroStyle=new Ue,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraduatedSymbolStyle"}destroy(){var e=this;e.negativeDisplayed=null,e.negativeStyle=null,e.positiveStyle=null,e.zeroDisplayed=null,e.zeroStyle=null}static fromObj(e){if(e){var t=new Os;return ye.copy(t,e),t.negativeStyle=Ue.fromJson(e.negativeStyle),t.positiveStyle=Ue.fromJson(e.positiveStyle),t.zeroStyle=Ue.fromJson(e.zeroStyle),t}}}s.ThemeGraduatedSymbolStyle=Os;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Is extends fs{constructor(e){super("GRADUATEDSYMBOL",e),this.baseValue=0,this.expression=null,this.flow=new vs,this.graduatedMode=s.GraduatedMode.CONSTAN,this.offset=new Ss,this.style=new Os,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGraduatedSymbol"}destroy(){super.destroy();var e=this;e.expression=null,e.flow&&(e.flow.destroy(),e.flow=null),e.graduatedMode=v.CONSTANT,e.offset&&(e.offset.destroy(),e.offset=null),e.style&&(e.style.destroy(),e.style=null)}toJSON(){return ye.toJSON(this.toServerJSONObject())}toServerJSONObject(){var e={};return e.type=this.type,e.memoryData=this.memoryData,e.baseValue=this.baseValue,e.expression=this.expression,e.graduatedMode=this.graduatedMode,this.flow&&(e.flowEnabled=this.flow.flowEnabled,e.leaderLineDisplayed=this.flow.leaderLineDisplayed,e.leaderLineStyle=this.flow.leaderLineStyle),this.offset&&(e.offsetFixed=this.offset.offsetFixed,e.offsetX=this.offset.offsetX,e.offsetY=this.offset.offsetY),this.style&&(e.negativeStyle=this.style.negativeStyle,e.negativeDisplayed=this.style.negativeDisplayed,e.positiveStyle=this.style.positiveStyle,e.zeroDisplayed=this.style.zeroDisplayed,e.zeroStyle=this.style.zeroStyle),e}static fromObj(e){if(e){var t=new s.ThemeGraduatedSymbol;return ye.copy(t,e),t.flow=vs.fromObj(e),t.offset=Ss.fromObj(e),t.style=Os.fromObj(e),t}}}s.ThemeGraduatedSymbol=Is;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Fs{constructor(e){this.caption=null,this.end=0,this.start=0,this.style=new Ue,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeRangeItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){if(e){var t=new Fs;return ye.copy(t,e),t.style=Ue.fromJson(e.style),t}}}s.ThemeRangeItem=Fs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Rs extends fs{constructor(e){super("RANGE",e),this.precision="1.0E-12",this.items=null,this.rangeExpression=null,this.rangeMode=S.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=_.YELLOW_RED,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeRange"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.rangeExpression=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new Rs;ye.copy(t,e);var i=e.items,s=i?i.length:0;t.items=[];for(var r=0;r<s;r++)t.items.push(Fs.fromObj(i[r]));return t}}}s.ThemeRange=Rs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ds{constructor(e){e=e||{},this.bounds=null,this.caption=null,this.description=null,this.name=null,this.queryable=null,this.subLayers=null,this.type=null,this.visible=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.UGCLayer"}destroy(){ye.reset(this)}fromJson(e){e=e||{},ye.extend(this,e);var t=this.bounds;t&&(this.bounds=new ve(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y))}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}s.UGCLayer=Ds;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ks{constructor(e){e=e||{},this.allowPointOverlap=!0,this.allowPointWithTextDisplay=!0,this.allowTextOverlap=!1,this.allowTextAndPointOverlap=!0,this.allowThemeGraduatedSymbolOverlap=!1,this.allowThemeGraphOverlap=!1,this.horizontalOverlappedSpaceSize=0,this.verticalOverlappedSpaceSize=0,ye.extend(this,e),this.ugcLayer=new Ds(e),this.CLASS_NAME="SuperMap.OverlapDisplayedOptions"}destroy(){ye.reset(this)}fromJson(e){this.ugcLayer.fromJson.apply(this,[e])}toServerJSONObject(){return this.ugcLayer.toServerJSONObject.apply(this,arguments)}toString(){var e=this.ugcLayer.toServerJSONObject.apply(this,arguments),t="{";for(var i in e)e.hasOwnProperty(i)&&(t+="'"+i+"':"+e[i]+",");return t=t.substr(0,t.length-1),t+="}"}}s.OverlapDisplayedOptions=ks;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Bs extends Ds{constructor(e){super(e=e||{}),this.completeLineSymbolDisplayed=null,this.maxScale=null,this.minScale=null,this.minVisibleGeometrySize=null,this.opaqueRate=null,this.symbolScalable=null,this.symbolScale=null,this.overlapDisplayed=null,this.overlapDisplayedOptions=null,this.CLASS_NAME="SuperMap.UGCMapLayer"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e)}toServerJSONObject(){return super.toServerJSONObject()}}s.UGCMapLayer=Bs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Us extends Bs{constructor(e){super(e=e||{}),this.datasetInfo=null,this.displayFilter=null,this.joinItems=null,this.representationField=null,this.ugcLayerType=null,this.CLASS_NAME="SuperMap.UGCSubLayer"}fromJson(e){if(super.fromJson(e),this.datasetInfo&&(this.datasetInfo=new ii(this.datasetInfo)),this.joinItems&&this.joinItems.length){for(var t=[],i=0;i<this.joinItems.length;i++)t[i]=new Lt(this.joinItems[i]);this.joinItems=t}}destroy(){super.destroy(),ye.reset(this)}toServerJSONObject(){var e=super.toServerJSONObject();if(e.joinItems){for(var t=[],i=0;i<e.joinItems.length;i++)e.joinItems[i].toServerJSONObject&&(t[i]=e.joinItems[i].toServerJSONObject());e.joinItems=t}return e.datasetInfo&&e.datasetInfo.toServerJSONObject&&(e.datasetInfo=e.datasetInfo.toServerJSONObject()),e}}s.UGCSubLayer=Us;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Gs extends Us{constructor(e){super(e=e||{}),this.theme=null,this.themeElementPosition=null,this.CLASS_NAME="SuperMap.ServerTheme"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e);var t=this.theme;switch(t&&t.type){case"LABEL":this.theme=Ts.fromObj(t);break;case"UNIQUE":this.theme=Ms.fromObj(t);break;case"GRAPH":this.theme=Ps.fromObj(t);break;case"DOTDENSITY":this.theme=Ns.fromObj(t);break;case"GRADUATEDSYMBOL":this.theme=Is.fromObj(t);break;case"RANGE":this.theme=Rs.fromObj(t)}this.themeElementPosition&&(this.themeElementPosition=new ge(this.themeElementPosition.x,this.themeElementPosition.y))}toServerJSONObject(){var e=super.toServerJSONObject();return e.themeElementPosition&&e.themeElementPosition.toServerJSONObject&&(e.themeElementPosition=e.themeElementPosition.toServerJSONObject()),e.theme&&e.theme.toServerJSONObject&&(e.theme=e.theme.toServerJSONObject()),e}}s.ServerTheme=Gs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class js extends Us{constructor(e){super(e=e||{}),this.colorDictionarys=null,this.brightness=null,this.colorGradientType=null,this.colors=null,this.contrast=null,this.dashStyle=null,this.gridType=null,this.horizontalSpacing=null,this.sizeFixed=null,this.solidStyle=null,this.specialColor=null,this.specialValue=null,this.specialValueTransparent=null,this.verticalSpacing=null,this.CLASS_NAME="SuperMap.Grid"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){if(super.fromJson(e),this.specialColor&&(this.specialColor=new Be(this.specialColor.red,this.specialColor.green,this.specialColor.blue)),this.colors){var t,i=[];for(var s in this.colors)t=this.colors[s],i.push(new Be(t.red,t.green,t.blue));this.colors=i}if(this.dashStyle&&(this.dashStyle=new Ue(this.dashStyle)),this.solidStyle&&(this.solidStyle=new Ue(this.solidStyle)),this.colorDictionary){var r,n=[];for(var a in this.colorDictionary)r=this.colorDictionary[a],n.push(new Xt({elevation:a,color:r}));this.colorDictionarys=n}delete this.colorDictionary}toServerJSONObject(){var e=super.toServerJSONObject();return e.dashStyle&&e.dashStyle.toServerJSONObject&&(e.dashStyle=e.dashStyle.toServerJSONObject()),e.solidStyle&&e.solidStyle.toServerJSONObject&&(e.solidStyle=e.solidStyle.toServerJSONObject()),e}}s.Grid=js;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class zs extends Us{constructor(e){super(e=e||{}),this.brightness=null,this.colorSpaceType=null,this.contrast=null,this.displayBandIndexes=null,this.transparent=null,this.transparentColor=null,this.transparentColorTolerance=null,this.CLASS_NAME="SuperMap.Image"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e),this.transparentColor&&(this.transparentColor=new Be(this.transparentColor.red,this.transparentColor.green,this.transparentColor.blue))}toServerJSONObject(){return super.toServerJSONObject()}}s.Image=zs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Vs extends Us{constructor(e){super(e=e||{}),this.style=null,this.CLASS_NAME="SuperMap.Vector"}destroy(){super.destroy(),ye.reset(this)}fromJson(e){super.fromJson(e);var t=this.style;t&&(this.style=new Ue(t))}toServerJSONObject(){var e=s.toServerJSONObject();return e.style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}}s.Vector=Vs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Hs extends yt{constructor(e,t){super(e,t),this.isTempLayers=!1,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GetLayersInfoService"}destroy(){super.destroy(),ye.reset(this)}processAsync(){var e=this;e.isTempLayers||(e.url=ye.urlPathAppend(e.url,"layers")),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}serviceProcessCompleted(e){var t,i;i=(t=!!(e=ye.transformResult(e))&&e.length>0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(i,t),this.events.triggerEvent("processCompleted",{result:e[0]})}handleLayers(e,t){var i;if(e)for(var s=0;s<e;s++){if(t[s].subLayers&&t[s].subLayers.layers&&t[s].subLayers.layers.length>0)this.handleLayers(t[s].subLayers.layers.length,t[s].subLayers.layers);else switch(t[s].ugcLayerType){case"THEME":(i=new Gs).fromJson(t[s]),t[s]=i;break;case"GRID":(i=new js).fromJson(t[s]),t[s]=i;break;case"IMAGE":(i=new zs).fromJson(t[s]),t[s]=i;break;case"VECTOR":(i=new Vs).fromJson(t[s]),t[s]=i}}}}s.GetLayersInfoService=Hs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Js{constructor(e){e&&(this.bounds=null,this.searchRadius=0,this.zValueFieldName=null,this.zValueScale=1,this.resolution=null,this.filterQueryParameter=null,this.outputDatasetName=null,this.outputDatasourceName=null,this.pixelFormat=null,this.dataset=null,this.inputPoints=null,this.InterpolationAnalystType="dataset",this.clipParam=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationAnalystParameters")}destroy(){var e=this;e.bounds=null,e.searchRadius=null,e.zValueFieldName=null,e.zValueScale=null,e.resolution=null,e.filterQueryParameter=null,e.outputDatasetName=null,e.pixelFormat=null}static toObject(e,t){for(var i in e)if("inputPoints"===i&&"geometry"===e.InterpolationAnalystType){for(var s=[],r=0;r<e.inputPoints.length;r++){var n=e.inputPoints[r],a={x:n.x,y:n.y,z:n.tag};s.push(a)}t[i]=s}else t[i]=e[i]}}s.InterpolationAnalystParameters=Js;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class qs extends Js{constructor(e){super(e),this.smooth=.1,this.tension=40,this.searchMode=null,this.expectedCount=12,this.maxPointCountForInterpolation=200,this.maxPointCountInNode=50,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationRBFAnalystParameters"}destroy(){super.destroy();var e=this;e.smooth=null,e.tension=null,e.searchMode=null,e.expectedCount=null,e.maxPointCountForInterpolation=null,e.maxPointCountInNode=null}static toObject(e,t){for(var i in e)t[i]=e[i]}}s.InterpolationRBFAnalystParameters=qs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ws extends Js{constructor(e){super(e),e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationDensityAnalystParameters"}destroy(){super.destroy()}}s.InterpolationDensityAnalystParameters=Ws;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ys extends Js{constructor(e){super(e),this.power=2,this.searchMode=null,this.expectedCount=12,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationIDWAnalystParameters"}destroy(){super.destroy();this.power=null,this.searchMode=null,this.expectedCount=null}}s.InterpolationIDWAnalystParameters=Ys;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Qs extends Js{constructor(e){super(e),this.type=null,this.mean=null,this.angle=0,this.nugget=0,this.range=0,this.sill=0,this.variogramMode=Y.SPHERICAL,this.exponent=Q.EXP1,this.searchMode=null,this.expectedCount=12,this.maxPointCountForInterpolation=200,this.maxPointCountInNode=50,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.InterpolationKrigingAnalystParameters"}destroy(){super.destroy();var e=this;e.type=null,e.mean=null,e.angle=null,e.nugget=null,e.range=null,e.sill=null,e.variogramMode=null,e.exponent=null,e.searchMode=null,e.expectedCount=null,e.maxPointCountForInterpolation=null,e.maxPointCountInNode=null}}s.InterpolationKrigingAnalystParameters=Qs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Xs extends Ct{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t)}destroy(){super.destroy(),this.mode=null,this.CLASS_NAME="SuperMap.InterpolationAnalystService"}processAsync(e){var t={},i=this;e instanceof Ws?(i.mode="Density","geometry"===e.InterpolationAnalystType?i.url=ye.urlPathAppend(i.url,"geometry/interpolation/density"):i.url=ye.urlPathAppend(i.url,"datasets/"+e.dataset+"/interpolation/density")):e instanceof Ys?(i.mode="IDW","geometry"===e.InterpolationAnalystType?i.url=ye.urlPathAppend(i.url,"geometry/interpolation/idw"):i.url=ye.urlPathAppend(i.url,"datasets/"+e.dataset+"/interpolation/idw")):e instanceof qs?(i.mode="RBF","geometry"===e.InterpolationAnalystType?i.url=ye.urlPathAppend(i.url,"geometry/interpolation/rbf"):i.url=ye.urlPathAppend(i.url,"datasets/"+e.dataset+"/interpolation/rbf")):e instanceof Qs&&(i.mode="Kriging","geometry"===e.InterpolationAnalystType?i.url=ye.urlPathAppend(i.url,"geometry/interpolation/kriging"):i.url=ye.urlPathAppend(i.url,"datasets/"+e.dataset+"/interpolation/kriging")),Js.toObject(e,t);var s=ye.toJSON(t);i.url=ye.urlAppend(i.url,"returnContent=true"),i.request({method:"POST",data:s,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}s.InterpolationAnalystService=Xs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ks{constructor(e){e&&(this.datasetName="",this.query="",this.resolution=80,this.method=0,this.meshType=0,this.fields="",this.radius=300,this.meshSizeUnit=ee.METER,this.radiusUnit=ee.METER,this.areaUnit=$.SQUAREMILE,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.KernelDensityJobParameter")}destroy(){this.datasetName=null,this.query=null,this.resolution=null,this.method=null,this.radius=null,this.meshType=null,this.fields=null,this.meshSizeUnit=null,this.radiusUnit=null,this.areaUnit=null,this.output instanceof Dt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof kt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var i in e)"datasetName"!==i?"output"!==i?(t.analyst=t.analyst||{},"query"===i&&e[i]?t.analyst[i]=e[i].toBBOX():t.analyst[i]=e[i],"mappingParameters"===i&&(t.analyst[i]=t.analyst[i]||{},t.analyst.mappingParameters=e[i])):(t.output=t.output||{},t.output=e[i]):(t.input=t.input||{},t.input[i]=e[i])}}s.KernelDensityJobParameter=Ks;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Zs extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/density"),this.CLASS_NAME="SuperMap.KernelDensityJobsService"}destroy(){super.destroy()}getKernelDensityJobs(){super.getJobs(this.url)}getKernelDensityJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addKernelDensityJob(e,t){super.addJob(this.url,e,Ks,t)}}s.KernelDensityJobsService=Zs;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class $s{constructor(){this.CLASS_NAME="LabelMatrixCell"}}s.LabelMatrixCell=$s;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class er extends $s{constructor(e){super(e),this.height=0,this.pathField=null,this.rotation=0,this.width=0,this.sizeFixed=!1,this.type="IMAGE",e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LabelImageCell"}destroy(){var e=this;e.height=null,e.pathField=null,e.rotation=null,e.width=null,e.sizeFixed=null}}s.LabelImageCell=er;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class tr extends $s{constructor(e){super(e),this.style=new Ue,this.symbolIDField=null,this.type="SYMBOL",e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LabelSymbolCell"}destroy(){this.style&&(this.style.destroy(),this.style=null),this.symbolIDField=null}}s.LabelSymbolCell=tr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ir extends $s{constructor(e){super(e),this.themeLabel=new Ts,this.type="THEME",e&&ye.extend(this,e),this.CLASS_NAME=" SuperMap.LabelThemeCell"}destroy(){this.themeLabel&&(this.themeLabel.destroy(),this.themeLabel=null)}}s.LabelThemeCell=ir;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class sr{constructor(e){this.layerName=null,this.isVisible=null,this.displayFilter=null,this.fieldValuesDisplayFilter=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.LayerStatus"}destroy(){this.layerName=null,this.isVisible=null,this.displayFilter=null}toJSON(){var e="{";e+='"type":"UGC",';var t=[];return this.layerName&&(t.push('"name":"'+this.layerName+'"'),t.push('"visible":'+this.isVisible)),this.displayFilter&&t.push('"displayFilter":"'+this.displayFilter+'"'),(this.minScale||0==this.minScale)&&t.push('"minScale":'+this.minScale),(this.maxScale||0==this.maxScale)&&t.push('"maxScale":'+this.maxScale),this.fieldValuesDisplayFilter&&t.push('"fieldValuesDisplayFilter":'+ye.toJSON(this.fieldValuesDisplayFilter)),e+=t,e+="}"}}s.LayerStatus=sr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class rr extends yt{constructor(e,t){super(e,t),this.projection=null,this.CLASS_NAME="SuperMap.MapService",t&&ye.extend(this,t);var i=this;if(i.projection){var s=i.projection.split(":");s instanceof Array&&(2===s.length&&(i.url=ye.urlAppend(i.url,`prjCoordSys={"epsgCode":"${s[1]}"}`)),1===s.length&&(i.url=ye.urlAppend(i.url,`prjCoordSys={"epsgCode":"${s[0]}"}`)))}}destroy(){super.destroy();var e=this;e.events&&(e.events.un(e.eventListeners),e.events.listeners=null,e.events.destroy(),e.events=null,e.eventListeners=null)}processAsync(){this.request({method:"GET",scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}serviceProcessCompleted(e){var t=(e=ye.transformResult(e)).code>=200&&e.code<300||0==e.code||304===e.code,i=e.code&&t;!e.code||i?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}}s.MapService=rr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class nr{constructor(e){e&&(this.dataset=null,this.extractRegion=null,this.expression=null,this.isZip=!1,this.ignoreNoValue=!1,this.targetDatasource=null,this.resultGridName=null,this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.MathExpressionAnalysisParameters")}destroy(){var e=this;e.dataset=null,e.bounds=null,e.expression=null,e.isZip=!0,e.ignoreNoValue=!0,e.targetDatasource=null,e.resultGridName=null,e.deleteExistResultDataset=null}static toObject(e,t){for(var i in e)if("dataset"!==i&&(t[i]=e[i]),"extractRegion"===i&&e[i]){for(var s=e[i].components[0].components,r={},n=[],a=s.length,o=0;o<a-1;o++){var l={};l.x=s[o].x,l.y=s[o].y,n.push(l)}r.points=n,r.type="REGION",t[i]=r}}}s.MathExpressionAnalysisParameters=nr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ar extends Ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.MathExpressionAnalysisService"}destroy(){super.destroy()}processAsync(e){var t=this,i={};e instanceof nr&&(t.url=ye.urlPathAppend(t.url,"datasets/"+e.dataset+"/mathanalyst")),nr.toObject(e,i);var s=ye.toJSON(i);t.url=ye.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}s.MathExpressionAnalysisService=ar;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class or{constructor(e,t){e&&(this.geometry=e,this.unit=d.METER,this.prjCoordSys=null,this.distanceMode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.MeasureParameters")}destroy(){this.geometry=null,this.unit=null,this.prjCoordSys=null}}s.MeasureParameters=or;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class lr extends yt{constructor(e,t){super(e,t),this.measureMode=c.DISTANCE,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.MeasureService"}destroy(){super.destroy();this.measureMode=null}processAsync(e){if(e instanceof or){var t,i,s=this,r=e.geometry;if(r){s.url=ye.urlPathAppend(s.url,s.measureMode===c.AREA?"area":"distance");var n,a,o,l=ze.fromGeometry(r);if(l)t=l.parts[0],i=l.points.splice(0,t),e.prjCoordSys?("object"==typeof e.prjCoordSys?n='{"epsgCode"'+(a=e.prjCoordSys.projCode).substring(a.indexOf(":"),a.length)+"}":"string"==typeof e.prjCoordSys&&(n='{"epsgCode"'+e.prjCoordSys.substring(e.prjCoordSys.indexOf(":"),e.prjCoordSys.length)+"}"),o={point2Ds:ye.toJSON(i),unit:e.unit,prjCoordSys:n}):o={point2Ds:ye.toJSON(i),unit:e.unit},s.request({method:"GET",params:o,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}}s.MeasureService=lr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class hr extends Ct{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.OverlayAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},i=this;e instanceof ri?(i.mode="datasets",i.url=ye.urlPathAppend(i.url,"datasets/"+e.sourceDataset+"/overlay"),ri.toObject(e,t)):e instanceof Wi&&(i.mode="geometry",e.operateGeometries&&e.sourceGeometries?(i.url=ye.urlPathAppend(i.url,"geometry/overlay/batch"),i.url=ye.urlAppend(i.url,"ignoreAnalystParam=true")):i.url=ye.urlPathAppend(i.url,"geometry/overlay"),Wi.toObject(e,t)),i.url=ye.urlAppend(i.url,"returnContent=true");var s=ye.toJSON(t);i.request({method:"POST",data:s,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}s.OverlayAnalystService=hr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ur{constructor(e){e&&(this.datasetName="",this.datasetOverlay="",this.mode="",this.srcFields="",this.overlayFields="",this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.OverlayGeoJobParameter")}destroy(){this.datasetName=null,this.datasetOverlay=null,this.mode=null,this.srcFields=null,this.overlayFields=null,this.output instanceof Dt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof kt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var i in e)"datasetName"!=i?"output"!==i?(t.analyst=t.analyst||{},t.analyst[i]=e[i],"mappingParameters"===i&&(t.analyst[i]=t.analyst[i]||{},t.analyst.mappingParameters=e[i])):(t.output=t.output||{},t.output=e[i]):(t.input=t.input||{},t.input[i]=e[i])}}s.OverlayGeoJobParameter=ur;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class cr extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/overlay"),this.CLASS_NAME="SuperMap.OverlayGeoJobsService"}destroy(){super.destroy()}getOverlayGeoJobs(){super.getJobs(this.url)}getOverlayGeoJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addOverlayGeoJob(e,t){super.addJob(this.url,e,ur,t)}}s.OverlayGeoJobsService=cr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class dr extends Wt{constructor(e){e&&(super(e),this.returnContent=!0,this.bounds=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryByBoundsParameters")}destroy(){super.destroy();this.returnContent=null,this.bounds&&(this.bounds=null)}}s.QueryByBoundsParameters=dr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class pr extends yt{constructor(e,t){super(e,t),this.returnContent=!1,this.format=r.GEOJSON,this.returnFeatureWithFieldCaption=!1,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.QueryService",this.url&&(t&&t.format&&(this.format=t.format.toUpperCase()),this.url=ye.urlPathAppend(this.url,"queryResults"))}destroy(){super.destroy();this.returnContent=null,this.format=null}processAsync(e){if(e instanceof Wt){var t,i=this,s=null;i.returnContent=e.returnContent,t=i.getJsonParameters(e),i.returnContent?i.url=ye.urlAppend(i.url,"returnContent="+i.returnContent):(s=e.returnCustomResult)&&(i.url=ye.urlAppend(i.url,"returnCustomResult="+s)),i.returnFeatureWithFieldCaption=e.returnFeatureWithFieldCaption,i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}serviceProcessCompleted(e){e=ye.transformResult(e);var t=new Ve;if(e&&e.recordsets)for(var i=0,s=e.recordsets,n=s.length;i<n;i++)s[i].features&&(!0===this.returnFeatureWithFieldCaption&&s[i].features.map(e=>(e.fieldNames=s[i].fieldCaptions,e)),this.format===r.GEOJSON&&(s[i].features=t.toGeoJSON(s[i].features)));this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new Wt({customParams:e.customParams,expectCount:e.expectCount,networkType:e.networkType,queryOption:e.queryOption,queryParams:e.queryParams,startRecord:e.startRecord,prjCoordSys:e.prjCoordSys,holdTime:e.holdTime})}}s.QueryService=pr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class fr extends pr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){if(!(e instanceof dr))return null;var t,i="",s=e.bounds;return t=this.getQueryParameters(e),i+="'queryMode':'BoundsQuery','queryParameters':",i+=ye.toJSON(t),i="{"+(i+=",'bounds': {'rightTop':{'y':"+s.top+",'x':"+s.right+"},'leftBottom':{'y':"+s.bottom+",'x':"+s.left+"}}")+"}"}}s.QueryByBoundsService=fr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class mr extends Wt{constructor(e){e&&(super(e),this.distance=0,this.geometry=null,this.isNearest=null,this.returnContent=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryByDistanceParameters")}destroy(){super.destroy();var e=this;e.returnContent=null,e.distance=null,e.isNearest=null,e.geometry&&(e.geometry.destroy(),e.geometry=null)}}s.QueryByDistanceParameters=mr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class yr extends pr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByDistanceService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof mr){var t="",i=this.getQueryParameters(e),s=ze.fromGeometry(e.geometry);return t+=e.isNearest?"'queryMode':'FindNearest','queryParameters':":"'queryMode':'DistanceQuery','queryParameters':",t+=ye.toJSON(i),t="{"+(t+=",'geometry':"+ye.toJSON(s)+",'distance':"+e.distance)+"}"}}}s.QueryByDistanceService=yr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class gr extends Wt{constructor(e){e&&(super(e),this.returnContent=!0,this.geometry=null,this.spatialQueryMode=h.INTERSECT,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryByGeometryParameters")}destroy(){super.destroy();this.returnContent=null,this.geometry=null,this.spatialQueryMode=null}}s.QueryByGeometryParameters=gr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class vr extends pr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof gr){var t,i="",s=e.geometry,r=ze.fromGeometry(s);return t=this.getQueryParameters(e),i+="'queryMode':'SpatialQuery','queryParameters':",i="{"+(i+=ye.toJSON(t)+",'geometry':"+ye.toJSON(r)+",'spatialQueryMode':"+ye.toJSON(e.spatialQueryMode))+"}"}}}s.QueryByGeometryService=vr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Sr extends Wt{constructor(e){e&&(super(e),this.returnContent=!0,ye.extend(this,e),this.CLASS_NAME="SuperMap.QueryBySQLParameters")}destroy(){super.destroy();this.returnContent=null}}s.QueryBySQLParameters=Sr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class br extends pr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryBySQLService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Sr){var t,i="";return t=this.getQueryParameters(e),i+="'queryMode':'SqlQuery','queryParameters':",i="{"+(i+=ye.toJSON(t))+"}"}}}s.QueryBySQLService=br;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class _r{constructor(e){if(!e)return this;this.sourceRoute=null,this.point=null,this.tolerance=null,this.isIgnoreGap=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.RouteCalculateMeasureParameters"}destroy(){var e=this;e.sourceRoute=null,e.point=null,e.tolerance&&(e.tolerance=null),e.isIgnoreGap&&(e.isIgnoreGap=!1)}}s.RouteCalculateMeasureParameters=_r;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class xr extends Ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteCalculateMeasureService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _r){var t,i=this;t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJsonParameters(e){return this.url=ye.urlPathAppend(this.url,"geometry/calculatemeasure"),this.url=ye.urlAppend(this.url,"returnContent=true"),ye.toJSON(e)}}s.RouteCalculateMeasureService=xr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Cr{constructor(e){if(!e)return this;this.sourceRoute=null,this.dataset=null,this.routeIDField=null,this.routeID=null,this.type=null,this.measure=null,this.offset=0,this.isIgnoreGap=!1,this.startMeasure=null,this.endMeasure=null;var t=e.sourceRoute,i={};if(t&&t instanceof Se&&t.components){i.type=t.type,i.parts=t.parts;for(var s=[],r=0,n=t.components.length;r<n;r++)s=s.concat(t.components[r].components);i.points=s,e.sourceRoute=i}ye.extend(this,e),this.CLASS_NAME="SuperMap.RouteLocatorParameters"}destroy(){var e=this;e.sourceRoute=null,e.type=null,e.measure=null,e.offset=0,e.isIgnoreGap=!1,e.startMeasure=null,e.endMeasure=null,e.dataset=null,e.routeID=null,e.routeIDField=null}}s.RouteLocatorParameters=Cr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Tr extends Ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteLocatorService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Cr){var t,i=this;t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJsonParameters(e){var t="geometry/routelocator";return e.dataset&&(t="datasets/"+e.dataset+"/linearreferencing/routelocator",e.sourceRoute=null),this.url=ye.urlPathAppend(this.url,t),this.url=ye.urlAppend(this.url,"returnContent=true"),ye.toJSON(e)}}s.RouteLocatorService=Tr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Mr{constructor(e){this.fieldNames=null,this.fieldValues=null,this.geometry=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ServerFeature"}destroy(){var e=this;e.fieldNames=null,e.fieldValues=null,e.geometry&&(e.geometry.destroy(),e.geometry=null)}toFeature(){var e,t,i,s,r={},n=this;for(var a in e=n.fieldNames,t=n.fieldValues,e)r[e[a]]=t[a];return n.geometry&&(i=n.geometry.toGeometry()),s=new Re(i,r),n.geometry&&n.geometry.id&&(s.fid=n.geometry.id),s}static fromJson(e){var t=null;if(e)return(t=e.geometry)&&(t=ze.fromJson(t)),new Mr({fieldNames:e.fieldNames,fieldValues:e.fieldValues,geometry:t})}}s.ServerFeature=Mr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class wr{constructor(e){e=e||{},this.resourceID=null,this.tempLayerName=null,this.layerInfo=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SetLayerInfoParameters"}destroy(){this.resourceID=null,this.tempLayerName=null,this.layerInfo=null}}s.SetLayerInfoParameters=wr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Er extends yt{constructor(e,t){super(e,t),t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.SetLayerInfoService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e){var t=ye.toJSON(e);this.request({method:"PUT",data:t,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}}}s.SetLayerInfoService=Er;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ar{constructor(e){e=e||{},this.isTempLayers=null,this.resourceID=null,this.layersInfo=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SetLayersInfoParameters"}destroy(){this.isTempLayers=null,this.resourceID=null,this.layersInfo=null}}s.SetLayersInfoParameters=Ar;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Lr extends yt{constructor(e,t){super(e,t),this.resourceID=null,this.isTempLayers=!1,t&&s.Util.extend(this,t),this.CLASS_NAME="SuperMap.SetLayersInfoService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e){var t,i=[],s=this,r="";s.isTempLayers?(s.url=ye.urlPathAppend(s.url,"tempLayersSet/"+s.resourceID),r="PUT"):(s.url=ye.urlPathAppend(s.url,"tempLayersSet"),r="POST"),e.subLayers||(e.subLayers={layers:[]}),e.subLayers.layers||(e.subLayers.layers=[]);var n=e.subLayers.layers,a=n.length;for(let e in n){if("GRID"===n[e].ugcLayerType){var o={},l=n[e].colorDictionarys;for(var h in l){o[l[h].elevation]=l[h].color}}n[e].colorDictionary=o,delete n[e].colorDictionarys}for(let e=0;e<a;e++)n[e].toJsonObject?i.push(n[e].toJsonObject()):i.push(n[e]);(t=ye.extend(t,e)).subLayers={layers:i},t.object=null;var u=ye.toJSON([t]);s.request({method:r,data:u,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}s.SetLayersInfoService=Lr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Pr{constructor(e){this.layerStatusList=[],this.holdTime=15,this.resourceID=null,e&&ye.extend(this,e)}destroy(){this.layerStatusList=null,this.holdTime=null,this.resourceID=null}toJSON(){var e="{";e+='"layers":[';for(var t=[],i=0,s=this.layerStatusList.length;i<s;i++)t.push(this.layerStatusList[i].toJSON());return e+=t,e+="]",e+="}"}}s.SetLayerStatusParameters=Pr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Nr extends yt{constructor(e,t){super(e,t),this.lastparams=null,this.mapUrl=e,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.SetLayerStatusService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e instanceof Pr){var t=this;if(t.url=t.mapUrl,null==e.resourceID)t.url=ye.urlPathAppend(t.url,"tempLayersSet"),t.lastparams=e,t.request({method:"POST",scope:t,success:t.createTempLayerComplete,failure:t.serviceProcessFailed});else{t.url=ye.urlPathAppend(t.url,"tempLayersSet/"+e.resourceID),t.url=ye.urlAppend(t.url,"elementRemain=true&reference="+e.resourceID+"&holdTime="+e.holdTime.toString());var i="[{";i+='"type":"UGC",',null!=e.layerStatusList&&e.layerStatusList.length>0&&(i+='"subLayers":'+e.toJSON()),i+=',"visible":true,',i+='"name":"'+this.getMapName(this.mapUrl)+'"',i+="}]",t.request({method:"PUT",data:i,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}createTempLayerComplete(e){(e=ye.transformResult(e)).succeed&&(this.lastparams.resourceID=e.newResourceID),this.processAsync(this.lastparams)}getMapName(e){var t=e;"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1));var i=t.lastIndexOf("/");return t.substring(i+1,t.length)}serviceProcessCompleted(e){null!=(e=ye.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}s.SetLayerStatusService=Nr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Or{constructor(e){e&&(this.datasetName="",this.datasetQuery="",this.geometryQuery="",this.mode=h.CONTAIN,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsParameter")}destroy(){this.datasetName=null,this.datasetQuery=null,this.geometryQuery=null,this.mode=null,this.output instanceof Dt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof kt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var i in e)"datasetName"!==i?"output"!==i?(t.analyst=t.analyst||{},t.analyst[i]=e[i],"mappingParameters"===i&&(t.analyst[i]=t.analyst[i]||{},t.analyst.mappingParameters=e[i])):(t.output=t.output||{},t.output=e[i]):(t.input=t.input||{},t.input[i]=e[i])}}s.SingleObjectQueryJobsParameter=Or;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ir extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/query"),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsService"}destroy(){super.destroy()}getQueryJobs(){super.getJobs(this.url)}getQueryJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addQueryJob(e,t){super.addJob(this.url,e,Or,t)}}s.SingleObjectQueryJobsService=Ir;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Fr{constructor(e){e=e||{},this.keyWord=null,this.returnPosition=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.StopQueryParameters"}destroy(){ye.reset(this)}}s.StopQueryParameters=Fr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Rr extends yt{constructor(e,t){super(e,t),t=t||{},ye.extend(this,t),this.CLASS_NAME="SuperMap.StopQueryService"}destroy(){super.destroy(),ye.reset(this)}processAsync(e){if(e instanceof Fr){var t=this;t.url=ye.urlPathAppend(t.url,"stops/keyword/"+e.keyWord),t.request({method:"GET",params:{returnPosition:e.returnPosition},scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}s.StopQueryService=Rr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Dr{constructor(e){e&&(this.datasetName="",this.groupField="",this.attributeField="",this.statisticModes="",this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SummaryAttributesJobsParameter")}destroy(){this.datasetName=null,this.groupField=null,this.attributeField=null,this.statisticModes=null,this.output instanceof Dt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof kt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var i in e)"datasetName"!==i?"output"!==i?(t.analyst=t.analyst||{},t.analyst[i]=e[i],"mappingParameters"===i&&(t.analyst[i]=t.analyst[i]||{},t.analyst.mappingParameters=e[i])):(t.output=t.output||{},t.output=e[i]):(t.input=t.input||{},t.input[i]=e[i])}}s.SummaryAttributesJobsParameter=Dr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class kr extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/summaryattributes"),this.CLASS_NAME="SuperMap.SummaryAttributesJobsService"}destroy(){super.destroy()}getSummaryAttributesJobs(){super.getJobs(this.url)}getSummaryAttributesJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addSummaryAttributesJob(e,t){super.addJob(this.url,e,Dr,t)}}s.SummaryAttributesJobsService=kr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Br{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.query="",this.resolution=100,this.meshType=0,this.statisticModes=te.AVERAGE,this.fields="",this.type=ie.SUMMARYMESH,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SummaryMeshJobParameter")}destroy(){this.datasetName=null,this.query=null,this.resolution=null,this.statisticModes=null,this.meshType=null,this.fields=null,this.regionDataset=null,this.type=null,this.output instanceof Dt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof kt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var i in e)"datasetName"!==i?"type"!==i?"output"!==i?("SUMMARYMESH"===e.type&&"regionDataset"!==i||"SUMMARYREGION"===e.type&&!s(["meshType","resolution","query"],i))&&(t.analyst=t.analyst||{},"query"===i&&e[i]?t.analyst[i]=e[i].toBBOX():t.analyst[i]=e[i],"mappingParameters"===i&&(t.analyst[i]=t.analyst[i]||{},t.analyst.mappingParameters=e[i])):(t.output=t.output||{},t.output=e[i]):t.type=e[i]:(t.input=t.input||{},t.input[i]=e[i]);function s(e,t){for(var i=e.length;i--;)if(e[i]===t)return!0;return!1}}}s.SummaryMeshJobParameter=Br;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ur extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/aggregatepoints"),this.CLASS_NAME="SuperMap.SummaryMeshJobsService"}destroy(){super.destroy()}getSummaryMeshJobs(){super.getJobs(this.url)}getSummaryMeshJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addSummaryMeshJob(e,t){super.addJob(this.url,e,Br,t)}}s.SummaryMeshJobsService=Ur;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Gr{constructor(e){e&&(this.datasetName="",this.regionDataset="",this.sumShape=!0,this.query="",this.standardSummaryFields=!1,this.standardFields="",this.standardStatisticModes="",this.weightedSummaryFields=!1,this.weightedFields="",this.weightedStatisticModes="",this.meshType=0,this.resolution=100,this.meshSizeUnit=ee.METER,this.type=ie.SUMMARYMESH,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.SummaryRegionJobParameter")}destroy(){this.datasetName=null,this.sumShape=null,this.regionDataset=null,this.query=null,this.standardSummaryFields=null,this.standardFields=null,this.standardStatisticModes=null,this.weightedSummaryFields=null,this.weightedFields=null,this.weightedStatisticModes=null,this.meshType=null,this.resolution=null,this.meshSizeUnit=null,this.type=null,this.output instanceof Dt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof kt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var i in e)"datasetName"!==i?"type"!==i&&"type"!==i?"output"!==i?("SUMMARYREGION"===e.type||"SUMMARYMESH"===e.type&&"regionDataset"!==i)&&(t.analyst=t.analyst||{},"query"===i&&e[i]?t.analyst[i]=e[i].toBBOX():t.analyst[i]=e[i],"mappingParameters"===i&&(t.analyst[i]=t.analyst[i]||{},t.analyst.mappingParameters=e[i])):(t.output=t.output||{},t.output=e[i]):t.type=e[i]:(t.input=t.input||{},t.input[i]=e[i])}}s.SummaryRegionJobParameter=Gr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class jr extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/summaryregion"),this.CLASS_NAME="SuperMap.SummaryRegionJobsService"}destroy(){super.destroy()}getSummaryRegionJobs(){super.getJobs(this.url)}getSummaryRegionJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addSummaryRegionJob(e,t){super.addJob(this.url,e,Gr,t)}}s.SummaryRegionJobsService=jr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class zr{constructor(e){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.SupplyCenter"}destroy(){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null}static fromJson(e){if(e)return new zr({maxWeight:e.maxWeight,nodeID:e.nodeID,resourceValue:e.resourceValue,type:e.type})}}s.SupplyCenter=zr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Vr extends Ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.SurfaceAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ai){var t,i=this;t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJsonParameters(e){var t="",i={},s=this;if(e instanceof oi)s.url=ye.urlPathAppend(s.url,"datasets/"+e.dataset+"/"+e.surfaceAnalystMethod.toLowerCase()),oi.toObject(e,i),t=ye.toJSON(i);else{if(!(e instanceof Yi))return;s.url=ye.urlPathAppend(s.url,"geometry/"+e.surfaceAnalystMethod.toLowerCase()),t=ye.toJSON(e)}return s.url=ye.urlAppend(s.url,"returnContent=true"),t}}s.SurfaceAnalystService=Vr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Hr{constructor(e){e&&(this.dataset=null,this.zFactor=1,this.averageCurvatureName=null,this.profileCurvatureName="",this.planCurvatureName="",this.deleteExistResultDataset=!1,ye.extend(this,e),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationParameters")}destroy(){var e=this;e.dataset=null,e.zFactor=1,e.averageCurvatureName=null,e.profileCurvatureName=null,e.planCurvatureName=null,e.deleteExistResultDataset=!0}static toObject(e,t){for(var i in e)"dataset"!==i&&(t[i]=e[i])}}s.TerrainCurvatureCalculationParameters=Hr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Jr extends Ct{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationService"}destroy(){super.destroy()}processAsync(e){var t=this,i={};e instanceof Hr&&(t.url=ye.urlPathAppend(t.url,"datasets/"+e.dataset+"/terraincalculation/curvature")),Hr.toObject(e,i);var r=s.Util.toJSON(i);t.url=ye.urlAppend(t.url,"returnContent=true"),t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}s.TerrainCurvatureCalculationService=Jr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class qr{constructor(e){this.caption=null,this.color=new Be,this.end=0,this.start=0,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRangeItem"}destroy(){var e=this;e.caption=null,e.end=null,e.start=null,e.color&&(e.color.destroy(),e.color=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){if(e){var t=new qr;return ye.copy(t,e),t.color=Be.fromJson(e.color),t}}}s.ThemeGridRangeItem=qr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Wr extends fs{constructor(e){super("GRIDRANGE",e),this.items=null,this.rangeMode=S.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=_.YELLOW_RED,this.reverseColor=!1,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridRange"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.reverseColor=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}static fromObj(e){if(e){var t=new Wr;ye.copy(t,e);var i=e.items,s=i?i.length:0;t.items=[];for(var r=0;r<s;r++)t.items.push(qr.fromObj(i[r]));return t}}}s.ThemeGridRange=Wr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Yr{constructor(e){this.caption=null,this.color=new Be,this.unique=null,this.visible=!0,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridUniqueItem"}destroy(){var e=this;e.caption=null,e.unique=null,e.color&&(e.color.destroy(),e.color=null),e.visible=null}toServerJSONObject(){var e={};return(e=ye.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){var t=new Yr;return ye.copy(t,e),t.color=Be.fromJson(e.color),t}}s.ThemeGridUniqueItem=Yr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Qr extends fs{constructor(e){super("GRIDUNIQUE",e),this.defaultcolor=new Be,this.items=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeGridUnique"}destroy(){super.destroy();var e=this;if(e.items){if(e.items.length>0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultcolor&&(e.defaultcolor.destroy(),e.defaultcolor=null)}toServerJSONObject(){var e={};if((e=ye.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],i=e.items.length,s=0;s<i;s++)t.push(e.items[s].toServerJSONObject());e.items=t}return e}static fromObj(e){var t=new Qr,i=e.items,s=i?i.length:0;ye.extend(t,e),t.items=[],t.defaultcolor=Be.fromJson(e.defaultcolor);for(var r=0;r<s;r++)t.items.push(Yr.fromObj(i[r]));return t}}s.ThemeGridUnique=Qr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Xr{constructor(e){this.caption=null,this.unique=null,this.offsetX=0,this.offsetY=0,this.visible=!0,this.style=new ms,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeLabelUniqueItem"}destroy(){var e=this;e.unique=null,e.caption=null,e.offsetX=null,e.offsetY=null,e.style&&(e.style.destroy(),e.style=null),e.visible=null}static fromObj(e){if(e){var t=new Xr;return ye.copy(t,e),t}}}s.ThemeLabelUniqueItem=Xr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Kr{constructor(e){this.datasetNames=null,this.dataSourceNames=null,this.joinItems=null,this.themes=null,this.displayFilters=null,this.displayOrderBys=null,this.fieldValuesDisplayFilter=null,e&&ye.extend(this,e),this.CLASS_NAME="SuperMap.ThemeParameters"}destroy(){var e=this;if(e.datasetNames=null,e.dataSourceNames=null,e.joinItems){for(let t=0,i=e.joinItems,s=i.length;t<s;t++)i[t].destroy();e.joinItems=null}if(e.themes){for(let t=0,i=e.themes,s=i.length;t<s;t++)i[t].destroy();e.themes=null}}}s.ThemeParameters=Kr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Zr extends yt{constructor(e,t){super(e,t),t&&s.Util.extend(this,t),this.url=ye.urlPathAppend(this.url,"tempLayersSet"),this.CLASS_NAME="SuperMap.ThemeService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Kr){var t,i=this;t=i.getJsonParameters(e),i.request({method:"POST",data:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}getJsonParameters(e){var t,i="",s=null,r=null,n=null;i+="[{'type': 'UGC','subLayers': {'layers': [";for(var a=0;a<e.themes.length;a++){s=e.themes[a];var o=ye.toJSON(s);if(i+="{'theme': "+(o=o.slice(0,-1))+"},'type': 'UGC','ugcLayerType': 'THEME',",(r=e.displayFilters)&&r.length>0&&(1===r.length?i+="'displayFilter':\""+r[0]+'",':i+="'displayFilter':\""+r[a]+'",'),(n=e.displayOrderBy)&&n.length>0&&(1===n.length?i+="'displayOrderBy':'"+n[0]+"',":i+="'displayOrderBy':'"+n[a]+"',"),(t=e.fieldValuesDisplayFilter)&&(i+="'fieldValuesDisplayFilter':"+ye.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[a]&&(i+="'joinItems':["+ye.toJSON(e.joinItems[a])+"],"),e.datasetNames&&e.dataSourceNames){var l=e.datasetNames[a]?a:e.datasetNames.length-1,h=e.dataSourceNames[a]?a:e.dataSourceNames.length-1;i+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[h]+"'}},"}else i+="},"}e.themes&&e.themes.length>0&&(i=i.substring(0,i.length-1)),i+="]},";var u=this.url.split("/");return i+="'name': '"+u[u.length-2]+"'}]"}}s.ThemeService=Zr;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class $r extends Ct{constructor(e,t){super(e,t),this.mode=null,t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.ThiessenAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},i=this;e instanceof hi?(i.mode="datasets",i.url=ye.urlPathAppend(i.url,"datasets/"+e.dataset+"/thiessenpolygon"),hi.toObject(e,t)):e instanceof Qi&&(i.mode="geometry",i.url=ye.urlPathAppend(i.url,"geometry/thiessenpolygon"),Qi.toObject(e,t));var s=ye.toJSON(t);i.url=ye.urlAppend(i.url,"returnContent=true"),i.request({method:"POST",data:s,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}s.ThiessenAnalystService=$r;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class en extends Ct{constructor(e,t){super(e,t),t&&ye.extend(this,t),this.CLASS_NAME="SuperMap.GeometryBatchAnalystService"}processAsync(e){var t=this;t.url=ye.urlPathAppend(t.url,"geometry/batchanalyst"),t.url=ye.urlAppend(t.url,"returnContent=true&ignoreAnalystParam=true");var i=t._processParams(e),s=ye.toJSON(i);t.request({method:"POST",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}_processParams(e){var t=this;if(ye.isArray(e)){var i=[];return e.map(function(e){return i.push(t._toJSON(e)),e}),i}}_toJSON(e){var t={};if("buffer"===e.analystName)t.analystName="buffer",t.param={},Ft.toObject(e.param,t.param);else if("overlay"===e.analystName)t.analystName="overlay",t.param={},Wi.toObject(e.param,t.param);else if("interpolationDensity"===e.analystName)t.analystName="interpolationDensity",t.param={},Js.toObject(e.param,t.param);else if("interpolationidw"===e.analystName)t.analystName="interpolationidw",t.param={},Js.toObject(e.param,t.param);else if("interpolationRBF"===e.analystName)t.analystName="interpolationRBF",t.param={},Js.toObject(e.param,t.param);else if("interpolationKriging"===e.analystName)t.analystName="interpolationKriging",t.param={},Js.toObject(e.param,t.param);else{if("thiessenpolygon"!==e.analystName)return e;t.analystName="thiessenpolygon",t.param={},Qi.toObject(e.param,t.param)}return t}destroy(){super.destroy()}}s.GeometryBatchAnalystService=en;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class tn extends yt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TilesetsService"}destroy(){super.destroy()}processAsync(){if(this.url){var e=this;e.url=ye.urlPathAppend(e.url,"tilesets"),e.request({method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}s.TilesetsService=tn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class sn{constructor(e){e&&(this.datasetName="",this.datasetTopology="",this.tolerance="",this.rule=se.REGIONNOOVERLAP,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TopologyValidatorJobsParameter")}destroy(){this.datasetName=null,this.datasetTopology=null,this.tolerance=null,this.rule=null,this.output instanceof Dt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof kt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var i in e)"datasetName"!==i?"output"!==i?(t.analyst=t.analyst||{},t.analyst[i]=e[i],"mappingParameters"===i&&(t.analyst[i]=t.analyst[i]||{},t.analyst.mappingParameters=e[i])):(t.output=t.output||{},t.output=e[i]):(t.input=t.input||{},t.input[i]=e[i])}}s.TopologyValidatorJobsParameter=sn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class rn extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/topologyvalidator"),this.CLASS_NAME="SuperMap.TopologyValidatorJobsService"}destroy(){super.destroy()}getTopologyValidatorJobs(){super.getJobs(this.url)}getTopologyValidatorJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addTopologyValidatorJob(e,t){super.addJob(this.url,e,sn,t)}}s.TopologyValidatorJobsService=rn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class nn{constructor(e){e=e||{},this.lineID=null,this.lineName=null,this.lineAliasName=null,this.startStopIndex=null,this.startStopName=null,this.startStopAliasName=null,this.endStopIndex=null,this.endStopName=null,this.endStopAliasName=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransferLine"}destroy(){ye.reset(this)}static fromJson(e){if(e)return new nn({lineID:e.lineID,lineName:e.lineName,lineAliasName:e.lineAliasName,startStopIndex:e.startStopIndex,startStopName:e.startStopName,startStopAliasName:e.startStopAliasName,endStopIndex:e.endStopIndex,endStopName:e.endStopName,endStopAliasName:e.endStopAliasName})}}s.TransferLine=nn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class an{constructor(e){e=e||{},this.transferLines=null,this.points=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransferPathParameters"}destroy(){ye.reset(this)}static toJson(e){if(e)return ye.toJSON(e)}}s.TransferPathParameters=an;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class on extends yt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof an){var t,i=this;i.url=ye.urlPathAppend(i.url,"path"),t={points:ye.toJSON(e.points),transferLines:ye.toJSON(e.transferLines)},i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}s.TransferPathService=on;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ln{constructor(e){e=e||{},this.solutionCount=6,this.transferPreference=U.NONE,this.transferTactic=B.LESS_TIME,this.walkingRatio=null,this.points=!1,this.evadeLines=null,this.evadeStops=null,this.priorLines=null,this.priorStops=null,this.travelTime=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.TransferSolutionParameters"}destroy(){ye.reset(this)}static toJson(e){if(e)return ye.toJSON(e)}}s.TransferSolutionParameters=ln;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class hn extends yt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferSolutionService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ln){var t,i=this;i.url=ye.urlPathAppend(i.url,"solutions"),t={points:ye.toJSON(e.points),walkingRatio:e.walkingRatio,transferTactic:e.transferTactic,solutionCount:e.solutionCount,transferPreference:e.transferPreference},e.evadeLines&&(t.evadeLines=ye.toJSON(e.evadeLines)),e.evadeStops&&(t.evadeStops=ye.toJSON(e.evadeStops)),e.priorLines&&(t.priorLines=ye.toJSON(e.priorLines)),e.priorStops&&(t.priorStops=ye.toJSON(e.priorStops)),e.travelTime&&(t.travelTime=e.travelTime),i.request({method:"GET",params:t,scope:i,success:i.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}s.TransferSolutionService=hn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class un{constructor(e){e&&(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",ye.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}s.UpdateEdgeWeightParameters=un;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class cn extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof un){var t=this,i=t.parse(e);t.url=ye.urlPathAppend(t.url,i);var s=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:s,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"edgeWeight"!==e[i])switch(i){case"edgeId":t+="/edgeweight/"+e[i];break;case"fromNodeId":t+="/fromnode/"+e[i];break;case"toNodeId":t+="/tonode/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}s.UpdateEdgeWeightService=cn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class dn{constructor(e){e&&(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",ye.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}s.UpdateTurnNodeWeightParameters=dn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class pn extends zt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof dn){var t=this,i=t.parse(e);t.url=ye.urlPathAppend(t.url,i);var s=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:s,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var i in e)if(""!==e[i]&&"turnNodeWeight"!==e[i])switch(i){case"nodeId":t+="/turnnodeweight/"+e[i];break;case"fromEdgeId":t+="/fromedge/"+e[i];break;case"toEdgeId":t+="/toedge/"+e[i];break;case"weightField":t+="/weightfield/"+e[i]}return t}}}s.UpdateTurnNodeWeightService=pn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class fn{constructor(e){e=e||{},this.datasetName="",this.datasetVectorClip="",this.geometryClip="",this.mode=Z.CLIP,this.output=null,this.mappingParameters=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.VectorClipJobsParameter"}destroy(){this.datasetName=null,this.datasetVectorClip=null,this.geometryClip=null,this.mode=null,this.output instanceof Dt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof kt&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var i in e)"datasetName"!==i?"output"!==i?(t.analyst=t.analyst||{},t.analyst[i]=e[i],"mappingParameters"===i&&(t.analyst[i]=t.analyst[i]||{},t.analyst.mappingParameters=e[i])):(t.output=t.output||{},t.output=e[i]):(t.input=t.input||{},t.input[i]=e[i])}}s.VectorClipJobsParameter=fn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class mn extends Ut{constructor(e,t){super(e,t),this.url=ye.urlPathAppend(this.url,"spatialanalyst/vectorclip"),this.CLASS_NAME="SuperMap.VectorClipJobsService"}destroy(){super.destroy()}getVectorClipJobs(){super.getJobs(this.url)}getVectorClipJob(e){super.getJobs(ye.urlPathAppend(this.url,e))}addVectorClipJob(e,t){super.addJob(this.url,e,fn,t)}}s.VectorClipJobsService=mn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class yn{constructor(e){e=e||{},this.type=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.RasterFunctionParameter"}destroy(){this.type=null}}s.RasterFunctionParameter=yn;s.NDVIParameter=
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class extends yn{constructor(e){super(e),this.redIndex=0,this.nirIndex=1,this.colorMap="0:ffffe5ff;0.1:f7fcb9ff;0.2:d9f0a3ff;0.3:addd8eff;0.4:78c679ff;0.5:41ab5dff;0.6:238443ff;0.7:006837ff;1:004529ff",this.type=oe.NDVI,ye.extend(this,e),this.CLASS_NAME="SuperMap.NDVIParameter"}destroy(){super.destroy(),this.redIndex=null,this.nirIndex=null,this.colorMap=null}toJSON(){return{redIndex:this.redIndex,nirIndex:this.nirIndex,colorMap:this.colorMap,type:this.type}}};s.HillshadeParameter=
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class extends yn{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.zFactor=1,this.type=oe.HILLSHADE,ye.extend(this,e),this.CLASS_NAME="SuperMap.HillshadeParameter"}destroy(){super.destroy(),this.altitude=null,this.azimuth=null,this.zFactor=null}toJSON(){return{altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,type:this.type}}};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var gn=s.ServiceStatus={DOES_NOT_INVOLVE:"DOES_NOT_INVOLVE",PUBLISH_FAILED:"PUBLISH_FAILED",PUBLISHED:"PUBLISHED",PUBLISHING:"PUBLISHING",UNPUBLISHED:"UNPUBLISHED",UNPUBLISHED_FAILED:"UNPUBLISHED_FAILED"},vn=s.DataItemType={AUDIO:"AUDIO",COLOR:"COLOR",COLORSCHEME:"COLORSCHEME",CSV:"CSV",EXCEL:"EXCEL",FILLSYMBOL:"FILLSYMBOL",IMAGE:"IMAGE",LAYERTEMPLATE:"LAYERTEMPLATE",LAYOUTTEMPLATE:"LAYOUTTEMPLATE",LINESYMBOL:"LINESYMBOL",MAPTEMPLATE:"MAPTEMPLATE",MARKERSYMBOL:"MARKERSYMBOL",MBTILES:"MBTILES",PHOTOS:"PHOTOS",SHP:"SHP",SMTILES:"SMTILES",SVTILES:"SVTILES",THEMETEMPLATE:"THEMETEMPLATE",TPK:"TPK",UDB:"UDB",UGCV5:"UGCV5",UNKNOWN:"UNKNOWN",VIDEO:"VIDEO",WORKENVIRONMENT:"WORKENVIRONMENT",WORKSPACE:"WORKSPACE"},Sn=s.DataItemOrderBy={FILENAME:"FILENAME",ID:"ID",LASTMODIFIEDTIME:"LASTMODIFIEDTIME",NICKNAME:"NICKNAME",SERVICESTATUS:"SERVICESTATUS",SIZE:"SIZE",STATUS:"STATUS",TYPE:"TYPE",UPDATETIME:"UPDATETIME",USERNAME:"USERNAME"},bn=s.FilterField={LINKPAGE:"LINKPAGE",MAPTITLE:"MAPTITLE",NICKNAME:"NICKNAME",RESTITLE:"RESTITLE",USERNAME:"USERNAME"};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class _n{constructor(e){e=e||{},ye.extend(this,e),this.serverType=n.ONLINE,this.CLASS_NAME="SuperMap.OnlineServiceBase"}request(e,t,i,s={}){return t=this.createCredentialUrl(t),s.crossOrigin=this.options.crossOrigin,s.headers=this.options.headers,Ke.commit(e,t,i,s).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,i=this.getCredential();if(i){var s="key="+i,r=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===r?t+=s:t.indexOf("?")>-1&&"?"!==r?t+="&"+s:t+="?"+s}return t}getCredential(){}}s.OnlineServiceBase=_n;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class xn extends _n{constructor(e,t){super(e),t=t||{},this.MD5=null,this.type=null,this.userName=null,this.fileName=null,this.size=null,this.serviceStatus=null,this.serviceId=null,this.id=null,this.lastModfiedTime=null,this.status=null,this.storageId=null,this.publishInfo=null,this.authorizeSetting=null,this.nickname=null,this.tags=[],this.description=null,this.dataItemServices=null,this.coordType=null,this.dataCheckResult=null,this.dataMetaInfo=null,this.thumbnail=null,ye.extend(this,t),this.id&&(this.serviceUrl=e+"/"+this.id),this.CLASS_NAME="SuperMap.OnlineData"}load(){if(this.serviceUrl){var e=this;return e.request("GET",this.serviceUrl).then(function(t){ye.extend(e,t)})}}getPublishedServices(){return this.dataItemServices}getAuthorizeSetting(){return this.authorizeSetting}}s.OnlineData=xn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Cn{constructor(){this.rootUrl="https://www.supermapol.com",this.webUrl=this.rootUrl+"/web";var e=this.webUrl+"/mycontent";this.mDatasUrl=e+"/datas",this.CLASS_NAME="SuperMap.Online"}load(){return Ke.get(this.rootUrl).then(function(e){return e})}login(){Ze.loginOnline(this.rootUrl,!0)}queryDatas(e){var t=this,i=t.mDatasUrl;return e&&(e=e.toJSON()),Ke.get(i,e).then(function(e){if(e&&e.content&&!(e.content.length<1)){for(var i=[],s=e.content,r=s.length,n=0;n<r;n++){var a=s[n],o=new xn(t.mDatasUrl,a);i.push(o)}return i}})}}s.Online=Cn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Tn{constructor(e){e=e||{},this.userNames=null,this.types=null,this.fileName=null,this.serviceStatuses=null,this.serviceId=null,this.ids=null,this.keywords=null,this.orderBy=null,this.tags=null,this.filterFields=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.OnlineQueryDatasParameter"}toJSON(){var e=this,t={types:e.types,fileName:e.fileName,serviceStatuses:e.serviceStatuses,serviceId:e.serviceId,ids:e.ids,keywords:e.keywords,orderBy:e.orderBy,tags:e.tags,filterFields:e.filterFields};for(var i in t)null==t[i]&&delete t[i];return t}}s.OnlineQueryDatasParameter=Tn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Mn{constructor(e){this.name=null,this.serviceIds=null,this.clientType=X.SERVER,this.limitation=null,ye.extend(this,e),this.CLASS_NAME="SuperMap.KeyServiceParameter"}toJSON(){return{name:this.name,serviceIds:this.serviceIds,clientType:this.clientType,limitation:this.limitation}}}s.KeyServiceParameter=Mn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class wn{constructor(e,t){this.type=e,this.server=null,this.tokenServiceUrl=null,this.keyServiceUrl=null,ye.extend(this,t),this.CLASS_NAME="SuperMap.ServerInfo",this.type=this.type||n.ISERVER,this.server||console.error("server url require is not undefined");var i="/services/security/tokens";this.type===n.ISERVER&&this.server.indexOf("iserver")<0&&(i="/iserver"+i),this.tokenServiceUrl||(this.tokenServiceUrl=ye.urlPathAppend(this.server,i)),this.keyServiceUrl||(this.type===n.IPORTAL?this.keyServiceUrl=ye.urlPathAppend(this.server,"/web/mycontent/keys/register"):this.type===n.ONLINE&&(this.keyServiceUrl=ye.urlPathAppend(this.server,"/web/mycontent/keys")))}}s.ServerInfo=wn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class En{constructor(e){this.userName=null,this.password=null,this.clientType=X.NONE,this.ip=null,this.referer=null,this.expiration=60,ye.extend(this,e),this.CLASS_NAME="SuperMap.TokenServiceParameter"}toJSON(){return{userName:this.userName,password:this.password,clientType:this.clientType,ip:this.ip,referer:this.referer,expiration:this.expiration}}}s.TokenServiceParameter=En;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var An=i(10),Ln=i.n(An);
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Pn{constructor(e,t){t=t||{},this.url=e,this.client=new Ln.a.Client({host:this.url}),this.change=null,this.openGeoFence=!1,this.outOfGeoFence=null,this.geoFence=null,this.EVENT_TYPES=["change","error","outOfGeoFence"],this.events=new Ie(this,null,this.EVENT_TYPES),this.eventListeners=null,ye.extend(this,t),this.eventListeners instanceof Object&&this.events.on(this.eventListeners)}setGeoFence(e){this.geoFence=e}bulk(e,t){return this.client.bulk(e,t)}clearScroll(e,t){return this.client.clearScroll(e,t)}count(e,t){return this.client.count(e,t)}create(e,t){return this.client.create(e,t)}delete(e,t){return this.client.delete(e,t)}deleteByQuery(e,t){return this.client.deleteByQuery(e,t)}deleteScript(e,t){return this.client.deleteScript(e,t)}deleteTemplate(e,t){return this.client.deleteTemplate(e,t)}exists(e,t){return this.client.exists(e,t)}existsSource(e,t){return this.client.existsSource(e,t)}explain(e,t){return this.client.explain(e,t)}fieldCaps(e,t){return this.client.fieldCaps(e,t)}get(e,t){return this.client.get(e,t)}getScript(e,t){return this.client.getScript(e,t)}getSource(e,t){return this.client.getSource(e,t)}getTemplate(e,t){return this.client.getTemplate(e,t)}index(e,t){return this.client.index(e,t)}info(e,t){return this.client.info(e,t)}mget(e,t){return this.client.mget(e,t)}msearch(e,t){let i=this;return i.client.msearch(e).then(function(e){return i._update(e.responses,t),e},function(e){return t(e),i.events.triggerEvent("error",{error:e}),e})}msearchTemplate(e,t){return this.client.msearchTemplate(e,t)}mtermvectors(e,t){return this.client.mtermvectors(e,t)}ping(e,t){return this.client.ping(e,t)}putScript(e,t){return this.client.putScript(e,t)}putTemplate(e,t){return this.client.putTemplate(e,t)}reindex(e,t){return this.client.reindex(e,t)}reindexRessrottle(e,t){return this.client.reindexRessrottle(e,t)}renderSearchTemplate(e,t){return this.client.renderSearchTemplate(e,t)}scroll(e,t){return this.client.scroll(e,t)}search(e,t){let i=this;return i.client.search(e).then(function(e){return i._update(e.responses,t),e},function(e){return t(e),i.events.triggerEvent("error",{error:e}),e})}searchShards(e,t){return this.client.searchShards(e,t)}searchTemplate(e,t){return this.client.searchTemplate(e,t)}suggest(e,t){return this.client.suggest(e,t)}termvectors(e,t){return this.client.termvectors(e,t)}update(e,t){return this.client.update(e,t)}updateByQuery(e,t){return this.client.updateByQuery(e,t)}_update(e,t){let i=this;e&&(i.data=e,i.openGeoFence&&i.geoFence&&i._validateDatas(e),i.events.triggerEvent("change",{data:i.data}),i.change?i.change&&i.change(e):t&&t(void 0,{responses:e}))}_validateDatas(e){if(e){e instanceof Array||(e=[e]);var t,i=e.length;for(t=0;t<i;t++)this._validateData(e[t])}}_validateData(e){let t=this;e.hits.hits.map(function(i){let s=i._source,r=t._getMeterPerMapUnit(t.geoFence.unit),n=t.geoFence.center[0]*r,a=t.geoFence.center[1]*r,o=s.x*r,l=s.y*r;return t._distance(o,l,n,a)>t.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),i})}_distance(e,t,i,s){return Math.sqrt((e-i)*(e-i)+(t-s)*(t-s))}_getMeterPerMapUnit(e){let t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}}s.ElasticSearch=Pn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Nn{constructor(){this.BUILTIN_OBJECT={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},this._ctx=null,this._canvas=null,this._pixelCtx=null,this._width=null,this._height=null,this._offsetX=0,this._offsetY=0,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Util"}clone(e){var t=this.BUILTIN_OBJECT;if("object"==typeof e&&null!==e){var i=e;if(e instanceof Array){i=[];for(var s=0,r=e.length;s<r;s++)i[s]=this.clone(e[s])}else if(!t[Object.prototype.toString.call(e)])for(var n in i={},e)e.hasOwnProperty(n)&&(i[n]=this.clone(e[n]));return i}return e}mergeItem(e,t,i,s){var r=this.BUILTIN_OBJECT;t.hasOwnProperty(i)&&("object"!=typeof e[i]||r[Object.prototype.toString.call(e[i])]?!s&&i in e||(e[i]=t[i]):this.merge(e[i],t[i],s))}merge(e,t,i){for(var s in t)this.mergeItem(e,t,s,i);return e}getContext(){return this._ctx||(this._ctx=document.createElement("canvas").getContext("2d")),this._ctx}getPixelContext(){return this._pixelCtx||(this._canvas=document.createElement("canvas"),this._width=this._canvas.width,this._height=this._canvas.height,this._pixelCtx=this._canvas.getContext("2d")),this._pixelCtx}adjustCanvasSize(e,t){var i,s=this._canvas,r=this._pixelCtx,n=this._width,a=this._height,o=this._offsetX,l=this._offsetY;e+o>n&&(n=e+o+100,s.width=n,i=!0),t+l>a&&(a=t+l+100,s.height=a,i=!0),e<-o&&(n+=o=100*Math.ceil(-e/100),s.width=n,i=!0),t<-l&&(a+=l=100*Math.ceil(-t/100),s.height=a,i=!0),i&&r.translate(o,l)}getPixelOffset(){return{x:this._offsetX,y:this._offsetY}}indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var i=0,s=e.length;i<s;i++)if(e[i]===t)return i;return-1}inherits(e,t){var i=e.prototype;function s(){}for(var r in s.prototype=t.prototype,e.prototype=new s,i)e.prototype[r]=i[r];e.constructor=e}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class On{constructor(){this.util=new Nn,this._ctx=null,this.palette=["#ff9277"," #dddd00"," #ffc877"," #bbe3ff"," #d5ffbb","#bbbbff"," #ddb000"," #b0dd00"," #e2bbff"," #ffbbe3","#ff7777"," #ff9900"," #83dd00"," #77e3ff"," #778fff","#c877ff"," #ff77ab"," #ff6600"," #aa8800"," #77c7ff","#ad77ff"," #ff77ff"," #dd0083"," #777700"," #00aa00","#0088aa"," #8400dd"," #aa0088"," #dd0000"," #772e00"],this._palette=this.palette,this.highlightColor="rgba(0,0,255,1)",this._highlightColor=this.highlightColor,this.colorRegExp=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,this._nameColors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Color"}customPalette(e){this.palette=e}resetPalette(){this.palette=this._palette}getColor(e,t){return e|=0,(t=t||this.palette)[e%t.length]}customHighlight(e){this.highlightColor=e}resetHighlight(){this.highlightColor=this._highlightColor}getHighlightColor(){return this.highlightColor}getRadialGradient(e,t,i,s,r,n,a){var o=this.util;this._ctx||(this._ctx=o.getContext());for(var l=this._ctx.createRadialGradient(e,t,i,s,r,n),h=0,u=a.length;h<u;h++)l.addColorStop(a[h][0],a[h][1]);return l.__nonRecursion=!0,l}getLinearGradient(e,t,i,s,r){var n=this.util;this._ctx||(this._ctx=n.getContext());for(var a=this._ctx.createLinearGradient(e,t,i,s),o=0,l=r.length;o<l;o++)a.addColorStop(r[o][0],r[o][1]);return a.__nonRecursion=!0,a}getStepColors(e,t,i){e=this.toRGBA(e),t=this.toRGBA(t),e=this.getData(e);for(var s=[],r=((t=this.getData(t))[0]-e[0])/i,n=(t[1]-e[1])/i,a=(t[2]-e[2])/i,o=(t[3]-e[3])/i,l=0,h=e[0],u=e[1],c=e[2],d=e[3];l<i;l++)s[l]=this.toColor([this.adjust(Math.floor(h),[0,255]),this.adjust(Math.floor(u),[0,255]),this.adjust(Math.floor(c),[0,255]),d.toFixed(4)-0],"rgba"),h+=r,u+=n,c+=a,d+=o;return h=t[0],u=t[1],c=t[2],d=t[3],s[l]=this.toColor([h,u,c,d],"rgba"),s}getGradientColors(e,t){var i=[],s=e.length;if(void 0===t&&(t=20),1===s)i=this.getStepColors(e[0],e[0],t);else if(s>1)for(var r=0,n=s-1;r<n;r++){var a=this.getStepColors(e[r],e[r+1],t);r<n-1&&a.pop(),i=i.concat(a)}return i}toColor(e,t){if(t=t||"rgb",e&&(3===e.length||4===e.length)){if(e=this.map(e,function(e){return e>1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var i=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=i[0],e[2]=i[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=this.adjust(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}toArray(e){(e=this.trim(e)).indexOf("rgba")<0&&(e=this.toRGBA(e));var t=[],i=0;return e.replace(/[\d.]+/g,function(e){i<3?e|=0:e=+e,t[i++]=e}),t}convert(e,t){if(!this.isCalculableColor(e))return e;var i=this.getData(e),s=i[3];return void 0===s&&(s=1),e.indexOf("hsb")>-1?i=this._HSV_2_RGB(i):e.indexOf("hsl")>-1&&(i=this._HSL_2_RGB(i)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?i=this._RGB_2_HSB(i):t.indexOf("hsl")>-1&&(i=this._RGB_2_HSL(i)),i[3]=s,this.toColor(i,t)}toRGBA(e){return this.convert(e,"rgba")}toRGB(e){return this.convert(e,"rgb")}toHex(e){return this.convert(e,"hex")}toHSVA(e){return this.convert(e,"hsva")}toHSV(e){return this.convert(e,"hsv")}toHSBA(e){return this.convert(e,"hsba")}toHSB(e){return this.convert(e,"hsb")}toHSLA(e){return this.convert(e,"hsla")}toHSL(e){return this.convert(e,"hsl")}toName(e){for(var t in this._nameColors)if(this.toHex(this._nameColors[t])===this.toHex(e))return t;return null}trim(e){return String(e).replace(/\s+/g,"")}normalize(e){if(this._nameColors[e]&&(e=this._nameColors[e]),e=(e=this.trim(e)).replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){var t=(3840&(e=parseInt(e.slice(1),16)))<<8,i=(240&e)<<4,s=15&e;e="#"+((1<<24)+(t<<4)+t+(i<<4)+i+(s<<4)+s).toString(16).slice(1)}return e}lift(e,t){if(!this.isCalculableColor(e))return e;var i=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var s=this.getData(e),r=0;r<3;r++)s[r]=1===i?s[r]*(1-t)|0:(255-s[r])*t+s[r]|0;return"rgb("+s.join(",")+")"}reverse(e){if(!this.isCalculableColor(e))return e;var t=this.getData(this.toRGBA(e));return t=this.map(t,function(e){return 255-e}),this.toColor(t,"rgb")}mix(e,t,i){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===i&&(i=.5);for(var s=2*(i=1-this.adjust(i,[0,1]))-1,r=this.getData(this.toRGBA(e)),n=this.getData(this.toRGBA(t)),a=r[3]-n[3],o=((s*a==-1?s:(s+a)/(1+s*a))+1)/2,l=1-o,h=[],u=0;u<3;u++)h[u]=r[u]*o+n[u]*l;var c=r[3]*i+n[3]*(1-i);return c=Math.max(0,Math.min(1,c)),1===r[3]&&1===n[3]?this.toColor(h,"rgb"):(h[3]=c,this.toColor(h,"rgba"))}random(){return"#"+Math.random().toString(16).slice(2,8)}getData(e){var t,i,s=(e=this.normalize(e)).match(this.colorRegExp);if(null===s)throw new Error("The color format error");var r,n=[];if(s[2])r=[(t=s[2].replace("#","").split(""))[0]+t[1],t[2]+t[3],t[4]+t[5]],n=this.map(r,function(e){return On.prototype.adjust.call(this,parseInt(e,16),[0,255])});else if(s[4]){var a=s[4].split(",");i=a[3],r=a.slice(0,3),n=this.map(r,function(e){return e=Math.floor(e.indexOf("%")>0?2.55*parseInt(e,0):e),On.prototype.adjust.call(this,e,[0,255])}),void 0!==i&&n.push(this.adjust(parseFloat(i),[0,1]))}else if(s[5]||s[6]){var o=(s[5]||s[6]).split(","),l=parseInt(o[0],0)/360,h=o[1],u=o[2];i=o[3],(n=this.map([h,u],function(e){return On.prototype.adjust.call(this,parseFloat(e)/100,[0,1])})).unshift(l),void 0!==i&&n.push(this.adjust(parseFloat(i),[0,1]))}return n}alpha(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var i=this.getData(this.toRGBA(e));return i[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(i,"rgba")}map(e,t){if("function"!=typeof t)throw new TypeError;for(var i=e?e.length:0,s=0;s<i;s++)e[s]=t(e[s]);return e}adjust(e,t){return e<=t[0]?e=t[0]:e>=t[1]&&(e=t[1]),e}isCalculableColor(e){return e instanceof Array||"string"==typeof e}_HSV_2_RGB(e){var t,i,s,r=e[0],n=e[1],a=e[2];if(0===n)t=255*a,i=255*a,s=255*a;else{var o=6*r;6===o&&(o=0);var l=0|o,h=a*(1-n),u=a*(1-n*(o-l)),c=a*(1-n*(1-(o-l))),d=0,p=0,f=0;0===l?(d=a,p=c,f=h):1===l?(d=u,p=a,f=h):2===l?(d=h,p=a,f=c):3===l?(d=h,p=u,f=a):4===l?(d=c,p=h,f=a):(d=a,p=h,f=u),t=255*d,i=255*p,s=255*f}return[t,i,s]}_HSL_2_RGB(e){var t,i,s,r=e[0],n=e[1],a=e[2];if(0===n)t=255*a,i=255*a,s=255*a;else{var o,l=2*a-(o=a<.5?a*(1+n):a+n-n*a);t=255*this._HUE_2_RGB(l,o,r+1/3),i=255*this._HUE_2_RGB(l,o,r),s=255*this._HUE_2_RGB(l,o,r-1/3)}return[t,i,s]}_HUE_2_RGB(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}_RGB_2_HSB(e){var t,i,s=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(s,r,n),o=Math.max(s,r,n),l=o-a,h=o;if(0===l)t=0,i=0;else{i=l/o;var u=((o-s)/6+l/2)/l,c=((o-r)/6+l/2)/l,d=((o-n)/6+l/2)/l;s===o?t=d-c:r===o?t=1/3+u-d:n===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,i*=100,h*=100]}_RGB_2_HSL(e){var t,i,s=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(s,r,n),o=Math.max(s,r,n),l=o-a,h=(o+a)/2;if(0===l)t=0,i=0;else{i=h<.5?l/(o+a):l/(2-o-a);var u=((o-s)/6+l/2)/l,c=((o-r)/6+l/2)/l,d=((o-n)/6+l/2)/l;s===o?t=d-c:r===o?t=1/3+u-d:n===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,i*=100,h*=100]}}var In=new On;class Fn{static createCanvas(e,t){var i=document.createElement("canvas");return i.height=e,i.width=t,i.getContext("2d")}static getLinearGradient(e,t,i,s,r){this._ctx||(this._ctx=this.getContext());for(var n=this._ctx.createLinearGradient(e,t,i,s),a=r.length,o=1/(a-1),l=0,h=0;h<a;h++)n.addColorStop(l,r[h]),l+=o;return n.__nonRecursion=!0,n}static getContext(){return this._ctx||(this._ctx=document.createElement("canvas").getContext("2d")),this._ctx}static getStepColors(e,t,i){e=In.toRGBA(e),t=In.toRGBA(t),e=In.getData(e);for(var s=[],r=((t=In.getData(t))[0]-e[0])/i,n=(t[1]-e[1])/i,a=(t[2]-e[2])/i,o=(t[3]-e[3])/i,l=0,h=e[0],u=e[1],c=e[2],d=e[3];l<i;l++)s[l]=In.toColor([In.adjust(Math.floor(h),[0,255]),In.adjust(Math.floor(u),[0,255]),In.adjust(Math.floor(c),[0,255]),d.toFixed(4)-0],"hex"),h+=r,u+=n,c+=a,d+=o;return h=t[0],u=t[1],c=t[2],d=t[3],s[l]=In.toColor([h,u,c,d],"hex"),s}static getGradientColors(e,t,i){var s,r,n,a=[],o=e.length;if(void 0!==t){if(o>=t)if("RANGE"===i)for(r=0;r<t;r++)a.push(e[r]);else for(r=0;r<t;r++){let t=Math.floor(r/2);if(r%2==0)a.push(e[t]);else{let i=e.length-1-t;a.push(e[i])}}else{for(s=Math.ceil(t/(o-1)),r=0,n=o-1;r<n;r++){var l=this.getStepColors(e[r],e[r+1],s);r<n-1&&l.pop(),a=a.concat(l)}for(var h=a.length-t,u=0;u<h;u++)a.splice(2,1)}return a}}}s.ColorsPickerUtil=Fn;class Rn{static newInstance(){return this.geostatsInstance||(this.geostatsInstance=new window.geostats),this.geostatsInstance}static getInstance(e){let t=this.newInstance();return t.setSerie(e),t}static getArrayStatistic(e,t){return e.length?"Sum"===t||"求和"===t?this.getSum(e):"Maximum"===t||"最大值"===t?this.getMax(e):"Minimum"===t||"最小值"===t?this.getMin(e):"Average"===t||"平均值"===t?this.getMean(e):"Median"===t||"中位数"===t?this.getMedian(e):"times"===t||"计数"===t?this.getTimes(e):void 0:0}static getArraySegments(e,t,i){if("offset"===t)return this.getEqInterval(e,i);if("jenks"===t)return this.getJenks(e,i);if("square"===t){return this.getMin(e)>=0&&this.getSqrtInterval(e,i)}if("logarithm"===t){return this.getMin(e)>0&&this.getGeometricProgression(e,i)}}static getSum(e){return this.getInstance(e).sum()}static getMax(e){return this.getInstance(e).max()}static getMin(e){return this.getInstance(e).min()}static getMean(e){return this.getInstance(e).mean()}static getMedian(e){return this.getInstance(e).median()}static getTimes(e){return e.length}static getEqInterval(e,t){return this.getInstance(e).getClassEqInterval(t)}static getJenks(e,t){return this.getInstance(e).getClassJenks(t)}static getSqrtInterval(e,t){return e=e.map(function(e){return Math.sqrt(e)}),this.getInstance(e).getClassEqInterval(t).map(function(e){return e*e})}static getGeometricProgression(e,t){return this.getInstance(e).getClassGeometricProgression(t)}}s.ArrayStatistic=Rn;var Dn=i(11),kn=i.n(Dn);
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Bn{constructor(e){this.env=null,this.parser=null,this.ruleSet=null,this.cartoStr="",this.shaders=null,"string"==typeof e&&(this.cartoStr=e,this.env={frames:[],errors:[],error:function(e){this.errors.push(e)}},this.parser=this.getParser(this.env),this.parse(e),this.shaders=this.toShaders())}getParser(e){var t,i,r,n,a,o,l,h,u,c=this;function d(){n=l[r],a=i,h=i}function p(){l[r]=n,h=i=a}function f(){i>h&&(l[r]=l[r].slice(i-h),h=i)}function m(e){var s,n,a,o;if(e instanceof Function)return e.call(u.parsers);if("string"==typeof e)s=t.charAt(i)===e?e:null,n=1,f();else{if(f(),!(s=e.exec(l[r])))return null;n=s[0].length}if(s){var c=i+=n;for(o=i+l[r].length-n;i<o&&(32===(a=t.charCodeAt(i))||10===a||9===a);)i++;return l[r]=l[r].slice(n+(i-c)),h=i,0===l[r].length&&r<l.length-1&&r++,"string"==typeof s?s:1===s.length?s[0]:s}}function y(i){var s,r={index:o,filename:e.filename,message:"Parse error.",line:0,column:-1};for(var n in r)0===i[n]&&(i[n]=r[n]);s=i.filename&&c.env.inputs&&c.env.inputs[i.filename]?c.env.inputs[i.filename]:t,i.line=(s.slice(0,i.index).match(/\n/g)||"").length+1;for(var a=i.index;a>=0&&"\n"!==s.charAt(a);a--)i.column++;return new Error([i.filename,i.line,i.column,i.message].join(";"))}return this.env=e=e||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},u={parse:function(n){var a,u=null;if(i=r=h=o=0,l=[],t=n.replace(/\r\n/g,"\n"),e.filename&&(c.env.inputs[e.filename]=t),l=function(e){for(var i,s,r,n,a=0,o=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,h=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,c=0,d=e[0],p=0;p<t.length;)if(o.lastIndex=p,(i=o.exec(t))&&i.index===p&&(p+=i[0].length,d.push(i[0])),r=t.charAt(p),l.lastIndex=h.lastIndex=p,(i=h.exec(t))&&i.index===p)p+=i[0].length,d.push(i[0]);else if(s||"/"!==r||"/"!==(n=t.charAt(p+1))&&"*"!==n||!(i=l.exec(t))||i.index!==p){switch(r){case"{":if(!s){c++,d.push(r);break}case"}":if(!s){c--,d.push(r),e[++a]=d=[];break}case"(":if(!s){s=!0,d.push(r);break}case")":if(s){s=!1,d.push(r);break}default:d.push(r)}p++}else p+=i[0].length,d.push(i[0]);return 0!==c&&(u={index:p-1,type:"Parse",message:c>0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),u)throw y(u);var d=function(e,t){var i=e.specificity,s=t.specificity;return i[0]!=s[0]?s[0]-i[0]:i[1]!=s[1]?s[1]-i[1]:i[2]!=s[2]?s[2]-i[2]:s[3]-i[3]};return(a=new s.CartoCSS.Tree.Ruleset([],m(this.parsers.primary))).root=!0,a.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+y(t).message:e.errors.message=y(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(d),t},a},parsers:{primary:function(){for(var e,t=[];(e=m(this.rule)||m(this.ruleset)||m(this.comment))||m(/^[\s\n]+/)||(e=m(this.invalid));)e&&t.push(e);return t},invalid:function(){var e=m(/^[^;\n]*[;\n]/);if(e)return new s.CartoCSS.Tree.Invalid(e,a)},comment:function(){var e;if("/"===t.charAt(i))return"/"===t.charAt(i+1)?new s.CartoCSS.Tree.Comment(m(/^\/\/.*/),!0):(e=m(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new s.CartoCSS.Tree.Comment(e):void 0},entities:{quoted:function(){if('"'===t.charAt(i)||"'"===t.charAt(i)){var e=m(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return e?new s.CartoCSS.Tree.Quoted(e[1]||e[2]):void 0}},field:function(){if(m("[")){var e=m(/(^[^\]]+)/);if(m("]"))return e?new s.CartoCSS.Tree.Field(e[1]):void 0}},comparison:function(){var e=m(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var e=m(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(e)return new s.CartoCSS.Tree.Keyword(e)},call:function(){var e,t;if(e=/^([\w\-]+|%)\(/.exec(l[r])){if("url"===(e=e[1]))return null;i+=e.length;if(m("("),t=m(this.entities.arguments),m(")"))return e?new s.CartoCSS.Tree.Call(e,t,i):void 0}},arguments:function(){for(var e,t=[];e=m(this.expression);){t.push(e);if(!m(","))break}return t},literal:function(){return m(this.entities.dimension)||m(this.entities.keywordcolor)||m(this.entities.hexcolor)||m(this.entities.quoted)},url:function(){var e;if("u"===t.charAt(i)&&m(/^url\(/)){e=m(this.entities.quoted)||m(this.entities.variable)||m(/^[\-\w%@$\/.&=:;#+?~]+/)||"";return m(")")?new s.CartoCSS.Tree.URL(void 0!==e.value||e instanceof s.CartoCSS.Tree.Variable?e:new s.CartoCSS.Tree.Quoted(e)):new s.CartoCSS.Tree.Invalid(e,a,"Missing closing ) in URL.")}},variable:function(){var r,n=i;if("@"===t.charAt(i)&&(r=m(/^@[\w-]+/)))return new s.CartoCSS.Tree.Variable(r,n,e.filename)},hexcolor:function(){var e;if("#"===t.charAt(i)&&(e=m(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new s.CartoCSS.Tree.Color(e[1])},keywordcolor:function(){var e=l[r].match(/^[a-z]+/);if(e&&e[0]in s.CartoCSS.Tree.Reference.data.colors)return new s.CartoCSS.Tree.Color(s.CartoCSS.Tree.Reference.data.colors[m(/^[a-z]+/)])},dimension:function(){var e=t.charCodeAt(i);if(!(e>57||e<45||47===e)){var r=m(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return r?new s.CartoCSS.Tree.Dimension(r[1],r[2],a):void 0}}},variable:function(){var e;if("@"===t.charAt(i)&&(e=m(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=m(this.entities.call)||m(this.entities.literal),t=m(this.entities.field)||m(this.entities.variable),i=m(this.entities.url)||m(this.entities.keyword);return e||t||i},end:function(){var e;return m(";")||("string"==typeof(e="}")?t.charAt(i)===e:!!e.test(l[r]))},element:function(){var e=m(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(e)return new s.CartoCSS.Tree.Element(e)},attachment:function(){var e=m(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var e,r,n,o,l,h=[],u=new s.CartoCSS.Tree.Filterset,c=[],d=0,p=0;(n=m(this.element))||(l=m(this.zoom))||(o=m(this.filter))||(e=m(this.attachment));){if(d++,n)h.push(n);else if(l)c.push(l),p++;else if(o){var f=u.add(o);if(f)throw y({message:f,index:i-1});p++}else{if(r)throw y({message:"Encountered second attachment name.",index:i-1});r=e}var g=t.charAt(i);if("{"===g||"}"===g||";"===g||","===g)break}if(d)return new s.CartoCSS.Tree.Selector(u,c,h,r,p,a)},filter:function(){d();var t,i,r;if(m("[")&&(t=m(/^[a-zA-Z0-9\-_]+/)||m(this.entities.quoted)||m(this.entities.variable)||m(this.entities.keyword)||m(this.entities.field))&&(t instanceof s.CartoCSS.Tree.Quoted&&(t=new s.CartoCSS.Tree.Field(t.toString())),(i=m(this.entities.comparison))&&(r=m(this.entities.quoted)||m(this.entities.variable)||m(this.entities.dimension)||m(this.entities.keyword)||m(this.entities.field)))){if(!m("]"))throw y({message:"Missing closing ] of filter.",index:a-1});return t.is||(t=new s.CartoCSS.Tree.Field(t)),new s.CartoCSS.Tree.Filter(t,i,r,a,e.filename)}},zoom:function(){d();var e,t;if(m(/^\[\s*zoom/g)&&(e=m(this.entities.comparison))&&(t=m(this.entities.variable)||m(this.entities.dimension))&&m("]"))return new s.CartoCSS.Tree.Zoom(e,t,a);p()},block:function(){var e;if(m("{")&&(e=m(this.primary))&&m("}"))return e},ruleset:function(){var e,t,i=[];for(d();e=m(this.selector);){for(i.push(e);m(this.comment););if(!m(","))break;for(;m(this.comment););}if(e)for(;m(this.comment););if(i.length>0&&(t=m(this.block))){if(1===i.length&&i[0].elements.length&&"Map"===i[0].elements[0].value){var r=new s.CartoCSS.Tree.Ruleset(i,t);return r.isMap=!0,r}return new s.CartoCSS.Tree.Ruleset(i,t)}p()},rule:function(){var r,n,l=t.charAt(i);if(d(),"."!==l&&"#"!==l&&(r=m(this.variable)||m(this.property))){if((n=m(this.value))&&m(this.end))return new s.CartoCSS.Tree.Rule(r,n,a,e.filename);o=i,p()}},font:function(){for(var e,t=[],i=[];e=m(this.entity);)i.push(e);if(t.push(new s.CartoCSS.Tree.Expression(i)),m(","))for(;(e=m(this.expression))&&(t.push(e),m(",")););return new s.CartoCSS.Tree.Value(t)},value:function(){for(var e,t=[];(e=m(this.expression))&&(t.push(e),m(",")););return t.length>1?new s.CartoCSS.Tree.Value(t.map(function(e){return e.value[0]})):1===t.length?new s.CartoCSS.Tree.Value(t):void 0},sub:function(){var e;if(m("(")&&(e=m(this.expression))&&m(")"))return e},multiplication:function(){var e,t,i,r;if(e=m(this.operand)){for(;(i=m("/")||m("*")||m("%"))&&(t=m(this.operand));)r=new s.CartoCSS.Tree.Operation(i,[r||e,t],a);return r||e}},addition:function(){var e,r,n,o;if(e=m(this.multiplication)){for(;(n=m(/^[-+]\s+/)||" "!=t.charAt(i-1)&&(m("+")||m("-")))&&(r=m(this.multiplication));)o=new s.CartoCSS.Tree.Operation(n,[o||e,r],a);return o||e}},operand:function(){return m(this.sub)||m(this.entity)},expression:function(){for(var e,t=[];e=m(this.addition)||m(this.entity);)t.push(e);if(t.length>0)return new s.CartoCSS.Tree.Expression(t)},property:function(){var e=m(/^(([a-z][-a-z_0-9]*\/)?\*?-?[-a-z_0-9]+)\s*:/);if(e)return e[1]}}}}parse(e){var t=this.parser;return this.ruleSet=t.parse(e)}toShaders(){if(this.ruleSet){var e=this.ruleSet;if(e){var t=e.toList(this.env);t.reverse();var i={},s=[];this._toShaders(i,s,t);for(var r=[],n={},a=0,o=t.length;a<o;++a){var l=t[a],h=l.attachment,u=i[s[a]],c=[];if(!n[h]){var d=0;for(var p in u)if("zoom"!==p&&"frames"!==p&&"attachment"!==p&&"elements"!=p)if("layer-index"===p){var f=(u[p].join("\n"),null);Object.defineProperty(c,"layerIndex",{configurable:!0,enumerable:!1,value:f})}else c[d++]=function(e,t){if(!Array.isArray(e))return e;var i=e.join("\n"),s='attributes["FEATUREID"]&&attributes["FEATUREID"]',r=i.indexOf(s);if(r>=0){if(!t.featureFilter){var n=r+s.length,a=i.indexOf(")",n+1),o="featureId&&(featureId"+i.substring(n,a)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!o}})}return{property:p,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+i+";} return _value; ")}}return{property:p,getValue:Function("attributes","zoom","var _value = null;"+i+"; return _value; ")}}(u[p],c);Object.defineProperty(c,"attachment",{configurable:!0,enumerable:!1,value:h}),Object.defineProperty(c,"elements",{configurable:!0,enumerable:!1,value:l.elements}),r.push(c),n[s[a]]=!0}Object.defineProperty(c,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return r}}return null}_toShaders(e,t,i){for(let r=0,n=i.length;r<n;++r){let n=i[r],a=[];for(let e=0,t=n.elements.length;e<t;e++)a.push(n.elements[e]);let o=n.filters.filters,l=[];for(let e in o)l.push(o[e].id);let h=a.join("/")+"::"+n.attachment+"_"+l.join("_");t.push(h);let u=e[h]=e[h]||{};u.zoom=s.CartoCSS.Tree.Zoom.all;let c=n.toJS(this.env);for(let e in c)(u[e]=u[e]||[]).push(c[e].join("\n"))}}getShaders(){return this.shaders}destroy(){this.cartoStr=null,this.env=null,this.ruleSet=null,this.parser=null,this.shaders=null}}s._mapnik_reference_latest={version:"2.1.1",style:{"filter-mode":{type:["all","first"],doc:"Control the processing behavior of Rule filters within a Style. If 'all' is used then all Rules are processed sequentially independent of whether any previous filters matched. If 'first' is used then it means processing ends after the first match (a positive filter evaluation) and no further Rules in the Style are processed ('first' is usually the default for CSS implementations on top of Mapnik to simplify translation from CSS to Mapnik XML)","default-value":"all","default-meaning":"All Rules in a Style are processed whether they have filters or not and whether or not the filter conditions evaluate to true."},"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},layer:{name:{"default-value":"",type:"string",required:!0,"default-meaning":"No layer name has been provided",doc:"The name of a layer. Can be anything you wish and is not strictly validated, but ideally unique in the map"},srs:{"default-value":"",type:"string","default-meaning":"No srs value is provided and the value will be inherited from the Map's srs",doc:"The spatial reference system definition for the layer, aka the projection. Can either be a proj4 literal string like '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' or, if the proper proj4 epsg/nad/etc identifier files are installed, a string that uses an id like: '+init=epsg:4326'"},status:{"default-value":!0,type:"boolean","default-meaning":"This layer will be marked as active and available for processing",doc:"A property that can be set to false to disable this layer from being processed"},minzoom:{"default-value":"0",type:"float","default-meaning":"The layer will be visible at the minimum possible scale",doc:"The minimum scale denominator that this layer will be visible at. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},maxzoom:{"default-value":"1.79769e+308",type:"float","default-meaning":"The layer will be visible at the maximum possible scale",doc:"The maximum scale denominator that this layer will be visible at. The default is the numeric limit of the C++ double type, which may vary slightly by system, but is likely a massive number like 1.79769e+308 and ensures that this layer will always be visible unless the value is reduced. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},queryable:{"default-value":!1,type:"boolean","default-meaning":"The layer will not be available for the direct querying of data values",doc:"This property was added for GetFeatureInfo/WMS compatibility and is rarely used. It is off by default meaning that in a WMS context the layer will not be able to be queried unless the property is explicitly set to true"},"clear-label-cache":{"default-value":!1,type:"boolean","default-meaning":"The renderer's collision detector cache (used for avoiding duplicate labels and overlapping markers) will not be cleared immediately before processing this layer",doc:"This property, by default off, can be enabled to allow a user to clear the collision detector cache before a given layer is processed. This may be desirable to ensure that a given layers data shows up on the map even if it normally would not because of collisions with previously rendered labels or markers"},"group-by":{"default-value":"",type:"string","default-meaning":"No special layer grouping will be used during rendering",doc:"https://github.com/mapnik/mapnik/wiki/Grouped-rendering"},"buffer-size":{"default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:"Extra tolerance around the Layer extent (in pixels) used to when querying and (potentially) clipping the layer data during rendering"},"maximum-extent":{"default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query this specific layer data during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Layer."}},symbolizers:{"*":{"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},map:{"background-color":{css:"background-color","default-value":"none","default-meaning":"transparent",type:"color",doc:"Map Background color"},"background-image":{css:"background-image",type:"uri","default-value":"","default-meaning":"transparent",doc:"An image that is repeated below all features on a map as a background.",description:"Map Background image"},srs:{css:"srs",type:"string","default-value":"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs","default-meaning":"The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space",doc:"Map spatial reference (proj4 string)"},"buffer-size":{css:"buffer-size","default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:'Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges".'},"maximum-extent":{css:"","default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map."},base:{css:"base","default-value":"","default-meaning":"This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.",type:"string",doc:"Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet."},"paths-from-xml":{css:"","default-value":!0,"default-meaning":"Paths read from XML will be interpreted from the location of the XML",type:"boolean",doc:"value to control whether paths in the XML will be interpreted from the location of the XML or from the working directory of the program that calls load_map()"},"minimum-version":{css:"","default-value":"none","default-meaning":"Mapnik version will not be detected and no error will be thrown about compatibility",type:"string",doc:"The minumum Mapnik version (e.g. 0.7.2) needed to use certain functionality in the stylesheet"},"font-directory":{css:"font-directory",type:"uri","default-value":"none","default-meaning":"No map-specific fonts will be registered",doc:"Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered)."}},polygon:{fill:{css:"polygon-fill",type:"color","default-value":"rgba(128,128,128,1)","default-meaning":"gray and fully opaque (alpha = 1), same as rgb(128,128,128)",doc:"Fill color to assign to a polygon"},"fill-opacity":{css:"polygon-opacity",type:"float",doc:"The opacity of the polygon","default-value":1,"default-meaning":"opaque"},gamma:{css:"polygon-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon edges"},"gamma-method":{css:"polygon-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},clip:{css:"polygon-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},line:{stroke:{css:"line-color","default-value":"rgba(0,0,0,1)",type:"color","default-meaning":"black and fully opaque (alpha = 1), same as rgb(0,0,0)",doc:"The color of a drawn line"},"stroke-width":{css:"line-width","default-value":1,type:"float",doc:"The width of a line in pixels"},"stroke-opacity":{css:"line-opacity","default-value":1,type:"float","default-meaning":"opaque",doc:"The opacity of a line"},"stroke-linejoin":{css:"line-join","default-value":"miter",type:["miter","round","bevel"],doc:"The behavior of lines when joining"},"stroke-linecap":{css:"line-cap","default-value":"butt",type:["butt","round","square"],doc:"The display of line endings"},"stroke-gamma":{css:"line-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of stroke line"},"stroke-gamma-method":{css:"line-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},"stroke-dasharray":{css:"line-dasharray",type:"numbers",doc:"A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns.","default-value":"none","default-meaning":"solid line"},"stroke-dashoffset":{css:"line-dash-offset",type:"numbers",doc:"valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled)","default-value":"none","default-meaning":"solid line"},"stroke-miterlimit":{css:"line-miterlimit",type:"float",doc:"The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts.","default-value":4,"default-meaning":"Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'"},clip:{css:"line-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},offset:{css:"line-offset",type:"float","default-value":0,"default-meaning":"no offset",doc:"Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line)."},rasterizer:{css:"line-rasterizer",type:["full","fast"],"default-value":"full",doc:"Exposes an alternate AGG rendering method that sacrifices some accuracy for speed."},"geometry-transform":{css:"line-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},markers:{file:{css:"marker-file",doc:"An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse.","default-value":"","default-meaning":"An ellipse or circle, if width equals height",type:"uri"},opacity:{css:"marker-opacity",doc:"The overall opacity of the marker, if set, overrides both the opacity of both the fill and stroke","default-value":1,"default-meaning":"The stroke-opacity and fill-opacity will be used",type:"float"},"fill-opacity":{css:"marker-fill-opacity",doc:"The fill opacity of the marker","default-value":1,"default-meaning":"opaque",type:"float"},stroke:{css:"marker-line-color",doc:"The color of the stroke around a marker shape.","default-value":"black",type:"color"},"stroke-width":{css:"marker-line-width",doc:"The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself.",type:"float"},"stroke-opacity":{css:"marker-line-opacity","default-value":1,"default-meaning":"opaque",doc:"The opacity of a line",type:"float"},placement:{css:"marker-placement",type:["point","line","interior"],"default-value":"point","default-meaning":"Place markers at the center point (centroid) of the geometry",doc:"Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior"},"multi-policy":{css:"marker-multi-policy",type:["each","whole","largest"],"default-value":"each","default-meaning":"If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each",doc:"A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default)."},"marker-type":{css:"marker-type",type:["arrow","ellipse"],"default-value":"ellipse",doc:"The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width)"},width:{css:"marker-width","default-value":10,doc:"The width of the marker, if using one of the default types.",type:"expression"},height:{css:"marker-height","default-value":10,doc:"The height of the marker, if using one of the default types.",type:"expression"},fill:{css:"marker-fill","default-value":"blue",doc:"The color of the area of the marker.",type:"color"},"allow-overlap":{css:"marker-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping markers are shown or hidden.","default-meaning":"Do not allow makers to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"marker-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},spacing:{css:"marker-spacing",doc:"Space between repeated labels","default-value":100,type:"float"},"max-error":{css:"marker-max-error",type:"float","default-value":.2,doc:"The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers."},transform:{css:"marker-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},clip:{css:"marker-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"marker-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"marker-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"marker-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},shield:{name:{css:"shield-name",type:"expression",serialization:"content",doc:'Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]'},file:{css:"shield-file",required:!0,type:"uri","default-value":"none",doc:"Image file to render behind the shield text"},"face-name":{css:"shield-face-name",type:"string",validate:"font",doc:"Font name and style to use for the shield text","default-value":"",required:!0},"unlock-image":{css:"shield-unlock-image",type:"boolean",doc:"This parameter should be set to true if you are trying to position text beside rather than on top of the shield image","default-value":!1,"default-meaning":"text alignment relative to the shield image uses the center of the image as the anchor for text positioning."},size:{css:"shield-size",type:"float",doc:"The size of the shield text in pixels"},fill:{css:"shield-fill",type:"color",doc:"The color of the shield text"},placement:{css:"shield-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons."},"avoid-edges":{css:"shield-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.",type:"boolean","default-value":!1},"allow-overlap":{css:"shield-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping shields are shown or hidden.","default-meaning":"Do not allow shields to overlap with other map elements already placed."},"minimum-distance":{css:"shield-min-distance",type:"float","default-value":0,doc:"Minimum distance to the next shield symbol, not necessarily the same shield."},spacing:{css:"shield-spacing",type:"float","default-value":0,doc:"The spacing between repeated occurrences of the same shield on a line"},"minimum-padding":{css:"shield-min-padding","default-value":0,doc:"Determines the minimum amount of padding that a shield gets relative to other shields",type:"float"},"wrap-width":{css:"shield-wrap-width",type:"unsigned","default-value":0,doc:"Length of a chunk of text in characters before wrapping text"},"wrap-before":{css:"shield-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"shield-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long names."},"halo-fill":{css:"shield-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"shield-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},"character-spacing":{css:"shield-character-spacing",type:"unsigned","default-value":0,doc:"Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement."},"line-spacing":{css:"shield-line-spacing",doc:"Vertical spacing between lines of multiline labels (in pixels)",type:"unsigned"},dx:{css:"shield-text-dx",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"shield-text-dy",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"shield-dx":{css:"shield-dx",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},"shield-dy":{css:"shield-dy",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},opacity:{css:"shield-opacity",type:"float",doc:"(Default 1.0) - opacity of the image used for the shield","default-value":1},"text-opacity":{css:"shield-text-opacity",type:"float",doc:"(Default 1.0) - opacity of the text placed on top of the shield","default-value":1},"horizontal-alignment":{css:"shield-horizontal-alignment",type:["left","middle","right","auto"],doc:"The shield's horizontal alignment from its centerpoint","default-value":"auto"},"vertical-alignment":{css:"shield-vertical-alignment",type:["top","middle","bottom","auto"],doc:"The shield's vertical alignment from its centerpoint","default-value":"middle"},"text-transform":{css:"shield-text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"justify-alignment":{css:"shield-justify-alignment",type:["left","center","right","auto"],doc:"Define how text in a shield's label is justified","default-value":"auto"},clip:{css:"shield-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"shield-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"line-pattern":{file:{css:"line-pattern-file",type:"uri","default-value":"none",required:!0,doc:"An image file to be repeated and warped along a line"},clip:{css:"line-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"line-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"polygon-pattern":{file:{css:"polygon-pattern-file",type:"uri","default-value":"none",required:!0,doc:"Image to use as a repeated pattern fill within a polygon"},alignment:{css:"polygon-pattern-alignment",type:["local","global"],"default-value":"local",doc:"Specify whether to align pattern fills to the layer or to the map."},gamma:{css:"polygon-pattern-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon pattern edges"},opacity:{css:"polygon-pattern-opacity",type:"float",doc:"(Default 1.0) - Apply an opacity level to the image used for the pattern","default-value":1,"default-meaning":"The image is rendered without modifications"},clip:{css:"polygon-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},raster:{opacity:{css:"raster-opacity","default-value":1,"default-meaning":"opaque",type:"float",doc:"The opacity of the raster symbolizer on top of other symbolizers."},"filter-factor":{css:"raster-filter-factor","default-value":-1,"default-meaning":"Allow the datasource to choose appropriate downscaling.",type:"float",doc:"This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed."},scaling:{css:"raster-scaling",type:["near","fast","bilinear","bilinear8","bicubic","spline16","spline36","hanning","hamming","hermite","kaiser","quadric","catrom","gaussian","bessel","mitchell","sinc","lanczos","blackman"],"default-value":"near",doc:"The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality."},"mesh-size":{css:"raster-mesh-size","default-value":16,"default-meaning":"Reprojection mesh will be 1/16 of the resolution of the source image",type:"unsigned",doc:"A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion."},"comp-op":{css:"raster-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},point:{file:{css:"point-file",type:"uri",required:!1,"default-value":"none",doc:"Image file to represent a point"},"allow-overlap":{css:"point-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping points are shown or hidden.","default-meaning":"Do not allow points to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"point-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},opacity:{css:"point-opacity",type:"float","default-value":1,"default-meaning":"Fully opaque",doc:"A value from 0 to 1 to control the opacity of the point"},placement:{css:"point-placement",type:["centroid","interior"],doc:"How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon.","default-value":"centroid"},transform:{css:"point-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},"comp-op":{css:"point-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},text:{name:{css:"text-name",type:"expression",required:!0,"default-value":"",serialization:"content",doc:"Value to use for a text label. Data columns are specified using brackets like [column_name]"},"face-name":{css:"text-face-name",type:"string",validate:"font",doc:"Font name and style to render a label in",required:!0},size:{css:"text-size",type:"float","default-value":10,doc:"Text size in pixels"},"text-ratio":{css:"text-ratio",doc:"Define the amount of text (of the total) present on successive lines when wrapping occurs","default-value":0,type:"unsigned"},"wrap-width":{css:"text-wrap-width",doc:"Length of a chunk of text in characters before wrapping text","default-value":0,type:"unsigned"},"wrap-before":{css:"text-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"text-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long text."},spacing:{css:"text-spacing",type:"unsigned",doc:"Distance between repeated text labels on a line (aka. label-spacing)"},"character-spacing":{css:"text-character-spacing",type:"float","default-value":0,doc:"Horizontal spacing adjustment between characters in pixels"},"line-spacing":{css:"text-line-spacing","default-value":0,type:"unsigned",doc:"Vertical spacing adjustment between lines in pixels"},"label-position-tolerance":{css:"text-label-position-tolerance","default-value":0,type:"unsigned",doc:"Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line)"},"max-char-angle-delta":{css:"text-max-char-angle-delta",type:"float","default-value":"22.5",doc:"The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners."},fill:{css:"text-fill",doc:"Specifies the color for the text","default-value":"#000000",type:"color"},opacity:{css:"text-opacity",doc:"A number from 0 to 1 specifying the opacity for the text","default-value":1,"default-meaning":"Fully opaque",type:"float"},"halo-fill":{css:"text-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"text-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},dx:{css:"text-dx",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"text-dy",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"vertical-alignment":{css:"text-vertical-alignment",type:["top","middle","bottom","auto"],doc:"Position of label relative to point position.","default-value":"auto","default-meaning":'Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.'},"avoid-edges":{css:"text-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.","default-value":!1,type:"boolean"},"minimum-distance":{css:"text-min-distance",doc:"Minimum permitted distance to the next text symbolizer.",type:"float"},"minimum-padding":{css:"text-min-padding",doc:"Determines the minimum amount of padding that a text symbolizer gets relative to other text",type:"float"},"minimum-path-length":{css:"text-min-path-length",type:"float","default-value":0,"default-meaning":"place labels on all paths",doc:"Place labels only on paths longer than this value."},"allow-overlap":{css:"text-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping text is shown or hidden.","default-meaning":"Do not allow text to overlap with other text - overlapping markers will not be shown."},orientation:{css:"text-orientation",type:"expression",doc:"Rotate the text."},placement:{css:"text-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"Control the style of placement of a point versus the geometry it is attached to."},"placement-type":{css:"text-placement-type",doc:'Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off.',type:["dummy","simple"],"default-value":"dummy"},placements:{css:"text-placements",type:"string","default-value":"",doc:'If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` '},"text-transform":{css:"text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"horizontal-alignment":{css:"text-horizontal-alignment",type:["left","middle","right","auto"],doc:"The text's horizontal alignment from its centerpoint","default-value":"auto"},"justify-alignment":{css:"text-align",type:["left","right","center","auto"],doc:"Define how text is justified","default-value":"auto","default-meaning":"Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives"},clip:{css:"text-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"text-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},building:{fill:{css:"building-fill","default-value":"#FFFFFF",doc:"The color of the buildings walls.",type:"color"},"fill-opacity":{css:"building-fill-opacity",type:"float",doc:"The opacity of the building as a whole, including all walls.","default-value":1},height:{css:"building-height",doc:"The height of the building in pixels.",type:"expression","default-value":"0"}}},colors:{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50],transparent:[0,0,0,0]},filter:{value:["true","false","null","point","linestring","polygon","collection"]}},Bn.mapnik_reference={version:{latest:s._mapnik_reference_latest,"2.1.1":s._mapnik_reference_latest}},s.CartoCSS=Bn,s.CartoCSS.Tree={},s.CartoCSS.Tree.operate=function(e,t,i){switch(e){case"+":return t+i;case"-":return t-i;case"*":return t*i;case"%":return t%i;case"/":return t/i}},s.CartoCSS.Tree.functions={rgb:function(e,t,i){return this.rgba(e,t,i,1)},rgba:function(e,t,i,r){var n=this,a=[e,t,i].map(function(e){return n.number(e)});return r=n.number(r),a.some(isNaN)||isNaN(r)?null:new s.CartoCSS.Tree.Color(a,r)},stop:function(e){var t,i;return arguments.length>1&&(t=arguments[1]),arguments.length>2&&(i=arguments[2]),{is:"tag",val:e,color:t,mode:i,toString:s=>'\n\t<stop value="'+e.ev(s)+'"'+(t?' color="'+t.ev(s)+'" ':"")+(i?' mode="'+i.ev(s)+'" ':"")+"/>"}},hsl:function(e,t,i){return this.hsla(e,t,i,1)},hsla:function(e,t,i,s){if([e=this.number(e)%360/360,t=this.number(t),i=this.number(i),s=this.number(s)].some(isNaN))return null;var r=i<=.5?i*(t+1):i+t-i*t,n=2*i-r;return this.rgba(255*a(e+1/3),255*a(e),255*a(e-1/3),s);function a(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?n+(r-n)*e*6:2*e<1?r:3*e<2?n+(r-n)*(2/3-e)*6:n}},hue:function(e){return"toHSL"in e?new s.CartoCSS.Tree.Dimension(Math.round(e.toHSL().h)):null},saturation:function(e){return"toHSL"in e?new s.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().s),"%"):null},lightness:function(e){return"toHSL"in e?new s.CartoCSS.Tree.Dimension(Math.round(100*e.toHSL().l),"%"):null},alpha:function(e){return"toHSL"in e?new s.CartoCSS.Tree.Dimension(e.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var i=e.toHSL();return i.s+=t.value/100,i.s=this.clamp(i.s),this.hsla_simple(i)},desaturate:function(e,t){if(!("toHSL"in e))return null;var i=e.toHSL();return i.s-=t.value/100,i.s=this.clamp(i.s),this.hsla_simple(i)},lighten:function(e,t){if(!("toHSL"in e))return null;var i=e.toHSL();return i.l+=t.value/100,i.l=this.clamp(i.l),this.hsla_simple(i)},darken:function(e,t){if(!("toHSL"in e))return null;var i=e.toHSL();return i.l-=t.value/100,i.l=this.clamp(i.l),this.hsla_simple(i)},fadein:function(e,t){if(!("toHSL"in e))return null;var i=e.toHSL();return i.a+=t.value/100,i.a=this.clamp(i.a),this.hsla_simple(i)},fadeout:function(e,t){if(!("toHSL"in e))return null;var i=e.toHSL();return i.a-=t.value/100,i.a=this.clamp(i.a),this.hsla_simple(i)},spin:function(e,t){if(!("toHSL"in e))return null;var i=e.toHSL(),s=(i.h+t.value)%360;return i.h=s<0?360+s:s,this.hsla_simple(i)},replace:function(e,t,i){return"field"===e.is?e.toString+".replace("+t.toString()+", "+i.toString()+")":e.replace(t,i)},mix:function(e,t,i){var r=i.value/100,n=2*r-1,a=e.toHSL().a-t.toHSL().a,o=((n*a==-1?n:(n+a)/(1+n*a))+1)/2,l=1-o,h=[e.rgb[0]*o+t.rgb[0]*l,e.rgb[1]*o+t.rgb[1]*l,e.rgb[2]*o+t.rgb[2]*l],u=e.alpha*r+t.alpha*(1-r);return new s.CartoCSS.Tree.Color(h,u)},greyscale:function(e){return this.desaturate(e,new s.CartoCSS.Tree.Dimension(100))},"%":function(e){for(var t=Array.prototype.slice.call(arguments,1),i=e.value,r=0;r<t.length;r++)i=i.replace(/%s/,t[r].value).replace(/%[da]/,t[r].toString());return i=i.replace(/%%/g,"%"),new s.CartoCSS.Tree.Quoted(i)},hsla_simple:function(e){return this.hsla(e.h,e.s,e.l,e.a)},number:function(e){return e instanceof s.CartoCSS.Tree.Dimension?parseFloat("%"===e.unit?e.value/100:e.value):"number"==typeof e?e:NaN},clamp:function(e){return Math.min(1,Math.max(0,e))}},s.CartoCSS.Tree.Call=class{constructor(e,t,i){this.is="call",this.name=e,this.args=t,this.index=i}ev(e){for(var t=this.args.map(function(t){return t.ev(e)}),i=0;i<t.length;i++)if("undefined"===t[i].is)return{is:"undefined",value:"undefined"};if(this.name in s.CartoCSS.Tree.functions){if(s.CartoCSS.Tree.functions[this.name].length<=t.length){var r=s.CartoCSS.Tree.functions[this.name].apply(s.CartoCSS.Tree.functions,t);return null===r?(e.error({message:"incorrect arguments given to "+this.name+"()",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r}return e.error({message:"incorrect number of arguments for "+this.name+"(). "+s.CartoCSS.Tree.functions[this.name].length+" expected.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}}var n=s.CartoCSS.Tree.Reference.mapnikFunctions[this.name];if(void 0===n){var a=kn()(s.CartoCSS.Tree.Reference.mapnikFunctions),o=this.name,l=a.map(function(e){return[e[0],s.CartoCSS.Tree.Reference.editDistance(o,e[0]),e[1]]}).sort(function(e,t){return e[1]-t[1]});return e.error({message:"unknown function "+this.name+"(), did you mean "+l[0][0]+"("+l[0][2]+")",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}}return n!==t.length&&-1!==n?(e.error({message:"function "+this.name+"() takes "+n+" arguments and was given "+t.length,index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):(this.args=t,this)}toString(e,t){return this.args.length?this.name+"("+this.args.join(",")+")":this.name}},s.CartoCSS.Tree.Color=class{constructor(e,t){this.is="color",Array.isArray(e)?this.rgb=e.slice(0,3):6==e.length?this.rgb=e.match(/.{2}/g).map(function(e){return parseInt(e,16)}):this.rgb=e.split("").map(function(e){return parseInt(e+e,16)}),"number"==typeof t?this.alpha=t:4===e.length?this.alpha=e[3]:this.alpha=1}ev(){return this}toString(){return"rgba("+this.rgb.map(function(e){return Math.round(e)}).concat(this.alpha).join(", ")+")"}operate(e,t,i){var r=[];i instanceof s.CartoCSS.Tree.Color||(i=i.toColor());for(var n=0;n<3;n++)r[n]=s.CartoCSS.Tree.operate(t,this.rgb[n],i.rgb[n]);return new s.CartoCSS.Tree.Color(r)}toHSL(){var e,t,i=this.rgb[0]/255,s=this.rgb[1]/255,r=this.rgb[2]/255,n=this.alpha,a=Math.max(i,s,r),o=Math.min(i,s,r),l=(a+o)/2,h=a-o;if(a===o)e=t=0;else{switch(t=l>.5?h/(2-a-o):h/(a+o),a){case i:e=(s-r)/h+(s<r?6:0);break;case s:e=(r-i)/h+2;break;case r:e=(i-s)/h+4}e/=6}return{h:360*e,s:t,l,a:n}}},s.CartoCSS.Tree.Comment=class{constructor(e,t){this.value=e,this.silent=!!t}toString(e){return"\x3c!--"+this.value+"--\x3e"}ev(){return this}},s.CartoCSS.Tree.Definition=class{constructor(e,t){this.elements=e.elements,this.rules=t,this.ruleIndex={};for(var i=0;i<this.rules.length;i++)"zoom"in this.rules[i]&&(this.rules[i]=this.rules[i].clone()),this.rules[i].zoom=e.zoom,this.ruleIndex[this.rules[i].updateID()]=!0;this.filters=e.filters,this.zoom=e.zoom,this.attachment=e.attachment||"__default__",this.specificity=e.specificity()}toString(){for(var e=this.filters.toString(),t=0;t<this.rules.length;t++)e+="\n "+this.rules[t];return e}toJS(e){var t={},i=this.zoom,r=this.filters.toJS(e),n=[i];function a(i){if(i instanceof s.CartoCSS.Tree.Rule)t[i.name]=t[i.name]||[],r?t[i.name].push("if("+r+"){"+i.value.toJS(e)+"}"):t[i.name].push(i.value.toJS(e));else if(i instanceof s.CartoCSS.Tree.Ruleset){var n=i.toJS(e);for(var a in n)for(var o in t[a]=t[a]||[],n[a])t[a].push(n[a][o])}}for(var o in r&&n.push(r),r=n.join(" && "),this.rules)a(this.rules[o]);return t}},s.CartoCSS.Tree.Dimension=class{constructor(e,t,i){this.is="float",this.physical_units=["m","cm","in","mm","pt","pc"],this.screen_units=["px","%"],this.all_units=["m","cm","in","mm","pt","pc","px","%"],this.densities={m:.0254,mm:25.4,cm:2.54,pt:72,pc:6},this.value=parseFloat(e),this.unit=t||null,this.index=i}ev(e){if(this.unit&&this.all_units.indexOf(this.unit)<0)return e.error({message:"Invalid unit: '"+this.unit+"'",index:this.index}),{is:"undefined",value:"undefined"};if(this.unit&&this.physical_units.indexOf(this.unit)>=0){if(!e.ppi)return e.error({message:"ppi is not set, so metric units can't be used",index:this.index}),{is:"undefined",value:"undefined"};this.value=this.value/this.densities[this.unit]*e.ppi,this.unit="px"}return this}toColor(){return new s.CartoCSS.Tree.Color([this.value,this.value,this.value])}round(){return this.value=Math.round(this.value),this}toString(){return this.value.toString()}operate(e,t,i){return"%"===this.unit&&"%"!==i.unit?(e.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===i.unit?"*"===t||"/"===t||"%"===t?(e.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new s.CartoCSS.Tree.Dimension(s.CartoCSS.Tree.operate(t,this.value,this.value*i.value*.01),this.unit):new s.CartoCSS.Tree.Dimension(s.CartoCSS.Tree.operate(t,this.value,i.value),this.unit||i.unit)}},s.CartoCSS.Tree.Element=class{constructor(e){this.value=e.trim(),"#"===this.value[0]&&(this.type="id",this.clean=this.value.replace(/^#/,"")),"."===this.value[0]&&(this.type="class",this.clean=this.value.replace(/^\./,"")),-1!==this.value.indexOf("*")&&(this.type="wildcard")}specificity(){return["id"===this.type?1:0,"class"===this.type?1:0]}toString(){return this.value}},s.CartoCSS.Tree.Expression=class{constructor(e){this.is="expression",this.value=e}ev(e){return this.value.length>1?new s.CartoCSS.Tree.Expression(this.value.map(function(t){return t.ev(e)})):this.value[0].ev(e)}toString(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}},s.CartoCSS.Tree.Field=class{constructor(e){this.is="field",this.value=e||""}toString(){return'["'+this.value.toUpperCase()+'"]'}ev(){return this}},s.CartoCSS.Tree.Filter=class{constructor(e,t,i,s,r){this.ops={"<":[" < ","numeric"],">":[" > ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" <= ","numeric"],">=":[" >= ","numeric"],"=~":[".match(","string",")"]},this.key=e,this.op=t,this.val=i,this.index=s,this.filename=r,this.id=this.key+this.op+this.val}ev(e){return this.key=this.key.ev(e),this.val=this.val.ev(e),this}toString(){return"["+this.id+"]"}},s.CartoCSS.Tree.Filterset=class{constructor(){this.filters={}}toJS(e){function t(e){var t=e.op;"="===t&&(t="==");var i=e.val;void 0!==e._val&&(i=e._val.toString(!0)),e.key&&"scale"===e.key.value?i=+i:"string"!=typeof i&&"object"!=typeof i||(i="'"+i+"'");var s="attributes";return s+"&&"+s+e.key+"&&"+s+e.key+" "+t+i}var i=[];for(var s in this.filters)i.push(t(this.filters[s]));return i.join(" && ")}toString(){var e=[];for(var t in this.filters)e.push(this.filters[t].id);return e.sort().join("\t")}ev(e){for(var t in this.filters)this.filters[t].ev(e);return this}clone(){var e=new s.CartoCSS.Tree.Filterset;for(var t in this.filters)e.filters[t]=this.filters[t];return e}cloneWith(e){var t=[];for(var i in e.filters){var r=this.addable(e.filters[i]);if(!1===r)return!1;!0===r&&t.push(e.filters[i])}if(!t.length)return null;var n=new s.CartoCSS.Tree.Filterset;for(i in this.filters)n.filters[i]=this.filters[i];for(;i=t.shift();)n.add(i);return n}addable(e){var t=e.key.toString(),i=e.val.toString();switch(i.match(/^[0-9]+(\.[0-9]*)?$/)&&(i=parseFloat(i)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==i&&null:void 0===this.filters[t+"!="+i]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=i)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=i)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>i)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<i))));case"=~":return!0;case"!=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val!==i&&null:void 0!==this.filters[t+"!="+i]?null:void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=i?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=i?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>i?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<i)||null;case">":return t+"="in this.filters?!(this.filters[t+"="].val<=i)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=i)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=i)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=i?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>i)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val<i)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=i)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<i)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=i?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=i)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=i)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=i)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=i)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=i?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<i)||null));case"<=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>i)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=i)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>i)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=i?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=i)||null))}}conflict(e){var t=e.key.toString(),i=e.val.toString();return isNaN(parseFloat(i))||(i=parseFloat(i)),("="===e.op&&void 0!==this.filters[t+"="]&&i!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&i==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&i===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}add(e,t){var i,s=e.key.toString(),r=e.op,n=this.conflict(e);if(n)return n;if("="===r){for(var a in this.filters)this.filters[a].key===s&&delete this.filters[a];this.filters[s+"="]=e}else if("!="===r)this.filters[s+"!="+e.val]=e;else if("=~"===r)this.filters[s+"=~"+e.val]=e;else if(">"===r){for(var o in this.filters)this.filters[o].key===s&&this.filters[o].val<=e.val&&delete this.filters[o];this.filters[s+">"]=e}else if(">="===r){for(var l in this.filters)i=+this.filters[l].val.toString(),this.filters[l].key===s&&i<e.val&&delete this.filters[l];void 0!==this.filters[s+"!="+e.val]?(delete this.filters[s+"!="+e.val],e.op=">",this.filters[s+">"]=e):this.filters[s+">="]=e}else if("<"===r){for(var h in this.filters)i=+this.filters[h].val.toString(),this.filters[h].key===s&&i>=e.val&&delete this.filters[h];this.filters[s+"<"]=e}else if("<="===r){for(var u in this.filters)i=+this.filters[u].val.toString(),this.filters[u].key===s&&i>e.val&&delete this.filters[u];void 0!==this.filters[s+"!="+e.val]?(delete this.filters[s+"!="+e.val],e.op="<",this.filters[s+"<"]=e):this.filters[s+"<="]=e}}},s.CartoCSS.Tree.Fontset=class{constructor(e,t){this.fonts=t,this.name="fontset-"+e.effects.length}},s.CartoCSS.Tree.Invalid=class{constructor(e,t,i){this.is="invalid",this.chunk=e,this.index=t,this.type="syntax",this.message=i||"Invalid code: "+this.chunk}ev(e){return e.error({chunk:this.chunk,index:this.index,type:"syntax",message:this.message||"Invalid code: "+this.chunk}),{is:"undefined"}}},s.CartoCSS.Tree.Keyword=class{ev(){return this}constructor(e){this.value=e;var t={transparent:"color",true:"boolean",false:"boolean"};this.is=t[e]?t[e]:"keyword"}toString(){return this.value}},s.CartoCSS.Tree.Literal=class{constructor(e){this.value=e||"",this.is="field"}toString(){return this.value}ev(){return this}},s.CartoCSS.Tree.Operation=class{constructor(e,t,i){this.is="operation",this.op=e.trim(),this.operands=t,this.index=i}ev(e){var t,i=this.operands[0].ev(e),r=this.operands[1].ev(e);return"undefined"===i.is||"undefined"===r.is?{is:"undefined",value:"undefined"}:(i instanceof s.CartoCSS.Tree.Dimension&&r instanceof s.CartoCSS.Tree.Color&&("*"===this.op||"+"===this.op?(t=r,r=i,i=t):e.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),i instanceof s.CartoCSS.Tree.Quoted&&r instanceof s.CartoCSS.Tree.Quoted&&"+"!==this.op?(e.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):i instanceof s.CartoCSS.Tree.Field||r instanceof s.CartoCSS.Tree.Field||i instanceof s.CartoCSS.Tree.Literal||r instanceof s.CartoCSS.Tree.Literal?"color"===i.is||"color"===r.is?(e.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new s.CartoCSS.Tree.Literal(i.ev(e).toString(!0)+this.op+r.ev(e).toString(!0)):void 0===i.operate?(e.error({message:"Cannot do math with type "+i.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):i.operate(e,this.op,r))}},s.CartoCSS.Tree.Quoted=class{constructor(e){this.is="string",this.value=e||""}toString(e){var t=this.value.replace(/&/g,"&"),i=t.replace(/\'/g,"\\'").replace(/\"/g,""").replace(/</g,"<").replace(/\>/g,">");return!0===e?"'"+i+"'":t}ev(){return this}operate(e,t,i){return new s.CartoCSS.Tree.Quoted(s.CartoCSS.Tree.operate(t,this.toString(),i.toString(this.contains_field)))}},s.CartoCSS.Tree.Reference={_validateValue:{font:function(e,t){return!e.validation_data||!e.validation_data.fonts||-1!=e.validation_data.fonts.indexOf(t)}},setData:function(e){this.data=e,this.selector_cache=function(e){var t={};for(var i in e.symbolizers)for(var s in e.symbolizers[i])e.symbolizers[i][s].hasOwnProperty("css")&&(t[e.symbolizers[i][s].css]=[e.symbolizers[i][s],i,s]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var i in e.symbolizers)for(var s in e.symbolizers[i])if("functions"===e.symbolizers[i][s].type)for(var r=0;r<e.symbolizers[i][s].functions.length;r++){var n=e.symbolizers[i][s].functions[r];t[n[0]]=n[1]}return t}(e),this.required_cache=function(e){var t={};for(var i in e.symbolizers)for(var s in t[i]=[],e.symbolizers[i])e.symbolizers[i][s].required&&t[i].push(e.symbolizers[i][s].css);return t}(e)},setVersion:function(e){return!!s.CartoCSS.mapnik_reference.version.hasOwnProperty(e)&&(this.setData(s.CartoCSS.mapnik_reference.version[e]),!0)},selectorData:function(e,t){if(this.selector_cache&&this.selector_cache[e])return this.selector_cache[e][t]},validSelector:function(e){return!!this.selector_cache[e]},selectorName:function(e){return this.selectorData(e,2)},selector:function(e){return this.selectorData(e,0)},symbolizer:function(e){return this.selectorData(e,1)},requiredProperties:function(e,t){var i=this.required_cache[e];for(var s in i)if(!(i[s]in t))return"Property "+i[s]+" required for defining "+e+" styles."},isFont:function(e){return"font"===this.selector(e).validate},editDistance:function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;for(var i=[],s=0;s<=t.length;s++)i[s]=[s];for(var r=0;r<=e.length;r++)i[0][r]=r;for(s=1;s<=t.length;s++)for(r=1;r<=e.length;r++)t.charAt(s-1)===e.charAt(r-1)?i[s][r]=i[s-1][r-1]:i[s][r]=Math.min(i[s-1][r-1]+1,Math.min(i[s][r-1]+1,i[s-1][r]+1));return i[t.length][e.length]},validValue:function(e,t,i){var s;if(this.selector(t)){if("keyword"===i.value[0].is)return function(e,t){return"object"==typeof this.selector(t).type?-1!==this.selector(t).type.indexOf(e.value[0].value):"string"===this.selector(t).type}(i,t);if("undefined"===i.value[0].is)return!0;if("numbers"===this.selector(t).type){for(s in i.value)if("float"!==i.value[s].is)return!1;return!0}if("tags"===this.selector(t).type){if(!i.value)return!1;if(!i.value[0].value)return"tag"===i.value[0].is;for(s=0;s<i.value[0].value.length;s++)if("tag"!==i.value[0].value[s].is)return!1;return!0}if("functions"==this.selector(t).type)return function(e,t){if("string"===e.value[0].is)return!0;for(var i in e.value)for(var s in e.value[i].value){if("call"!==e.value[i].value[s].is)return!1;var r=find(this.selector(t).functions,function(t){return t[0]===e.value[i].value[s].name});if(!(r&&-1===r[1]||r&&r[1]===e.value[i].value[s].args.length))return!1}return!0}(i,t);if("expression"===this.selector(t).type)return!0;if("unsigned"===this.selector(t).type)return"float"===i.value[0].is&&(i.value[0].round(),!0);if(this.selector(t).validate){for(s=0;s<i.value.length;s++)if(this.selector(t).type===i.value[s].is&&this._validateValue[this.selector(t).validate](e,i.value[s].value))return!0;return!1}return this.selector(t).type===i.value[0].is}return!1}},s.CartoCSS.Tree.Reference.setVersion("latest"),s.CartoCSS.Tree.Rule=class{constructor(e,t,i,r){this.is="rule";var n=e.split("/");this.name=n.pop(),this.instance=n.length?n[0]:"__default__",this.value=t instanceof s.CartoCSS.Tree.Value?t:new s.CartoCSS.Tree.Value([t]),this.index=i,this.symbolizer=s.CartoCSS.Tree.Reference.symbolizer(this.name),this.filename=r,this.variable="@"===e.charAt(0)}clone(){var e=Object.create(s.CartoCSS.Tree.Rule.prototype);return e.name=this.name,e.value=this.value,e.index=this.index,e.instance=this.instance,e.symbolizer=this.symbolizer,e.filename=this.filename,e.variable=this.variable,e}updateID(){return this.id=this.zoom+"#"+this.instance+"#"+this.name}toString(){return"["+s.CartoCSS.Tree.Zoom.toString(this.zoom)+"] "+this.name+": "+this.value}ev(e){return new s.CartoCSS.Tree.Rule(this.name,this.value.ev(e),this.index,this.filename)}},s.CartoCSS.Tree.Ruleset=class{constructor(e,t){this.is="ruleset",this.selectors=e,this.rules=t,this._lookups={}}ev(e){var t,i,r=new s.CartoCSS.Tree.Ruleset(this.selectors,this.rules.slice(0));for(r.root=this.root,e.frames.unshift(r),t=0;t<r.rules.length;t++)i=r.rules[t],r.rules[t]=i.ev?i.ev(e):i;return e.frames.shift(),r}match(e){return!e||0===e.length}variables(){return this._variables?this._variables:this._variables=this.rules.reduce(function(e,t){return t instanceof s.CartoCSS.Tree.Rule&&!0===t.variable&&(e[t.name]=t),e},{})}variable(e){return this.variables()[e]}rulesets(){return this._rulesets?this._rulesets:this._rulesets=this.rules.filter(function(e){return e instanceof s.CartoCSS.Tree.Ruleset})}find(e,t){t=t||this;var i=[],r=e.toString();return r in this._lookups?this._lookups[r]:(this.rulesets().forEach(function(r){if(r!==t)for(var n=0;n<r.selectors.length;n++)if(e.match(r.selectors[n])){e.elements.length>1?Array.prototype.push.apply(i,r.find(new s.CartoCSS.Tree.Selector(null,null,e.elements.slice(1)),t)):i.push(r);break}}),this._lookups[r]=i)}evZooms(e){for(var t=0;t<this.selectors.length;t++){for(var i=s.CartoCSS.Tree.Zoom.all,r=0;r<this.selectors[t].zoom.length;r++)i=this.selectors[t].zoom[r].ev(e).zoom;this.selectors[t].zoom=i}}flatten(e,t,i){var r,n,a=[];for(0===this.selectors.length&&(i.frames=i.frames.concat(this.rules)),this.evZooms(i),r=0;r<this.selectors.length;r++){var o=this.selectors[r];if(o.filters)if(t.length)for(n=0;n<t.length;n++){var l=t[n],h=l.filters.cloneWith(o.filters);if(null===h){if(l.zoom===o.zoom&&l.attachment===o.attachment&&l.elements.join()===o.elements.join()){a.push(l);continue}h=l.filters}else if(!h)continue;var u=Object.create(s.CartoCSS.Tree.Selector.prototype);u.filters=h,u.zoom=o.zoom,u.elements=l.elements.concat(o.elements),l.attachment&&o.attachment?u.attachment=l.attachment+"/"+o.attachment:u.attachment=o.attachment||l.attachment,u.conditions=l.conditions+o.conditions,u.index=o.index,a.push(u)}else a.push(o)}var c=[];for(r=0;r<this.rules.length;r++){var d=this.rules[r];d instanceof s.CartoCSS.Tree.Ruleset?d.flatten(e,a,i):d instanceof s.CartoCSS.Tree.Rule?c.push(d):d instanceof s.CartoCSS.Tree.Invalid&&i.error(d)}var p=!!c.length&&c[0].index;for(r=0;r<a.length;r++)!1!==p&&(a[r].index=p),e.push(new s.CartoCSS.Tree.Definition(a[r],c.slice()));return e}},s.CartoCSS.Tree.Selector=class{constructor(e,t,i,r,n,a){this.elements=i||[],this.attachment=r,this.filters=e||{},this.zoom=void 0!==t?t:s.CartoCSS.Tree.Zoom.all,this.conditions=n,this.index=a}specificity(){return this.elements.reduce(function(e,t){var i=t.specificity();return e[0]+=i[0],e[1]+=i[1],e},[0,0,this.conditions,this.index])}},s.CartoCSS.Tree.URL=class{constructor(e,t){this.is="uri",this.value=e,this.paths=t}toString(){return this.value.toString()}ev(e){return new s.CartoCSS.Tree.URL(this.value.ev(e),this.paths)}},s.CartoCSS.Tree.Value=class{constructor(e){this.is="value",this.value=e}ev(e){return 1===this.value.length?this.value[0].ev(e):new s.CartoCSS.Tree.Value(this.value.map(function(t){return t.ev(e)}))}toJS(e){var t=this.ev(e),i=t.toString();return"color"===t.is||"uri"===t.is||"string"===t.is||"keyword"===t.is?i="'"+i+"'":"field"===t.is?i=i.replace(/\[(.*)\]/g,"attributes['$1']"):t.value&&"object"==typeof t.value&&(i="["+i+"]"),"_value = "+i+";"}toString(e,t,i,s){return this.value.map(function(t){return t.toString(e,s)}).join(i||", ")}clone(){var e=Object.create(s.CartoCSS.Tree.Value.prototype);return Array.isArray(e)?e.value=this.value.slice():e.value=this.value,e.is=this.is,e}},s.CartoCSS.Tree.Variable=class{constructor(e,t,i){this.is="variable",this.name=e,this.index=t,this.filename=i}toString(){return this.name}ev(e){if(this._css)return this._css;var t=e.frames.filter(function(e){return e.name===this.name}.bind(this));return t.length?t[0].value.ev(e):(e.error({message:"variable "+this.name+" is undefined",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"})}},s.CartoCSS.Tree.Zoom=class{constructor(e,t,i){this.op=e,this.value=t,this.index=i}setZoom(e){return this.zoom=e,this}ev(e){var t=parseInt(this.value.ev(e).toString(),10);switch((t>s.CartoCSS.Tree.Zoom.maxZoom||t<0)&&e.error({message:"Only zoom levels between 0 and "+s.CartoCSS.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+t,this;case">":this.zoom="zoom && zoom > "+t;break;case">=":this.zoom="zoom && zoom >= "+t;break;case"<":this.zoom="zoom && zoom < "+t;break;case"<=":this.zoom="zoom && zoom <= "+t;break;default:return this}return this}toString(){for(var e="",t=0;t<=s.CartoCSS.Tree.Zoom.maxZoom;t++)e+=this.zoom&1<<t?"X":".";return e}},s.CartoCSS.Tree.Zoom.all=23,s.CartoCSS.Tree.Zoom.maxZoom=22,s.CartoCSS.Tree.Zoom.ranges={0:1e9,1:5e8,2:2e8,3:1e8,4:5e7,5:25e6,6:125e5,7:65e5,8:3e6,9:15e5,10:75e4,11:4e5,12:2e5,13:1e5,14:5e4,15:25e3,16:12500,17:5e3,18:2500,19:1500,20:750,21:500,22:250,23:100};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Un{constructor(e){e=e||{},this.fill=!0,this.fillColor="#000000",this.fillOpacity=1,this.stroke=!1,this.strokeColor="#000000",this.strokeOpacity=1,this.strokeWidth=1,this.strokeLinecap="butt",this.strokeLineJoin="miter",this.strokeDashstyle="solid",this.pointRadius=6,this.shadowBlur=0,this.shadowColor="#000000",this.shadowOffsetX=0,this.shadowOffsetY=0,this.label="",this.labelRect=!1,this.fontColor="",this.fontSize=12,this.fontStyle="normal",this.fontVariant="normal",this.fontWeight="normal",this.fontFamily="arial,sans-serif",this.labelPosition="top",this.labelAlign="center",this.labelBaseline="middle",this.labelXOffset=0,this.labelYOffset=0,ye.extend(this,e)}}s.ThemeStyle=Un;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Gn{constructor(){this.refOriginalPosition=[0,0],this.refDataID=null,this.isHoverByRefDataID=!1,this.refDataHoverGroup=null,this.dataInfo=null,this.clickable=!0,this.hoverable=!0,this.style=null,this.highlightStyle={},this.CLASS_NAME="SuperMap.Feature.ShapeParameters"}destroy(){this.refOriginalPosition=null,this.refDataID=null,this.isHoverByRefDataID=null,this.refDataHoverGroup=null,this.dataInfo=null,this.clickable=null,this.hoverable=null,this.style=null,this.highlightStyle=null}}s.Feature=s.Feature||{},s.Feature.ShapeParameters=Gn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class jn extends Gn{constructor(e,t){super(e,t),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=6,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Point"}destroy(){this.x=null,this.y=null,this.r=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Point=jn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class zn extends Gn{constructor(e){super(e),this.pointList=e,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Line"}destroy(){this.pointList=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Line=zn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Vn extends Gn{constructor(e){super(e),this.pointList=e,this.holePolygonPointLists=null,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Polygon"}destroy(){this.pointList=null,this.holePolygonPointLists=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Polygon=Vn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Hn extends Gn{constructor(e,t,i,s){super(e,t,i,s),this.x=isNaN(e)?0:e,this.y=isNaN(e)?0:t,this.width=isNaN(i)?0:i,this.height=isNaN(s)?0:s,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Rectangle"}destroy(){this.x=null,this.y=null,this.width=null,this.height=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Rectangle=Hn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Jn extends Gn{constructor(e,t,i,s,r,n,a){super(e,t,i,s,r,n,a),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=isNaN(i)?0:i,this.startAngle=isNaN(s)?0:s,this.endAngle=isNaN(r)?0:r,this.r0=isNaN(n)?0:n,this.clockWise=a,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Sector"}destroy(){this.x=null,this.y=null,this.r=null,this.startAngle=null,this.endAngle=null,this.r0=null,this.clockWise=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Sector=Jn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class qn extends Gn{constructor(e,t,i){super(e,t,i),this.x=e,this.y=t,this.text=i,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Label"}destroy(){this.x=null,this.y=null,this.text=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Label=qn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Wn extends Gn{constructor(e,t,i,s,r,n,a,o,l){super(e,t,i,s,r,n,a,o,l),this.x=e,this.y=t,this.image=i,this.width=s,this.height=r,this.sx=n,this.sy=a,this.sWidth=o,this.sHeight=l,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Image"}destroy(){this.x=null,this.y=null,this.image=null,this.width=null,this.height=null,this.sx=null,this.sy=null,this.sWidth=null,this.sHeight=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Image=Wn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Yn extends Gn{constructor(e,t,i){super(e,t,i),this.x=isNaN(e)?0:e,this.y=isNaN(t)?0:t,this.r=isNaN(i)?0:i,this.CLASS_NAME="SuperMap.Feature.ShapeParameters.Circle"}destroy(){this.x=null,this.y=null,this.r=null,super.destroy()}}s.Feature=s.Feature||{},s.Feature.ShapeParameters.Circle=Yn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Qn{constructor(){this._handlers={},this.CLASS_NAME="SuperMap.LevelRenderer.Eventful"}destroy(){this._handlers=null}one(e,t,i){var s=this._handlers;return t&&e?(s[e]||(s[e]=[]),s[e].push({h:t,one:!0,ctx:i||this}),this):this}bind(e,t,i){var s=this._handlers;return t&&e?(s[e]||(s[e]=[]),s[e].push({h:t,one:!1,ctx:i||this}),this):this}unbind(e,t){var i=this._handlers;if(!e)return this._handlers={},this;if(t){if(i[e]){for(var s=[],r=0,n=i[e].length;r<n;r++)i[e][r].h!=t&&s.push(i[e][r]);i[e]=s}i[e]&&0===i[e].length&&delete i[e]}else delete i[e];return this}dispatch(e){if(this._handlers[e]){var t=arguments,i=t.length;i>3&&(t=Array.prototype.slice.call(t,1));for(var s=this._handlers[e],r=s.length,n=0;n<r;){switch(i){case 1:s[n].h.call(s[n].ctx);break;case 2:s[n].h.call(s[n].ctx,t[1]);break;case 3:s[n].h.call(s[n].ctx,t[1],t[2]);break;default:s[n].h.apply(s[n].ctx,t)}s[n].one?(s.splice(n,1),r--):n++}}return this}dispatchWithContext(e){if(this._handlers[e]){var t=arguments,i=t.length;i>4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var s=t[t.length-1],r=this._handlers[e],n=r.length,a=0;a<n;){switch(i){case 1:r[a].h.call(s);break;case 2:r[a].h.call(s,t[1]);break;case 3:r[a].h.call(s,t[1],t[2]);break;default:r[a].h.apply(s,t)}r[a].one?(r.splice(a,1),n--):a++}}return this}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Xn{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Vector"}create(e,t){var i=new(0,this.ArrayCtor)(2);return i[0]=e||0,i[1]=t||0,i}copy(e,t){return e[0]=t[0],e[1]=t[1],e}set(e,t,i){return e[0]=t,e[1]=i,e}add(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e}scaleAndAdd(e,t,i,s){return e[0]=t[0]+i[0]*s,e[1]=t[1]+i[1]*s,e}sub(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e}len(e){return Math.sqrt(this.lenSquare(e))}lenSquare(e){return e[0]*e[0]+e[1]*e[1]}mul(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e}div(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e}dot(e,t){return e[0]*t[0]+e[1]*t[1]}scale(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e}normalize(e,t){var i=this.len(t);return 0===i?(e[0]=0,e[1]=0):(e[0]=t[0]/i,e[1]=t[1]/i),e}distance(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}distanceSquare(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}negate(e,t){return e[0]=-t[0],e[1]=-t[1],e}lerp(e,t,i,s){return e[0]=t[0]+s*(i[0]-t[0]),e[1]=t[1]+s*(i[1]-t[1]),e}applyTransform(e,t,i){var s=t[0],r=t[1];return e[0]=i[0]*s+i[2]*r+i[4],e[1]=i[1]*s+i[3]*r+i[5],e}min(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e}max(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}length(e){return this.len(e)}lengthSquare(e){return this.lenSquare(e)}dist(e,t){return this.distance(e,t)}distSquare(e,t){return this.distanceSquare(e,t)}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Kn{constructor(){this.vector=new Xn,this.EPSILON=1e-4,this.THREE_SQRT=Math.sqrt(3),this.ONE_THIRD=1/3,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Curve"}isAroundZero(e){return e>-this.EPSILON&&e<this.EPSILON}isNotAroundZero(e){return e>this.EPSILON||e<-this.EPSILON}cubicAt(e,t,i,s,r){var n=1-r;return n*n*(n*e+3*r*t)+r*r*(r*s+3*n*i)}cubicDerivativeAt(e,t,i,s,r){var n=1-r;return 3*(((t-e)*n+2*(i-t)*r)*n+(s-i)*r*r)}cubicRootAt(e,t,i,s,r,n){var a=s+3*(t-i)-e,o=3*(i-2*t+e),l=3*(t-e),h=e-r,u=o*o-3*a*l,c=o*l-9*a*h,d=l*l-3*o*h,p=0;if(this.isAroundZero(u)&&this.isAroundZero(c))if(this.isAroundZero(o))n[0]=0;else{let e=-l/o;e>=0&&e<=1&&(n[p++]=e)}else{var f=c*c-4*u*d;if(this.isAroundZero(f)){var m=c/u;let e=-o/a+m,t=-m/2;e>=0&&e<=1&&(n[p++]=e),t>=0&&t<=1&&(n[p++]=t)}else if(f>0){let e=Math.sqrt(f),t=u*o+1.5*a*(-c+e),i=u*o+1.5*a*(-c-e),s=(-o-((t=t<0?-Math.pow(-t,this.ONE_THIRD):Math.pow(t,this.ONE_THIRD))+(i=i<0?-Math.pow(-i,this.ONE_THIRD):Math.pow(i,this.ONE_THIRD))))/(3*a);s>=0&&s<=1&&(n[p++]=s)}else{var y=(2*u*o-3*a*c)/(2*Math.sqrt(u*u*u)),g=Math.acos(y)/3,v=Math.sqrt(u),S=Math.cos(g);let e=(-o-2*v*S)/(3*a),t=(-o+v*(S+this.THREE_SQRT*Math.sin(g)))/(3*a),i=(-o+v*(S-this.THREE_SQRT*Math.sin(g)))/(3*a);e>=0&&e<=1&&(n[p++]=e),t>=0&&t<=1&&(n[p++]=t),i>=0&&i<=1&&(n[p++]=i)}}return p}cubicExtrema(e,t,i,s,r){var n=6*i-12*t+6*e,a=9*t+3*s-3*e-9*i,o=3*t-3*e,l=0;if(this.isAroundZero(a)){if(this.isNotAroundZero(n)){let e=-o/n;e>=0&&e<=1&&(r[l++]=e)}}else{var h=n*n-4*a*o;if(this.isAroundZero(h))r[0]=-n/(2*a);else if(h>0){let e=Math.sqrt(h),t=(-n+e)/(2*a),i=(-n-e)/(2*a);t>=0&&t<=1&&(r[l++]=t),i>=0&&i<=1&&(r[l++]=i)}}return l}cubicSubdivide(e,t,i,s,r,n){var a=(t-e)*r+e,o=(i-t)*r+t,l=(s-i)*r+i,h=(o-a)*r+a,u=(l-o)*r+o,c=(u-h)*r+h;n[0]=e,n[1]=a,n[2]=h,n[3]=c,n[4]=c,n[5]=u,n[6]=l,n[7]=s}cubicProjectPoint(e,t,i,s,r,n,a,o,l,h,u){var c,d=this.vector.create(),p=this.vector.create(),f=this.vector.create(),m=.005,y=1/0;d[0]=l,d[1]=h;for(let l=0;l<1;l+=.05){p[0]=this.cubicAt(e,i,r,a,l),p[1]=this.cubicAt(t,s,n,o,l);let h=this.vector.distSquare(d,p);h<y&&(c=l,y=h)}y=1/0;for(let l=0;l<32&&!(m<this.EPSILON);l++){let l=c-m,h=c+m;p[0]=this.cubicAt(e,i,r,a,l),p[1]=this.cubicAt(t,s,n,o,l);let u=this.vector.distSquare(p,d);if(l>=0&&u<y)c=l,y=u;else{f[0]=this.cubicAt(e,i,r,a,h),f[1]=this.cubicAt(t,s,n,o,h);let l=this.vector.distSquare(f,d);h<=1&&l<y?(c=h,y=l):m*=.5}}return u&&(u[0]=this.cubicAt(e,i,r,a,c),u[1]=this.cubicAt(t,s,n,o,c)),Math.sqrt(y)}quadraticAt(e,t,i,s){var r=1-s;return r*(r*e+2*s*t)+s*s*i}quadraticDerivativeAt(e,t,i,s){return 2*((1-s)*(t-e)+s*(i-t))}quadraticRootAt(e,t,i,s,r){var n=e-2*t+i,a=2*(t-e),o=e-s,l=0;if(this.isAroundZero(n)){if(this.isNotAroundZero(a)){var h=-o/a;h>=0&&h<=1&&(r[l++]=h)}}else{var u=a*a-4*n*o;if(this.isAroundZero(u)){let e=-a/(2*n);e>=0&&e<=1&&(r[l++]=e)}else if(u>0){let e=Math.sqrt(u),t=(-a+e)/(2*n),i=(-a-e)/(2*n);t>=0&&t<=1&&(r[l++]=t),i>=0&&i<=1&&(r[l++]=i)}}return l}quadraticExtremum(e,t,i){var s=e+i-2*t;return 0===s?.5:(e-t)/s}quadraticProjectPoint(e,t,i,s,r,n,a,o,l){var h,u=this.vector.create(),c=this.vector.create(),d=this.vector.create(),p=.005,f=1/0;u[0]=a,u[1]=o;for(let a=0;a<1;a+=.05){c[0]=this.quadraticAt(e,i,r,a),c[1]=this.quadraticAt(t,s,n,a);let o=this.vector.distSquare(u,c);o<f&&(h=a,f=o)}f=1/0;for(let a=0;a<32&&!(p<this.EPSILON);a++){let a=h-p,o=h+p;c[0]=this.quadraticAt(e,i,r,a),c[1]=this.quadraticAt(t,s,n,a);let l=this.vector.distSquare(c,u);if(a>=0&&l<f)h=a,f=l;else{d[0]=this.quadraticAt(e,i,r,o),d[1]=this.quadraticAt(t,s,n,o);let a=this.vector.distSquare(d,u);o<=1&&a<f?(h=o,f=a):p*=.5}}return l&&(l[0]=this.quadraticAt(e,i,r,h),l[1]=this.quadraticAt(t,s,n,h)),Math.sqrt(f)}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Zn{}Zn.EVENT={RESIZE:"resize",CLICK:"click",DBLCLICK:"dblclick",MOUSEWHEEL:"mousewheel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",GLOBALOUT:"globalout",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",touchClickDelay:300},Zn.catchBrushException=!1,Zn.debugMode=0;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class $n{static SUtil_smoothBezier(e,t,i,s,r){r&&2===r||(r=[0,0]);var n,a,o=r,l=[],h=[],u=[],c=[],d=!!s;if(d){n=[1/0,1/0],a=[-1/0,-1/0];let t=e.length;for(let i=0;i<t;i++)$n.Util_vector.min(n,n,[e[i][0]+o[0],e[i][1]+o[1]]),$n.Util_vector.max(a,a,[e[i][0]+o[0],e[i][1]+o[1]]);$n.Util_vector.min(n,n,s[0]),$n.Util_vector.max(a,a,s[1])}let p=e.length;for(let s=0;s<p;s++){let r,f,m=[e[s][0]+o[0],e[s][1]+o[1]];if(i)r=[e[s?s-1:p-1][0]+o[0],e[s?s-1:p-1][1]+o[1]],f=[e[(s+1)%p][0]+o[0],e[(s+1)%p][1]+o[1]];else{if(0===s||s===p-1){l.push([e[s][0]+o[0],e[s][1]+o[1]]);continue}r=[e[s-1][0]+o[0],e[s-1][1]+o[1]],f=[e[s+1][0]+o[0],e[s+1][1]+o[1]]}$n.Util_vector.sub(h,f,r),$n.Util_vector.scale(h,h,t);let y=$n.Util_vector.distance(m,r),g=$n.Util_vector.distance(m,f),v=y+g;0!==v&&(y/=v,g/=v),$n.Util_vector.scale(u,h,-y),$n.Util_vector.scale(c,h,g);let S=$n.Util_vector.add([],m,u),b=$n.Util_vector.add([],m,c);d&&($n.Util_vector.max(S,S,n),$n.Util_vector.min(S,S,a),$n.Util_vector.max(b,b,n),$n.Util_vector.min(b,b,a)),l.push(S),l.push(b)}return i&&l.push(l.shift()),l}static SUtil_smoothSpline(e,t,i,s){s&&2===s||(s=[0,0]);var r=s,n=e.length,a=[],o=0;for(let t=1;t<n;t++)o+=$n.Util_vector.distance([e[t-1][0]+r[0],e[t-1][1]+r[1]],[e[t][0]+r[0],e[t][1]+r[1]]);var l=o/5;l=l<n?n:l;for(let i=0;i<l;i++){let s,o,u,c=i/(l-1)*(t?n:n-1),d=Math.floor(c),p=c-d,f=[e[d%n][0]+r[0],e[d%n][1]+r[1]];t?(s=[e[(d-1+n)%n][0]+r[0],e[(d-1+n)%n][1]+r[1]],o=[e[(d+1)%n][0]+r[0],e[(d+1)%n][1]+r[1]],u=[e[(d+2)%n][0]+r[0],e[(d+2)%n][1]+r[1]]):(s=[e[0===d?d:d-1][0]+r[0],e[0===d?d:d-1][1]+r[1]],o=[e[d>n-2?n-1:d+1][0]+r[0],e[d>n-2?n-1:d+1][1]+r[1]],u=[e[d>n-3?n-1:d+2][0]+r[0],e[d>n-3?n-1:d+2][1]+r[1]]);let m=p*p,y=p*m;a.push([h(s[0],f[0],o[0],u[0],p,m,y),h(s[1],f[1],o[1],u[1],p,m,y)])}return a;function h(e,t,i,s,r,n,a){var o=.5*(i-e),l=.5*(s-t);return(2*(t-i)+o+l)*a+(-3*(t-i)-2*o-l)*n+o*r+t}}static SUtil_dashedLineTo(e,t,i,s,r,n,a){var o=[5,5];if(n="number"!=typeof n?5:n,e.setLineDash)return o[0]=n,o[1]=n,a&&a instanceof Array?e.setLineDash(a):e.setLineDash(o),e.moveTo(t,i),void e.lineTo(s,r);var l=s-t,h=r-i,u=Math.floor(Math.sqrt(l*l+h*h)/n);l/=u,h/=u;for(var c=!0,d=0;d<u;++d)c?e.moveTo(t,i):e.lineTo(t,i),c=!c,t+=l,i+=h;e.lineTo(s,r)}}$n.Util_area=new class{constructor(){this.util=new Nn,this.curve=new Kn,this._ctx=null,this._textWidthCache={},this._textHeightCache={},this._textWidthCacheCounter=0,this._textHeightCacheCounter=0,this.TEXT_CACHE_MAX=5e3,this.PI2=2*Math.PI,this.roots=[-1,-1,-1],this.extrema=[-1,-1],this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Area"}normalizeRadian(e){return(e%=this.PI2)<0&&(e+=this.PI2),e}isInside(e,t,i,s){if(!t||!e)return!1;var r=e.type;this._ctx=this._ctx||this.util.getContext();var n=this._mathMethod(e,t,i,s);if(void 0!==n)return n;if(e.buildPath&&this._ctx.isPointInPath)return this._buildPathMethod(e,this._ctx,t,i,s);switch(r){case"ellipse":case"smicellipse":return!0;case"trochoid":var a="out"==t.location?t.r1+t.r2+t.d:t.r1-t.r2+t.d;return this.isInsideCircle(t,i,s,a);case"rose":return this.isInsideCircle(t,i,s,t.maxr);default:return!1}}_mathMethod(e,t,i,s){switch(e.type){case"bezier-curve":return void 0===t.cpX2?this.isInsideQuadraticStroke(t.xStart,t.yStart,t.cpX1,t.cpY1,t.xEnd,t.yEnd,t.lineWidth,i,s):this.isInsideCubicStroke(t.xStart,t.yStart,t.cpX1,t.cpY1,t.cpX2,t.cpY2,t.xEnd,t.yEnd,t.lineWidth,i,s);case"line":return this.isInsideLine(t.xStart,t.yStart,t.xEnd,t.yEnd,t.lineWidth,i,s);case"broken-line":return this.isInsideBrokenLine(t.pointList,t.lineWidth,i,s);case"smicbroken-line":{let r=i,n=s;return e.refOriginalPosition&&(r=i-e.refOriginalPosition[0],n=s-e.refOriginalPosition[1]),this.isInsideBrokenLine(t.pointList,t.lineWidth,r,n)}case"ring":return this.isInsideRing(t.x,t.y,t.r0,t.r,i,s);case"smicring":{let r=t.x,n=t.y;return e.refOriginalPosition&&(r=t.x+e.refOriginalPosition[0],n=t.y+e.refOriginalPosition[1]),this.isInsideRing(r,n,t.r0,t.r,i,s)}case"circle":return this.isInsideCircle(t.x,t.y,t.r,i,s);case"smicpoint":{let r=i,n=s;return e.refOriginalPosition&&(r=i-e.refOriginalPosition[0],n=s-e.refOriginalPosition[1]),this.isInsideCircle(t.x,t.y,t.r,r,n)}case"sector":{let e=t.startAngle*Math.PI/180,r=t.endAngle*Math.PI/180;return t.clockWise||(e=-e,r=-r),this.isInsideSector(t.x,t.y,t.r0,t.r,e,r,!t.clockWise,i,s)}case"smicsector":{let r=t.startAngle*Math.PI/180,n=t.endAngle*Math.PI/180;t.clockWise||(r=-r,n=-n);let a=t.x,o=t.y;return e.refOriginalPosition&&(a=t.x+e.refOriginalPosition[0],o=t.y+e.refOriginalPosition[1]),this.isInsideSector(a,o,t.r0,t.r,r,n,!t.clockWise,i,s)}case"path":return this.isInsidePath(t.pathArray,Math.max(t.lineWidth,5),t.brushType,i,s);case"polygon":case"star":case"smicstar":case"isogon":case"smicisogon":return this.isInsidePolygon(t.pointList,i,s);case"smicpolygon":{let u=i,c=s;if(e.refOriginalPosition&&(u=i-e.refOriginalPosition[0],c=s-e.refOriginalPosition[1]),e.holePolygonPointLists&&e.holePolygonPointLists.length>0){for(var r=this.isInsidePolygon(t.pointList,u,c),n=e.holePolygonPointLists,a=!1,o=0,l=n.length;o<l;o++){var h=n[o];!0===this.isInsidePolygon(h,u,c)&&(a=!0)}return!0===r&&!1===a}return this.isInsidePolygon(t.pointList,u,c)}case"text":var u=t.__rect||e.getRect(t);return this.isInsideRect(u.x,u.y,u.width,u.height,i,s);case"smictext":var c=e.getTextBackground(t);return this.isInsidePolygon(c,i,s);case"rectangle":case"image":return this.isInsideRect(t.x,t.y,t.width,t.height,i,s);case"smicimage":{let r=t.x,n=t.y;return e.refOriginalPosition&&(r=t.x+e.refOriginalPosition[0],n=t.y+e.refOriginalPosition[1]),this.isInsideRect(r,n,t.width,t.height,i,s)}}}_buildPathMethod(e,t,i,s,r){return t.beginPath(),e.buildPath(t,i),t.closePath(),t.isPointInPath(s,r)}isOutside(e,t,i,s){return!this.isInside(e,t,i,s)}isInsideLine(e,t,i,s,r,n,a){if(0===r)return!1;var o=Math.max(r,5),l=0;if(a>t+o&&a>s+o||a<t-o&&a<s-o||n>e+o&&n>i+o||n<e-o&&n<i-o)return!1;if(e===i)return Math.abs(n-e)<=o/2;var h=(l=(t-s)/(e-i))*n-a+(e*s-i*t)/(e-i);return h*h/(l*l+1)<=o/2*o/2}isInsideCubicStroke(e,t,i,s,r,n,a,o,l,h,u){if(0===l)return!1;var c=Math.max(l,5);return!(u>t+c&&u>s+c&&u>n+c&&u>o+c||u<t-c&&u<s-c&&u<n-c&&u<o-c||h>e+c&&h>i+c&&h>r+c&&h>a+c||h<e-c&&h<i-c&&h<r-c&&h<a-c)&&this.curve.cubicProjectPoint(e,t,i,s,r,n,a,o,h,u,null)<=c/2}isInsideQuadraticStroke(e,t,i,s,r,n,a,o,l){if(0===a)return!1;var h=Math.max(a,5);return!(l>t+h&&l>s+h&&l>n+h||l<t-h&&l<s-h&&l<n-h||o>e+h&&o>i+h&&o>r+h||o<e-h&&o<i-h&&o<r-h)&&this.curve.quadraticProjectPoint(e,t,i,s,r,n,o,l,null)<=h/2}isInsideArcStroke(e,t,i,s,r,n,a,o,l){var h=this.PI2;if(0===a)return!1;var u=Math.max(a,5);o-=e,l-=t;var c=Math.sqrt(o*o+l*l);if(c-u>i||c+u<i)return!1;if(Math.abs(s-r)>=h)return!0;if(n){var d=s;s=this.normalizeRadian(r),r=this.normalizeRadian(d)}else s=this.normalizeRadian(s),r=this.normalizeRadian(r);s>r&&(r+=h);var p=Math.atan2(l,o);return p<0&&(p+=h),p>=s&&p<=r||p+h>=s&&p+h<=r}isInsideBrokenLine(e,t,i,s){for(var r=Math.max(t,10),n=0,a=e.length-1;n<a;n++){var o=e[n][0],l=e[n][1],h=e[n+1][0],u=e[n+1][1];if(this.isInsideLine(o,l,h,u,r,i,s))return!0}return!1}isInsideRing(e,t,i,s,r,n){var a=(r-e)*(r-e)+(n-t)*(n-t);return a<s*s&&a>i*i}isInsideRect(e,t,i,s,r,n){return r>=e&&r<=e+i&&n>=t&&n<=t+s}isInsideCircle(e,t,i,s,r){return(s-e)*(s-e)+(r-t)*(r-t)<i*i}isInsideSector(e,t,i,s,r,n,a,o,l){return this.isInsideArcStroke(e,t,(i+s)/2,r,n,a,s-i,o,l)}isInsidePolygon(e,t,i){for(var s=e.length,r=0,n=0,a=s-1;n<s;n++){var o=e[a][0],l=e[a][1],h=e[n][0],u=e[n][1];r+=this.windingLine(o,l,h,u,t,i),a=n}return 0!==r}windingLine(e,t,i,s,r,n){return n>t&&n>s||n<t&&n<s?0:s==t?0:(n-t)/(s-t)*(i-e)+e>r?s<t?1:-1:0}swapExtrema(){var e=this.extrema[0];this.extrema[0]=this.extrema[1],this.extrema[1]=e}windingCubic(e,t,i,s,r,n,a,o,l,h){var u=this.curve,c=this.roots,d=this.extrema;if(h>t&&h>s&&h>n&&h>o||h<t&&h<s&&h<n&&h<o)return 0;var p=u.cubicRootAt(t,s,n,o,h,c);if(0===p)return 0;for(var f,m,y=0,g=-1,v=0;v<p;v++){var S=c[v];u.cubicAt(e,i,r,a,S)<l||(g<0&&(g=u.cubicExtrema(t,s,n,o,d),d[1]<d[0]&&g>1&&this.swapExtrema(),f=u.cubicAt(t,s,n,o,d[0]),g>1&&(m=u.cubicAt(t,s,n,o,d[1]))),2==g?S<d[0]?y+=f<t?1:-1:S<d[1]?y+=m<f?1:-1:y+=o<m?1:-1:S<d[0]?y+=f<t?1:-1:y+=o<f?1:-1)}return y}windingQuadratic(e,t,i,s,r,n,a,o){var l=this.curve,h=this.roots;if(o>t&&o>s&&o>n||o<t&&o<s&&o<n)return 0;var u=l.quadraticRootAt(t,s,n,o,h);if(0===u)return 0;var c=l.quadraticExtremum(t,s,n);if(c>=0&&c<=1){var d=0,p=l.quadraticAt(t,s,n,c);for(let s=0;s<u;s++)l.quadraticAt(e,i,r,h[s])>a||(h[s]<c?d+=p<t?1:-1:d+=n<p?1:-1);return d}return l.quadraticAt(e,i,r,h[0])>a?0:n<t?1:-1}windingArc(e,t,i,s,r,n,a,o){var l=this.roots,h=this.PI2;if((o-=t)>i||o<-i)return 0;let u=Math.sqrt(i*i-o*o);if(l[0]=-u,l[1]=u,Math.abs(s-r)>=h){s=0,r=h;var c=n?1:-1;return a>=l[0]+e&&a<=l[1]+e?c:0}if(n){let e=s;s=this.normalizeRadian(r),r=this.normalizeRadian(e)}else s=this.normalizeRadian(s),r=this.normalizeRadian(r);s>r&&(r+=h);var d=0;for(let t=0;t<2;t++){var p=l[t];if(p+e>a){let e=Math.atan2(o,p),t=n?1:-1;e<0&&(e=h+e),(e>=s&&e<=r||e+h>=s&&e+h<=r)&&(e>Math.PI/2&&e<1.5*Math.PI&&(t=-t),d+=t)}}return d}isInsidePath(e,t,i,s,r){for(var n=0,a=0,o=0,l=0,h=0,u=!0,c=!0,d="stroke"===(i=i||"fill")||"both"===i,p="fill"===i||"both"===i,f=0;f<e.length;f++){var m=e[f],y=m.points;if(u||"M"===m.command){if(f>0&&(p&&(n+=this.windingLine(a,o,l,h,s,r)),0!==n))return!0;l=y[y.length-2],h=y[y.length-1],u=!1,c&&"A"!==m.command&&(c=!1,a=l,o=h)}switch(m.command){case"M":a=y[0],o=y[1];break;case"L":if(d&&this.isInsideLine(a,o,y[0],y[1],t,s,r))return!0;p&&(n+=this.windingLine(a,o,y[0],y[1],s,r)),a=y[0],o=y[1];break;case"C":if(d&&this.isInsideCubicStroke(a,o,y[0],y[1],y[2],y[3],y[4],y[5],t,s,r))return!0;p&&(n+=this.windingCubic(a,o,y[0],y[1],y[2],y[3],y[4],y[5],s,r)),a=y[4],o=y[5];break;case"Q":if(d&&this.isInsideQuadraticStroke(a,o,y[0],y[1],y[2],y[3],t,s,r))return!0;p&&(n+=this.windingQuadratic(a,o,y[0],y[1],y[2],y[3],s,r)),a=y[2],o=y[3];break;case"A":var g=y[0],v=y[1],S=y[2],b=y[3],_=y[4],x=y[5],C=Math.cos(_)*S+g,T=Math.sin(_)*b+v;c?(c=!1,l=C,h=T):n+=this.windingLine(a,o,C,T);var M=(s-g)*b/S+g;if(d&&this.isInsideArcStroke(g,v,b,_,_+x,1-y[7],t,M,r))return!0;p&&(n+=this.windingArc(g,v,b,_,_+x,1-y[7],M,r)),a=Math.cos(_+x)*S+g,o=Math.sin(_+x)*b+v;break;case"z":if(d&&this.isInsideLine(a,o,l,h,t,s,r))return!0;u=!0}}return p&&(n+=this.windingLine(a,o,l,h,s,r)),0!==n}getTextWidth(e,t){var i=e+":"+t;if(this._textWidthCache[i])return this._textWidthCache[i];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var s=0,r=0,n=(e=(e+"").split("\n")).length;r<n;r++)s=Math.max(this._ctx.measureText(e[r]).width,s);return this._ctx.restore(),this._textWidthCache[i]=s,++this._textWidthCacheCounter>this.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),s}getTextHeight(e,t){var i=e+":"+t;if(this._textHeightCache[i])return this._textHeightCache[i];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var s=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[i]=s,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),s}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,$n.Util_color=new On,$n.Util_computeBoundingBox=new class{constructor(){3===arguments.length&&this.computeBoundingBox(arguments),this.CLASS_NAME="SuperMap.LevelRenderer.Tool.ComputeBoundingBox"}computeBoundingBox(e,t,i){if(0!==e.length){for(var s=e[0][0],r=e[0][0],n=e[0][1],a=e[0][1],o=1;o<e.length;o++){var l=e[o];l[0]<s&&(s=l[0]),l[0]>r&&(r=l[0]),l[1]<n&&(n=l[1]),l[1]>a&&(a=l[1])}t[0]=s,t[1]=n,i[0]=r,i[1]=a}}cubeBezier(e,t,i,s,r,n){var a=new Kn,o=[];a.cubicExtrema(e[0],t[0],i[0],s[0],o);for(let r=0;r<o.length;r++)o[r]=a.cubicAt(e[0],t[0],i[0],s[0],o[r]);var l=[];a.cubicExtrema(e[1],t[1],i[1],s[1],l);for(let r=0;r<l.length;r++)l[r]=a.cubicAt(e[1],t[1],i[1],s[1],l[r]);o.push(e[0],s[0]),l.push(e[1],s[1]);var h=Math.min.apply(null,o),u=Math.max.apply(null,o),c=Math.min.apply(null,l),d=Math.max.apply(null,l);r[0]=h,r[1]=c,n[0]=u,n[1]=d}quadraticBezier(e,t,i,s,r){var n=new Kn,a=n.quadraticExtremum(e[0],t[0],i[0]),o=n.quadraticExtremum(e[1],t[1],i[1]),l=1-(a=Math.max(Math.min(a,1),0)),h=1-(o=Math.max(Math.min(o,1),0)),u=l*l*e[0]+2*l*a*t[0]+a*a*i[0],c=l*l*e[1]+2*l*a*t[1]+a*a*i[1],d=h*h*e[0]+2*h*o*t[0]+o*o*i[0],p=h*h*e[1]+2*h*o*t[1]+o*o*i[1];s[0]=Math.min(e[0],i[0],u,d),s[1]=Math.min(e[1],i[1],c,p),r[0]=Math.max(e[0],i[0],u,d),r[1]=Math.max(e[1],i[1],c,p)}arc(e,t,i,s,r,n,a,o){var l=new Xn,h=l.create(),u=l.create(),c=l.create();if(h[0]=Math.cos(s)*i+e,h[1]=Math.sin(s)*i+t,u[0]=Math.cos(r)*i+e,u[1]=Math.sin(r)*i+t,l.min(a,h,u),l.max(o,h,u),(s%=2*Math.PI)<0&&(s+=2*Math.PI),(r%=2*Math.PI)<0&&(r+=2*Math.PI),s>r&&!n?r+=2*Math.PI:s<r&&n&&(s+=2*Math.PI),n){var d=r;r=s,s=d}for(var p=0;p<r;p+=Math.PI/2)p>s&&(c[0]=Math.cos(p)*i+e,c[1]=Math.sin(p)*i+t,l.min(a,c,a),l.max(o,c,o))}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,$n.Util_curve=new Kn,$n.Util_env=new class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Env";var e,t,i,s,r,n,a,o,l,h,u,c,d,p,f,m,y,g,v,S,b,_=this;return e=navigator.userAgent,t=_.os={},i=_.browser={},s=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),r=e.match(/(Android);?[\s\/]+([\d.]+)?/),n=e.match(/(iPad).*OS\s([\d_]+)/),a=e.match(/(iPod)(.*OS\s([\d_]+))?/),o=!n&&e.match(/(iPhone\sOS)\s([\d_]+)/),l=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=l&&e.match(/TouchPad/),u=e.match(/Kindle\/([\d.]+)/),c=e.match(/Silk\/([\d._]+)/),d=e.match(/(BlackBerry).*Version\/([\d.]+)/),p=e.match(/(BB10).*Version\/([\d.]+)/),f=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),m=e.match(/PlayBook/),y=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),g=e.match(/Firefox\/([\d.]+)/),v=e.match(/MSIE ([\d.]+)/),S=s&&e.match(/Mobile\//)&&!y,b=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!y,(i.webkit=!!s)&&(i.version=s[1]),r&&(t.android=!0,t.version=r[2]),o&&!a&&(t.ios=t.iphone=!0,t.version=o[2].replace(/_/g,".")),n&&(t.ios=t.ipad=!0,t.version=n[2].replace(/_/g,".")),a&&(t.ios=t.ipod=!0,t.version=a[3]?a[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),d&&(t.blackberry=!0,t.version=d[2]),p&&(t.bb10=!0,t.version=p[2]),f&&(t.rimtabletos=!0,t.version=f[2]),m&&(i.playbook=!0),u&&(t.kindle=!0,t.version=u[1]),c&&(i.silk=!0,i.version=c[1]),!c&&t.android&&e.match(/Kindle Fire/)&&(i.silk=!0),y&&(i.chrome=!0,i.version=y[1]),g&&(i.firefox=!0,i.version=g[1]),v&&(i.ie=!0,i.version=v[1]),S&&(e.match(/Safari/)||t.ios)&&(i.safari=!0),b&&(i.webview=!0),v&&(i.ie=!0,i.version=v[1]),t.tablet=!!(n||m||r&&!e.match(/Mobile/)||g&&e.match(/Tablet/)||v&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(r||o||l||d||p||y&&e.match(/Android/)||y&&e.match(/CriOS\/([\d.]+)/)||g&&e.match(/Mobile/)||v&&e.match(/Touch/))),{browser:i,os:t,canvasSupported:!!document.createElement("canvas").getContext}}destory(){return!0}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,$n.Util_event=new class{constructor(){this.stop="function"==typeof window.addEventListener?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0},this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Event"}getX(e){return void 0!==e.zrenderX&&e.zrenderX||void 0!==e.offsetX&&e.offsetX||void 0!==e.layerX&&e.layerX||void 0!==e.clientX&&e.clientX}getY(e){return void 0!==e.zrenderY&&e.zrenderY||void 0!==e.offsetY&&e.offsetY||void 0!==e.layerY&&e.layerY||void 0!==e.clientY&&e.clientY}getDelta(e){return void 0!==e.zrenderDelta&&e.zrenderDelta||void 0!==e.wheelDelta&&e.wheelDelta||void 0!==e.detail&&-e.detail}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,$n.Util_http=new class{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Http"}get(e,t,i){if("object"==typeof e){var s=e;e=s.url,t=s.onsuccess,i=s.onerror}var r=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status>=200&&r.status<300||304===r.status?t&&t(r.responseText):i&&i(),r.onreadystatechange=new Function,r=null)},r.send(null)}},$n.Util_log=new
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class{constructor(){return this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Log",function(){if(0!==Zn.debugMode)if(1==Zn.debugMode)for(let e in arguments)throw new Error(arguments[e]);else if(Zn.debugMode>1)for(let e in arguments)console.log(arguments[e])}}destory(){return!0}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,$n.Util_math=new class{constructor(){this._radians=window.Math.PI/180,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Math"}sin(e,t){return window.Math.sin(t?e*this._radians:e)}cos(e,t){return window.Math.cos(t?e*this._radians:e)}degreeToRadian(e){return e*this._radians}radianToDegree(e){return e/this._radians}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/,$n.Util_matrix=new class{constructor(){this.ArrayCtor="undefined"==typeof Float32Array?Array:Float32Array,this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Matrix"}create(){var e=new(0,this.ArrayCtor)(6);return this.identity(e),e}identity(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}copy(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}mul(e,t,i){return e[0]=t[0]*i[0]+t[2]*i[1],e[1]=t[1]*i[0]+t[3]*i[1],e[2]=t[0]*i[2]+t[2]*i[3],e[3]=t[1]*i[2]+t[3]*i[3],e[4]=t[0]*i[4]+t[2]*i[5]+t[4],e[5]=t[1]*i[4]+t[3]*i[5]+t[5],e}translate(e,t,i){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+i[0],e[5]=t[5]+i[1],e}rotate(e,t,i){var s=t[0],r=t[2],n=t[4],a=t[1],o=t[3],l=t[5],h=Math.sin(i),u=Math.cos(i);return e[0]=s*u+a*h,e[1]=-s*h+a*u,e[2]=r*u+o*h,e[3]=-r*h+u*o,e[4]=u*n+h*l,e[5]=u*l-h*n,e}scale(e,t,i){var s=i[0],r=i[1];return e[0]=t[0]*s,e[1]=t[1]*r,e[2]=t[2]*s,e[3]=t[3]*r,e[4]=t[4]*s,e[5]=t[5]*r,e}invert(e,t){var i=t[0],s=t[2],r=t[4],n=t[1],a=t[3],o=t[5],l=i*a-n*s;return l?(l=1/l,e[0]=a*l,e[1]=-n*l,e[2]=-s*l,e[3]=i*l,e[4]=(s*o-a*r)*l,e[5]=(n*r-i*o)*l,e):null}mulVector(e,t,i){var s=t[0],r=t[2],n=t[4],a=t[1],o=t[3],l=t[5];return e[0]=i[0]*s+i[1]*r+n,e[1]=i[0]*a+i[1]*o+l,e}},$n.Util=new Nn,$n.Util_vector=new Xn;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ea{constructor(){var e;this.position=[0,0],this.rotation=[0,0,0],this.scale=[1,1,0,0],this.needLocalTransform=!1,this.needTransform=!1,this.CLASS_NAME="SuperMap.LevelRenderer.Transformable",this.lookAt=(e=$n.Util_vector.create(),function(t){this.transform||(this.transform=$n.Util_matrix.create());var i=this.transform;function s(e){return e>-5e-5&&e<5e-5}$n.Util_vector.sub(e,t,this.position),s(e[0])&&s(e[1])||($n.Util_vector.normalize(e,e),i[2]=e[0]*this.scale[1],i[3]=e[1]*this.scale[1],i[0]=e[1]*this.scale[0],i[1]=-e[0]*this.scale[0],i[4]=this.position[0],i[5]=this.position[1],this.decomposeTransform())})}destroy(){this.position=null,this.rotation=null,this.scale=null,this.needLocalTransform=null,this.needTransform=null}updateNeedTransform(){function e(e){return e>5e-5||e<-5e-5}this.needLocalTransform=e(this.rotation[0])||e(this.position[0])||e(this.position[1])||e(this.scale[0]-1)||e(this.scale[1]-1)}updateTransform(){if(this.updateNeedTransform(),this.parent?this.needTransform=this.needLocalTransform||this.parent.needTransform:this.needTransform=this.needLocalTransform,this.needTransform){var e=[0,0],t=this.transform||$n.Util_matrix.create();if($n.Util_matrix.identity(t),this.needLocalTransform){if(i(this.scale[0])||i(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;let s=i(e[0])||i(e[1]);s&&$n.Util_matrix.translate(t,t,e),$n.Util_matrix.scale(t,t,this.scale),s&&(e[0]=-e[0],e[1]=-e[1],$n.Util_matrix.translate(t,t,e))}if(this.rotation instanceof Array){if(0!==this.rotation[0]){e[0]=-this.rotation[1]||0,e[1]=-this.rotation[2]||0;let s=i(e[0])||i(e[1]);s&&$n.Util_matrix.translate(t,t,e),$n.Util_matrix.rotate(t,t,this.rotation[0]),s&&(e[0]=-e[0],e[1]=-e[1],$n.Util_matrix.translate(t,t,e))}}else 0!==this.rotation&&$n.Util_matrix.rotate(t,t,this.rotation);(i(this.position[0])||i(this.position[1]))&&$n.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?$n.Util_matrix.mul(this.transform,this.parent.transform,this.transform):$n.Util_matrix.copy(this.transform,this.parent.transform))}function i(e){return e>5e-5||e<-5e-5}}setTransform(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}decomposeTransform(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],i=this.position,s=this.scale,r=this.rotation;a(t-1)&&(t=Math.sqrt(t));var n=e[2]*e[2]+e[3]*e[3];a(n-1)&&(n=Math.sqrt(n)),i[0]=e[4],i[1]=e[5],s[0]=t,s[1]=n,s[2]=s[3]=0,r[0]=Math.atan2(-e[1]/n,e[0]/t),r[1]=r[2]=0}function a(e){return e>5e-5||e<-5e-5}}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ta extends(s.mixin(Qn,ea)){constructor(e){var t;super(e),e=e||{},this.id=null,this.style={},this.highlightStyle=null,this.parent=null,this.__dirty=!0,this.__clipShapes=[],this.invisible=!1,this.ignore=!1,this.zlevel=0,this.draggable=!1,this.clickable=!1,this.hoverable=!0,this.z=0,this.refOriginalPosition=[0,0],this.refDataID=null,this.isHoverByRefDataID=!1,this.refDataHoverGroup=null,this.dataInfo=null,ye.extend(this,e),this.id=this.id||ye.createUniqueID("smShape_"),this.CLASS_NAME="SuperMap.LevelRenderer.Shape",this.getTansform=(t=[],function(e,i){var s=[e,i];return this.needTransform&&this.transform&&($n.Util_matrix.invert(t,this.transform),$n.Util_matrix.mulVector(s,t,[e,i,1]),e==s[0]&&i==s[1]&&this.updateNeedTransform()),s})}destroy(){this.id=null,this.style=null,this.highlightStyle=null,this.parent=null,this.__dirty=null,this.__clipShapes=null,this.invisible=null,this.ignore=null,this.zlevel=null,this.draggable=null,this.clickable=null,this.hoverable=null,this.z=null,this.refOriginalPosition=null,this.refDataID=null,this.refDataHoverGroup=null,this.isHoverByRefDataID=null,this.dataInfo=null,super.destroy()}brush(e,t){var i=this.beforeBrush(e,t);switch(e.beginPath(),this.buildPath(e,i),i.brushType){case"both":this.setCtxGlobalAlpha(e,"fill",i),e.fill(),i.lineWidth>0&&(this.setCtxGlobalAlpha(e,"stroke",i),e.stroke()),this.setCtxGlobalAlpha(e,"reset",i);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",i),i.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",i);break;default:this.setCtxGlobalAlpha(e,"fill",i),e.fill(),this.setCtxGlobalAlpha(e,"reset",i)}this.drawText(e,i,this.style),this.afterBrush(e)}beforeBrush(e,t){var i=this.style;return this.brushTypeOnly&&(i.brushType=this.brushTypeOnly),t&&(i=this.getHighlightStyle(i,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(i.strokeColor=i.strokeColor||i.color),e.save(),this.doClip(e),this.setContext(e,i),this.setTransform(e),i}afterBrush(e){e.restore()}setContext(e,t){for(var i=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],s=0,r=i.length;s<r;s++){var n=t[i[s][0]],a=i[s][1];void 0!==n&&(e[a]=n)}}doClip(e){var t=$n.Util_matrix.create();if(this.__clipShapes)for(var i=0;i<this.__clipShapes.length;i++){var s=this.__clipShapes[i];if(s.needTransform){let i=s.transform;$n.Util_matrix.invert(t,i),e.transform(i[0],i[1],i[2],i[3],i[4],i[5])}if(e.beginPath(),s.buildPath(e,s.style),e.clip(),s.needTransform){let i=t;e.transform(i[0],i[1],i[2],i[3],i[4],i[5])}}}getHighlightStyle(e,t,i){var s={};for(let t in e)s[t]=e[t];var r=$n.Util_color.getHighlightColor();"stroke"!=e.brushType?(s.strokeColor=r,s.lineWidth=e.lineWidth||1,s.brushType="both"):"stroke"!=i?(s.strokeColor=r,s.lineWidth=e.lineWidth||1):s.strokeColor=t.strokeColor||$n.Util_color.mix(e.strokeColor,$n.Util_color.toRGB(r));for(let e in t)void 0!==t[e]&&(s[e]=t[e]);return s}getHighlightZoom(){return"text"!=this.type?6:2}drift(e,t){this.position[0]+=e,this.position[1]+=t}buildPath(e,t){$n.Util_log("buildPath not implemented in "+this.type)}getRect(e){$n.Util_log("getRect not implemented in "+this.type)}isCover(e,t){var i=this.getTansform(e,t);e=i[0],t=i[1];var s=this.style.__rect;return s||(s=this.style.__rect=this.getRect(this.style)),e>=s.x&&e<=s.x+s.width&&t>=s.y&&t<=s.y+s.height&&$n.Util_area.isInside(this,this.style,e,t)}drawText(e,t,i){if(void 0!==t.text&&!1!==t.text){var s=t.textColor||t.color||t.strokeColor;e.fillStyle=s;var r,n,a,o,l=10,h=t.textPosition||this.textPosition||"top",u=[];switch(u=this.refOriginalPosition&&2===this.refOriginalPosition.length?this.refOriginalPosition:[0,0],h){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var c=(i||t).__rect||this.getRect(i||t);switch(h){case"inside":a=c.x+c.width/2,o=c.y+c.height/2,r="center",n="middle","stroke"!=t.brushType&&s==t.color&&(e.fillStyle="#fff");break;case"left":a=c.x-l,o=c.y+c.height/2,r="end",n="middle";break;case"right":a=c.x+c.width+l,o=c.y+c.height/2,r="start",n="middle";break;case"top":a=c.x+c.width/2,o=c.y-l,r="center",n="bottom";break;case"bottom":a=c.x+c.width/2,o=c.y+c.height+l,r="center",n="top"}}break;case"start":case"end":var d=0,p=0,f=0,m=0;if(void 0!==t.pointList){var y=t.pointList;if(y.length<2)return;var g=y.length;switch(h){case"start":d=y[0][0]+u[0],p=y[1][0]+u[0],f=y[0][1]+u[1],m=y[1][1]+u[1];break;case"end":d=y[g-2][0]+u[0],p=y[g-1][0]+u[0],f=y[g-2][1]+u[1],m=y[g-1][1]+u[1]}}else d=t.xStart+u[0]||0,p=t.xEnd+u[0]||0,f=t.yStart+u[1]||0,m=t.yEnd+u[1]||0;switch(h){case"start":r=d<p?"end":"start",n=f<m?"bottom":"top",a=d,o=f;break;case"end":r=d<p?"start":"end",n=f<m?"top":"bottom",a=p,o=m}l-=4,d&&p&&d!=p?a-="end"==r?l:-l:r="center",f!=m?o-="bottom"==n?l:-l:n="middle";break;case"specific":a=t.textX||0,o=t.textY||0,r="start",n="middle"}t.labelXOffset&&!isNaN(t.labelXOffset)&&(a+=t.labelXOffset),t.labelYOffset&&!isNaN(t.labelYOffset)&&(o+=t.labelYOffset),null!=a&&null!=o&&ta._fillText(e,t.text,a,o,t.textFont,t.textAlign||r,t.textBaseline||n)}}modSelf(){this.__dirty=!0,this.style&&(this.style.__rect=null),this.highlightStyle&&(this.highlightStyle.__rect=null)}isSilent(){return!(this.hoverable||this.draggable||this.clickable||this.onmousemove||this.onmouseover||this.onmouseout||this.onmousedown||this.onmouseup||this.onclick||this.ondragenter||this.ondragover||this.ondragleave||this.ondrop)}setCtxGlobalAlpha(e,t,i){e.globalAlpha="fill"===t?void 0===i.fillOpacity?void 0===i.opacity?1:i.opacity:i.fillOpacity:"stroke"===t?void 0===i.strokeOpacity?void 0===i.opacity?1:i.opacity:i.strokeOpacity:void 0===i.opacity?1:i.opacity}static _fillText(e,t,i,s,r,n,a){r&&(e.font=r),e.textAlign=n,e.textBaseline=a;var o=ta._getTextRect(t,i,s,r,n,a);t=(t+"").split("\n");var l=$n.Util_area.getTextHeight("ZH",r);switch(a){case"top":s=o.y;break;case"bottom":s=o.y+l;break;default:s=o.y+l/2}for(var h=0,u=t.length;h<u;h++)e.fillText(t[h],i,s),s+=l}static _getTextRect(e,t,i,s,r,n){var a=$n.Util_area.getTextWidth(e,s),o=$n.Util_area.getTextHeight("ZH",s);switch(e=(e+"").split("\n"),r){case"end":case"right":t-=a;break;case"center":t-=a/2}switch(n){case"top":break;case"bottom":i-=o*e.length;break;default:i-=o*e.length/2}return{x:t,y:i,width:a,height:o*e.length}}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ia extends ta{constructor(e){super(e),this.type="smicpoint",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicPoint"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var i=this.refOriginalPosition;e.arc(t.x+i[0],t.y+i[1],t.r,0,2*Math.PI,!0)}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,i=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+i[0]-e.r-t/2),y:Math.round(e.y+i[1]-e.r-t/2),width:2*e.r+t,height:2*e.r+t},e.__rect)}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class sa extends ta{constructor(e){super(e),this.type="smictext",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicText"}destroy(){this.type=null,super.destroy()}brush(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var i=this.refOriginalPosition,s=this.style;if(t&&(s=this.getHighlightStyle(s,this.highlightStyle||{})),void 0!==s.text&&!1!==s.text){e.save(),this.doClip(e),this.setContext(e,s),this.setTransform(e),s.textFont&&(e.font=s.textFont),e.textAlign=s.textAlign||"start",e.textBaseline=s.textBaseline||"middle";var r,n=(s.text+"").split("\n"),a=$n.Util_area.getTextHeight("ZH",s.textFont),o=this.getRectNoRotation(s),l=s.x+i[0];r="top"==s.textBaseline?o.y:"bottom"==s.textBaseline?o.y+a:o.y+a/2;for(var h=s.x+i[0],u=s.y+i[1],c=0,d=n.length;c<d;c++){switch(s.labelRect&&(e.fillRect(o.x-2,o.y,o.width+4,o.height),e.fillStyle=s.strokeColor,e.strokeRect(o.x-2,o.y,o.width+4,o.height),e.fillStyle=s.textColor),s.brushType){case"stroke":this.setCtxGlobalAlpha(e,"stroke",s),s.textRotation&&0!==s.textRotation?(e.save(),e.translate(h,u),e.rotate(s.textRotation*Math.PI/180),"top"==s.textBaseline?s.maxWidth?e.strokeText(n[c],0,a*c,s.maxWidth):e.strokeText(n[c],0,a*c):"bottom"==s.textBaseline?s.maxWidth?e.strokeText(n[c],0,a*(c+1)-o.height,s.maxWidth):e.strokeText(n[c],0,a*(c+1)-o.height):s.maxWidth?e.strokeText(n[c],0,a*(c+1)-o.height/2-a/2,s.maxWidth):e.strokeText(n[c],0,a*(c+1)-o.height/2-a/2),e.restore()):s.maxWidth?e.strokeText(n[c],l,r,s.maxWidth):e.strokeText(n[c],l,r),this.setCtxGlobalAlpha(e,"reset",s);break;case"both":s.textRotation&&0!==s.textRotation?(e.save(),e.translate(h,u),e.rotate(s.textRotation*Math.PI/180),"top"==s.textBaseline?s.maxWidth?(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(n[c],0,a*c,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(n[c],0,a*c,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s)):(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(n[c],0,a*c),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(n[c],0,a*c),this.setCtxGlobalAlpha(e,"reset",s)):"bottom"==s.textBaseline?s.maxWidth?(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(n[c],0,a*(c+1)-o.height,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(n[c],0,a*(c+1)-o.height,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s)):(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(n[c],0,a*(c+1)-o.height),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(n[c],0,a*(c+1)-o.height),this.setCtxGlobalAlpha(e,"reset",s)):s.maxWidth?(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(n[c],0,a*(c+1)-o.height/2-a/2,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(n[c],0,a*(c+1)-o.height/2-a/2,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s)):(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(n[c],0,a*(c+1)-o.height/2-a/2),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(n[c],0,a*(c+1)-o.height/2-a/2),this.setCtxGlobalAlpha(e,"reset",s)),e.restore()):s.maxWidth?(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(n[c],l,r,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(n[c],l,r,s.maxWidth),this.setCtxGlobalAlpha(e,"reset",s)):(this.setCtxGlobalAlpha(e,"fill",s),e.fillText(n[c],l,r),this.setCtxGlobalAlpha(e,"reset",s),this.setCtxGlobalAlpha(e,"stroke",s),e.strokeText(n[c],l,r),this.setCtxGlobalAlpha(e,"reset",s));break;default:this.setCtxGlobalAlpha(e,"fill",s),s.textRotation&&0!==s.textRotation?(e.save(),e.translate(h,u),e.rotate(s.textRotation*Math.PI/180),"top"==s.textBaseline?s.maxWidth?e.fillText(n[c],0,a*c,s.maxWidth):e.fillText(n[c],0,a*c):"bottom"==s.textBaseline?s.maxWidth?e.fillText(n[c],0,a*(c+1)-o.height,s.maxWidth):e.fillText(n[c],0,a*(c+1)-o.height):s.maxWidth?e.fillText(n[c],0,a*(c+1)-o.height/2-a/2,s.maxWidth):e.fillText(n[c],0,a*(c+1)-o.height/2-a/2),e.restore()):s.maxWidth?e.fillText(n[c],l,r,s.maxWidth):e.fillText(n[c],l,r),this.setCtxGlobalAlpha(e,"reset",s)}r+=a}e.restore()}}getRect(e){if(e.__rect)return e.__rect;for(var t,i,s,r,n=this.getTextBackground(e,!0),a=0,o=n.length;a<o;a++){var l=n[a];0==a?(t=l[0],s=l[0],i=l[1],r=l[1]):(l[0]<t&&(t=l[0]),l[0]>s&&(s=l[0]),l[1]<i&&(i=l[1]),l[1]>r&&(r=l[1]))}return e.__rect={x:t,y:i,width:s-t,height:r-i},e.__rect}getRectNoRotation(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,i=this.refOriginalPosition,s=$n.Util_area.getTextHeight("ZH",e.textFont),r=$n.Util_area.getTextWidth(e.text,e.textFont),n=$n.Util_area.getTextHeight(e.text,e.textFont),a=e.x+i[0];"end"==e.textAlign||"right"==e.textAlign?a-=r:"center"==e.textAlign&&(a-=r/2),t="top"==e.textBaseline?e.y+i[1]:"bottom"==e.textBaseline?e.y+i[1]-n:e.y+i[1]-n/2;var o,l=!1;if(e.maxWidth){var h=parseInt(e.maxWidth);h<r&&(o=r,l=!0,r=h),a=e.x+i[0],"end"==e.textAlign||"right"==e.textAlign?a-=r:"center"==e.textAlign&&(a-=r/2)}e.textFont&&(e.textFont.toLowerCase().indexOf("italic")>-1&&(r+=!0===l?s/3*(r/o):s/3));return{x:a,y:t,width:r,height:n}}getTextBackground(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var i=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var s=this.getRectNoRotation(e),r=e.x+i[0],n=e.y+i[1],a=[];if(e.textRotation&&0!==e.textRotation){let t=e.textRotation,i=this.getRotatedLocation(s.x,s.y,r,n,t),o=this.getRotatedLocation(s.x+s.width,s.y,r,n,t),l=this.getRotatedLocation(s.x+s.width,s.y+s.height,r,n,t),h=this.getRotatedLocation(s.x,s.y+s.height,r,n,t);a.push(i),a.push(o),a.push(l),a.push(h)}else{let e=[s.x,s.y],t=[s.x+s.width,s.y],i=[s.x+s.width,s.y+s.height],r=[s.x,s.y+s.height];a.push(e),a.push(t),a.push(i),a.push(r)}return e.__textBackground=a,e.__textBackground}getRotatedLocation(e,t,i,s,r){var n,a,o=new Array;return t=-t,s=-s,r=-r,n=(e-i)*Math.cos(r/180*Math.PI)-(t-s)*Math.sin(r/180*Math.PI)+i,a=(e-i)*Math.sin(r/180*Math.PI)+(t-s)*Math.cos(r/180*Math.PI)+s,o[0]=n,o[1]=-a,o}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ra extends ta{constructor(e){super(e),this.type="smiccircle",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicCircle"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var i=this.refOriginalPosition,s=t.x+i[0],r=t.y+i[1];return e.moveTo(s+t.r,r),e.arc(s,r,t.r,0,2*Math.PI,!0),!0}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,i=this.refOriginalPosition,s=e.x+i[0],r=e.y+i[1],n=e.r;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(s-n-t/2),y:Math.round(r-n-t/2),width:2*n+t,height:2*n+t},e.__rect}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class na extends ta{constructor(e){super(e),this.type="smicpolygon",this.holePolygonPointLists=null,this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicPolygon"}destroy(){this.type=null,this.holePolygonPointLists=null,super.destroy()}brush(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var i=this.style;t&&(i=this.getHighlightStyle(i,this.highlightStyle||{})),e.save(),this.setContext(e,i),this.setTransform(e);var s=!1;"fill"!=i.brushType&&"both"!=i.brushType&&void 0!==i.brushType||(e.beginPath(),"dashed"==i.lineType||"dotted"==i.lineType||"dot"==i.lineType||"dash"==i.lineType||"dashdot"==i.lineType||"longdash"==i.lineType||"longdashdot"==i.lineType?this.buildPath(e,{lineType:"solid",lineWidth:i.lineWidth,pointList:i.pointList}):(this.buildPath(e,i),s=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",i),e.fill(),this.setCtxGlobalAlpha(e,"reset",i)),i.lineWidth>0&&("stroke"==i.brushType||"both"==i.brushType)&&(s||(e.beginPath(),this.buildPath(e,i)),this.setCtxGlobalAlpha(e,"stroke",i),e.stroke(),this.setCtxGlobalAlpha(e,"reset",i)),this.drawText(e,i,this.style);var r=ye.cloneObject(i);if(r.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var n=this.holePolygonPointLists,a=n.length,o=0;o<a;o++){var l=n[o];r.pointList=l,e.globalCompositeOperation="destination-out",s=!1,"fill"!=r.brushType&&"both"!=r.brushType&&void 0!==r.brushType||(e.beginPath(),"dashed"==r.lineType||"dotted"==r.lineType||"dot"==r.lineType||"dash"==r.lineType||"dashdot"==r.lineType||"longdash"==r.lineType||"longdashdot"==r.lineType?this.buildPath(e,{lineType:"solid",lineWidth:r.lineWidth,pointList:r.pointList}):(this.buildPath(e,r),s=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",r),e.fill(),this.setCtxGlobalAlpha(e,"reset",r)),r.lineWidth>0&&("stroke"==r.brushType||"both"==r.brushType)?(s||(e.beginPath(),this.buildPath(e,r)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",r),e.stroke(),this.setCtxGlobalAlpha(e,"reset",r)):e.globalCompositeOperation="source-over"}e.restore()}buildPath(e,t){t.showShadow&&(e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY),this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var i=this.refOriginalPosition,s=t.pointList;if(!(s.length<2))if(t.smooth&&"spline"!==t.smooth){var r,n,a,o=$n.SUtil_smoothBezier(s,t.smooth,!0,t.smoothConstraint,i);e.moveTo(s[0][0]+i[0],s[0][1]+i[1]);for(var l=s.length,h=0;h<l;h++)r=o[2*h],n=o[2*h+1],a=[s[(h+1)%l][0]+i[0],s[(h+1)%l][1]+i[1]],e.bezierCurveTo(r[0],r[1],n[0],n[1],a[0],a[1])}else if("spline"===t.smooth&&(s=$n.SUtil_smoothSpline(s,!0,null,i)),t.lineType&&"solid"!=t.lineType){if("dashed"===t.lineType||"dotted"===t.lineType||"dot"===t.lineType||"dash"===t.lineType||"longdash"===t.lineType){let r=t._dashLength||(t.lineWidth||1)*("dashed"==t.lineType?5:1);t._dashLength=r;let n=t.lineWidth||1,a=n,o=n;"dashed"===t.lineType&&(a*=5,o*=5,t.lineCap&&"butt"!==t.lineCap&&(a-=n,o+=n)),"dotted"===t.lineType&&t.lineCap&&"butt"!==t.lineCap&&(a=1,o+=n),"dot"===t.lineType&&(o*=4,t.lineCap&&"butt"!==t.lineCap&&(a=1,o+=n)),"dash"===t.lineType&&(a*=4,o*=4,t.lineCap&&"butt"!==t.lineCap&&(a-=n,o+=n)),"longdash"===t.lineType&&(a*=8,o*=4,t.lineCap&&"butt"!==t.lineCap&&(a-=n,o+=n)),e.moveTo(s[0][0]+i[0],s[0][1]+i[1]);for(let t=1;t<s.length;t++)$n.SUtil_dashedLineTo(e,s[t-1][0]+i[0],s[t-1][1]+i[1],s[t][0]+i[0],s[t][1]+i[1],n,[a,o]);$n.SUtil_dashedLineTo(e,s[s.length-1][0]+i[0],s[s.length-1][1]+i[1],s[0][0]+i[0],s[0][1]+i[1],n,[a,o])}else if("dashdot"===t.lineType||"longdashdot"===t.lineType){let r=t._dashLength||(t.lineWidth||1)*("dashed"==t.lineType?5:1);t._dashLength=r;let n=t.lineWidth||1,a=n,o=n,l=n,h=n;"dashdot"===t.lineType&&(a*=4,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(a-=n,o+=n,l=1,h+=n)),"longdashdot"===t.lineType&&(a*=8,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(a-=n,o+=n,l=1,h+=n)),e.moveTo(s[0][0]+i[0],s[0][1]+i[1]);for(let t=1;t<s.length;t++)$n.SUtil_dashedLineTo(e,s[t-1][0]+i[0],s[t-1][1]+i[1],s[t][0]+i[0],s[t][1]+i[1],n,[a,o,l,h]);$n.SUtil_dashedLineTo(e,s[s.length-1][0]+i[0],s[s.length-1][1]+i[1],s[0][0]+i[0],s[0][1]+i[1],n,[a,o,l,h])}}else{e.moveTo(s[0][0]+i[0],s[0][1]+i[1]);for(let t=1;t<s.length;t++)e.lineTo(s[t][0]+i[0],s[t][1]+i[1]);e.lineTo(s[0][0]+i[0],s[0][1]+i[1])}}getRect(e,t){var i;if(t?i=t:(this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),i=this.refOriginalPosition),e.__rect)return e.__rect;for(var s,r=Number.MAX_VALUE,n=Number.MIN_VALUE,a=Number.MAX_VALUE,o=Number.MIN_VALUE,l=e.pointList,h=0,u=l.length;h<u;h++)l[h][0]+i[0]<r&&(r=l[h][0]+i[0]),l[h][0]+i[0]>n&&(n=l[h][0]+i[0]),l[h][1]+i[1]<a&&(a=l[h][1]+i[1]),l[h][1]+i[1]>o&&(o=l[h][1]+i[1]);return s="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(r-s/2),y:Math.round(a-s/2),width:n-r+s,height:o-a+s},e.__rect}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class aa extends ta{constructor(e){super(e),this.brushTypeOnly="stroke",this.textPosition="end",this.type="smicbroken-line",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicBrokenLine"}destroy(){this.brushTypeOnly=null,this.textPosition=null,this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var i=this.refOriginalPosition,s=t.pointList;if(!(s.length<2)){var r=Math.min(t.pointList.length,Math.round(t.pointListLength||t.pointList.length));if(t.smooth&&"spline"!==t.smooth){var n,a,o,l=$n.SUtil_smoothBezier(s,t.smooth,!1,t.smoothConstraint,i);e.moveTo(s[0][0]+i[0],s[0][1]+i[1]);for(let t=0;t<r-1;t++)n=l[2*t],a=l[2*t+1],o=[s[t+1][0]+i[0],s[t+1][1]+i[1]],e.bezierCurveTo(n[0],n[1],a[0],a[1],o[0],o[1])}else if("spline"===t.smooth&&(r=(s=$n.SUtil_smoothSpline(s,null,null,i)).length),t.lineType&&"solid"!==t.lineType){if("dashed"===t.lineType||"dotted"===t.lineType||"dot"===t.lineType||"dash"===t.lineType||"longdash"===t.lineType){let n=t.lineWidth||1,a=n,o=n;"dashed"===t.lineType&&(a*=5,o*=5,t.lineCap&&"butt"!==t.lineCap&&(a-=n,o+=n)),"dotted"===t.lineType&&t.lineCap&&"butt"!==t.lineCap&&(a=1,o+=n),"dot"===t.lineType&&(o*=4,t.lineCap&&"butt"!==t.lineCap&&(a=1,o+=n)),"dash"===t.lineType&&(a*=4,o*=4,t.lineCap&&"butt"!==t.lineCap&&(a-=n,o+=n)),"longdash"===t.lineType&&(a*=8,o*=4,t.lineCap&&"butt"!==t.lineCap&&(a-=n,o+=n)),e.moveTo(s[0][0]+i[0],s[0][1]+i[1]);for(var h=1;h<r;h++)$n.SUtil_dashedLineTo(e,s[h-1][0]+i[0],s[h-1][1]+i[1],s[h][0]+i[0],s[h][1]+i[1],n,[a,o])}else if("dashdot"===t.lineType||"longdashdot"===t.lineType){let n=t.lineWidth||1,a=n,o=n,l=n,h=n;"dashdot"===t.lineType&&(a*=4,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(a-=n,o+=n,l=1,h+=n)),"longdashdot"===t.lineType&&(a*=8,o*=4,h*=4,t.lineCap&&"butt"!==t.lineCap&&(a-=n,o+=n,l=1,h+=n)),n=(t.lineWidth||1)*("dashed"===t.lineType?5:1),e.moveTo(s[0][0]+i[0],s[0][1]+i[1]);for(let t=1;t<r;t++)$n.SUtil_dashedLineTo(e,s[t-1][0]+i[0],s[t-1][1]+i[1],s[t][0]+i[0],s[t][1]+i[1],n,[a,o,l,h])}}else{e.moveTo(s[0][0]+i[0],s[0][1]+i[1]);for(let t=1;t<r;t++)e.lineTo(s[t][0]+i[0],s[t][1]+i[1])}}}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition;return na.prototype.getRect.apply(this,[e,t])}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class oa extends ta{constructor(e){super(e),this.type="smicimage",this._imageCache={},this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicImage"}destroy(){this.type=null,this._imageCache=null,super.destroy()}brush(e,t,i){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition,r=this.style||{};t&&(r=this.getHighlightStyle(r,this.highlightStyle||{}));var n=r.image,a=this;if("string"==typeof n){var o=n;this._imageCache[o]?n=this._imageCache[o]:((n=new Image).onload=function(){n.onload=null,clearTimeout(oa._refreshTimeout),oa._needsRefresh.push(a),oa._refreshTimeout=setTimeout(function(){i&&i(oa._needsRefresh),oa._needsRefresh=[]},10)},n.src=o,this._imageCache[o]=n)}if(n){if("IMG"==n.nodeName.toUpperCase())if(window.ActiveXObject){if("complete"!=n.readyState)return}else if(!n.complete)return;var l=r.width||n.width,h=r.height||n.height,u=r.x+s[0],c=r.y+s[1];if(!n.width||!n.height)return;if(e.save(),this.doClip(e),this.setContext(e,r),this.setTransform(e),r.sWidth&&r.sHeight){let t=r.sx+s[0]||0,i=r.sy+s[1]||0;e.drawImage(n,t,i,r.sWidth,r.sHeight,u,c,l,h)}else if(r.sx&&r.sy){let t=r.sx+s[0],i=r.sy+s[1];var d=l-t,p=h-i;e.drawImage(n,t,i,d,p,u,c,l,h)}else e.drawImage(n,u,c,l,h);r.width||(r.width=l),r.height||(r.height=h),this.style.width||(this.style.width=l),this.style.height||(this.style.height=h),this.drawText(e,r,this.style),e.restore()}}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition;return{x:e.x+t[0],y:e.y+t[1],width:e.width,height:e.height}}clearCache(){this._imageCache={}}}oa._needsRefresh=[],oa._refreshTimeout=null;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class la extends ta{constructor(e){super(e),this.type="smicrectangle",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicRectangle"}destroy(){this.type=null,super.destroy()}_buildRadiusPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var i,s,r,n,a,o=this.refOriginalPosition,l=t.x+o[0],h=t.y+o[1],u=t.width,c=t.height,d=t.radius;"number"==typeof d?i=s=r=n=d:d instanceof Array?1===d.length?i=s=r=n=d[0]:2===d.length?(i=r=d[0],s=n=d[1]):3===d.length?(i=d[0],s=n=d[1],r=d[2]):(i=d[0],s=d[1],r=d[2],n=d[3]):i=s=r=n=0,i+s>u&&(i*=u/(a=i+s),s*=u/a),r+n>u&&(r*=u/(a=r+n),n*=u/a),s+r>c&&(s*=c/(a=s+r),r*=c/a),i+n>c&&(i*=c/(a=i+n),n*=c/a),e.moveTo(l+i,h),e.lineTo(l+u-s,h),0!==s&&e.quadraticCurveTo(l+u,h,l+u,h+s),e.lineTo(l+u,h+c-r),0!==r&&e.quadraticCurveTo(l+u,h+c,l+u-r,h+c),e.lineTo(l+n,h+c),0!==n&&e.quadraticCurveTo(l,h+c,l,h+c-n),e.lineTo(l,h+i),0!==i&&e.quadraticCurveTo(l,h,l+i,h)}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var i=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+i[0],t.y+i[1]),e.lineTo(t.x+i[0]+t.width,t.y+i[1]),e.lineTo(t.x+i[0]+t.width,t.y+i[1]+t.height),e.lineTo(t.x+i[0],t.y+i[1]+t.height),e.lineTo(t.x+i[0],t.y+i[1])),e.closePath()}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,i=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+i[0]-t/2),y:Math.round(e.y+i[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ha extends ta{constructor(e){super(e),this.type="smicsector",this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]),this.CLASS_NAME="SuperMap.LevelRenderer.Shape.SmicSector"}destroy(){this.type=null,super.destroy()}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var i=this.refOriginalPosition,s=t.x+i[0],r=t.y+i[1],n=t.r0||0,a=t.r,o=t.startAngle,l=t.endAngle,h=t.clockWise||!1;o=$n.Util_math.degreeToRadian(o),l=$n.Util_math.degreeToRadian(l),h||(o=-o,l=-l);var u=$n.Util_math.cos(o),c=$n.Util_math.sin(o);e.moveTo(u*n+s,c*n+r),e.lineTo(u*a+s,c*a+r),e.arc(s,r,a,o,l,!h),e.lineTo($n.Util_math.cos(l)*n+s,$n.Util_math.sin(l)*n+r),0!==n&&e.arc(s,r,n,l,o,h),e.closePath()}getRect(e){if(e.__rect)return e.__rect;this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t=this.refOriginalPosition,i=$n.Util_vector.create(),s=$n.Util_vector.create(),r=$n.Util_vector.create(),n=$n.Util_vector.create(),a=e.x+t[0],o=e.y+t[1],l=e.r0||0,h=e.r,u=$n.Util_math.degreeToRadian(e.startAngle),c=$n.Util_math.degreeToRadian(e.endAngle),d=e.clockWise;return d||(u=-u,c=-c),l>1?$n.Util_computeBoundingBox.arc(a,o,l,u,c,!d,i,r):(i[0]=r[0]=a,i[1]=r[1]=o),$n.Util_computeBoundingBox.arc(a,o,h,u,c,!d,s,n),$n.Util_vector.min(i,i,s),$n.Util_vector.max(r,r,n),e.__rect={x:i[0],y:i[1],width:r[0]-i[0],height:r[1]-i[1]},e.__rect}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ua{constructor(e){this.shapeParameters=e,this.CLASS_NAME="SuperMap.Feature.ShapeFactory"}destroy(){this.shapeParameters=null}createShape(e){if(e&&(this.shapeParameters=e),!this.shapeParameters)return null;var t=this.shapeParameters;if(t instanceof jn){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e=ye.copyAttributesWithClip(e,t.style,["x","y"]);let i=new ia;return i.style=ua.transformStyle(e),i.highlightStyle=ua.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(i,t,["x","y","style","highlightStyle"]),i}if(t instanceof zn){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=ye.copyAttributesWithClip(e,t.style,["pointList"]);let i=new aa;return i.style=ua.transformStyle(e),i.highlightStyle=ua.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(i,t,["pointList","style","highlightStyle"]),i}if(t instanceof Vn){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=ye.copyAttributesWithClip(e,t.style,["pointList"]);let i=new na;return i.style=ua.transformStyle(e),i.highlightStyle=ua.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(i,t,["pointList","style","highlightStyle"]),i}if(t instanceof Hn){if(!t.x&&!t.y&!t.width&!t.height)return null;let e=new Object;e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e=ye.copyAttributesWithClip(e,t.style,["x","y","width","height"]);let i=new la;return i.style=ua.transformStyle(e),i.highlightStyle=ua.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(i,t,["x","y","width","height","style","highlightStyle"]),i}if(t instanceof Jn){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e.startAngle=t.startAngle,e.endAngle=t.endAngle,t.r0&&(e.r0=t.r0),t.clockWise&&(e.clockWise=t.clockWise),e=ye.copyAttributesWithClip(e,t.style,["x","y","r","startAngle","endAngle","r0","endAngle"]);let i=new ha;return i.style=ua.transformStyle(e),i.highlightStyle=ua.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(i,t,["x","y","r","startAngle","endAngle","r0","endAngle","style","highlightStyle"]),i}if(t instanceof qn){let e=new Object;e.x=t.x,e.y=t.y,e.text=t.text,e=ye.copyAttributesWithClip(e,t.style,["x","y","text"]);let i=new sa;return i.style=ua.transformStyle(e),i.highlightStyle=ua.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(i,t,["x","y","text","style","highlightStyle"]),i}if(t instanceof Wn){let e=new Object;e.x=t.x,e.y=t.y,t.image&&(e.image=t.image),t.width&&(e.width=t.width),t.height&&(e.height=t.height),t.sx&&(e.sx=t.sx),t.sy&&(e.sy=t.sy),t.sWidth&&(e.sWidth=t.sWidth),t.sHeight&&(e.sHeight=t.sHeight),e=ye.copyAttributesWithClip(e,t.style,["x","y","image","width","height","sx","sy","sWidth","sHeight"]);let i=new oa;return i.style=ua.transformStyle(e),i.highlightStyle=ua.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(i,t,["x","y","image","width","height","style","highlightStyle"]),i}if(t instanceof Yn){let e=new Object;e.x=t.x,e.r=t.r,e.y=t.y,e=ye.copyAttributesWithClip(e,t.style,["x","y","r"]);let i=new ra;return i.style=ua.transformStyle(e),i.highlightStyle=ua.transformStyle(t.highlightStyle),ye.copyAttributesWithClip(i,t,["x","y","r","style","highlightStyle","lineWidth","text","textPosition"]),i}return null}static transformStyle(e){var t={},i=["normal","normal","normal","12","arial,sans-serif"],s=[!0,!1];for(var r in e)switch(r){case"fill":s[0]=e[r];break;case"fillColor":t.color=e[r];break;case"stroke":s[1]=e[r];break;case"strokeWidth":t.lineWidth=e[r];break;case"strokeLinecap":t.lineCap=e[r];break;case"strokeLineJoin":t.lineJoin=e[r];break;case"strokeDashstyle":t.lineType=e[r];break;case"pointRadius":t.r=e[r];break;case"label":t.text=e[r];break;case"labelRect":t.labelRect=e[r];break;case"fontColor":t.textColor=e[r];break;case"fontStyle":i[0]=e[r];break;case"fontVariant":i[1]=e[r];break;case"fontWeight":i[2]=e[r];break;case"fontSize":var n="";e[r]&&e[r].toString().indexOf("px")<0&&(n="px"),i[3]=e[r]+n;break;case"fontFamily":i[4]=e[r];break;case"fontOpacity":t.opacity=e[r];break;case"labelPosition":t.textPosition=e[r];break;case"labelAlign":t.textAlign=e[r];break;case"labelBaseline":t.textBaseline=e[r];break;case"labelRotation":t.textRotation=e[r];break;default:t[r]=e[r]}return t.textFont=i.join(" "),!0===s[0]&&!1===s[1]?t.brushType="fill":!1===s[0]&&!0===s[1]?t.brushType="stroke":!0===s[0]&&!0===s[1]?t.brushType="both":t.brushType="fill",null==t.lineWidth&&(t.lineWidth=1),t}static Background(e,t,i){var s=i||{},r=new Hn(t[0],t[3],Math.abs(t[2]-t[0]),Math.abs(t[3]-t[1]));return r.style={fillColor:"#f3f3f3"},s.backgroundStyle&&ye.copyAttributesWithClip(r.style,s.backgroundStyle),s.backgroundRadius&&(r.style.radius=s.backgroundRadius),r.clickable=!1,r.hoverable=!1,e.createShape(r)}static GraphAxis(e,t,i,s){var r=t,n=i||{},a=[],o=[],l=!!n.useXReferenceLine&&n.useXReferenceLine,h=n.axisYTick&&!isNaN(n.axisYTick)?n.axisYTick:0,u=[],c=[];if(0==h){if(c.push([r[0],r[3]-5]),c.push([r[0],r[1]]),n.axis3DParameter&&!isNaN(n.axis3DParameter)&&n.axis3DParameter>=15){let e=parseInt(n.axis3DParameter),t=[r[0]-e,r[1]+e];n.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([r[0],r[1]])}c.push([r[2]+5,r[1]])}else{var d=Math.abs(r[1]-r[3])/h,p=r[3];c.push([r[0],p-5]);for(var f=0;f<h;f++){if(c.push([r[0],p]),c.push([r[0]-5,p]),c.push([r[0],p]),l){var m=new zn([[r[0],p],[r[2],p]]);m.style={strokeColor:"#cfcfcf",strokeLinecap:"butt",strokeLineJoin:"round",strokeWidth:1},m.clickable=!1,m.hoverable=!1,n.xReferenceLineStyle&&ye.copyAttributesWithClip(m.style,n.xReferenceLineStyle),a.push(e.createShape(m))}p+=d}if(c.push([r[0],r[1]]),n.axis3DParameter&&!isNaN(n.axis3DParameter)&&n.axis3DParameter>=15){let e=parseInt(n.axis3DParameter),t=[r[0]-e,r[1]+e];n.axisUseArrow?(u.push([t[0]+1.5,t[1]-7.5]),u.push([t[0]-1,t[1]+1]),u.push([t[0]+7.5,t[1]-1.5]),c.push([t[0],t[1]])):c.push([t[0],t[1]]),c.push([r[0],r[1]])}c.push([r[2]+5,r[1]])}if(n.axisUseArrow){var y=[[r[2]+5,r[1]+4],[r[2]+13,r[1]],[r[2]+5,r[1]-4]],g=[[r[0]-4,r[3]-5],[r[0],r[3]-13],[r[0]+4,r[3]-5]],v=new Vn(y);v.style={fillColor:"#008acd"},ye.copyAttributesWithClip(v.style,n.axisStyle),o.push(e.createShape(v));var S=new Vn(g);if(S.style={fillColor:"#008acd"},ye.copyAttributesWithClip(S.style,n.axisStyle),o.push(e.createShape(S)),n.axis3DParameter&&!isNaN(n.axis3DParameter)&&n.axis3DParameter>=15){var b=new Vn(u);b.style={fillColor:"#008acd"},ye.copyAttributesWithClip(b.style,n.axisStyle),o.push(e.createShape(b))}}var _=new zn(c);_.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},n.axisStyle&&ye.copyAttributesWithClip(_.style,n.axisStyle),_.clickable=!1,_.hoverable=!1;var x=[e.createShape(_)],C=[];if(n.axisYLabels&&n.axisYLabels.length&&n.axisYLabels.length>0){var T=n.axisYLabels;let t=T.length;var M=[0,0];if(n.axisYLabelsOffset&&n.axisYLabelsOffset.length&&(M=n.axisYLabelsOffset),1==t){let t=new qn(r[0]-5+M[0],r[3]+M[1],T[0]);t.style={labelAlign:"right"},n.axisYLabelsStyle&&ye.copyAttributesWithClip(t.style,n.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,C.push(e.createShape(t))}else for(var w=r[3],E=Math.abs(r[1]-r[3])/(t-1),A=0;A<t;A++){let t=new qn(r[0]-5+M[0],w+M[1],T[A]);t.style={labelAlign:"right"},n.axisYLabelsStyle&&ye.copyAttributesWithClip(t.style,n.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,C.push(e.createShape(t)),w+=E}}var L=[];if(n.axisXLabels&&n.axisXLabels.length&&n.axisXLabels.length>0){let t=n.axisXLabels,i=t.length,a=[0,0];if(n.axisXLabelsOffset&&n.axisXLabelsOffset.length&&(a=n.axisXLabelsOffset),s&&s.xPositions&&s.xPositions.length&&s.xPositions.length==i){let o=s.xPositions;for(let s=0;s<i;s++){let i=new qn(o[s]+a[0],r[1]+a[1],t[s]);i.style={labelAlign:"center",labelBaseline:"top"},n.axisXLabelsStyle&&ye.copyAttributesWithClip(i.style,n.axisXLabelsStyle),i.clickable=!1,i.hoverable=!1,L.push(e.createShape(i))}}else if(1==i){let i=new qn(r[0]-5+a[0],r[1]+a[0],t[0]);i.style={labelAlign:"center",labelBaseline:"top"},n.axisXLabelsStyle&&ye.copyAttributesWithClip(i.style,n.axisXLabelsStyle),i.clickable=!1,i.hoverable=!1,L.push(e.createShape(i))}else{let s=r[0],o=Math.abs(r[2]-r[0])/(i-1);for(let l=0;l<i;l++){let i=new qn(s+a[0],r[1]+a[1],t[l]);i.style={labelAlign:"center",labelBaseline:"top"},n.axisXLabelsStyle&&ye.copyAttributesWithClip(i.style,n.axisXLabelsStyle),i.clickable=!1,i.hoverable=!1,L.push(e.createShape(i)),s+=o}}}return a.concat(x).concat(C).concat(L).concat(o)}static ShapeStyleTool(e,t,i,s,r,n){var a=e||{};if(t&&ye.copyAttributesWithClip(a,t),i&&i.length&&void 0!==r&&!isNaN(r)&&r>=0&&i[r]&&ye.copyAttributesWithClip(a,i[r]),s&&s.length&&void 0!==n)for(var o=s,l=o.length,h=parseFloat(n),u=0;u<l;u++)if(o[u].start<=h&&h<o[u].end){ye.copyAttributesWithClip(a,o[u].style);break}return a}}s.Feature=s.Feature||{},s.Feature.ShapeFactory=ua;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ca{constructor(e,t){e&&t&&t.map&&t.renderer&&(this.id=ye.createUniqueID(this.CLASS_NAME+"_"),this.lonlat=null,this.location=[],this.data=e,this.shapes=[],this.layer=t,this.CLASS_NAME="SuperMap.Feature.Theme")}destroy(){this.data=null,this.id=null,this.lonlat=null,this.location=null,this.shapes=null,this.layer=null}getLocalXY(e){var t=this.layer.map.getResolution(),i=this.layer.map.getExtent();if(e instanceof Ce||e instanceof Me){return[e.x/t+-i.left/t,i.top/t-e.y/t]}if(e instanceof ge){return[e.lon/t+-i.left/t,i.top/t-e.lat/t]}return null}}s.Feature=s.Feature||{},s.Feature.Theme=ca;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class da extends ca{constructor(e,t,i,s,r,n){super(e,t,i,s,r,n),this.shapeFactory=new ua,this.shapeParameters=null,this.RelativeCoordinate=!1,this.setting=null,this.origonPoint=null,this.chartBox=null,this.chartBounds=null,this.width=null,this.height=null,this.XOffset=0,this.YOffset=0,this.DVBParameter=null,this.dataViewBox=null,this.DVBCodomain=null,this.DVBCenterPoint=null,this.DVBUnitValue=null,this.DVBOrigonPoint=null,this.DVBWidth=null,this.DVBHeight=null,this.origonPointOffset=null,this.fields=i||[],this.dataValues=null,this.lonlat=r||this.data.geometry.getBounds().getCenterLonLat(),s&&s.width&&s.height&&s.codomain&&(this.setting=s),this.CLASS_NAME="SuperMap.Feature.Theme.Graph"}destroy(){this.shapeFactory=null,this.shapeParameters=null,this.width=null,this.height=null,this.origonPoint=null,this.chartBox=null,this.dataViewBox=null,this.chartBounds=null,this.DVBParameter=null,this.DVBOrigonPoint=null,this.DVBCenterPoint=null,this.DVBWidth=null,this.DVBHeight=null,this.DVBCodomain=null,this.DVBUnitValue=null,this.origonPointOffset=null,this.XOffset=null,this.YOffset=null,this.fields=null,this.dataValues=null,this.setting=null,super.destroy()}initBaseParameter(){if(!this.setting)return!1;var e=this.setting;if(!(e.width&&e.height&&e.codomain))return!1;var t=void 0===e.decimalNumber||isNaN(e.decimalNumber)?-1:e.decimalNumber,i=ca.getDataValues(this.data,this.fields,t);this.dataValues=i||[],this.width=parseFloat(e.width),this.height=parseFloat(e.height),this.DVBCodomain=e.codomain,this.XOffset=e.XOffset?e.XOffset:0,this.YOffset=e.YOffset?e.YOffset:0,this.origonPoint=[],this.chartBox=[],this.dataViewBox=[],this.DVBParameter=e.dataViewBoxParameter?e.dataViewBoxParameter:[0,0,0,0],this.DVBOrigonPoint=[],this.DVBCenterPoint=[],this.origonPointOffset=[],this.resetLocation();var s=this.width,r=this.height,n=this.location;this.origonPoint=[n[0]-s/2,n[1]-r/2];var a=this.origonPoint;this.chartBox=[a[0],a[1]+r,a[0]+s,a[1]];var o=this.chartBox,l=this.DVBParameter;this.dataViewBox=[o[0]+l[0],o[1]-l[1],o[2]-l[2],o[3]+l[3]];var h=this.dataViewBox;return!(h[0]>=h[2]||h[1]<=h[3])&&(this.DVBOrigonPoint=[h[0],h[3]],this.DVBWidth=Math.abs(h[2]-h[0]),this.DVBHeight=Math.abs(h[1]-h[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-a[0],this.DVBOrigonPoint[1]-a[1]],!0)}resetLocation(e){e&&(this.lonlat=e);var t=this.getLocalXY(this.lonlat);t[0]+=this.XOffset,t[1]+=this.YOffset,this.location=t;var i=this.width,s=this.height,r=this.location;return this.chartBounds=new ve(r[0]-i/2,r[1]+s/2,r[0]+i/2,r[1]-s/2),this.resetLinearGradient(),r}resetLinearGradient(){}shapesConvertToRelativeCoordinate(){for(var e=this.shapes,t=this.location,i=0,s=e.length;i<s;i++){e[i].refOriginalPosition=t;var r=e[i].style;for(var n in r)switch(n){case"pointList":for(var a=r[n],o=0,l=a.length;o<l;o++)a[o][0]-=t[0],a[o][1]-=t[1];break;case"x":r[n]-=t[0];break;case"y":r[n]-=t[1]}}this.RelativeCoordinate=!0}assembleShapes(){}getLocalXY(e){return this.layer.getLocalXY(e)}}ca.getDataValues=function(e,t,i){if(!e.attributes)return!1;for(var s=[],r=e.attributes,n=0;n<t.length;n++)for(var a in r)if(a===t[n])try{!isNaN(i)&&i>=0?s.push(parseFloat(r[a].toString()).toFixed(i)):s.push(parseFloat(r[a].toString()))}catch(e){throw new Error("not a number")}return s.length===t.length&&s},s.Feature.Theme.Graph=da;s.Feature.Theme.Bar=
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class extends da{constructor(e,t,i,s,r){super(e,t,i,s,r),this.CLASS_NAME="SuperMap.Feature.Theme.Bar"}destroy(){super.destroy()}assembleShapes(){var e={showShadow:!0,shadowBlur:8,shadowColor:"rgba(100,100,100,0.8)",shadowOffsetX:2,shadowOffsetY:2},t=this.setting;if(t.barLinearGradient||(t.barLinearGradient=[["#00FF00","#00CD00"],["#00CCFF","#5E87A2"],["#00FF66","#669985"],["#CCFF00","#94A25E"],["#FF9900","#A2945E"]]),t.dataViewBoxParameter||(void 0===t.useAxis||t.useAxis?t.dataViewBoxParameter=[45,15,15,15]:t.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var i=this.DVBCodomain;this.DVBUnitValue=(i[1]-i[0])/this.DVBHeight;var s=this.dataViewBox,r=this.dataValues;if(!(r.length<1)){for(let e=0,t=r.length;e<t;e++)if(r[e]<i[0]||r[e]>i[1])return;var n=this.calculateXShapeInfo();if(n){var a=n.xPositions,o=n.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(ua.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(ua.GraphAxis(this.shapeFactory,s,t,n)));for(var l=0;l<r.length;l++){var h=s[1]-(r[l]-i[0])/this.DVBUnitValue,u=[[a[l]-o/2,s[1]-1],[a[l]+o/2,s[1]-1],[a[l]+o/2,h],[a[l]-o/2,h]],c=new Vn(u);if(void 0===t.showShadow||t.showShadow){if(t.barShadowStyle){var d=t.barShadowStyle;d.shadowBlur&&(e.shadowBlur=d.shadowBlur),d.shadowColor&&(e.shadowColor=d.shadowColor),d.shadowOffsetX&&(e.shadowOffsetX=d.shadowOffsetX),d.shadowOffsetY&&(e.shadowOffsetY=d.shadowOffsetY)}c.style={},ye.copyAttributesWithClip(c.style,e)}c.refDataID=this.data.id,c.dataInfo={field:this.fields[l],value:r[l]},void 0!==t.barHoverAble&&(c.hoverable=t.barHoverAble),void 0!==t.barClickAble&&(c.clickable=t.barClickAble),this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,i=this.setting,s=this.dataValues.length;if(s<1)return null;var r=[],n=0,a=this.DVBWidth;if(i.xShapeBlank&&i.xShapeBlank.length&&3==i.xShapeBlank.length){var o=a-((e=i.xShapeBlank)[0]+e[2]+(s-1)*e[1]);if(o<=s)return null;n=o/s}else e=[n=a/(2*s+1),n,n];for(var l=0,h=0;h<s;h++)0==h?l=e[0]+n/2:l+=n+e[1],r.push(t[0]+l);return{xPositions:r,width:n}}resetLinearGradient(){if(this.RelativeCoordinate)for(var e=this.shapes.length,t=this.setting.barLinearGradient,i=-1,s=0;s<e;s++){var r=this.shapes[s];if("SuperMap.LevelRenderer.Shape.SmicPolygon"===r.CLASS_NAME){var n=r.style,a=this.location[0]+n.pointList[0][0],o=this.location[0]+n.pointList[1][0];++i>=t.length&&(i%=t.length);var l=t[i][0],h=t[i][1],u=(new On).getLinearGradient(a,0,o,0,[[0,l],[1,h]]);r.style.color=u}}}};s.Feature.Theme.Bar3D=
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class extends da{constructor(e,t,i,s,r){super(e,t,i,s,r),this.CLASS_NAME="SuperMap.Feature.Theme.Bar3D"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,25,20,20]:e.dataViewBoxParameter=[5,5,5,5]),e.axisUseArrow=void 0===e.axisUseArrow||e.axisUseArrow,e.axisXLabelsOffset=void 0!==e.axisXLabelsOffset?e.axisXLabelsOffset:[-10,10],this.initBaseParameter()){var t=this.DVBCodomain;this.DVBUnitValue=(t[1]-t[0])/this.DVBHeight;var i=this.dataViewBox,s=this.dataValues;if(!(s.length<1)){for(let e=0,i=s.length;e<i;e++)if(s[e]<t[0]||s[e]>t[1])return;var r=this.calculateXShapeInfo();if(r){var n=r.xPositions,a=r.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(ua.Background(this.shapeFactory,this.chartBox,e)),(!e.axis3DParameter||isNaN(e.axis3DParameter)||e.axis3DParameter<15)&&(e.axis3DParameter=20),(void 0===e.useAxis||e.useAxis)&&(this.shapes=this.shapes.concat(ua.GraphAxis(this.shapeFactory,i,e,r)));var o=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10;for(let r=0;r<s.length;r++){var l=i[1]-(s[r]-t[0])/this.DVBUnitValue,h=n[r]-a/2,u=n[r]+a/2,c=[[h,l],[u,l],[u-o,l+o],[h-o,l+o]],d=[[u,l],[u-o,l+o],[u-o,i[1]+o],[u,i[1]]],p=[[h-o,i[1]+o],[u-o,i[1]+o],[u-o,l+o],[h-o,l+o]];o<=0&&(p=[[h,i[1]],[u,i[1]],[u,l],[h,l]]);var f=new Vn(c),m=new Vn(d),y=new Vn(p);e.barSideStyle=e.barSideStyle?e.barSideStyle:e.barFaceStyle,e.barSideStyleByFields=e.barSideStyleByFields?e.barSideStyleByFields:e.barFaceStyleByFields,e.barSideStyleByCodomain=e.barSideStyleByCodomain?e.barSideStyleByCodomain:e.barFaceStyleByCodomain,e.barTopStyle=e.barTopStyle?e.barTopStyle:e.barFaceStyle,e.barTopStyleByFields=e.barTopStyleByFields?e.barTopStyleByFields:e.barFaceStyleByFields,e.barTopStyleByCodomain=e.barTopStyleByCodomain?e.barTopStyleByCodomain:e.barFaceStyleByCodomain,y.style=ua.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barFaceStyle,e.barFaceStyleByFields,e.barFaceStyleByCodomain,r,s[r]),m.style=ua.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barSideStyle,e.barSideStyleByFields,e.barSideStyleByCodomain,r,s[r]),f.style=ua.ShapeStyleTool({stroke:!0,strokeColor:"#ffffff",fillColor:"#ee9900"},e.barTopStyle,e.barTopStyleByFields,e.barTopStyleByCodomain,r,s[r]),e.barSideHoverStyle=e.barSideHoverStyle?e.barSideHoverStyle:e.barFaceHoverStyle,e.barTopHoverStyle=e.barTopHoverStyle?e.barTopHoverStyle:e.barFaceHoverStyle,y.highlightStyle=ua.ShapeStyleTool({stroke:!0},e.barFaceHoverStyle),m.highlightStyle=ua.ShapeStyleTool({stroke:!0},e.barSideHoverStyle),f.highlightStyle=ua.ShapeStyleTool({stroke:!0},e.barTopHoverStyle),f.refDataID=m.refDataID=y.refDataID=this.data.id,f.isHoverByRefDataID=m.isHoverByRefDataID=y.isHoverByRefDataID=!0,f.refDataHoverGroup=m.refDataHoverGroup=y.refDataHoverGroup=ye.createUniqueID("lr_shg"),f.dataInfo=m.dataInfo=y.dataInfo={field:this.fields[r],value:s[r]},void 0!==e.barHoverAble&&(f.hoverable=m.hoverable=y.hoverable=e.barHoverAble),void 0!==e.barClickAble&&(f.clickable=m.clickable=y.clickable=e.barClickAble),this.shapes.push(this.shapeFactory.createShape(m)),this.shapes.push(this.shapeFactory.createShape(f)),this.shapes.push(this.shapeFactory.createShape(y))}this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,i=this.setting,s=this.dataValues.length;if(s<1)return null;var r=[],n=0,a=this.DVBWidth;if(i.xShapeBlank&&i.xShapeBlank.length&&3==i.xShapeBlank.length){var o=a-((e=i.xShapeBlank)[0]+e[2]+(s-1)*e[1]);if(o<=s)return null;n=o/s}else e=[n=a/(2*s+1),n,n];for(var l=0,h=0;h<s;h++)0==h?l=e[0]+n/2:l+=n+e[1],r.push(t[0]+l);return{xPositions:r,width:n}}};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class pa extends da{constructor(e,t,i,s,r,n){super(e,t,i,s,r,n),this.setting=null,s&&s.codomain&&(this.setting=s,this.DVBCodomain=this.setting.codomain),this.CLASS_NAME="SuperMap.Feature.Theme.RankSymbol"}destroy(){this.setting=null,super.destroy()}initBaseParameter(){if(!this.setting)return!1;var e=this.setting;e.XOffset&&(this.XOffset=e.XOffset),e.YOffset&&(this.YOffset=e.YOffset),this.XOffset=e.XOffset?e.XOffset:0,this.YOffset=e.YOffset?e.YOffset:0,this.origonPoint=[],this.chartBox=[],this.dataViewBox=[],this.DVBParameter=e.dataViewBoxParameter?e.dataViewBoxParameter:[0,0,0,0],this.DVBOrigonPoint=[],this.DVBCenterPoint=[],this.origonPointOffset=[],this.resetLocation();var t=this.width,i=this.height,s=this.location;this.origonPoint=[s[0]-t/2,s[1]-i/2];var r=this.origonPoint;this.chartBox=[r[0],r[1]+i,r[0]+t,r[1]];var n=this.chartBox,a=this.DVBParameter;this.dataViewBox=[n[0]+a[0],n[1]-a[1],n[2]-a[2],n[3]+a[3]];var o=this.dataViewBox;return!(o[0]>=o[2]||o[1]<=o[3])&&(this.DVBOrigonPoint=[o[0],o[3]],this.DVBWidth=Math.abs(o[2]-o[0]),this.DVBHeight=Math.abs(o[1]-o[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-r[0],this.DVBOrigonPoint[1]-r[1]],!0)}}s.Feature.Theme.RankSymbol=pa;s.Feature.Theme.Circle=
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class extends pa{constructor(e,t,i,s,r){super(e,t,i,s,r),this.CLASS_NAME="SuperMap.Feature.Theme.Circle"}destroy(){super.destroy()}assembleShapes(){if(!this.setting)return!1;var e=this.setting;if(!e.codomain)return!1;var t=void 0===e.decimalNumber||isNaN(e.decimalNumber)?-1:e.decimalNumber,i=ca.getDataValues(this.data,this.fields,t);this.dataValues=i||[];var s=this.dataValues;e.maxR||(e.maxR=100),e.minR||(e.minR=0);var r=this.DVBCodomain;r&&r[1]-r[0]>0?this.DVBUnitValue=e.maxR/(r[1]-r[0]):this.DVBUnitValue=e.maxR;var n=this.DVBUnitValue,a=s[0]*n+e.minR;if(this.width=2*a,this.height=2*a,this.initBaseParameter()&&(!r||!(s[0]<r[0]||s[0]>r[1]))){var o=this.DVBCenterPoint,l=new Yn(o[0],o[1],a);l.style=ua.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=ua.ShapeStyleTool(null,e.circleHoverStyle),void 0!==e.circleHoverAble&&(l.hoverable=e.circleHoverAble),void 0!==e.circleClickAble&&(l.clickable=e.circleClickAble),l.refDataID=this.data.id,l.dataInfo={field:this.fields[0],r:a,value:s[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}};s.Feature.Theme.Line=
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class extends da{constructor(e,t,i,s,r,n){super(e,t,i,s,r,n),this.CLASS_NAME="SuperMap.Feature.Theme.Line"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,i=this.DVBCodomain;this.DVBUnitValue=(i[1]-i[0])/this.DVBHeight;var s=this.DVBUnitValue,r=this.dataValues;if(!(r.length<1)){var n=this.calculateXShapeInfo();if(n){var a,o,l=n.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(ua.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(ua.GraphAxis(this.shapeFactory,t,e,n));for(var h=[],u=[],c=0,d=r.length;c<d;c++){if(r[c]<i[0]||r[c]>i[1])return null;a=l[c],o=t[1]-(r[c]-i[0])/s;var p=new jn(a,o);p.style=ua.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,c,r[c]),p.highlightStyle=ua.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(p.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(p.clickable=e.pointClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[c],value:r[c]},u.push(this.shapeFactory.createShape(p));var f=[a,o];h.push(f)}var m=new zn(h);m.style=ua.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),m.clickable=!1,m.hoverable=!1;var y=this.shapeFactory.createShape(m);this.shapes.push(y),this.shapes=this.shapes.concat(u),this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,i=this.setting,s=this.dataValues.length;if(s<1)return null;var r=[],n=this.DVBWidth,a=0;if(i.xShapeBlank&&i.xShapeBlank.length&&2==i.xShapeBlank.length){var o=n-((e=i.xShapeBlank)[0]+e[1]);if(o<=s)return null;a=o/(s-1)}else e=[a=n/(s+1),a,a];for(var l=0,h=0;h<s;h++)0==h?l=e[0]:l+=a,r.push(t[0]+l);return{xPositions:r,width:0}}};s.Feature.Theme.Pie=
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class extends da{constructor(e,t,i,s,r){super(e,t,i,s,r),this.CLASS_NAME="SuperMap.Feature.Theme.Pie"}destroy(){super.destroy()}assembleShapes(){var e=this.setting,t=[{fillColor:"#ff9277"},{fillColor:"#dddd00"},{fillColor:"#ffc877"},{fillColor:"#bbe3ff"},{fillColor:"#d5ffbb"},{fillColor:"#bbbbff"},{fillColor:"#ddb000"},{fillColor:"#b0dd00"},{fillColor:"#e2bbff"},{fillColor:"#ffbbe3"},{fillColor:"#ff7777"},{fillColor:"#ff9900"},{fillColor:"#83dd00"},{fillColor:"#77e3ff"},{fillColor:"#778fff"},{fillColor:"#c877ff"},{fillColor:"#ff77ab"},{fillColor:"#ff6600"},{fillColor:"#aa8800"},{fillColor:"#77c7ff"},{fillColor:"#ad77ff"},{fillColor:"#ff77ff"},{fillColor:"#dd0083"},{fillColor:"#777700"},{fillColor:"#00aa00"},{fillColor:"#0088aa"},{fillColor:"#8400dd"},{fillColor:"#aa0088"},{fillColor:"#dd0000"},{fillColor:"#772e00"}];if(this.initBaseParameter()){e.useBackground&&this.shapes.push(ua.Background(this.shapeFactory,this.chartBox,e));var i=this.dataValues;if(!(i.length<1)){var s=this.DVBCodomain;for(let e=0;e<i.length;e++)if(i[e]<s[0]||i[e]>s[1])return;var r=0;for(let e=0;e<i.length;e++)r+=Math.abs(i[e]);this.DVBUnitValue=360/r;for(var n=this.DVBUnitValue,a=this.DVBCenterPoint,o=0,l=0,h=o,u=this.DVBHeight<this.DVBWidth?this.DVBHeight/2:this.DVBWidth/2,c=0;c<i.length;c++){var d=Math.abs(i[c]);(l=0===c?o+d*n:c===d.length-1?h:o+d*n)-o>=360&&(l=359.9999999);var p=new Jn(a[0],a[1],u,o,l);if(void 0===e.sectorStyleByFields){var f=c%t.length;p.style=ua.ShapeStyleTool(null,e.sectorStyle,t,null,f)}else p.style=ua.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,c,i[c]);p.highlightStyle=ua.ShapeStyleTool(null,e.sectorHoverStyle),void 0!==e.sectorHoverAble&&(p.hoverable=e.sectorHoverAble),void 0!==e.sectorClickAble&&(p.clickable=e.sectorClickAble),p.refDataID=this.data.id,p.dataInfo={field:this.fields[c],value:i[c]},this.shapes.push(this.shapeFactory.createShape(p)),o=l}this.shapesConvertToRelativeCoordinate()}}}};s.Feature.Theme.Point=
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class extends da{constructor(e,t,i,s,r,n){super(e,t,i,s,r,n),this.CLASS_NAME="SuperMap.Feature.Theme.Point"}destroy(){super.destroy()}assembleShapes(){var e=this.setting;if(e.dataViewBoxParameter||(void 0===e.useAxis||e.useAxis?e.dataViewBoxParameter=[45,15,15,15]:e.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var t=this.dataViewBox,i=this.DVBCodomain;this.DVBUnitValue=(i[1]-i[0])/this.DVBHeight;var s=this.DVBUnitValue,r=this.dataValues,n=this.calculateXShapeInfo();if(n){var a,o,l=n.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(ua.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(ua.GraphAxis(this.shapeFactory,t,e,n));for(var h=0,u=r.length;h<u;h++){if(r[h]<i[0]||r[h]>i[1])return null;a=l[h],o=t[1]-(r[h]-i[0])/s;var c=new jn(a,o);c.style=ua.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,h,r[h]),c.highlightStyle=ua.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(c.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(c.clickable=e.pointClickAble),c.refDataID=this.data.id,c.dataInfo={field:this.fields[h],value:r[h]},this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}calculateXShapeInfo(){var e,t=this.dataViewBox,i=this.setting,s=this.dataValues.length;if(s<1)return null;var r=[],n=this.DVBWidth,a=0;if(i.xShapeBlank&&i.xShapeBlank.length&&2==i.xShapeBlank.length){var o=n-((e=i.xShapeBlank)[0]+e[1]);if(o<=s)return null;a=o/(s-1)}else e=[a=n/(s+1),a,a];for(var l=0,h=0;h<s;h++)0==h?l=e[0]:l+=a,r.push(t[0]+l);return{xPositions:r,width:0}}};s.Feature.Theme.Ring=
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class extends da{constructor(e,t,i,s,r){super(e,t,i,s,r),this.CLASS_NAME="SuperMap.Feature.Theme.Ring"}destroy(){super.destroy()}assembleShapes(){if(this.initBaseParameter()){var e=[{fillColor:"#ff9277"},{fillColor:"#dddd00"},{fillColor:"#ffc877"},{fillColor:"#bbe3ff"},{fillColor:"#d5ffbb"},{fillColor:"#bbbbff"},{fillColor:"#ddb000"},{fillColor:"#b0dd00"},{fillColor:"#e2bbff"},{fillColor:"#ffbbe3"},{fillColor:"#ff7777"},{fillColor:"#ff9900"},{fillColor:"#83dd00"},{fillColor:"#77e3ff"},{fillColor:"#778fff"},{fillColor:"#c877ff"},{fillColor:"#ff77ab"},{fillColor:"#ff6600"},{fillColor:"#aa8800"},{fillColor:"#77c7ff"},{fillColor:"#ad77ff"},{fillColor:"#ff77ff"},{fillColor:"#dd0083"},{fillColor:"#777700"},{fillColor:"#00aa00"},{fillColor:"#0088aa"},{fillColor:"#8400dd"},{fillColor:"#aa0088"},{fillColor:"#dd0000"},{fillColor:"#772e00"}],t=this.setting;t.useBackground&&this.shapes.push(ua.Background(this.shapeFactory,this.chartBox,t));var i=this.dataValues;if(!(i.length<1)){var s=this.DVBCodomain;for(let e=0;e<i.length;e++)if(i[e]<s[0]||i[e]>s[1])return;var r=0;for(let e=0;e<i.length;e++)r+=Math.abs(i[e]);this.DVBUnitValue=360/r;for(var n=this.DVBUnitValue,a=this.DVBCenterPoint,o=0,l=0,h=o,u=this.DVBHeight<this.DVBWidth?this.DVBHeight/2:this.DVBWidth/2,c=t.innerRingRadius>=0&&t.innerRingRadius<u,d=void 0!==t.innerRingRadius&&!isNaN(t.innerRingRadius)&&c?t.innerRingRadius:0,p=0;p<i.length;p++){var f=Math.abs(i[p]);l=0===p?o+f*n:p===f.length-1?h:o+f*n;var m=new Jn(a[0],a[1],u,o,l,d);if(void 0===t.sectorStyleByFields){var y=p%e.length;m.style=ua.ShapeStyleTool(null,t.sectorStyle,e,null,y)}else m.style=ua.ShapeStyleTool(null,t.sectorStyle,t.sectorStyleByFields,t.sectorStyleByCodomain,p,i[p]);m.highlightStyle=ua.ShapeStyleTool(null,t.sectorHoverStyle),void 0!==t.sectorHoverAble&&(m.hoverable=t.sectorHoverAble),void 0!==t.sectorClickAble&&(m.clickable=t.sectorClickAble),m.refDataID=this.data.id,m.dataInfo={field:this.fields[p],value:i[p]},this.shapes.push(this.shapeFactory.createShape(m)),o=l}this.shapesConvertToRelativeCoordinate()}}}};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class fa extends ca{constructor(e,t,i,s,r){if(super(e,t),e.geometry&&e.geometry instanceof Se){this.dataBounds=e.geometry.getBounds(),this.nodesClipPixel=2,this.isHoverAble=!0,this.isMultiHover=!0,this.isClickAble=!0,this.highlightStyle=null,this.shapeOptions={},this.style=i||{},this.CLASS_NAME="SuperMap.Feature.Theme.Vector",this.style=i||{},s&&ye.copyAttributesWithClip(this,s,["shapeOptions","dataBounds"]),r&&ye.copyAttributesWithClip(this.shapeOptions,r);var n=e.geometry;this.lonlat=this.dataBounds.getCenterLonLat(),this.location=this.getLocalXY(this.lonlat),n instanceof we?this.lineToTF(n):n instanceof Te?this.lineToTF(n):n instanceof xe||(n instanceof _e?this.multiPointToTF(n):n instanceof Ee?this.multiLineStringToTF(n):n instanceof Ae?this.multiPolygonToTF(n):n instanceof Le?this.polygonToTF(n):n instanceof be||(n instanceof Ce?this.pointToTF(n):n instanceof Pe?this.rectangleToTF(n):n instanceof Me&&this.geoTextToTF(n)))}}destroy(){this.style=null,this.dataBounds=null,this.nodesClipPixel=null,this.isHoverAble=null,this.isMultiHover=null,this.isClickAble=null,this.highlightStyle=null,this.shapeOptions=null,super.destroy()}lineToTF(e){for(var t=e.components,i=[],s=[],r=this.location,n=[],a=this.nodesClipPixel,o=0;o<t.length;o++){var l=t[o];if(s=[],i=this.getLocalXY(l),s[0]=i[0]-r[0],s[1]=i[1]-r[1],n.length>0){var h=n[n.length-1];if(Math.abs(h[0]-s[0])<=a&&Math.abs(h[1]-s[1])<=a)continue}n.push(s)}if(n.length<2)return null;var u=new Object;(u=ye.copyAttributesWithClip(u,this.style,["pointList"])).pointList=n;var c=new aa({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=this.location,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}multiPointToTF(e){for(var t=e.components,i=[],s=[],r=this.location,n=[],a=this.nodesClipPixel,o=0;o<t.length;o++){var l=t[o];if(s=[],i=this.getLocalXY(l),s[0]=i[0]-r[0],s[1]=i[1]-r[1],n.length>0){var h=n[n.length-1];if(Math.abs(h[0]-s[0])<=a&&Math.abs(h[1]-s[1])<=a)continue}n.push(s);var u=new Object;u.r=6,(u=ye.copyAttributesWithClip(u,this.style)).x=s[0],u.y=s[1];var c=new ia({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=r,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}}multiLineStringToTF(e){for(var t=e.components,i=0;i<t.length;i++){var s=t[i];this.lineToTF(s)}}multiPolygonToTF(e){for(var t=e.components,i=0;i<t.length;i++){var s=t[i];this.polygonToTF(s)}}pointToTF(e){var t=this.location,i=this.getLocalXY(e),s=new Object;s.r=6,(s=ye.copyAttributesWithClip(s,this.style)).x=i[0]-t[0],s.y=i[1]-t[1];var r=new ia({style:s,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(r.highlightStyle=this.highlightStyle),r.refOriginalPosition=t,r.refDataID=this.data.id,r.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(r,this.shapeOptions),this.shapes.push(r)}polygonToTF(e){for(var t=e.components,i=[],s=[],r=this.location,n=[],a=[],o=[],l=this.nodesClipPixel,h=0;h<t.length;h++){var u=t[h].components;if(0===h){n=[];for(var c=0;c<u.length;c++){if(s=[],i=this.getLocalXY(u[c]),s[0]=i[0]-r[0],s[1]=i[1]-r[1],n.length>0){var d=n[n.length-1];if(Math.abs(d[0]-s[0])<=l&&Math.abs(d[1]-s[1])<=l)continue}n.push(s)}}else{a=[];for(var p=0;p<u.length;p++){if(s=[],i=this.getLocalXY(u[p]),s[0]=i[0]-r[0],s[1]=i[1]-r[1],a.length>0){var f=a[a.length-1];if(Math.abs(f[0]-s[0])<=l&&Math.abs(f[1]-s[1])<=l)continue}a.push(s)}}a.length<2||o.push(a)}if(!(n.length<2)){var m={};(m=ye.copyAttributesWithClip(m,this.style,["pointList"])).pointList=n;var y=new na({style:m,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(y.highlightStyle=this.highlightStyle),y.refOriginalPosition=this.location,y.refDataID=this.data.id,y.isHoverByRefDataID=this.isMultiHover,o.length>0&&(y.holePolygonPointLists=o),this.shapeOptions&&ye.copyAttributesWithClip(y,this.shapeOptions),this.shapes.push(y)}}rectangleToTF(e){var t=this.location,i=new ge(e.x,e.y),s=this.layer.map.getResolution(),r=this.getLocalXY(i),n=new Object;n.r=6,(n=ye.copyAttributesWithClip(n,this.style)).x=r[0]-t[0],n.y=r[1]-t[1]-2*e.width/s,n.width=e.width/s,n.height=e.height/s;var a=new la({style:n,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(a.highlightStyle=this.highlightStyle),a.refOriginalPosition=t,a.refDataID=this.data.id,a.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(a,this.shapeOptions),this.shapes.push(a)}geoTextToTF(e){var t=this.location,i=this.getLocalXY(e),s=new Object;s.r=6,(s=ye.copyAttributesWithClip(s,this.style,["x","y","text"])).x=i[0]-t[0],s.y=i[1]-t[1],s.text=e.text;var r=new sa({style:s,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(r.highlightStyle=this.highlightStyle),r.refOriginalPosition=t,r.refDataID=this.data.id,r.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ye.copyAttributesWithClip(r,this.shapeOptions),this.shapes.push(r)}updateAndAddShapes(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,i=0,s=this.shapes.length;i<s;i++){var r=this.shapes[i];r.refOriginalPosition=e,t.addShape(r)}}getShapesCount(){return this.shapes.length}getLocalXY(e){return this.layer.getLocalXY(e)}}s.Feature.Theme.ThemeVector=fa;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ma extends(s.mixin(Qn,ea)){constructor(e){super(e),e=e||{},this.id=null,this.type="group",this.clipShape=null,this._children=[],this._storage=null,this.__dirty=!0,this.ignore=!1,ye.extend(this,e),this.id=this.id||ye.createUniqueID("smShapeGroup_"),this.CLASS_NAME="SuperMap.LevelRenderer.Group"}destroy(){this.id=null,this.type=null,this.clipShape=null,this._children=null,this._storage=null,this.__dirty=null,this.ignore=null,super.destroy()}children(){return this._children.slice()}childAt(e){return this._children[e]}addChild(e){e!=this&&e.parent!=this&&(e.parent&&e.parent.removeChild(e),this._children.push(e),e.parent=this,this._storage&&this._storage!==e._storage&&(this._storage.addToMap(e),e instanceof ma&&e.addChildrenToStorage(this._storage)))}removeChild(e){var t=ye.indexOf(this._children,e);this._children.splice(t,1),e.parent=null,this._storage&&(this._storage.delFromMap(e.id),e instanceof ma&&e.delChildrenFromStorage(this._storage))}eachChild(e,t){for(var i=!!t,s=0;s<this._children.length;s++){var r=this._children[s];i?e.call(t,r):e(r)}}traverse(e,t){for(var i=!!t,s=0;s<this._children.length;s++){var r=this._children[s];i?e.call(t,r):e(r),"group"===r.type&&r.traverse(e,t)}}addChildrenToStorage(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.addToMap(i),"group"===i.type&&i.addChildrenToStorage(e)}}delChildrenFromStorage(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.delFromMap(i.id),"group"===i.type&&i.delChildrenFromStorage(e)}}modSelf(){this.__dirty=!0}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ya{constructor(){this._elements={},this._hoverElements=[],this._roots=[],this._shapeList=[],this._shapeListOffset=0,this.CLASS_NAME="SuperMap.LevelRenderer.Storage"}destroy(){this.dispose(),this._shapeList=null,this._shapeListOffset=null}iterShape(e,t){if(!t){t={hover:!1,normal:"down",update:!1}}if(t.hover)for(var i=0,s=this._hoverElements.length;i<s;i++){var r=this._hoverElements[i];if(r.updateTransform(),e(r))return this}switch(t.update&&this.updateShapeList(),t.normal){case"down":{let t=this._shapeList.length;for(;t--;)if(e(this._shapeList[t]))return this;break}default:for(let t=0,i=this._shapeList.length;t<i;t++)if(e(this._shapeList[t]))return this}return this}getHoverShapes(e){var t=[],i=this._hoverElements.length;for(let e=0;e<i;e++){t.push(this._hoverElements[e]);var s=this._hoverElements[e].hoverConnect;if(s)for(var r,n=0,a=(s=s instanceof Array?s:[s]).length;n<a;n++)(r=s[n].id?s[n]:this.get(s[n]))&&t.push(r)}if(t.sort(ya.shapeCompareFunc),e)for(let e=0,i=t.length;e<i;e++)t[e].updateTransform();return t}getShapeList(e){return e&&this.updateShapeList(),this._shapeList}updateShapeList(){this._shapeListOffset=0;var e=this._roots.length;for(let t=0;t<e;t++){let e=this._roots[t];this._updateAndAddShape(e)}this._shapeList.length=this._shapeListOffset;var t=this._shapeList.length;for(let e=0;e<t;e++)this._shapeList[e].__renderidx=e;this._shapeList.sort(ya.shapeCompareFunc)}_updateAndAddShape(e,t){if(!e.ignore)if(e.updateTransform(),"group"==e.type){e.clipShape&&(e.clipShape.parent=e,e.clipShape.updateTransform(),t?(t=t.slice()).push(e.clipShape):t=[e.clipShape]);for(var i=0;i<e._children.length;i++){var s=e._children[i];s.__dirty=e.__dirty||s.__dirty,this._updateAndAddShape(s,t)}e.__dirty=!1}else e.__clipShapes=t,this._shapeList[this._shapeListOffset++]=e}mod(e,t){var i=this._elements[e];if(i&&(i.modSelf(),t))if(t.parent||t._storage||t.__startClip){var s={};for(var r in t)"parent"!=r&&"_storage"!=r&&"__startClip"!=r&&t.hasOwnProperty(r)&&(s[r]=t[r]);(new Nn).merge(i,s,!0)}else(new Nn).merge(i,t,!0);return this}drift(e,t,i){var s=this._elements[e];return s&&(s.needTransform=!0,"horizontal"===s.draggable?i=0:"vertical"===s.draggable&&(t=0),(!s.ondrift||s.ondrift&&!s.ondrift(t,i))&&s.drift(t,i)),this}addHover(e){return e.updateNeedTransform(),this._hoverElements.push(e),this}delHover(){return this._hoverElements=[],this}hasHoverShape(){return this._hoverElements.length>0}addRoot(e){e instanceof ma&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}delRoot(e){if(void 0===e){for(var t=0;t<this._roots.length;t++){var i=this._roots[t];i instanceof ma&&i.delChildrenFromStorage(this)}return this._elements={},this._hoverElements=[],void(this._roots=[])}if(e instanceof Array){var s=e.length;for(let t=0;t<s;t++)this.delRoot(e[t])}else{var r;r="string"==typeof e?this._elements[e]:e;var n=(new Nn).indexOf(this._roots,r);n>=0&&(this.delFromMap(r.id),this._roots.splice(n,1),r instanceof ma&&r.delChildrenFromStorage(this))}}addToMap(e){return e instanceof ma&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this}get(e){return this._elements[e]}delFromMap(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof ma&&(t._storage=null)),this}dispose(){this._elements=null,this._roots=null,this._hoverElements=null}static shapeCompareFunc(e,t){return e.zlevel==t.zlevel?e.z==t.z?e.__renderidx-t.__renderidx:e.z-t.z:e.zlevel-t.zlevel}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ga{constructor(e,t){this.root=e,this.storage=t,this._domRoot=null,this._layers={},this._zlevelList=[],this._layerConfig={},this._bgDom=null,this.shapeToImage=null,ga.devicePixelRatio=Math.max(window.devicePixelRatio||1,1),this.CLASS_NAME="SuperMap.LevelRenderer.Painter",this.root.innerHTML="",this._width=this._getWidth(),this._height=this._getHeight();var i=document.createElement("div");this._domRoot=i,i.style.position="relative",i.style.overflow="hidden",i.style.width=this._width+"px",i.style.height=this._height+"px",this.root.appendChild(i),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=ga.createDom(ye.createUniqueID("SuperMap.Theme_background_"),"div",this),i.appendChild(this._bgDom),this._bgDom.onselectstart=n,this._bgDom.style["-webkit-user-select"]="none",this._bgDom.style["user-select"]="none",this._bgDom.style["-webkit-touch-callout"]="none";var s=new va(ye.createUniqueID("_highLightLayer_"),this);this._layers.hover=s,i.appendChild(s.dom),s.initContext(),s.dom.onselectstart=n,s.dom.style["-webkit-user-select"]="none",s.dom.style["user-select"]="none",s.dom.style["-webkit-touch-callout"]="none";var r=this;function n(){return!1}this.updatePainter=function(e,t){r.refreshShapes(e,t)}}destroy(){this.dispose(),this._zlevelList=null,this._layerConfig=null,this._bgDom=null,this.shapeToImage=null}render(e){return this.refresh(e,!0),this}refresh(e,t){var i=this.storage.getShapeList(!0);return this._paintList(i,t),"function"==typeof e&&e(),this}_paintList(e,t){var i,s,r;for(var n in void 0===t&&(t=!1),this._updateLayerStatus(e),this._layers)"hover"!==n&&(this._layers[n].unusedCount++,this._layers[n].updateTransform());for(var a=[],o=0,l=e.length;o<l;o++){var h=e[o];if(s!==h.zlevel&&(i&&i.needTransform&&r.restore(),r=(i=this.getLayer(h.zlevel)).ctx,s=h.zlevel,i.unusedCount=0,(i.dirty||t)&&i.clear(),i.needTransform&&(r.save(),i.setTransform(r))),r&&h.__startClip){var u=h.__startClip;if(r.save(),u.needTransform){let e=u.transform;$n.Util_matrix.invert(a,e),r.transform(e[0],e[1],e[2],e[3],e[4],e[5])}if(r.beginPath(),u.buildPath(r,u.style),r.clip(),u.needTransform){let e=a;r.transform(e[0],e[1],e[2],e[3],e[4],e[5])}}if((i&&i.dirty||t)&&!h.invisible&&(!h.onbrush||h.onbrush&&!h.onbrush(r,!1)))if(Zn.catchBrushException)try{h.brush(r,!1,this.updatePainter)}catch(e){$n.Util_log(e,"brush error of "+h.type,h)}else h.brush(r,!1,this.updatePainter);r&&h.__stopClip&&r.restore(),h.__dirty=!1}r&&i&&i.needTransform&&r.restore();for(let e in this._layers)if("hover"!==e){var c=this._layers[e];c.dirty=!1,1==c.unusedCount&&c.clear()}}getLayer(e){var t=this._layers[e];if(!t){var i=this._zlevelList.length,s=null,r=-1;if(i>0&&e>this._zlevelList[0]){for(r=0;r<i-1&&!(this._zlevelList[r]<e&&this._zlevelList[r+1]>e);r++);s=this._layers[this._zlevelList[r]]}this._zlevelList.splice(r+1,0,e),t=new va(ye.createUniqueID("_levelLayer_"+e),this);var n=s?s.dom:this._bgDom;n.nextSibling?n.parentNode.insertBefore(t.dom,n.nextSibling):n.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new Nn).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}getLayers(){return this._layers}_updateLayerStatus(e){var t=this._layers,i={};for(let e in t)"hover"!==e&&(i[e]=t[e].elCount,t[e].elCount=0);for(let i=0;i<e.length;i++){var s=e[i],r=t[s.zlevel];if(r){if(r.elCount++,r.dirty)continue;r.dirty=s.__dirty}}for(let e in t)"hover"!==e&&i[e]!==t[e].elCount&&(t[e].dirty=!0)}refreshShapes(e,t){for(var i=0,s=e.length;i<s;i++){var r=e[i];this.storage.mod(r.id)}return this.refresh(t),this}clear(){for(var e in this._layers)"hover"!=e&&this._layers[e].clear();return this}modLayer(e,t){if(t){this._layerConfig[e]?(new Nn).merge(this._layerConfig[e],t,!0):this._layerConfig[e]=t;var i=this._layers[e];i&&(new Nn).merge(i,this._layerConfig[e],!0)}}delLayer(e){var t=this._layers[e];t&&(this.modLayer(e,{position:t.position,rotation:t.rotation,scale:t.scale}),t.dom.parentNode.removeChild(t.dom),delete this._layers[e],this._zlevelList.splice((new Nn).indexOf(this._zlevelList,e),1))}refreshHover(){this.clearHover();for(var e=this.storage.getHoverShapes(!0),t=0,i=e.length;t<i;t++)this._brushHover(e[t]);return this.storage.delHover(),this}clearHover(){var e=this._layers.hover;return e&&e.clear(),this}resize(){var e=this._domRoot;e.style.display="none";var t=this._getWidth(),i=this._getHeight();if(e.style.display="",this._width!=t||i!=this._height){for(var s in this._width=t,this._height=i,e.style.width=t+"px",e.style.height=i+"px",this._layers)this._layers[s].resize(t,i);this.refresh(null,!0)}return this}clearLayer(e){var t=this._layers[e];t&&t.clear()}dispose(){this.root.innerHTML="",this.root=null,this.storage=null,this._domRoot=null,this._layers=null}getDomHover(){return this._layers.hover.dom}toDataURL(e,t,i){var s=ga.createDom(ye.createUniqueID("SuperMap.Theme.image_"),"canvas",this);this._bgDom.appendChild(s);var r=s.getContext("2d");1!=ga.devicePixelRatio&&r.scale(ga.devicePixelRatio,ga.devicePixelRatio),r.fillStyle=t||"#fff",r.rect(0,0,this._width*ga.devicePixelRatio,this._height*ga.devicePixelRatio),r.fill();var n=this;this.storage.iterShape(function(e){if(!e.invisible&&(!e.onbrush||e.onbrush&&!e.onbrush(r,!1)))if(Zn.catchBrushException)try{e.brush(r,!1,n.updatePainter)}catch(t){$n.Util_log(t,"brush error of "+e.type,e)}else e.brush(r,!1,n.updatePainter)},{normal:"up",update:!0});var a=s.toDataURL(e,i);return r=null,this._bgDom.removeChild(s),a}getWidth(){return this._width}getHeight(){return this._height}_getWidth(){var e=this.root,t=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientWidth||parseInt(t.width,10))-parseInt(t.paddingLeft,10)-parseInt(t.paddingRight,10)).toFixed(0)-0}_getHeight(){var e=this.root,t=e.currentStyle||document.defaultView.getComputedStyle(e);return((e.clientHeight||parseInt(t.height,10))-parseInt(t.paddingTop,10)-parseInt(t.paddingBottom,10)).toFixed(0)-0}_brushHover(e){var t=this._layers.hover.ctx;if(!e.onbrush||e.onbrush&&!e.onbrush(t,!0)){var i=this.getLayer(e.zlevel);if(i.needTransform&&(t.save(),i.setTransform(t)),Zn.catchBrushException)try{e.brush(t,!0,this.updatePainter)}catch(t){$n.Util_log(t,"hoverBrush error of "+e.type,e)}else e.brush(t,!0,this.updatePainter);i.needTransform&&t.restore()}}_shapeToImage(e,t,i,s,r){var n=document.createElement("canvas"),a=n.getContext("2d"),o=r||window.devicePixelRatio||1;n.style.width=i+"px",n.style.height=s+"px",n.setAttribute("width",i*o),n.setAttribute("height",s*o),a.clearRect(0,0,i*o,s*o);var l={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[0,0,0],t.rotation=0,t.scale=[1,1],t&&t.brush(a,!1);var h=new oa({id:e,style:{x:0,y:0,image:n}});return null!=l.position&&(h.position=t.position=l.position),null!=l.rotation&&(h.rotation=t.rotation=l.rotation),null!=l.scale&&(h.scale=t.scale=l.scale),h}_createShapeToImageProcessor(){var e=this;return function(t,i,s,r){return e._shapeToImage(t,i,s,r,ga.devicePixelRatio)}}updateHoverLayer(e){if(!(e instanceof Array))return this;this.clearHover(),this.storage.delHover();for(var t=0;t<e.length;t++)this.storage.addHover(e[t]),this._brushHover(e[t])}static createDom(e,t,i){var s=document.createElement(t),r=i._width,n=i._height;return s.style.position="absolute",s.style.left=0,s.style.top=0,s.style.width=r+"px",s.style.height=n+"px",s.setAttribute("width",r*ga.devicePixelRatio),s.setAttribute("height",n*ga.devicePixelRatio),s.setAttribute("id",e),s}}class va extends ea{constructor(e,t){super(e,t),this.dom=null,this.domBack=null,this.ctxBack=null,this.painter=t,this.unusedCount=0,this.config=null,this.dirty=!0,this.elCount=0,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.zoomable=!1,this.panable=!1,this.maxZoom=1/0,this.minZoom=0,this.ctx=null,this.dom=ga.createDom(ye.createUniqueID("SuperMap.Theme"+e),"canvas",t),this.dom.onselectstart=function(){return!1},this.dom.style["-webkit-user-select"]="none",this.dom.style["user-select"]="none",this.dom.style["-webkit-touch-callout"]="none",this.CLASS_NAME="SuperMap.LevelRenderer.Painter.Layer"}destroy(){this.dom=null,this.domBack=null,this.ctxBack=null,this.painter=null,this.unusedCount=null,this.config=null,this.dirty=null,this.elCount=null,this.clearColor=null,this.motionBlur=null,this.lastFrameAlpha=null,this.zoomable=null,this.panable=null,this.maxZoom=null,this.minZoom=null,this.ctx=null,ea.destroy.apply(this,arguments)}initContext(){this.ctx=this.dom.getContext("2d"),1!=ga.devicePixelRatio&&this.ctx.scale(ga.devicePixelRatio,ga.devicePixelRatio)}createBackBuffer(){this.domBack=ga.createDom(ye.createUniqueID("SuperMap.Theme.back-"+this.id),"canvas",this.painter),this.ctxBack=this.domBack.getContext("2d"),1!=ga.devicePixelRatio&&this.ctxBack.scale(ga.devicePixelRatio,ga.devicePixelRatio)}resize(e,t){this.dom.style.width=e+"px",this.dom.style.height=t+"px",this.dom.setAttribute("width",e*ga.devicePixelRatio),this.dom.setAttribute("height",t*ga.devicePixelRatio),1!=ga.devicePixelRatio&&this.ctx.scale(ga.devicePixelRatio,ga.devicePixelRatio),this.domBack&&(this.domBack.setAttribute("width",e*ga.devicePixelRatio),this.domBack.setAttribute("height",t*ga.devicePixelRatio),1!=ga.devicePixelRatio&&this.ctxBack.scale(ga.devicePixelRatio,ga.devicePixelRatio))}clear(){var e=this.dom,t=this.ctx,i=e.width,s=e.height,r=this.clearColor,n=this.motionBlur,a=this.lastFrameAlpha;if(n&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(e,0,0,i/ga.devicePixelRatio,s/ga.devicePixelRatio)),r?(t.save(),t.fillStyle=this.config.clearColor,t.fillRect(0,0,i/ga.devicePixelRatio,s/ga.devicePixelRatio),t.restore()):t.clearRect(0,0,i/ga.devicePixelRatio,s/ga.devicePixelRatio),n){var o=this.domBack;t.save(),t.globalAlpha=a,t.drawImage(o,0,0,i/ga.devicePixelRatio,s/ga.devicePixelRatio),t.restore()}}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Sa extends Qn{constructor(e,t,i){var s,r;super(e,t,i),this.root=e,this.storage=t,this.painter=i,this._lastX=0,this._lastY=0,this._mouseX=0,this._mouseY=0,this._findHover=null,this._domHover=null,this._findHover=(s=function(e,t,i){var s=this;if(s._draggingTarget&&s._draggingTarget.id==e.id||e.isSilent())return!1;var r=s._event;if(e.isCover(t,i)){if(e.hoverable)if(e.isHoverByRefDataID&&!0===e.isHoverByRefDataID){if(e.refDataID){var n=e.refDataID,a=null;e.refDataHoverGroup&&(a=e.refDataHoverGroup);for(var o=s.storage._shapeList,l=0,h=o.length;l<h;l++){var u=o[l];u.refDataID&&n===u.refDataID&&(a?u.refDataHoverGroup&&a===u.refDataHoverGroup&&s.storage.addHover(u):s.storage.addHover(u))}}}else s.storage.addHover(e);for(var c=e.parent;c;){if(c.clipShape&&!c.clipShape.isCover(s._mouseX,s._mouseY))return!1;c=c.parent}return s._lastHover!=e&&(s._processOutShape(r),s._processDragLeave(r),s._lastHover=e,s._processDragEnter(r)),s._processOverShape(r),s._processDragOver(r),s._hasfound=1,!0}return!1},r=this,function(e,t,i){return s.call(r,e,t,i)}),this._domHover=i.getDomHover(),this.CLASS_NAME="SuperMap.LevelRenderer.Handler";var n={resize:function(e){e=e||window.event,this._lastHover=null,this._isMouseDown=0,this.dispatch(Zn.EVENT.RESIZE,e)},click:function(e){e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._clickThreshold<10&&this._dispatchAgency(t,Zn.EVENT.CLICK,e),this._mousemoveHandler(e)},dblclick:function(e){e=e||window.event,e=this._zrenderEventFixed(e);var t=this._lastHover;(t&&t.clickable||!t)&&this._clickThreshold<5&&this._dispatchAgency(t,Zn.EVENT.DBLCLICK,e),this._mousemoveHandler(e)},mousewheel:function(e){var t=((e=this._zrenderEventFixed(e)).wheelDelta||-e.detail)>0?1.1:1/1.1,i=this.painter.getLayers(),s=!1;for(var r in i)if("hover"!==r){var n=i[r],a=n.position;if(n.zoomable){n.__zoom=n.__zoom||1;var o=n.__zoom;o*=t,t=(o=Math.max(Math.min(n.maxZoom,o),n.minZoom))/n.__zoom,n.__zoom=o,a[0]-=(this._mouseX-a[0])*(t-1),a[1]-=(this._mouseY-a[1])*(t-1),n.scale[0]*=t,n.scale[1]*=t,n.dirty=!0,s=!0}}s&&this.painter.refresh(),this._dispatchAgency(this._lastHover,Zn.EVENT.MOUSEWHEEL,e),this._mousemoveHandler(e)},mousemove:function(e){this._clickThreshold++,e=this._zrenderEventFixed(e),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=$n.Util_event.getX(e),this._mouseY=$n.Util_event.getY(e);var t=this._mouseX-this._lastX,i=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(e),this._processDragLeave(e)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var s="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,i),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var r=this.painter.getLayers(),n=!1;for(var a in r)if("hover"!==a){var o=r[a];o.panable&&(s="move",o.position[0]+=t,o.position[1]+=i,n=!0,o.dirty=!0)}n&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?s="move":this._hasfound&&this._lastHover.clickable&&(s="pointer"),this.root.style.cursor=s,this._dispatchAgency(this._lastHover,Zn.EVENT.MOUSEMOVE,e),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()},mouseout:function(e){var t=(e=this._zrenderEventFixed(e)).toElement||e.relatedTarget;if(t!=this.root)for(;t&&9!=t.nodeType;){if(t==this.root)return void this._mousemoveHandler(e);t=t.parentNode}e.zrenderX=this._lastX,e.zrenderY=this._lastY,this.root.style.cursor="",this._isMouseDown=0,this._processOutShape(e),this._processDrop(e),this._processDragEnd(e),this.painter.refreshHover(),this.dispatch(Zn.EVENT.GLOBALOUT,e)},mousedown:function(e){if(this._clickThreshold=0,2==this._lastDownButton)return this._lastDownButton=e.button,void(this._mouseDownTarget=null);this._lastMouseDownMoment=new Date,e=this._zrenderEventFixed(e),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,Zn.EVENT.MOUSEDOWN,e),this._lastDownButton=e.button},mouseup:function(e){e=this._zrenderEventFixed(e),this.root.style.cursor="",this._isMouseDown=0,this._mouseDownTarget=null,this._dispatchAgency(this._lastHover,Zn.EVENT.MOUSEUP,e),this._processDrop(e),this._processDragEnd(e)},touchstart:function(e){e=this._zrenderEventFixed(e,!0),this._lastTouchMoment=new Date,this._mobildFindFixed(e),this._mousedownHandler(e)},touchmove:function(e){e=this._zrenderEventFixed(e,!0),this._mousemoveHandler(e),this._isDragging&&$n.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment<Zn.EVENT.touchClickDelay&&(this._mobildFindFixed(e),this._clickHandler(e),t-this._lastClickMoment<Zn.EVENT.touchClickDelay/2&&(this._dblclickHandler(e),this._lastHover&&this._lastHover.clickable&&$n.Util_event.stop(e)),this._lastClickMoment=t),this.painter.clearHover()}};function a(e,t){return function(i){return e.call(t,i)}}!function(e){var t=["resize","click","dblclick","mousewheel","mousemove","mouseout","mouseup","mousedown","touchstart","touchend","touchmove"],i=t.length;for(;i--;){var s=t[i];e["_"+s+"Handler"]=a(n[s],e)}}(this),window.addEventListener?(window.addEventListener("resize",this._resizeHandler),$n.Util_env.os.tablet||$n.Util_env.os.phone?(e.addEventListener("touchstart",this._touchstartHandler),e.addEventListener("touchmove",this._touchmoveHandler),e.addEventListener("touchend",this._touchendHandler)):(e.addEventListener("click",this._clickHandler),e.addEventListener("dblclick",this._dblclickHandler),e.addEventListener("mousewheel",this._mousewheelHandler),e.addEventListener("mousemove",this._mousemoveHandler),e.addEventListener("mousedown",this._mousedownHandler),e.addEventListener("mouseup",this._mouseupHandler)),e.addEventListener("DOMMouseScroll",this._mousewheelHandler),e.addEventListener("mouseout",this._mouseoutHandler)):(window.attachEvent("onresize",this._resizeHandler),e.attachEvent("onclick",this._clickHandler),e.ondblclick=this._dblclickHandler,e.attachEvent("onmousewheel",this._mousewheelHandler),e.attachEvent("onmousemove",this._mousemoveHandler),e.attachEvent("onmouseout",this._mouseoutHandler),e.attachEvent("onmousedown",this._mousedownHandler),e.attachEvent("onmouseup",this._mouseupHandler))}destroy(){this.dispose(),this._lastX=null,this._lastY=null,this._mouseX=null,this._mouseY=null,this._findHover=null,Qn.prototype.destroy.apply(this,arguments)}on(e,t){return this.bind(e,t),this}un(e,t){return this.unbind(e,t),this}trigger(e,t){var i=Zn.EVENT;switch(e){case i.RESIZE:case i.CLICK:case i.DBLCLICK:case i.MOUSEWHEEL:case i.MOUSEMOVE:case i.MOUSEDOWN:case i.MOUSEUP:case i.MOUSEOUT:this["_"+e+"Handler"](t)}}dispose(){var e=this.root;window.removeEventListener?(window.removeEventListener("resize",this._resizeHandler),$n.Util_env.os.tablet||$n.Util_env.os.phone?(e.removeEventListener("touchstart",this._touchstartHandler),e.removeEventListener("touchmove",this._touchmoveHandler),e.removeEventListener("touchend",this._touchendHandler)):(e.removeEventListener("click",this._clickHandler),e.removeEventListener("dblclick",this._dblclickHandler),e.removeEventListener("mousewheel",this._mousewheelHandler),e.removeEventListener("mousemove",this._mousemoveHandler),e.removeEventListener("mousedown",this._mousedownHandler),e.removeEventListener("mouseup",this._mouseupHandler)),e.removeEventListener("DOMMouseScroll",this._mousewheelHandler),e.removeEventListener("mouseout",this._mouseoutHandler)):(window.detachEvent("onresize",this._resizeHandler),e.detachEvent("onclick",this._clickHandler),e.detachEvent("dblclick",this._dblclickHandler),e.detachEvent("onmousewheel",this._mousewheelHandler),e.detachEvent("onmousemove",this._mousemoveHandler),e.detachEvent("onmouseout",this._mouseoutHandler),e.detachEvent("onmousedown",this._mousedownHandler),e.detachEvent("onmouseup",this._mouseupHandler)),this.root=null,this._domHover=null,this.storage=null,this.painter=null,this.un()}_processDragStart(e){var t=this._lastHover;if(this._isMouseDown&&t&&t.draggable&&!this._draggingTarget&&this._mouseDownTarget==t){if(t.dragEnableTime&&new Date-this._lastMouseDownMoment<t.dragEnableTime)return;var i=t;this._draggingTarget=i,this._isDragging=1,i.invisible=!0,this.storage.mod(i.id),this._dispatchAgency(i,Zn.EVENT.DRAGSTART,e),this.painter.refresh()}}_processDragEnter(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,Zn.EVENT.DRAGENTER,e,this._draggingTarget)}_processDragOver(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,Zn.EVENT.DRAGOVER,e,this._draggingTarget)}_processDragLeave(e){this._draggingTarget&&this._dispatchAgency(this._lastHover,Zn.EVENT.DRAGLEAVE,e,this._draggingTarget)}_processDrop(e){this._draggingTarget&&(this._draggingTarget.invisible=!1,this.storage.mod(this._draggingTarget.id),this.painter.refresh(),this._dispatchAgency(this._lastHover,Zn.EVENT.DROP,e,this._draggingTarget))}_processDragEnd(e){this._draggingTarget&&(this._dispatchAgency(this._draggingTarget,Zn.EVENT.DRAGEND,e),this._lastHover=null),this._isDragging=0,this._draggingTarget=null}_processOverShape(e){this._dispatchAgency(this._lastHover,Zn.EVENT.MOUSEOVER,e)}_processOutShape(e){this._dispatchAgency(this._lastHover,Zn.EVENT.MOUSEOUT,e)}_dispatchAgency(e,t,i,s){var r="on"+t,n={type:t,event:i,target:e,cancelBubble:!1},a=e;for(s&&(n.dragged=s);a&&(a[r]&&(n.cancelBubble=a[r](n)),a.dispatch(t,n),a=a.parent,!n.cancelBubble););e?n.cancelBubble||this.dispatch(t,n):s||this.dispatch(t,{type:t,event:i})}_iterateAndFindHover(){for(var e,t=$n.Util_matrix.create(),i=this.storage.getShapeList(),s=[0,0],r=i.length-1;r>=0;r--){var n=i[r];if(void 0!==n.zlevel&&(e=this.painter.getLayer(n.zlevel,e),s[0]=this._mouseX,s[1]=this._mouseY,e.needTransform&&($n.Util_matrix.invert(t,e.transform),$n.Util_vector.applyTransform(s,s,t))),this._findHover(n,s[0],s[1]))break}}_mobildFindFixed(e){var t=[{x:10},{x:-20},{x:10,y:10},{y:-20}];this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var i=0;!this._lastHover&&i<t.length;i++){var s=t[i];s.x&&(this._mouseX+=s.x),s.y&&(this._mouseX+=s.y),this._iterateAndFindHover()}this._lastHover&&(e.zrenderX=this._mouseX,e.zrenderY=this._mouseY)}_zrenderEventFixed(e,t){if(e.zrenderFixed)return e;if(t){var i="touchend"!=e.type?e.targetTouches[0]:e.changedTouches[0];if(i){var s=this.root.getBoundingClientRect();e.zrenderX=i.clientX-s.left,e.zrenderY=i.clientY-s.top}}else{var r=(e=e||window.event).toElement||e.relatedTarget||e.srcElement||e.target;r&&r!=this._domHover&&(e.zrenderX=(void 0!==e.offsetX?e.offsetX:e.layerX)+r.offsetLeft,e.zrenderY=(void 0!==e.offsetY?e.offsetY:e.layerY)+r.offsetTop)}return e.zrenderFixed=1,e}getLastHoverOne(){return this._lastHover?this._lastHover:null}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ba{constructor(){this.CLASS_NAME="SuperMap.LevelRenderer.Animation.easing"}destroy(){}Linear(e){return e}QuadraticIn(e){return e*e}QuadraticOut(e){return e*(2-e)}QuadraticInOut(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}CubicIn(e){return e*e*e}CubicOut(e){return--e*e*e+1}CubicInOut(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}QuarticIn(e){return e*e*e*e}QuarticOut(e){return 1- --e*e*e*e}QuarticInOut(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}QuinticIn(e){return e*e*e*e*e}QuinticOut(e){return--e*e*e*e*e+1}QuinticInOut(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}SinusoidalIn(e){return 1-Math.cos(e*Math.PI/2)}SinusoidalOut(e){return Math.sin(e*Math.PI/2)}SinusoidalInOut(e){return.5*(1-Math.cos(Math.PI*e))}ExponentialIn(e){return 0===e?0:Math.pow(1024,e-1)}ExponentialOut(e){return 1===e?1:1-Math.pow(2,-10*e)}ExponentialInOut(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}CircularIn(e){return 1-Math.sqrt(1-e*e)}CircularOut(e){return Math.sqrt(1- --e*e)}CircularInOut(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}ElasticIn(e){var t,i=.1;return 0===e?0:1===e?1:(i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))}ElasticOut(e){var t,i=.1;return 0===e?0:1===e?1:(i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)}ElasticInOut(e){var t,i=.1;return 0===e?0:1===e?1:(i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*.5+1)}BackIn(e){var t=1.70158;return e*e*((t+1)*e-t)}BackOut(e){var t=1.70158;return--e*e*((t+1)*e+t)+1}BackInOut(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}BounceIn(e){return 1-this.BounceOut(1-e)}BounceOut(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}BounceInOut(e){return e<.5?.5*this.BounceIn(2*e):.5*this.BounceOut(2*e-1)+.5}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class _a{constructor(e){this._targetPool=e.target||{},this._targetPool instanceof Array||(this._targetPool=[this._targetPool]),this._life=e.life||1e3,this._delay=e.delay||0,this._startTime=(new Date).getTime()+this._delay,this._endTime=this._startTime+1e3*this._life,this.loop=void 0!==e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this.CLASS_NAME="SuperMap.LevelRenderer.Animation.Clip"}destroy(){}step(e){var t=new ba,i=(e-this._startTime)/this._life;if(!(i<0)){i=Math.min(i,1);var s="string"==typeof this.easing?t[this.easing]:this.easing,r="function"==typeof s?s(i):i;return this.fire("frame",r),1==i?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null}}restart(){var e=((new Date).getTime()-this._startTime)%this._life;this._startTime=(new Date).getTime()-e+this.gap}fire(e,t){for(var i=0,s=this._targetPool.length;i<s;i++)this["on"+e]&&this["on"+e](this._targetPool[i],t)}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class xa extends Qn{constructor(e){super(e),e=e||{},this.stage={},this.onframe=function(){},this._clips=[],this._running=!1,this._time=0,ye.extend(this,e),this.CLASS_NAME="SuperMap.LevelRenderer.Animation"}add(e){this._clips.push(e)}remove(e){var t=(new Nn).indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)}_update(){var e=(new Date).getTime(),t=e-this._time,i=this._clips,s=i.length,r=[],n=[];for(let t=0;t<s;t++){var a=i[t],o=a.step(e);o&&(r.push(o),n.push(a))}this.stage.update&&this.stage.update();for(let e=0;e<s;)i[e]._needsRemove?(i[e]=i[s-1],i.pop(),s--):e++;s=r.length;for(let e=0;e<s;e++)n[e].fire(r[e]);this._time=e,this.onframe(t),this.dispatch("frame",t)}start(){var e=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){setTimeout(e,16)},t=this;this._running=!0,this._time=(new Date).getTime(),e(function i(){t._running&&(t._update(),e(i))})}stop(){this._running=!1}clear(){this._clips=[]}animate(e,t){var i=new Ca(e,(t=t||{}).loop,t.getter,t.setter);return i.animation=this,i}static _interpolateNumber(e,t,i){return(t-e)*i+e}static _interpolateArray(e,t,i,s,r){var n=e.length;if(1==r)for(let r=0;r<n;r++)s[r]=xa._interpolateNumber(e[r],t[r],i);else{var a=e[0].length;for(let r=0;r<n;r++)for(let n=0;n<a;n++)s[r][n]=xa._interpolateNumber(e[r][n],t[r][n],i)}}static _isArrayLike(e){switch(typeof e){case"undefined":case"string":return!1}return void 0!==e.length}static _catmullRomInterpolateArray(e,t,i,s,r,n,a,o,l){var h=e.length;if(1==l)for(let l=0;l<h;l++)o[l]=xa._catmullRomInterpolate(e[l],t[l],i[l],s[l],r,n,a);else{var u=e[0].length;for(let l=0;l<h;l++)for(var c=0;c<u;c++)o[l][c]=xa._catmullRomInterpolate(e[l][c],t[l][c],i[l][c],s[l][c],r,n,a)}}static _catmullRomInterpolate(e,t,i,s,r,n,a){var o=.5*(i-e),l=.5*(s-t);return(2*(t-i)+o+l)*a+(-3*(t-i)-2*o-l)*n+o*r+t}static _cloneValue(e){var t=Array.prototype.slice;if(xa._isArrayLike(e)){var i=e.length;if(xa._isArrayLike(e[0])){for(var s=[],r=0;r<i;r++)s.push(t.call(e[r]));return s}return t.call(e)}return e}static rgba2String(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}}class Ca{constructor(e,t,i,s){this._tracks={},this._target=e,this._loop=t||!1,this._getter=i||function(e,t){return e[t]},this._setter=s||function(e,t,i){e[t]=i},this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[],this.CLASS_NAME="SuperMap.LevelRenderer.Animation.Animator"}when(e,t){for(var i in t)this._tracks[i]||(this._tracks[i]=[],0!==e&&this._tracks[i].push({time:0,value:xa._cloneValue(this._getter(this._target,i))})),this._tracks[i].push({time:parseInt(e,10),value:t[i]});return this}during(e){return this._onframeList.push(e),this}start(e){var t=this,i=this._setter,s=this._getter,r=t._onframeList.length,n="spline"===e,a=function(){if(t._clipCount--,0===t._clipCount){t._tracks={};for(var e=t._doneList.length,i=0;i<e;i++)t._doneList[i].call(t)}},o=function(o,l){var h=o.length;if(h){var u=o[0].value,c=xa._isArrayLike(u),d=!1,p=c&&xa._isArrayLike(u[0])?2:1;o.sort(function(e,t){return e.time-t.time});var f=o[h-1].time,m=[],y=[];for(let e=0;e<h;e++){m.push(o[e].time/f);var g=o[e].value;"string"==typeof g&&(0===(g=$n.Util_color.toArray(g)).length&&(g[0]=g[1]=g[2]=0,g[3]=1),d=!0),y.push(g)}var v,S,b,_,x,C,T,M=0,w=0;if(d)var E=[0,0,0,0];var A=new _a({target:t._target,life:f,loop:t._loop,delay:t._delay,onframe:function(e,a){if(a<w){for(v=Math.min(M+1,h-1),S=v;S>=0&&!(m[S]<=a);S--);S=Math.min(S,h-2)}else{for(S=M;S<h&&!(m[S]>a);S++);S=Math.min(S-1,h-2)}M=S,w=a;var o=m[S+1]-m[S];if(0!==o){if(b=(a-m[S])/o,n)if(x=y[S],_=y[0===S?S:S-1],C=y[S>h-2?h-1:S+1],T=y[S>h-3?h-1:S+2],c)xa._catmullRomInterpolateArray(_,x,C,T,b,b*b,b*b*b,s(e,l),p);else{let t;t=d?xa.rgba2String(E):xa._catmullRomInterpolate(_,x,C,T,b,b*b,b*b*b),i(e,l,t)}else if(c)xa._interpolateArray(y[S],y[S+1],b,s(e,l),p);else{let t;d?(xa._interpolateArray(y[S],y[S+1],b,E,1),t=xa.rgba2String(E)):t=xa._interpolateNumber(y[S],y[S+1],b),i(e,l,t)}for(S=0;S<r;S++)t._onframeList[S](e,a)}},ondestroy:a});e&&"spline"!==e&&(A.easing=e),t._clipList.push(A),t._clipCount++,t.animation.add(A)}};for(var l in this._tracks)o(this._tracks[l],l);return this}stop(){for(var e=0;e<this._clipList.length;e++){var t=this._clipList[e];this.animation.remove(t)}this._clipList=[]}delay(e){return this._delay=e,this}done(e){return e&&this._doneList.push(e),this}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Ta{constructor(e,t){this.id=e,this.storage=new ya,this.painter=new ga(t,this.storage),this.handler=new Sa(t,this.storage,this.painter),this.animatingElements=[],this.animation=new xa({stage:{update:Ta.getFrameCallback(this)}}),this._needsRefreshNextFrame=!1,this.animation.start(),this.CLASS_NAME="SuperMap.LevelRenderer.Render"}destroy(){this.id=null,this.storage=null,this.painter=null,this.handler=null,this.animatingElements=null,this.animation=null,this._needsRefreshNextFrame=null}getId(){return this.id}addShape(e){return this.storage.addRoot(e),this}addGroup(e){return this.storage.addRoot(e),this}delShape(e){return this.storage.delRoot(e),this}delGroup(e){return this.storage.delRoot(e),this}modShape(e,t){return this.storage.mod(e,t),this}modGroup(e,t){return this.storage.mod(e,t),this}modLayer(e,t){return this.painter.modLayer(e,t),this}addHoverShape(e){return this.storage.addHover(e),this}render(e){return this.painter.render(e),this._needsRefreshNextFrame=!1,this}refresh(e){return this.painter.refresh(e),this._needsRefreshNextFrame=!1,this}refreshNextFrame(){return this._needsRefreshNextFrame=!0,this}refreshHover(e){return this.painter.refreshHover(e),this}refreshShapes(e,t){return this.painter.refreshShapes(e,t),this}resize(){return this.painter.resize(),this}animate(e,t,i){if("string"==typeof e&&(e=this.storage.get(e)),e){var s;if(t){for(var r=t.split("."),n=e,a=0,o=r.length;a<o;a++)n&&(n=n[r[a]]);n&&(s=n)}else s=e;if(!s)return void $n.Util_log('Property "'+t+'" is not existed in element '+e.id);var l=this.animatingElements;return void 0===e.__aniCount&&(e.__aniCount=0),0===e.__aniCount&&l.push(e),e.__aniCount++,this.animation.animate(s,{loop:i}).done(function(){if(e.__aniCount--,0===e.__aniCount){var t=(new Nn).indexOf(l,e);l.splice(t,1)}})}$n.Util_log("Element not existed")}clearAnimation(){this.animation.clear()}getWidth(){return this.painter.getWidth()}getHeight(){return this.painter.getHeight()}toDataURL(e,t,i){return this.painter.toDataURL(e,t,i)}shapeToImage(e,t,i){var s=ye.createUniqueID("SuperMap.LevelRenderer.ToImage_");return this.painter.shapeToImage(s,e,t,i)}on(e,t){return this.handler.on(e,t),this}un(e,t){return this.handler.un(e,t),this}trigger(e,t){return this.handler.trigger(e,t),this.handler.dispatch(e,t),this}clear(){return this.storage.delRoot(),this.painter.clear(),this}dispose(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=null,this.animatingElements=null,this.storage=null,this.painter=null,this.handler=null}updateHoverShapes(e){return this.painter.updateHoverLayer(e),this}getAllShapes(){return this.storage._shapeList}clearAll(){return this.clear(),this.painter.clearHover(),this}getHoverOne(){return this.handler.getLastHoverOne()}static getFrameCallback(e){return function(){var t=e.animatingElements;if(t instanceof Array){for(var i=0,s=t.length;i<s;i++)e.storage.mod(t[i].id);(t.length||e._needsRefreshNextFrame)&&e.refresh()}}}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class Ma{constructor(){Ma._instances={},Ma.Tool={},this.version="2.0.4",this.CLASS_NAME="SuperMap.LevelRenderer"}destroy(){this.dispose(),this.version=null}init(e){var t=new Ta(ye.createUniqueID("LRenderer_"),e);return Ma._instances[t.id]=t,t}dispose(e){if(e)e.dispose(),this.delInstance(e.id);else{for(var t in Ma._instances)Ma._instances[t].dispose();Ma._instances={}}return this}getInstance(e){return Ma._instances[e]}delInstance(e){return delete Ma._instances[e],this}}s.LevelRenderer=Ma;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
const wa={EXCEL:"EXCEL",CSV:"CSV",ISERVER:"ISERVER",GEOJSON:"GEOJSON",JSON:"JSON"},Ea={fileMaxSize:10485760};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Aa{constructor(e){this.FileTypes=wa,this.FileConfig=Ea,this.loadFileObject=e&&e.loadFileObject?e.loadFileObject:[]}set(e,t){this[e]=t}get(e){return this[e]}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class La{constructor(){this._initView()}_initView(){const e=document.createElement("div");e.hidden=!0,e.setAttribute("class","component-messageboxcontainer component-border-bottom-orange");const t=document.createElement("div");t.setAttribute("class","icon"),this.icon=document.createElement("span"),this.icon.setAttribute("class","supermapol-icons-message-warning"),t.appendChild(this.icon),e.appendChild(t);const i=document.createElement("div");i.setAttribute("class","component-messagebox"),i.innerHTML="",e.appendChild(i),this.messageBox=i;const s=document.createElement("div");s.setAttribute("class","component-messagebox__cancelbtncontainer");const r=document.createElement("button");r.setAttribute("class","component-messagebox__cancelBtn"),r.innerHTML="x",r.onclick=this.closeView.bind(this),s.appendChild(r),e.appendChild(s),this.messageBoxContainer=e,document.body.appendChild(this.messageBoxContainer)}closeView(){this.messageBoxContainer.hidden=!0}showView(e,t="warring"){"success"===t?(this.icon.setAttribute("class","supermapol-icons-message-success"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-green")):"failure"===t?(this.icon.setAttribute("class","supermapol-icons-message-failure"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-red")):"warring"===t&&(this.icon.setAttribute("class","supermapol-icons-message-warning"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-orange")),this.messageBox.innerHTML=e,this.messageBoxContainer.hidden=!1}}s.Components.MessageBox=La;var Pa=i(1),Na=i.n(Pa);
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
let Oa={code:null,defaultCode:"en-US",getCode:function(){return s.Lang.code||s.Lang.setCode(),s.Lang.code},setCode:function(){var e=this.getLanguageFromCookie();e?s.Lang.code=e:(e=s.Lang.defaultCode,0===(e="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage).indexOf("zh")&&(e="zh-CN"),0===e.indexOf("en")&&(e="en-US"),s.Lang.code=e)},getLanguageFromCookie(){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){for(var i=e[t];" "===i.charAt(0);)i=i.substring(1);if(-1!==i.indexOf("language="))return i.substring("language=".length,i.length)}return""},i18n:function(e){var t=s.Lang[s.Lang.getCode()],i=t&&t[e];return i||(i=e),i}};s.Lang=Oa,s.i18n=s.Lang.i18n;var Ia=i(5),Fa=i.n(Ia);
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
let Ra={rABS:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsBinaryString,rABF:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsArrayBuffer,rAT:"undefined"!=typeof FileReader&&FileReader.prototype&&FileReader.prototype.readAsText,readFile(e,t,i,s,r){wa.JSON===e||wa.GEOJSON===e?this.readTextFile(t,i,s,r):wa.EXCEL!==e&&wa.CSV!==e||this.readXLSXFile(t,i,s,r)},readTextFile(e,t,i,s){let r=new FileReader;r.onloadend=function(e){t&&t.call(s,e.target.result)},r.onerror=function(e){i&&i.call(s,e)},this.rAT?r.readAsText(e.file,"utf-8"):r.readAsBinaryString(e.file)},readXLSXFile(e,t,i,s){let r=new FileReader;r.onloadend=function(e){let r=new Uint8Array(e.target.result),n=Fa.a.read(r,{type:"array"});try{if(n&&n.SheetNames&&n.SheetNames.length>0){let e=n.SheetNames[0],i=Fa.a.utils.sheet_to_csv(n.Sheets[e]);t&&t.call(s,i)}}catch(e){i&&i.call(s,e)}},r.onerror=function(e){i&&i.call(s,e)},this.rABF&&r.readAsArrayBuffer(e.file)},processDataToGeoJson(e,t,i,s,r){let n=null;if("EXCEL"===e||"CSV"===e)n=this.processExcelDataToGeoJson(t),i&&i.call(r,n);else if("JSON"===e||"GEOJSON"===e){let e=t;"string"==typeof e&&(e=JSON.parse(e)),"ISERVER"===e.type?n=e.data.recordsets[0].features:"FeatureCollection"===e.type?n=e:s&&s.call(r,Oa.i18n("msg_dataInWrongGeoJSONFormat")),i&&i.call(r,n)}else s&&s.call(r,Oa.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson(e){let t=this.string2Csv(e),i=t.colTitles,s=-1,r=-1;for(let e=0,t=i.length;e<t;e++)this.isXField(i[e])&&(s=e),this.isYField(i[e])&&(r=e);let n=[];for(let e=0,i=t.rows.length;e<i;e++){let i=t.rows[e],a=Number(i[s]),o=Number(i[r]),l={};for(let i in t.colTitles){l[t.colTitles[i]]=t.rows[e][i]}let h={type:"Feature",geometry:{type:"Point",coordinates:[a,o]},properties:l};n.push(h)}return n},isXField(e){var t=e.toLowerCase();return"x"===t||"smx"===t||"jd"===t||"经度"===t||"东经"===t||"longitude"===t||"lot"===t||"lon"===t||"lng"===t||"x坐标"===t},isYField(e){var t=e.toLowerCase();return"y"===t||"smy"===t||"wd"===t||"纬度"===t||"北纬"===t||"latitude"===t||"lat"===t||"y坐标"===t},string2Csv(e,t){let i=e.split("\n"),s={};s.colTitles=t?[]:i[0].split(","),s.rows=[];for(let e=t?0:1;e<i.length;e++)i[e]&&s.rows.push(i[e].split(","));return s}};s.Components.FileReaderUtil=Ra;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Da{constructor(e){this.datasets=e,this.EVENT_TYPES=["getdatafailed"],this.events=new Ie(this,null,this.EVENT_TYPES)}getDatasetInfo(e){let t=this.datasets.url,i=this;Ke.get(t).then(function(e){return e.json()}).then(function(t){if(t.datasetInfo){let s=t.datasetInfo;i.datasetsInfo={dataSourceName:s.dataSourceName,datasetName:s.name,mapName:t.name},e({result:i.datasetsInfo})}}).catch(function(e){console.log(e),i._fireFailedEvent(e)})}getDataFeatures(e,t){let i,r,n,a=e.result,o={name:a.datasetName+"@"+a.dataSourceName};Object.assign(o,this.datasets.queryInfo),i=new s.FilterParameter(o),r=new s.GetFeaturesBySQLParameters({queryParameter:i,datasetNames:[a.dataSourceName+":"+a.datasetName],fromIndex:0,toIndex:1e5}),(n=new s.GetFeaturesBySQLService(a.dataUrl,{eventListeners:{processCompleted:t,processFailed:function(){}}})).processAsync(r)}getLayerFeatures(e,t){let i,r,n,a=e.result,o={name:a.mapName};Object.assign(o,this.datasets.queryInfo),i=new s.FilterParameter(o),r=new s.QueryBySQLParameters({queryParams:[i],expectCount:1e5}),(n=new s.QueryBySQLService(a.dataUrl,{eventListeners:{processCompleted:t,processFailed:function(){}}})).processAsync(r)}getDataInfoByIptl(e){this.getServiceInfo(this.datasets.url,e)}getServiceInfo(e,t){let i=this;Ke.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(s=>{if(!1!==s.succeed)if(s.dataItemServices&&s.dataItemServices.length>0){let r;s.dataItemServices.forEach(s=>{if("RESTDATA"===s.serviceType&&"PUBLISHED"===s.serviceStatus)r=s;else{if("RESTMAP"!==s.serviceType||"PUBLISHED"!==s.serviceStatus)return void i.getDatafromContent(e,t);r=s}}),r&&i.getDatafromRest(r.serviceType,r.address,t)}else i.getDatafromContent(e,t);else i._fireFailedEvent(s)}).catch(e=>{console.log(e),i._fireFailedEvent(e)})}getDatafromContent(e,t){let i={result:{}},s=this;e+="/content.json?pageSize=9999999¤tPage=1",Ke.get(e,null,{withCredentials:this.datasets.withCredentials}).then(e=>e.json()).then(e=>{if(!1!==e.succeed){if(e.type){if("JSON"===e.type||"GEOJSON"===e.type){if(e.content=JSON.parse(e.content.trim()),!e.content.features)return void console.log(Oa.i18n("msg_jsonResolveFiled"));let t=this._formatGeoJSON(e.content);i.result.features={type:e.content.type,features:t}}else if("EXCEL"===e.type||"CSV"===e.type){let t=this._excelData2Feature(e.content);i.result.features={type:"FeatureCollection",features:t}}t(i,"content")}}else s._fireFailedEvent(e)},this).catch(e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromRest(e,t,i){let s=this,r=this.datasets.withCredentials;if("RESTDATA"===e){let e,n,a=`${t}/data/datasources`;Ke.get(a,null,{withCredentials:r}).then(e=>e.json()).then(o=>{e=o.datasourceNames[0],a=`${t}/data/datasources/${e}/datasets`,Ke.get(a,null,{withCredentials:r}).then(e=>e.json()).then(r=>(n=r.datasetNames[0],s.getDatafromRestData(`${t}/data`,[e+":"+n],i),[e+":"+n])).catch(function(e){s._fireFailedEvent(e)})}).catch(function(e){s._fireFailedEvent(e)})}else{let e,n,a,o=`${t}/maps`;Ke.get(o,null,{withCredentials:r}).then(e=>e.json()).then(l=>{e=l[0].name,a=l[0].path,o=o=`${t}/maps/${e}/layers`,Ke.get(o,null,{withCredentials:r}).then(e=>e.json()).then(e=>(n=e[0].subLayers.layers[0].caption,s.getDatafromRestMap(n,a,i),n)).catch(function(e){s._fireFailedEvent(e)})}).catch(function(e){s._fireFailedEvent(e)})}}getDatafromRestData(e,t,i){let s=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,e=>{i(e,"RESTDATA")},e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromRestMap(e,t,i){let s=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,e=>{i(e,"RESTMAP")},e=>{console.log(e),s._fireFailedEvent(e)})}_getFeatureBySQL(e,t,i,s,r){let n,a,o,l={name:t.join().replace(":","@")};Object.assign(l,i),n=new Ot(l),o=new ls({queryParameter:n,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(a=new hs(e,{eventListeners:{processCompleted:e=>{s&&s(e)},processFailed:e=>{r&&r(e)}}})).processAsync(o)}_queryFeatureBySQL(e,t,i,s,r,n,a,l,h,u){var c,d,p={name:t};Object.assign(p,i),c=new Ot(p),s&&(c.fields=s);var f={queryParams:[c]};u&&(f.queryOption=o.ATTRIBUTE),l&&(f.startRecord=l),h&&(f.expectCount=h),r&&(f.prjCoordSys={epsgCode:r}),d=new Sr(f),this._queryBySQL(e,d,e=>{"processCompleted"===e.type?n(e):a(e)})}_queryBySQL(e,t,i,s){new br(e,{eventListeners:{scope:this,processCompleted:i,processFailed:i},format:this._processFormat(s)}).processAsync(t)}_processFormat(e){return e||r.GEOJSON}_formatGeoJSON(e){let t=e.features;return t.forEach((e,t)=>{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,i=-1,s=-1;for(let e=0,r=t.length;e<r;e++)Ra.isXField(t[e])&&(i=e),Ra.isYField(t[e])&&(s=e);let r=[];for(let t=0,n=e.rows.length;t<n;t++){let n=e.rows[t],a=Number(n[i]),o=Number(n[s]),l={};for(let i in e.colTitles){l[e.colTitles[i]]=e.rows[t][i]}l.index=t+"";let h={type:"Feature",geometry:{type:"Point",coordinates:[a,o]},properties:l};r.push(h)}return r}_fireFailedEvent(e){let t=e?{error:e,message:Oa.i18n("msg_getdatafailed")}:{message:Oa.i18n("msg_getdatafailed")};this.events.triggerEvent("getdatafailed",t)}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class ka{constructor(e){this.datasets=e.datasets,this.xField=[],this.yField=[],this.grid={top:"50px",bottom:"50px",left:"50px",right:"60px"},this.chartType=e.type||"bar",this._initXYField(e.chartOptions),this.EVENT_TYPES=["getdatafailed"],this.events=new Ie(this,null,this.EVENT_TYPES)}_initXYField(e){let t=this;e&&e.length>0&&e.forEach(function(e){e.xAxis&&t.xField.push({field:e.xAxis.field,name:e.xAxis.name}),e.yAxis&&t.yField.push({field:e.yAxis.field,name:e.yAxis.name})})}getDatasetInfo(e){this.createChart=e,this.datasets&&this._checkUrl(this.datasets.url)&&(this.chartModel=new Da(this.datasets),"iServer"===this.datasets.type?this.chartModel.getDatasetInfo(this._getDatasetInfoSuccess.bind(this)):"iPortal"===this.datasets.type&&this.chartModel.getDataInfoByIptl(this._getDataInfoSuccess.bind(this)),this.chartModel.events.on({getdatafailed:e=>{this.events.triggerEvent("getdatafailed",e)}}))}_getDatasetInfoSuccess(e){let t=this.datasets.url,i=t.indexOf("rest");if(i>0){let s=t.indexOf("/",i+5),r=t.substring(i+5,s),n=t.substring(0,i+4)+"/data";if("maps"===r){let r=t.indexOf("/",s+1),a=t.substring(s+1,r);n=t.substring(0,i+4)+"/maps/"+a,e.result.dataUrl=n,this._getLayerFeatures(e)}else"data"===r&&(e.result.dataUrl=n,this._getDataFeatures(e))}}_getDataInfoSuccess(e,t){let i=this;"RESTMAP"===t?i._getChartDatasFromLayer(e):i._getChartDatas(e)}_getDataFeatures(e){this.chartModel.getDataFeatures(e,this._getChartDatas.bind(this))}_getLayerFeatures(e){this.chartModel.getLayerFeatures(e,this._getChartDatasFromLayer.bind(this))}_getChartDatas(e){if(e){this.features=e.result.features;let t=this.features.features,i={};if(t.length){let e=t[0],s=[],r=[];for(let t in e.properties)s.push(t),r.push(this._getDataType(e.properties[t]));i={features:t,fieldCaptions:s,fieldTypes:r,fieldValues:[]};for(let e in r){let s=[];for(let r in t){let n=t[r],a=i.fieldCaptions[e],o=n.properties[a];s.push(o)}i.fieldValues.push(s)}this.createChart(i)}}}_getChartDatasFromLayer(e){if(e.result.recordsets){let t=e.result.recordsets[0],i=t.features.features;this.features=t.features;let s={};if(i.length){s={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]};for(let e in s.fieldCaptions){let t=[];for(let r in i){let n=i[r],a=s.fieldCaptions[e],o=n.properties[a];t.push(o)}s.fieldValues.push(t)}this.createChart(s)}}}_createChartOptions(e){return this.calculatedData=this._createChartDatas(e),this.updateChartOptions(this.chartType)}changeType(e){if(e!==this.chartType)return this.chartType=e,this.updateChartOptions(this.chartType)}updateData(e,t,i){this.updateChart=i,this.xField=[],this.yField=[],this._initXYField(t),e.type=e.type||"iServer",e.withCredentials=e.withCredentials||!1,this.datasets=e,this.getDatasetInfo(this._updateDataSuccess.bind(this))}_updateDataSuccess(e){let t=this._createChartOptions(e);this.updateChart(t)}updateChartOptions(e,t){if(this.calculatedData){let i=this.grid,s=this._createChartSeries(this.calculatedData,e),r=[];for(let e in this.calculatedData.XData)r.push({value:this.calculatedData.XData[e].fieldsData});let n={type:"category",name:this.xField[0].name||"X",data:r,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},a={type:"value",name:this.yFieldName||"Y",data:{},nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},o={formatter:"{b0}: {c0}"},l="#404a59";return t&&(t.grid&&(i=t.grid),t.tooltip&&(o=t.tooltip),t.backgroundColor&&(l=t.backgroundColor)),{backgroundColor:l,grid:i,series:s,xAxis:n,yAxis:a,tooltip:o}}}_createChartDatas(e){let t=0,i=[],s=e.fieldCaptions,r=this;s.forEach(function(e,i){r.xField[0]&&e===r.xField[0].field&&(t=i)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(r.yFieldName=r.yFieldName+","),r.yFieldName=r.yFieldName+e.name,s.forEach(function(t,s){t===e.field&&i.push(s)})});let n=this._getAttrData(e,t),a=[];if(i.length>0)i.forEach(function(t){let i=[];for(let s in e.fieldValues[t])i.push({value:e.fieldValues[t][s]});a.push(i)});else{let e=[],t=[],i=n.length;for(let s=0;s<i;s++){let i=!1;for(let r=0,a=t.length;r<a;r++)if(n[s].fieldsData===t[r].fieldsData){e[r].value++,t[r].recordIndexs.push(s),i=!0;break}i||n[s].fieldsData&&(t.push({fieldsData:n[s].fieldsData,recordIndexs:[s]}),e.push({value:1}))}n=t,a=[e]}return{XData:n,YData:a}}_getAttrData(e,t){0===t&&(this.xField=[{field:e.fieldCaptions[t],name:e.fieldCaptions[t]}]);let i=[];for(let s=0,r=e.fieldValues[t].length;s<r;s++){let r=e.fieldValues[t][s];i.push({recordIndexs:s,fieldsData:r})}return i}_createChartSeries(e,t){let i=[];return e.YData.forEach(function(e){let s=0,r=[];for(let t of e)s=t.value,r.push({value:s});let n={type:t,data:r,name:"y"};i.push(n)}),i}_isDate(e){return/((^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(10|12|0?[13578])([-\/\._])(3[01]|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(11|0?[469])([-\/\._])(30|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(0?2)([-\/\._])(2[0-8]|1[0-9]|0?[1-9])$)|(^([2468][048]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([3579][26]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][13579][26])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][13579][26])([-\/\._])(0?2)([-\/\._])(29)$))/gi.test(e)}_isNumber(e){let t=Number(e);return 0===t||!isNaN(t)}_getDataType(e){if(null!==e&&void 0!==e&&""!==e){if(this._isDate(e))return"DATE";if(this._isNumber(e))return"NUMBER"}return"STRING"}_checkUrl(e){let t;return t=!(""===e||!this._isMatchUrl(e))&&(!/^http[s]?:\/\/localhost/.test(e)&&!/^http[s]?:\/\/127.0.0.1/.test(e))}_isMatchUrl(e){return new RegExp("(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]").test(e)}getStyle(){return{grid:this.grid,tooltip:this.tooltip,backgroundColor:this.backgroundColor}}getFeatures(){return this.features}setStyle(e){return this.updateChartOptions(this.chartType,e)}}s.Components.ChartViewModel=ka;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ba{constructor(e,t){this.domID=e,this.chartType=t.type||"bar",t.datasets.type=t.datasets.type||"iServer",t.datasets.withCredentials=t.datasets.withCredentials||!1,this.viewModel=new ka(t),this._fillDataToView()}onAdd(e){this.addChart=e}_fillDataToView(){let e=new La;this.viewModel.getDatasetInfo(this._createChart.bind(this)),this.viewModel.events.on({getdatafailed:t=>{e.showView(t.message)}})}getStyle(){return this.viewModel.getStyle()}getFeatures(){return this.viewModel.getFeatures()}setStyle(e){let t=this.viewModel.setStyle(e);this._updateChart(t)}changeType(e){if(this.chartType!==e){this.chartType=e;let t=this.viewModel.changeType(e);this._updateChart(t)}}updateData(e,t){let i=this;this.viewModel.updateData(e,t,function(e){i._updateChart(e),i.addChart&&i.addChart()})}_createChart(e){this.echart=Na.a.init(document.getElementById(this.domID),null,{renderer:"canvas"});let t=this.viewModel._createChartOptions(e);this.echart.setOption(t),this.addChart&&this.addChart()}_updateChart(e){this.echart&&(this.echart.clear(),this.echart.setOption(e))}}s.Components.Chart=Ba;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ua{constructor(e){e=e||{},this.id=e.id?e.id:null,this.rootContainer=null}getElement(){return this.id&&(this.rootContainer.id=this.id),this.rootContainer}_initView(){}showView(){this.rootContainer.hidden=!1}closeView(){this.rootContainer.hidden=!0}}s.Components.TemplateBase=Ua;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ga extends Ua{constructor(e){super(e);let t=e.title?e.title:"";this._initView(t)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-container");const i=document.createElement("div");i.setAttribute("class","component-title");const s=document.createElement("div");s.innerHTML=e,i.appendChild(s),t.appendChild(i);const r=document.createElement("div");return r.setAttribute("class","component-content"),t.appendChild(r),this.content=r,this.rootContainer=t,t}getContentElement(){return this.content}appendContent(e){this.content.appendChild(e)}}s.Components.CommonContainer=Ga;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ja extends Ua{constructor(e){super(e),this._initView(e)}_initView(e){let t=this._createElement("div","component-selecttool");if(e.labelName){this._createElement("label","component-selecttool__lable--describe",t).innerHTML=e.labelName}let i=this._createElement("div","component-selecttool--chart",t);i.setAttribute("tabindex","1");let s=this._createElement("div","component-selecttool__name",i);s.title=e.optionsArr[0],s.innerHTML=e.optionsArr[0];let r=this._createElement("div","component-selecttool__trianglebtn--chart",i),n=this._createElement("div","component-triangle-down-img",r),a=this._createElement("div","component-selecttool__content",i),o=this._createElement("div","component-selecttool__content--chart",a),l=this._createElement("div","component-selecttool__scrollarea__content",o);l.setAttribute("tabindex","1"),this.createOptions(l,e.optionsArr),this.optionClickEvent(l,s,e.optionsClickCb),this._selectClickEvent(i,a,n),this.rootContainer=t}createOptions(e,t){for(let i in t){let s=this._createElement("div","component-selecttool__option",e);s.title=t[i],s.innerHTML=t[i]}}_selectClickEvent(e,t,i){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",i.className="component-triangle-down-img"):(t.style.display="block",i.className="triangle-up-img"),e.preventDefault(),e.stopPropagation()},e.onmousedown=function(e){e.target!==this&&(this.focus(),e.preventDefault(),e.stopPropagation())},e.onblur=function(){t.style.display="none",i.className="component-triangle-down-img"}}_createElement(e,t,i){let s=document.createElement(e||"div");return t&&(s.className=t),i&&i.appendChild(s),s}optionClickEvent(e,t,i){for(let s=0;s<e.children.length;s++){let r=e.children[s];r.onclick=function(){t.innerHTML=r.innerHTML,t.title=r.title,r.getAttribute("data-value")&&t.setAttribute("data-value",r.getAttribute("data-value")),i&&i(r)}}}}s.Components.Select=ja;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class za extends Ua{constructor(e){super(e),this._initView(e)}_initView(e){let t=document.createElement("div");t.className="component-dropdownbox--container";let i=document.createElement("div");i.setAttribute("tabindex","1"),i.className="component-dropdownbox",t.appendChild(i);let s=document.createElement("div");i.appendChild(s),this._createDropDownOption(e[0],s);let r=document.createElement("div");r.className="component-dropdownbox__triangle-btn",i.appendChild(r);let n=document.createElement("div");n.className="component-triangle-down-img",r.appendChild(n);let a={parentEle:i,dropDownContent:["component-dropdownbox__content component-dropdownbox__content--chart","dropDownContent"],scrollareaContent:"component-selecttool__scrollarea__content",optionsArr:e,triangleBtn:n,dropDownTopContainer:s};this._createDropDownBox(a),this.rootContainer=t}_createDropDownBox(e){let t=e.parentEle,i=e.dropDownTopContainer,s=document.createElement("div");s.className=e.dropDownContent[0],t.appendChild(s);let r=document.createElement("div");r.className=e.scrollareaContent,s.appendChild(r);let n=e.optionsArr;for(let e=0;e<n.length;e++)this._createDropDownOption(n[e],r);let a=e.triangleBtn;this._dropDownClickEvent(t,s,a),this._eleOnblur(t,s,a);let o=r.children;for(let e=0;e<o.length;e++)o[e].onclick=function(){i.innerHTML=o[e].outerHTML}}_createDropDownOption(e,t){let i=document.createElement("div");i.className="component-dropdownbox__item";let s=e;s.dataValue&&i.setAttribute("data-value",s.dataValue),t.appendChild(i);let r=document.createElement("div");r.className="component-dropdownbox__item__img",i.appendChild(r);let n=document.createElement("div");s.icon.className&&(n.className=s.icon.className),s.icon.background&&(n.style.background=s.icon.background),r.appendChild(n);let a=document.createElement("div");a.className="component-dropdownbox__item__title",a.title=s.title,a.innerHTML=s.title,i.appendChild(a);let o=document.createElement("div");o.className="component-dropdownbox__item__remark",o.title=s.remark,o.innerHTML=s.remark,i.appendChild(o)}_dropDownClickEvent(e,t,i){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",i.className="component-triangle-down-img"):(t.style.display="block",i.className="triangle-up-img"),e.preventDefault(),e.stopPropagation()},e.onmousedown=function(e){e.target!==this&&(this.focus(),e.preventDefault(),e.stopPropagation())}}_eleOnblur(e,t,i){e.onblur=function(){t.style.display="none",i.className="component-triangle-down-img"}}_createElement(e,t,i){let s=document.createElement(e||"div");return t&&(s.className=t),i&&i.appendChild(s),s}}s.Components.DropDownBox=za;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Va extends Ua{constructor(e){super(e=e||{}),e.title=e.title?e.title:"",this._initView(e.title)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-popcontainer");const i=document.createElement("div");i.setAttribute("class","component-popcontainer__header");const s=document.createElement("label");s.setAttribute("class","component-popcontainer__header__title"),s.innerHTML=e,i.appendChild(s);const r=document.createElement("span");r.setAttribute("class","supermapol-icons-clear component-popcontainer__header__close"),r.onclick=this.closeView.bind(this),t.appendChild(r),t.appendChild(i);const n=document.createElement("div");n.setAttribute("class","component-popcontainer__content"),this.content=n,t.appendChild(n),this.rootContainer=t}appendContent(e){this.content.appendChild(e)}}s.Components.PopContainer=Va;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ha extends Va{constructor(e){e.title=e.title?e.title:"属性",super(e),this.rootContainer.firstChild.hidden=!0,e.attributes=e.attributes?e.attributes:[],this._createAttributesTable(e.attributes)}_createAttributesTable(e){const t=document.createElement("table");t.setAttribute("class","component-popcontainer__content__table");const i=document.createElement("tbody");let s=!0;for(let t in e){const r=document.createElement("tr");s&&r.setAttribute("class","component-popcontainer__content__td--color");const n=document.createElement("td"),a=document.createElement("Span");a.innerHTML=t,n.appendChild(a);const o=document.createElement("td");o.innerHTML=e[t],r.appendChild(n),r.appendChild(o),i.appendChild(r),s=!s}t.appendChild(i),this.appendContent(t)}}s.Components.AttributesPopContainer=Ha;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ja extends Ua{constructor(e){super(e),this._initView()}_initView(){const e=document.createElement("div");e.setAttribute("class","component-tabpage");const t=document.createElement("ul");this.header=t;const i=document.createElement("div");i.setAttribute("class","component-tabpage__content"),this.content=i,e.appendChild(t),e.appendChild(i),this.rootContainer=e}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t<e.length;t++){let i=document.createElement("span");i.index=t,i.appendChild(document.createTextNode(e[t].title)),i.onclick=this._changeTabsPage.bind(this);let s=e[t].content;s.index=t,s.hidden=!0,this.header.appendChild(i),this.content.appendChild(s)}this.header.firstChild.setAttribute("class","on"),this.content.firstChild.hidden=!1}removeTab(e){this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}removeAllTabs(){for(let e=this.header.children.length;e>0;e--)this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e<this.header.children.length;e++)this.header.children[e].setAttribute("class",""),this.content.children[e].hidden=!0,e===t&&(this.header.children[e].setAttribute("class","on"),this.content.children[e].hidden=!1)}}s.Components.IndexTabsPageContainer=Ja;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class qa extends Ja{constructor(e){super(e),this.rootContainer.classList.add("component-citytabpage--noneBoxShadow"),this.config=e.config,ye.isArray(this.config)?(this.header.hidden=!0,this._createCityItem("城市",this.config),this.content.style.border="none"):(this._createTabs(),this.header.onclick=(e=>{for(let e=0;e<this.header.children.length;e++)this.header.children[e].setAttribute("class","");e.target.setAttribute("class","on"),this._createCityContent(e.target.innerHTML)}))}_createTabs(){if(ye.isArray(this.config))for(let e=0;e<this.config.length;e++){let t="";for(const i in this.config[e])t+=i;let i=document.createElement("li");i.innerHTML=t,this.header.appendChild(i)}else for(const e in this.config){let t=document.createElement("li");t.innerHTML=e,this.header.appendChild(t)}this.header.firstChild.setAttribute("class","on"),this._createCityContent(this.header.firstChild.innerHTML)}_createCityContent(e){for(let e=this.content.children.length;e>0;e--)this.content.removeChild(this.content.children[e-1]);const t=this.config[e];for(let e in t)this._createCityItem(e,t[e])}_createCityItem(e,t){const i=document.createElement("div"),s=document.createElement("div");s.setAttribute("class","component-citytabpag__py-key"),s.innerHTML=e,i.appendChild(s);const r=document.createElement("div");r.setAttribute("class","component-citytabpag__content");for(let e=0;e<t.length;e++){let i=document.createElement("span");i.innerHTML=t[e],r.appendChild(i)}"HOT"===e&&(r.style.width="428px"),i.appendChild(r),this.content.appendChild(i)}}s.Components.CityTabsPage=qa;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Wa extends Ua{constructor(e){super(e),this.navTabsTitle=null,this.navTabsContent=null,e.tabs=e.tabs?e.tabs:[],this._initView(e.tabs)}_initView(e){const t=document.createElement("div");t.setAttribute("class","component-navtabspage");const i=document.createElement("span");i.setAttribute("class","supermapol-icons-close"),i.onclick=this.closeView.bind(this),t.appendChild(i);const s=document.createElement("div");this.navTabsTitle=s,s.setAttribute("class","component-navtabspage__title"),t.appendChild(s);const r=document.createElement("div");this.navTabsContent=r,r.setAttribute("class","component-navtabspage__content"),t.appendChild(r),e.length>0&&this.appendTabs(e),this.rootContainer=t}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t<e.length;t++){let i=document.createElement("span");i.index=t,i.appendChild(document.createTextNode(e[t].title)),i.onclick=this._changeTabsPage.bind(this);let s=e[t].content;s.index=t,s.hidden=!0,this.navTabsTitle.appendChild(i),this.navTabsContent.appendChild(s)}this.navTabsTitle.firstChild.setAttribute("class","component-navtabspage__tabs--select"),this.navTabsContent.firstChild.hidden=!1}removeTab(e){this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}removeAllTabs(){for(let e=this.navTabsTitle.children.length;e>0;e--)this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}_changeTabsPage(e){const t=e.target.index;for(let e=0;e<this.navTabsTitle.children.length;e++)this.navTabsTitle.children[e].setAttribute("class",""),this.navTabsContent.children[e].hidden=!0,e===t&&(this.navTabsTitle.children[e].setAttribute("class","component-navtabspage__tabs--select"),this.navTabsContent.children[e].hidden=!1)}}s.Components.NavTabsPage=Wa;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Ya extends Ua{constructor(e){super(e=e||{}),this.currentPage=0,this.pageNumberLis=[],this.currentPageNumberLis=[],this.linkageEvent=null,e.contents=e.contents?e.contents:null,e.pageCounts=e.pageCounts?e.pageCounts:0,this._initView(e.contents,e.pageCounts)}setLinkageEvent(e){this.linkageEvent=e}_initView(e,t){const i=document.createElement("div");i.setAttribute("class","component-pagination");const s=document.createElement("div");s.setAttribute("class","component-pagination__content"),i.appendChild(s),this.content=s;const r=document.createElement("ul");r.setAttribute("class","component-pagination__link"),r.onclick=this._changePageEvent.bind(this),i.appendChild(r),this._createLink(r),this.link=r,e&&this.setContent(e),0!==t&&this.setPageLink(t),this.rootContainer=i}setContent(e){this.clearContent(),this.appendContent(e)}appendContent(e){this.content.appendChild(e)}clearContent(){for(let e=this.content.children.length-1;e>=0;e--)this.content.removeChild(this.content.children[e])}setPageLink(e){this.pageNumberLis=[],this.currentPageNumberLis=[],this.clearPageLink(),this._createPageLi(e),this._appendPageLink()}_createPageLi(e){for(let t=0;t<e;t++){const e=document.createElement("li");e.innerHTML=t+1,this.pageNumberLis.push(e)}if(this.pageNumberLis[0].setAttribute("class","active"),this.currentPage=1,e<5)this.currentPageNumberLis=this.pageNumberLis;else for(let e=0;e<5;e++)this.currentPageNumberLis.push(this.pageNumberLis[e])}_appendPageLink(){for(let e=0;e<this.currentPageNumberLis.length;e++)this.link.insertBefore(this.currentPageNumberLis[e],this.link.childNodes[this.link.children.length-2]);for(let e=0;e<this.currentPageNumberLis.length;e++)this.currentPageNumberLis[e].setAttribute("class",""),Number(this.currentPageNumberLis[e].innerHTML)===this.currentPage&&this.currentPageNumberLis[e].setAttribute("class","active");this._changeDisableState(),this.linkageEvent&&this.linkageEvent(this.currentPage)}clearPageLink(){for(let e=this.link.children.length-3;e>1;e--)this.link.removeChild(this.link.children[e])}_createLink(e){for(let t=0;t<4;t++){const i=document.createElement("li");i.setAttribute("class","disable");const s=document.createElement("span");i.appendChild(s),0===t?(s.id="first",s.setAttribute("class","supermapol-icons-first")):1===t?(s.id="prev",s.setAttribute("class","supermapol-icons-prev")):2===t?(s.id="next",s.setAttribute("class","supermapol-icons-next")):3===t&&(s.id="last",s.setAttribute("class","supermapol-icons-last")),e.appendChild(i)}}_changePageEvent(e){const t=e.target;if("disable"===t.parentElement.classList[0])return;let i;if(t.id)i=t.id;else{if(!Number(t.innerHTML))return;i=Number(t.innerHTML)}this._prePageNum(i),this.clearPageLink(),this._appendPageLink()}_changeDisableState(){this.link.children[0].setAttribute("class",""),this.link.children[1].setAttribute("class",""),this.link.children[this.link.children.length-1].setAttribute("class",""),this.link.children[this.link.children.length-2].setAttribute("class",""),1===this.currentPage&&(this.link.children[0].setAttribute("class","disable"),this.link.children[1].setAttribute("class","disable")),this.currentPage===this.pageNumberLis.length&&(this.link.children[this.link.children.length-1].setAttribute("class","disable"),this.link.children[this.link.children.length-2].setAttribute("class","disable"))}_prePageNum(e){const t=[];if(this.currentPage="first"===e?1:"last"===e?this.pageNumberLis.length:"prev"===e?this.currentPage-1:"next"===e?this.currentPage+1:e,this.pageNumberLis.length<=5)for(let e=0;e<this.pageNumberLis.length;e++)t.push(this.pageNumberLis[e]);else if(this.currentPage<=3)for(let e=0;e<5;e++)t.push(this.pageNumberLis[e]);else if(this.currentPage>=this.pageNumberLis.length-3)for(let e=this.pageNumberLis.length-5;e<this.pageNumberLis.length;e++)t.push(this.pageNumberLis[e]);else for(let e=this.currentPage-3;e<=this.currentPage+1;e++)t.push(this.pageNumberLis[e]);t.length>0&&(this.currentPageNumberLis=t)}}s.Components.PaginationContainer=Ya;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
let Qa={getFileType:e=>/^.*\.(?:xls|xlsx)$/i.test(e)?wa.EXCEL:/^.*\.(?:csv)$/i.test(e)?wa.CSV:/^.*\.(?:geojson|json)$/i.test(e)?wa.GEOJSON:null};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/s.Lang["en-US"]={title_dataFlowService:"Data Flow Service",title_distributedAnalysis:"Distributed Analysis",title_clientComputing:"Client Computing",title_dataServiceQuery:"Data Service Query",title_searchCity:"Search city",title_searchLayer:" Search layer",text_input_value_inputDataFlowUrl:"Please enter the data stream service address such as: ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"Display feature information",text_subscribe:"subscribe",text_cancelSubscribe:"unsubscribe",text_densityAnalysis:"Density Analysis",text_CalculateTheValuePerUnitArea:"Calculate the value per unit area within the neighborhood shape",text_option_selectDataset:"Please select a dataset",text_label_dataset:"Dataset",text_option_simplePointDensityAnalysis:"Simple point density analysis",text_option_nuclearDensityAnalysis:"Nuclear density analysis",text_label_analyticalMethod:"Analytical method",text_option_quadrilateral:"Quadrilateral",text_option_hexagon:"hexagon",text_label_meshType:"Mesh type",text_option_notSet:"Not set",text_label_weightField:"Weight field",text_label_gridSizeInMeters:"Grid size",text_label_searchRadius:"Search radius",text_label_queryRange:"Scope of analysis",text_label_areaUnit:"Area unit",text_option_equidistantSegmentation:"Equidistant segmentation",text_option_logarithm:"Logarithm",text_option_equalCountingSegment:"Equal counting segment",text_option_squareRootSegmentation:"Square root segmentation",text_label_thematicMapSegmentationMode:"Thematic map segmentation mode",text_label_thematicMapSegmentationParameters:"Thematic map segmentation parameters",text_option_greenOrangePurpleGradient:"Green orange purple gradient",text_option_greenOrangeRedGradient:"Green orange red gradient",text_option_rainbowGradient:"Rainbow gradient",text_option_spectralGradient:"Spectral gradient",text_option_terrainGradient:"Terrain gradient",text_label_thematicMapColorGradientMode:"Thematic map color gradient mode",text_label_resultLayerName:"Result layer name",text_chooseFile:"Open File",text_isoline:"Isoline",text_extractDiscreteValue:"Extract discrete value generation curve",text_buffer:"Buffer",text_specifyTheDistance:"Specify the distance to create the surrounding area",text_label_analysisLayer:"Analysis layer",text_label_extractField:"Extract field",text_label_extractedValue:"Extracted value",text_label_distanceAttenuation:"Distance attenuation",text_label_gridSize:"gridSize",text_label_bufferRadius:"Buffer radius",text_label_defaultkilometers:"Default 10 kilometers",text_label_kilometer:"kilometer",text_label_unit:"unit",text_retainOriginal:"Retain original object field",text_mergeBuffer:"Merge buffer",text_label_color:"Color",text_label_buffer:"[Buffer]",text_label_isolines:"[Isolines]",text_label_queryRangeTips:"The default is the full range of input data. Example: -74.050, 40.650, -73.850, 40.850",text_label_queryModel:"Query mode",text_label_IDArrayOfFeatures:"ID array of features",text_label_maxFeatures:"The maximum number of features that can be returned",text_label_bufferDistance:"Buffer distance",text_label_queryRange1:"Query range",text_label_spatialQueryMode:"Spatial query mode",text_label_featureFilter:"Feature filter",text_label_geometricObject:"Geometric object",text_label_queryMode:"Query mode",text_label_searchTips:"Search for city locations or layer features",text_label_chooseSearchLayers:"Select a query layer",text_loadSearchCriteria:"Load search criteria",text_saveSearchCriteria:"Save search criteria",btn_analyze:"Analyze",btn_analyzing:"Analyzing",btn_emptyTheAnalysisLayer:"Empty the analysis layer",btn_cancelAnalysis:"Cancel",btn_query:"Query",btn_querying:"Querying",btn_emptyTheRresultLayer:"Clear all result layers","msg_dataReturnedIsEmpty.":"The request is successful and the data returned by the query is empty.",msg_dataFlowServiceHasBeenSubscribed:"The data stream service has been subscribed to.",msg_inputDataFlowUrlFirst:"Please enter the data stream service address first.",msg_datasetOrMethodUnsupport:"This dataset does not support this analysis type. Please reselect the dataset.",msg_selectDataset:"Please select a data set!",msg_setTheWeightField:"Please set the weight field!",msg_theFieldNotSupportAnalysis:"The field you currently select does not support analysis!",msg_resultIsEmpty:"The result of the analysis is empty!",msg_openFileFail:"Failed to open file!",msg_fileTypeUnsupported:"File format is not supported!",msg_fileSizeExceeded:"File size exceeded! The file size should not exceed 10M!",msg_dataInWrongGeoJSONFormat:"Wrong data format! Non standard GEOJSON format data!",msg_dataInWrongFormat:"Wrong data format! Non standard EXCEL, CSV or GEOJSON format data!",msg_searchKeywords:"Search keywords cannot be empty. Please enter your search criteria.",msg_searchGeocodeField:"Did not match the address matching service data!",msg_cityGeocodeField:"The address matching service of the current city is not configured.",msg_getFeatureField:"No related vector features found!",msg_dataflowservicesubscribed:"The data stream service has been subscribed to.",msg_subscribesucceeded:"The data stream service subscription was successful.",msg_crsunsupport:"Does not support the coordinate system of the current map",msg_tilematrixsetunsupport:"Incoming TileMatrixSet is not supported",msg_jsonResolveFiled:"JSON format parsing failure!",msg_requestContentFiled:"Failed to request data through iportal!",msg_getdatafailed:"Failed to get data!"};s.Lang["zh-CN"]={title_dataFlowService:"数据流服务",title_distributedAnalysis:"分布式分析",title_clientComputing:"客户端计算",title_dataServiceQuery:"数据服务查询",title_searchCity:"搜索城市",title_searchLayer:"搜索图层",text_input_value_inputDataFlowUrl:"请输入数据流服务地址如:ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"显示要素信息",text_subscribe:"订阅",text_cancelSubscribe:"取消订阅",text_densityAnalysis:"密度分析",text_CalculateTheValuePerUnitArea:"计算点指定邻域形状内的每单位面积量值",text_option_selectDataset:"请选择数据集",text_label_dataset:"数据集",text_option_simplePointDensityAnalysis:"简单点密度分析",text_option_nuclearDensityAnalysis:"核密度分析",text_label_analyticalMethod:"分析方法",text_option_quadrilateral:"四边形",text_option_hexagon:"六边形",text_label_meshType:"网格面类型",text_option_notSet:"未设置",text_label_weightField:"权重字段",text_label_gridSizeInMeters:"网格大小",text_label_searchRadius:"搜索半径",text_label_queryRange:"分析范围",text_label_areaUnit:"面积单位",text_option_equidistantSegmentation:"等距离分段",text_option_logarithm:"对数",text_option_equalCountingSegment:"等计数分段",text_option_squareRootSegmentation:"平方根分段",text_label_thematicMapSegmentationMode:"专题图分段模式",text_label_thematicMapSegmentationParameters:"专题图分段参数",text_option_greenOrangePurpleGradient:"绿橙紫渐变",text_option_greenOrangeRedGradient:"绿橙红渐变",text_option_rainbowGradient:"彩虹渐变",text_option_spectralGradient:"光谱渐变",text_option_terrainGradient:"地形渐变",text_label_thematicMapColorGradientMode:"专题图颜色渐变模式",text_label_resultLayerName:"结果图层名称",text_chooseFile:"选择文件",text_isoline:"等值线",text_extractDiscreteValue:"提取离散值生成曲线",text_buffer:"缓冲区",text_specifyTheDistance:"指定距离创建周边区域",text_label_analysisLayer:"分析图层",text_label_extractField:"提取字段",text_label_extractedValue:"提取值",text_label_distanceAttenuation:"距离衰减",text_label_gridSize:"栅格大小",text_label_bufferRadius:"缓冲半径",text_label_defaultkilometers:"默认10千米",text_option_kilometer:"千米",text_label_unit:"单位",text_retainOriginal:"保留原对象字段属性",text_mergeBuffer:"合并缓冲区",text_label_color:"颜色",text_label_buffer:"[缓冲区]",text_label_isolines:"[等值线]",text_label_queryRangeTips:"默认为输入数据的全幅范围。范例:-74.050,40.650,-73.850,40.850",text_label_IDArrayOfFeatures:"要素 ID 数组",text_label_maxFeatures:"最多可返回的要素数量",text_label_bufferDistance:"缓冲区距离",text_label_queryRange1:"查询范围",text_label_spatialQueryMode:"空间查询模式",text_label_featureFilter:"要素过滤器",text_label_geometricObject:"几何对象",text_label_queryMode:"查询模式",text_label_searchTips:"搜索城市地点或图层要素",text_label_chooseSearchLayers:"选择查询图层",text_loadSearchCriteria:"加载搜索条件",text_saveSearchCriteria:"保存搜索条件",btn_analyze:"分析",btn_analyzing:"分析中",btn_emptyTheAnalysisLayer:"清空分析图层",btn_cancelAnalysis:"取消",btn_query:"查询",btn_querying:"查询中",btn_emptyTheRresultLayer:"清除所有结果图层",msg_dataFlowServiceHasBeenSubscribed:"已订阅该数据流服务。",msg_inputDataFlowUrlFirst:"请先输入数据流服务地址。",msg_datasetOrMethodUnsupport:"该数据集不支持本分析类型,请重新选择数据集",msg_selectDataset:"请选择数据集!",msg_setTheWeightField:"请设置权重字段!",msg_theFieldNotSupportAnalysis:"您当前选择的字段不支持分析!",msg_resultIsEmpty:"分析的结果为空!",msg_dataReturnedIsEmpty:"请求成功,查询返回的数据为空。",msg_openFileFail:"打开文件失败!",msg_fileTypeUnsupported:"不支持该文件格式!",msg_fileSizeExceeded:"文件大小超限!文件大小不得超过 10M!",msg_dataInWrongGeoJSONFormat:"数据格式错误!非标准的 GEOJSON 格式数据!",msg_dataInWrongFormat:"数据格式错误!非标准的 EXCEL, CSV 或 GEOJSON 格式数据!",msg_searchKeywords:"搜索关键字不能为空,请输入搜索条件。",msg_searchGeocodeField:"未匹配到地址匹配服务数据!",msg_cityGeocodeField:"未配置当前城市的地址匹配服务。",msg_getFeatureField:"未查找到相关矢量要素!",msg_dataflowservicesubscribed:"已订阅该数据流服务。",msg_subscribesucceeded:"数据流服务订阅成功。",msg_crsunsupport:"不支持当前地图的坐标系",msg_tilematrixsetunsupport:"不支持传入的TileMatrixSet",msg_jsonResolveFiled:"json格式解析失败!",msg_requestContentFiled:"通过iportal请求数据失败!",msg_getdatafailed:"获取数据失败!"};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Xa=i(0),Ka=i.n(Xa);
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
Ka.a.Projection={};var Za=Ka.a.Class.extend({initialize:function(e){this.bounds=e},project:function(e){return new Ka.a.Point(e.lng,e.lat)},unproject:function(e){return new Ka.a.LatLng(e.y,e.x)}}),$a=function(e){return new Za(e)},eo=Ka.a.Class.extend({includes:Ka.a.CRS,initialize:function(e){e.origin&&(this.transformation=new Ka.a.Transformation(1,-e.origin.x,-1,e.origin.y)),this.projection=Ka.a.Projection.NonProjection(e.bounds),this.bounds=e.bounds,this.origin=e.origin,this.resolutions=e.resolutions},scale:function(e){let t;if(this.resolutions&&0!==this.resolutions.length)t=1/this.resolutions[0];else{t=1/(Math.max(this.bounds.getSize().x,this.bounds.getSize().y)/256)}return t*Math.pow(2,e)},zoom:function(e){let t;if(this.resolutions&&0!==this.resolutions.length)t=1/this.resolutions[0];else{t=1/(Math.max(this.bounds.getSize().x,this.bounds.getSize().y)/256)}return Math.log(e/t)/Math.LN2},distance:function(e,t){var i=t.lng-e.lng,s=t.lat-e.lat;return Math.sqrt(i*i+s*s)},infinite:!1}),to=function(e){return new eo(e)};Ka.a.Projection.NonProjection=$a,Ka.a.CRS.NonEarthCRS=to;var io=1,so=2,ro=4,no=5,ao=484813681109536e-20,oo=Math.PI/2,lo=.16666666666666666,ho=.04722222222222222,uo=.022156084656084655,co=1e-10,po=.017453292519943295,fo=57.29577951308232,mo=Math.PI/4,yo=2*Math.PI,go=3.14159265359,vo={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},So={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},bo=/[\s_\-\/\(\)]/g;function _o(e,t){if(e[t])return e[t];for(var i,s=Object.keys(e),r=t.toLowerCase().replace(bo,""),n=-1;++n<s.length;)if((i=s[n]).toLowerCase().replace(bo,"")===r)return e[i]}var xo=function(e){var t,i,s,r={},n=e.split("+").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var i=t.split("=");return i.push(!0),e[i[0].toLowerCase()]=i[1],e},{}),a={proj:"projName",datum:"datumCode",rf:function(e){r.rf=parseFloat(e)},lat_0:function(e){r.lat0=e*po},lat_1:function(e){r.lat1=e*po},lat_2:function(e){r.lat2=e*po},lat_ts:function(e){r.lat_ts=e*po},lon_0:function(e){r.long0=e*po},lon_1:function(e){r.long1=e*po},lon_2:function(e){r.long2=e*po},alpha:function(e){r.alpha=parseFloat(e)*po},lonc:function(e){r.longc=e*po},x_0:function(e){r.x0=parseFloat(e)},y_0:function(e){r.y0=parseFloat(e)},k_0:function(e){r.k0=parseFloat(e)},k:function(e){r.k0=parseFloat(e)},a:function(e){r.a=parseFloat(e)},b:function(e){r.b=parseFloat(e)},r_a:function(){r.R_A=!0},zone:function(e){r.zone=parseInt(e,10)},south:function(){r.utmSouth=!0},towgs84:function(e){r.datum_params=e.split(",").map(function(e){return parseFloat(e)})},to_meter:function(e){r.to_meter=parseFloat(e)},units:function(e){r.units=e;var t=_o(So,e);t&&(r.to_meter=t.to_meter)},from_greenwich:function(e){r.from_greenwich=e*po},pm:function(e){var t=_o(vo,e);r.from_greenwich=(t||parseFloat(e))*po},nadgrids:function(e){"@null"===e?r.datumCode="none":r.nadgrids=e},axis:function(e){3===e.length&&-1!=="ewnsud".indexOf(e.substr(0,1))&&-1!=="ewnsud".indexOf(e.substr(1,1))&&-1!=="ewnsud".indexOf(e.substr(2,1))&&(r.axis=e)}};for(t in n)i=n[t],t in a?"function"==typeof(s=a[t])?s(i):r[s]=i:r[t]=i;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r},Co=function(e){return new Po(e).output()},To=1,Mo=/\s/,wo=/[A-Za-z]/,Eo=/[A-Za-z84]/,Ao=/[,\]]/,Lo=/[\d\.E\-\+]/;function Po(e){if("string"!=typeof e)throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=To}function No(e,t,i){Array.isArray(t)&&(i.unshift(t),t=null);var s=t?{}:e,r=i.reduce(function(e,t){return Oo(t,e),e},s);t&&(e[t]=r)}function Oo(e,t){if(Array.isArray(e)){var i=e.shift();if("PARAMETER"===i&&(i=e.shift()),1===e.length)return Array.isArray(e[0])?(t[i]={},void Oo(e[0],t[i])):void(t[i]=e[0]);if(e.length)if("TOWGS84"!==i){if("AXIS"===i)return i in t||(t[i]=[]),void t[i].push(e);var s;switch(Array.isArray(i)||(t[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return t[i]={name:e[0].toLowerCase(),convert:e[1]},void(3===e.length&&Oo(e[2],t[i]));case"SPHEROID":case"ELLIPSOID":return t[i]={name:e[0],a:e[1],rf:e[2]},void(4===e.length&&Oo(e[3],t[i]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return e[0]=["name",e[0]],void No(t,i,e);default:for(s=-1;++s<e.length;)if(!Array.isArray(e[s]))return Oo(e,t[i]);return No(t,i,e)}}else t[i]=e;else t[i]=!0}else t[e]=!0}Po.prototype.readCharicter=function(){var e=this.text[this.place++];if(4!==this.state)for(;Mo.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case To:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},Po.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(Ao.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},Po.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=To)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=To,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},Po.prototype.number=function(e){if(!Lo.test(e)){if(Ao.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},Po.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},Po.prototype.keyword=function(e){if(Eo.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=To)}if(!Ao.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},Po.prototype.neutral=function(e){if(wo.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(Lo.test(e))return this.word=e,void(this.state=3);if(!Ao.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},Po.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var Io=.017453292519943295;function Fo(e){return e*Io}var Ro,Do=function(e){var t=Co(e),i=t.shift(),s=t.shift();t.unshift(["name",s]),t.unshift(["type",i]);var r={};return Oo(t,r),function(e){if("GEOGCS"===e.type?e.projName="longlat":"LOCAL_CS"===e.type?(e.projName="identity",e.local=!0):"object"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",i=0,s=e.AXIS.length;i<s;++i){var r=e.AXIS[i][0].toLowerCase();-1!==r.indexOf("north")?t+="n":-1!==r.indexOf("south")?t+="s":-1!==r.indexOf("east")?t+="e":-1!==r.indexOf("west")&&(t+="w")}2===t.length&&(t+="u"),3===t.length&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.UNIT.convert&&("GEOGCS"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var n=e.GEOGCS;function a(t){return t*(e.to_meter||1)}"GEOGCS"===e.type&&(n=e),n&&(n.DATUM?e.datumCode=n.DATUM.name.toLowerCase():e.datumCode=n.name.toLowerCase(),"d_"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==e.datumCode&&"new_zealand_1949"!==e.datumCode||(e.datumCode="nzgd49"),"wgs_1984"!==e.datumCode&&"world_geodetic_system_1984"!==e.datumCode||("Mercator_Auxiliary_Sphere"===e.PROJECTION&&(e.sphere=!0),e.datumCode="wgs84"),"_ferro"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),"_jakarta"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),n.DATUM&&n.DATUM.SPHEROID&&(e.ellps=n.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps="intl"),e.a=n.DATUM.SPHEROID.a,e.rf=parseFloat(n.DATUM.SPHEROID.rf,10)),n.DATUM&&n.DATUM.TOWGS84&&(e.datum_params=n.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),"ch1903+"===e.datumCode&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Fo],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Fo],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",Fo],["lat0","latitude_of_origin",Fo],["lat0","standard_parallel_1",Fo],["lat1","standard_parallel_1",Fo],["lat2","standard_parallel_2",Fo],["azimuth","Azimuth"],["alpha","azimuth",Fo],["srsCode","name"]].forEach(function(t){return i=e,r=(s=t)[0],n=s[1],void(!(r in i)&&n in i&&(i[r]=i[n],3===s.length&&(i[r]=s[2](i[r]))));var i,s,r,n}),e.long0||!e.longc||"Albers_Conic_Equal_Area"!==e.projName&&"Lambert_Azimuthal_Equal_Area"!==e.projName||(e.long0=e.longc),e.lat_ts||!e.lat1||"Stereographic_South_Pole"!==e.projName&&"Polar Stereographic (variant B)"!==e.projName||(e.lat0=Fo(e.lat1>0?90:-90),e.lat_ts=e.lat1)}(r),r};function ko(e){var t=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?ko[e]=xo(arguments[1]):ko[e]=Do(arguments[1]):ko[e]=i}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?ko.apply(t,e):ko(e)});if("string"==typeof e){if(e in ko)return ko[e]}else"EPSG"in e?ko["EPSG:"+e.EPSG]=e:"ESRI"in e?ko["ESRI:"+e.ESRI]=e:"IAU2000"in e?ko["IAU2000:"+e.IAU2000]=e:console.log(e);return}}(Ro=ko)("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),Ro("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),Ro("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),Ro.WGS84=Ro["EPSG:4326"],Ro["EPSG:3785"]=Ro["EPSG:3857"],Ro.GOOGLE=Ro["EPSG:3857"],Ro["EPSG:900913"]=Ro["EPSG:3857"],Ro["EPSG:102113"]=Ro["EPSG:3857"];var Bo=ko;var Uo=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var Go=["3857","900913","3785","102113"];var jo=function(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in Bo}(e))return Bo[e];if(function(e){return Uo.some(function(t){return e.indexOf(t)>-1})}(e)){var t=Do(e);if(function(e){var t=_o(e,"authority");if(t){var i=_o(t,"epsg");return i&&Go.indexOf(i)>-1}}(t))return Bo["EPSG:3857"];var i=function(e){var t=_o(e,"extension");if(t)return _o(t,"proj4")}(t);return i?xo(i):t}return function(e){return"+"===e[0]}(e)?xo(e):void 0},zo=function(e,t){var i,s;if(e=e||{},!t)return e;for(s in t)void 0!==(i=t[s])&&(e[s]=i);return e},Vo=function(e,t,i){var s=e*t;return i/Math.sqrt(1-s*s)},Ho=function(e){return e<0?-1:1},Jo=function(e){return Math.abs(e)<=go?e:e-Ho(e)*yo},qo=function(e,t,i){var s=e*i,r=.5*e;return s=Math.pow((1-s)/(1+s),r),Math.tan(.5*(oo-t))/s},Wo=function(e,t){for(var i,s,r=.5*e,n=oo-2*Math.atan(t),a=0;a<=15;a++)if(i=e*Math.sin(n),n+=s=oo-2*Math.atan(t*Math.pow((1-i)/(1+i),r))-n,Math.abs(s)<=1e-10)return n;return-9999};function Yo(e){return e}var Qo=[{init:function(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Vo(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(e){var t,i,s=e.x,r=e.y;if(r*fo>90&&r*fo<-90&&s*fo>180&&s*fo<-180)return null;if(Math.abs(Math.abs(r)-oo)<=co)return null;if(this.sphere)t=this.x0+this.a*this.k0*Jo(s-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(mo+.5*r));else{var n=Math.sin(r),a=qo(this.e,r,n);t=this.x0+this.a*this.k0*Jo(s-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=i,e},inverse:function(e){var t,i,s=e.x-this.x0,r=e.y-this.y0;if(this.sphere)i=oo-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var n=Math.exp(-r/(this.a*this.k0));if(-9999===(i=Wo(this.e,n)))return null}return t=Jo(this.long0+s/(this.a*this.k0)),e.x=t,e.y=i,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:Yo,inverse:Yo,names:["longlat","identity"]}],Xo={},Ko=[];function Zo(e,t){var i=Ko.length;return e.names?(Ko[i]=e,e.names.forEach(function(e){Xo[e.toLowerCase()]=i}),this):(console.log(t),!0)}var $o={start:function(){Qo.forEach(Zo)},add:Zo,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==Xo[t]&&Ko[Xo[t]]?Ko[Xo[t]]:void 0}},el={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},tl=el.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};el.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var il={};il.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},il.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},il.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},il.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},il.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},il.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},il.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},il.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},il.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},il.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},il.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},il.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},il.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},il.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},il.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},il.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},il.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var sl=function(e,t,i,s,r,n){var a={};return a.datum_type=void 0===e||"none"===e?no:ro,t&&(a.datum_params=t.map(parseFloat),0===a.datum_params[0]&&0===a.datum_params[1]&&0===a.datum_params[2]||(a.datum_type=io),a.datum_params.length>3&&(0===a.datum_params[3]&&0===a.datum_params[4]&&0===a.datum_params[5]&&0===a.datum_params[6]||(a.datum_type=so,a.datum_params[3]*=ao,a.datum_params[4]*=ao,a.datum_params[5]*=ao,a.datum_params[6]=a.datum_params[6]/1e6+1))),a.a=i,a.b=s,a.es=r,a.ep2=n,a};function rl(e,t){if(!(this instanceof rl))return new rl(e);t=t||function(e){if(e)throw e};var i=jo(e);if("object"==typeof i){var s=rl.projections.get(i.projName);if(s){if(i.datumCode&&"none"!==i.datumCode){var r=_o(il,i.datumCode);r&&(i.datum_params=r.towgs84?r.towgs84.split(","):null,i.ellps=r.ellipse,i.datumName=r.datumName?r.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84";var n,a,o,l,h,u,c,d=function(e,t,i,s,r){if(!e){var n=_o(el,s);n||(n=tl),e=n.a,t=n.b,i=n.rf}return i&&!t&&(t=(1-1/i)*e),(0===i||Math.abs(e-t)<co)&&(r=!0,t=e),{a:e,b:t,rf:i,sphere:r}}(i.a,i.b,i.rf,i.ellps,i.sphere),p=(n=d.a,a=d.b,d.rf,o=i.R_A,u=((l=n*n)-(h=a*a))/l,c=0,o?(l=(n*=1-u*(lo+u*(ho+u*uo)))*n,u=0):c=Math.sqrt(u),{es:u,e:c,ep2:(l-h)/h}),f=i.datum||sl(i.datumCode,i.datum_params,d.a,d.b,p.es,p.ep2);zo(this,i),zo(this,s),this.a=d.a,this.b=d.b,this.rf=d.rf,this.sphere=d.sphere,this.es=p.es,this.e=p.e,this.ep2=p.ep2,this.datum=f,this.init(),t(null,this)}else t(e)}else t(e)}rl.projections=$o,rl.projections.start();var nl=rl;function al(e,t,i){var s,r,n,a,o=e.x,l=e.y,h=e.z?e.z:0;if(l<-oo&&l>-1.001*oo)l=-oo;else if(l>oo&&l<1.001*oo)l=oo;else{if(l<-oo)return{x:-1/0,y:-1/0,z:e.z};if(l>oo)return{x:1/0,y:1/0,z:e.z}}return o>Math.PI&&(o-=2*Math.PI),r=Math.sin(l),a=Math.cos(l),n=r*r,{x:((s=i/Math.sqrt(1-t*n))+h)*a*Math.cos(o),y:(s+h)*a*Math.sin(o),z:(s*(1-t)+h)*r}}function ol(e,t,i,s){var r,n,a,o,l,h,u,c,d,p,f,m,y,g,v,S=e.x,b=e.y,_=e.z?e.z:0;if(r=Math.sqrt(S*S+b*b),n=Math.sqrt(S*S+b*b+_*_),r/i<1e-12){if(g=0,n/i<1e-12)return oo,v=-s,{x:e.x,y:e.y,z:e.z}}else g=Math.atan2(b,S);a=_/n,c=(o=r/n)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*o*o)),d=a*l,y=0;do{y++,h=t*(u=i/Math.sqrt(1-t*d*d))/(u+(v=r*c+_*d-u*(1-t*d*d))),m=(f=a*(l=1/Math.sqrt(1-h*(2-h)*o*o)))*c-(p=o*(1-h)*l)*d,c=p,d=f}while(m*m>1e-24&&y<30);return{x:g,y:Math.atan(f/Math.abs(p)),z:v}}function ll(e){return e===io||e===so}var hl=function(e,t,i){return function(e,t){return e.datum_type===t.datum_type&&!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===io?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==so||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}(e,t)?i:e.datum_type===no||t.datum_type===no?i:e.es!==t.es||e.a!==t.a||ll(e.datum_type)||ll(t.datum_type)?(i=al(i,e.es,e.a),ll(e.datum_type)&&(i=function(e,t,i){if(t===io)return{x:e.x+i[0],y:e.y+i[1],z:e.z+i[2]};if(t===so){var s=i[0],r=i[1],n=i[2],a=i[3],o=i[4],l=i[5],h=i[6];return{x:h*(e.x-l*e.y+o*e.z)+s,y:h*(l*e.x+e.y-a*e.z)+r,z:h*(-o*e.x+a*e.y+e.z)+n}}}(i,e.datum_type,e.datum_params)),ll(t.datum_type)&&(i=function(e,t,i){if(t===io)return{x:e.x-i[0],y:e.y-i[1],z:e.z-i[2]};if(t===so){var s=i[0],r=i[1],n=i[2],a=i[3],o=i[4],l=i[5],h=i[6],u=(e.x-s)/h,c=(e.y-r)/h,d=(e.z-n)/h;return{x:u+l*c-o*d,y:-l*u+c+a*d,z:o*u-a*c+d}}}(i,t.datum_type,t.datum_params)),ol(i,t.es,t.a,t.b)):i},ul=function(e,t,i){var s,r,n,a=i.x,o=i.y,l=i.z||0,h={};for(n=0;n<3;n++)if(!t||2!==n||void 0!==i.z)switch(0===n?(s=a,r="x"):1===n?(s=o,r="y"):(s=l,r="z"),e.axis[n]){case"e":h[r]=s;break;case"w":h[r]=-s;break;case"n":h[r]=s;break;case"s":h[r]=-s;break;case"u":void 0!==i[r]&&(h.z=s);break;case"d":void 0!==i[r]&&(h.z=-s);break;default:return null}return h},cl=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t},dl=function(e){pl(e.x),pl(e.y)};function pl(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function fl(e,t,i){var s;return Array.isArray(i)&&(i=cl(i)),dl(i),e.datum&&t.datum&&function(e,t){return(e.datum.datum_type===io||e.datum.datum_type===so)&&"WGS84"!==t.datumCode||(t.datum.datum_type===io||t.datum.datum_type===so)&&"WGS84"!==e.datumCode}(e,t)&&(i=fl(e,s=new nl("WGS84"),i),e=s),"enu"!==e.axis&&(i=ul(e,!1,i)),"longlat"===e.projName?i={x:i.x*po,y:i.y*po,z:i.z||0}:(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),i=e.inverse(i)),e.from_greenwich&&(i.x+=e.from_greenwich),i=hl(e.datum,t.datum,i),t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),"longlat"===t.projName?i={x:i.x*fo,y:i.y*fo,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),"enu"!==t.axis?ul(t,!0,i):i}var ml=nl("WGS84");function yl(e,t,i){var s,r,n;return Array.isArray(i)?(s=fl(e,t,i)||{x:NaN,y:NaN},i.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof s.z?[s.x,s.y,s.z].concat(i.splice(3)):[s.x,s.y,i[2]].concat(i.splice(3)):[s.x,s.y].concat(i.splice(2)):[s.x,s.y]):(r=fl(e,t,i),2===(n=Object.keys(i)).length?r:(n.forEach(function(s){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===s||"y"===s||"z"===s)return}else if("x"===s||"y"===s)return;r[s]=i[s]}),r))}function gl(e){return e instanceof nl?e:e.oProj?e.oProj:nl(e)}var vl=function(e,t,i){e=gl(e);var s,r=!1;return void 0===t?(t=e,e=ml,r=!0):(void 0!==t.x||Array.isArray(t))&&(i=t,t=e,e=ml,r=!0),t=gl(t),i?yl(e,t,i):(s={forward:function(i){return yl(e,t,i)},inverse:function(i){return yl(t,e,i)}},r&&(s.oProj=t),s)},Sl=6,bl="AJSAJS",_l="AFAFAF",xl=65,Cl=73,Tl=79,Ml=86,wl=90,El={forward:Al,inverse:function(e){var t=Ol(Fl(e.toUpperCase()));if(t.lat&&t.lon)return[t.lon,t.lat,t.lon,t.lat];return[t.left,t.bottom,t.right,t.top]},toPoint:Ll};function Al(e,t){return t=t||5,function(e,t){var i="00000"+e.easting,s="00000"+e.northing;return e.zoneNumber+e.zoneLetter+(p=e.easting,f=e.northing,m=e.zoneNumber,y=Il(m),g=Math.floor(p/1e5),v=Math.floor(f/1e5)%20,r=g,n=v,a=y,o=a-1,l=bl.charCodeAt(o),h=_l.charCodeAt(o),u=l+r-1,c=h+n,d=!1,u>wl&&(u=u-wl+xl-1,d=!0),(u===Cl||l<Cl&&u>Cl||(u>Cl||l<Cl)&&d)&&u++,(u===Tl||l<Tl&&u>Tl||(u>Tl||l<Tl)&&d)&&++u===Cl&&u++,u>wl&&(u=u-wl+xl-1),c>Ml?(c=c-Ml+xl-1,d=!0):d=!1,(c===Cl||h<Cl&&c>Cl||(c>Cl||h<Cl)&&d)&&c++,(c===Tl||h<Tl&&c>Tl||(c>Tl||h<Tl)&&d)&&++c===Cl&&c++,c>Ml&&(c=c-Ml+xl-1),String.fromCharCode(u)+String.fromCharCode(c))+i.substr(i.length-5,t)+s.substr(s.length-5,t);var r,n,a,o,l,h,u,c,d;var p,f,m,y,g,v}(function(e){var t,i,s,r,n,a,o,l=e.lat,h=e.lon,u=6378137,c=Pl(l),d=Pl(h);o=Math.floor((h+180)/6)+1,180===h&&(o=60);l>=56&&l<64&&h>=3&&h<12&&(o=32);l>=72&&l<84&&(h>=0&&h<9?o=31:h>=9&&h<21?o=33:h>=21&&h<33?o=35:h>=33&&h<42&&(o=37));a=Pl(6*(o-1)-180+3),.006739496752268451,t=u/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),i=Math.tan(c)*Math.tan(c),s=.006739496752268451*Math.cos(c)*Math.cos(c),r=Math.cos(c)*(d-a),n=u*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c));var p=.9996*t*(r+(1-i+s)*r*r*r/6+(5-18*i+i*i+72*s-.39089081163157013)*r*r*r*r*r/120)+5e5,f=.9996*(n+t*Math.tan(c)*(r*r/2+(5-i+9*s+4*s*s)*r*r*r*r/24+(61-58*i+i*i+600*s-2.2240339282485886)*r*r*r*r*r*r/720));l<0&&(f+=1e7);return{northing:Math.round(f),easting:Math.round(p),zoneNumber:o,zoneLetter:function(e){var t="Z";84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C");return t}(l)}}({lat:e[1],lon:e[0]}),t)}function Ll(e){var t=Ol(Fl(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Pl(e){return e*(Math.PI/180)}function Nl(e){return e/Math.PI*180}function Ol(e){var t=e.northing,i=e.easting,s=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var n,a,o,l,h,u,c,d,p=6378137,f=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),m=i-5e5,y=t;s<"N"&&(y-=1e7),u=6*(r-1)-180+3,d=(c=y/.9996/6367449.145945056)+(3*f/2-27*f*f*f/32)*Math.sin(2*c)+(21*f*f/16-55*f*f*f*f/32)*Math.sin(4*c)+151*f*f*f/96*Math.sin(6*c),n=p/Math.sqrt(1-.00669438*Math.sin(d)*Math.sin(d)),a=Math.tan(d)*Math.tan(d),o=.006739496752268451*Math.cos(d)*Math.cos(d),l=.99330562*p/Math.pow(1-.00669438*Math.sin(d)*Math.sin(d),1.5),h=m/(.9996*n);var g=d-n*Math.tan(d)/l*(h*h/2-(5+3*a+10*o-4*o*o-.06065547077041606)*h*h*h*h/24+(61+90*a+298*o+45*a*a-1.6983531815716497-3*o*o)*h*h*h*h*h*h/720);g=Nl(g);var v,S=(h-(1+2*a+o)*h*h*h/6+(5-2*o+28*a-3*o*o+.05391597401814761+24*a*a)*h*h*h*h*h/120)/Math.cos(d);if(S=u+Nl(S),e.accuracy){var b=Ol({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});v={top:b.lat,right:b.lon,bottom:g,left:S}}else v={lat:g,lon:S};return v}function Il(e){var t=e%Sl;return 0===t&&(t=Sl),t}function Fl(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,i=e.length,s=null,r="",n=0;!/[A-Z]/.test(t=e.charAt(n));){if(n>=2)throw"MGRSPoint bad conversion from: "+e;r+=t,n++}var a=parseInt(r,10);if(0===n||n+3>i)throw"MGRSPoint bad conversion from: "+e;var o=e.charAt(n++);if(o<="A"||"B"===o||"Y"===o||o>="Z"||"I"===o||"O"===o)throw"MGRSPoint zone letter "+o+" not handled: "+e;s=e.substring(n,n+=2);for(var l=Il(a),h=function(e,t){var i=bl.charCodeAt(t-1),s=1e5,r=!1;for(;i!==e.charCodeAt(0);){if(++i===Cl&&i++,i===Tl&&i++,i>wl){if(r)throw"Bad character: "+e;i=xl,r=!0}s+=1e5}return s}(s.charAt(0),l),u=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;var i=_l.charCodeAt(t-1),s=0,r=!1;for(;i!==e.charCodeAt(0);){if(++i===Cl&&i++,i===Tl&&i++,i>Ml){if(r)throw"Bad character: "+e;i=xl,r=!0}s+=1e5}return s}(s.charAt(1),l);u<Rl(o);)u+=2e6;var c=i-n;if(c%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+e;var d,p,f,m=c/2,y=0,g=0;return m>0&&(d=1e5/Math.pow(10,m),p=e.substring(n,n+m),y=parseFloat(p)*d,f=e.substring(n+m),g=parseFloat(f)*d),{easting:y+h,northing:g+u,zoneLetter:o,zoneNumber:a,accuracy:d}}function Rl(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function Dl(e,t,i){if(!(this instanceof Dl))return new Dl(e,t,i);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var s=e.split(",");this.x=parseFloat(s[0],10),this.y=parseFloat(s[1],10),this.z=parseFloat(s[2],10)||0}else this.x=e,this.y=t,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Dl.fromMGRS=function(e){return new Dl(Ll(e))},Dl.prototype.toMGRS=function(e){return Al([this.x,this.y],e)};var kl=Dl,Bl=.01068115234375,Ul=function(e){var t=[];t[0]=1-e*(.25+e*(.046875+e*(.01953125+e*Bl))),t[1]=e*(.75-e*(.046875+e*(.01953125+e*Bl)));var i=e*e;return t[2]=i*(.46875-e*(.013020833333333334+.007120768229166667*e)),i*=e,t[3]=i*(.3645833333333333-.005696614583333333*e),t[4]=i*e*.3076171875,t},Gl=function(e,t,i,s){return i*=t,t*=t,s[0]*e-i*(s[1]+t*(s[2]+t*(s[3]+t*s[4])))},jl=function(e,t,i){for(var s=1/(1-t),r=e,n=20;n;--n){var a=Math.sin(r),o=1-t*a*a;if(r-=o=(Gl(r,a,Math.cos(r),i)-e)*(o*Math.sqrt(o))*s,Math.abs(o)<co)return r}return r};var zl={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Ul(this.es),this.ml0=Gl(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(e){var t,i,s,r=e.x,n=e.y,a=Jo(r-this.long0),o=Math.sin(n),l=Math.cos(n);if(this.es){var h=l*a,u=Math.pow(h,2),c=this.ep2*Math.pow(l,2),d=Math.pow(c,2),p=Math.abs(l)>co?Math.tan(n):0,f=Math.pow(p,2),m=Math.pow(f,2);t=1-this.es*Math.pow(o,2),h/=Math.sqrt(t);var y=Gl(n,o,l,this.en);i=this.a*(this.k0*h*(1+u/6*(1-f+c+u/20*(5-18*f+m+14*c-58*f*c+u/42*(61+179*m-m*f-479*f)))))+this.x0,s=this.a*(this.k0*(y-this.ml0+o*a*h/2*(1+u/12*(5-f+9*c+4*d+u/30*(61+m-58*f+270*c-330*f*c+u/56*(1385+543*m-m*f-3111*f))))))+this.y0}else{var g=l*Math.sin(a);if(Math.abs(Math.abs(g)-1)<co)return 93;if(i=.5*this.a*this.k0*Math.log((1+g)/(1-g))+this.x0,s=l*Math.cos(a)/Math.sqrt(1-Math.pow(g,2)),(g=Math.abs(s))>=1){if(g-1>co)return 93;s=0}else s=Math.acos(s);n<0&&(s=-s),s=this.a*this.k0*(s-this.lat0)+this.y0}return e.x=i,e.y=s,e},inverse:function(e){var t,i,s,r,n=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,i=jl(t,this.es,this.en),Math.abs(i)<oo){var o=Math.sin(i),l=Math.cos(i),h=Math.abs(l)>co?Math.tan(i):0,u=this.ep2*Math.pow(l,2),c=Math.pow(u,2),d=Math.pow(h,2),p=Math.pow(d,2);t=1-this.es*Math.pow(o,2);var f=n*Math.sqrt(t)/this.k0,m=Math.pow(f,2);s=i-(t*=h)*m/(1-this.es)*.5*(1-m/12*(5+3*d-9*u*d+u-4*c-m/30*(61+90*d-252*u*d+45*p+46*u-m/56*(1385+3633*d+4095*p+1574*p*d)))),r=Jo(this.long0+f*(1-m/6*(1+2*d+u-m/20*(5+28*d+24*p+8*u*d+6*u-m/42*(61+662*d+1320*p+720*p*d))))/l)}else s=oo*Ho(a),r=0;else{var y=Math.exp(n/this.k0),g=.5*(y-1/y),v=this.lat0+a/this.k0,S=Math.cos(v);t=Math.sqrt((1-Math.pow(S,2))/(1+Math.pow(g,2))),s=Math.asin(t),a<0&&(s=-s),r=0===g&&0===S?0:Jo(Math.atan2(g,S)+this.long0)}return e.x=r,e.y=s,e},names:["Transverse_Mercator","Transverse Mercator","tmerc"]},Vl=function(e){var t=Math.exp(e);return t=(t-1/t)/2},Hl=function(e,t){e=Math.abs(e),t=Math.abs(t);var i=Math.max(e,t),s=Math.min(e,t)/(i||1);return i*Math.sqrt(1+Math.pow(s,2))},Jl=function(e){var t=Math.abs(e);return t=function(e){var t=1+e,i=t-1;return 0===i?e:e*Math.log(t)/i}(t*(1+t/(Hl(1,t)+1))),e<0?-t:t},ql=function(e,t){for(var i,s=2*Math.cos(2*t),r=e.length-1,n=e[r],a=0;--r>=0;)i=s*n-a+e[r],a=n,n=i;return t+i*Math.sin(2*t)},Wl=function(e,t){for(var i,s=2*Math.cos(t),r=e.length-1,n=e[r],a=0;--r>=0;)i=s*n-a+e[r],a=n,n=i;return Math.sin(t)*i},Yl=function(e,t,i){for(var s,r,n=Math.sin(t),a=Math.cos(t),o=Vl(i),l=function(e){var t=Math.exp(e);return t=(t+1/t)/2}(i),h=2*a*l,u=-2*n*o,c=e.length-1,d=e[c],p=0,f=0,m=0;--c>=0;)s=f,r=p,d=h*(f=d)-s-u*(p=m)+e[c],m=u*f-r+h*p;return[(h=n*l)*d-(u=a*o)*m,h*m+u*d]};var Ql={init:function(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),i=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),i*=t,this.cgb[1]=i*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),i*=t,this.cgb[2]=i*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=i*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),i*=t,this.cgb[3]=i*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=i*(1237/630+t*(t*(-24832/14175)-2.4)),i*=t,this.cgb[4]=i*(4174/315+t*(-144838/6237)),this.cbg[4]=i*(-734/315+t*(109598/31185)),i*=t,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+i*(.25+i*(1/64+i/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=i*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=i*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),i*=t,this.utg[2]=i*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=i*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),i*=t,this.utg[3]=i*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=i*(49561/161280+t*(-179/168+t*(6601661/7257600))),i*=t,this.utg[4]=i*(-4583/161280+t*(108847/3991680)),this.gtu[4]=i*(34729/80640+t*(-3418889/1995840)),i*=t,this.utg[5]=-.03233083094085698*i,this.gtu[5]=.6650675310896665*i;var s=ql(this.cbg,this.lat0);this.Zb=-this.Qn*(s+Wl(this.gtu,2*s))},forward:function(e){var t=Jo(e.x-this.long0),i=e.y;i=ql(this.cbg,i);var s=Math.sin(i),r=Math.cos(i),n=Math.sin(t),a=Math.cos(t);i=Math.atan2(s,a*r),t=Math.atan2(n*r,Hl(s,r*a)),t=Jl(Math.tan(t));var o,l,h=Yl(this.gtu,2*i,2*t);return i+=h[0],t+=h[1],Math.abs(t)<=2.623395162778?(o=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(o=1/0,l=1/0),e.x=o,e.y=l,e},inverse:function(e){var t,i,s=(e.x-this.x0)*(1/this.a),r=(e.y-this.y0)*(1/this.a);if(r=(r-this.Zb)/this.Qn,s/=this.Qn,Math.abs(s)<=2.623395162778){var n=Yl(this.utg,2*r,2*s);r+=n[0],s+=n[1],s=Math.atan(Vl(s));var a=Math.sin(r),o=Math.cos(r),l=Math.sin(s),h=Math.cos(s);r=Math.atan2(a*h,Hl(l,h*o)),s=Math.atan2(l,h*o),t=Jo(s+this.long0),i=ql(this.cgb,r)}else t=1/0,i=1/0;return e.x=t,e.y=i,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]},Xl=function(e,t){if(void 0===e){if((e=Math.floor(30*(Jo(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e};var Kl={init:function(){var e=Xl(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*po,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Ql.init.apply(this),this.forward=Ql.forward,this.inverse=Ql.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},Zl=function(e,t){return Math.pow((1-e)/(1+e),t)},$l=20;var eh={init:function(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+mo)/(Math.pow(Math.tan(.5*this.lat0+mo),this.C)*Zl(this.e*e,this.ratexp))},forward:function(e){var t=e.x,i=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+mo),this.C)*Zl(this.e*Math.sin(i),this.ratexp))-oo,e.x=this.C*t,e},inverse:function(e){for(var t=e.x/this.C,i=e.y,s=Math.pow(Math.tan(.5*i+mo)/this.K,1/this.C),r=$l;r>0&&(i=2*Math.atan(s*Zl(this.e*Math.sin(e.y),-.5*this.e))-oo,!(Math.abs(i-e.y)<1e-14));--r)e.y=i;return r?(e.x=t,e.y=i,e):null},names:["gauss"]};var th={init:function(){eh.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(e){var t,i,s,r;return e.x=Jo(e.x-this.long0),eh.forward.apply(this,[e]),t=Math.sin(e.y),i=Math.cos(e.y),s=Math.cos(e.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*i*s),e.x=r*i*Math.sin(e.x),e.y=r*(this.cosc0*t-this.sinc0*i*s),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(e){var t,i,s,r,n;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,n=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(n,this.R2);t=Math.sin(a),i=Math.cos(a),r=Math.asin(i*this.sinc0+e.y*t*this.cosc0/n),s=Math.atan2(e.x*t,n*this.cosc0*i-e.y*this.sinc0*t)}else r=this.phic0,s=0;return e.x=s,e.y=r,eh.inverse.apply(this,[e]),e.x=Jo(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var ih={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=co&&(this.k0=.5*(1+Ho(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=co&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=co&&(this.k0=.5*this.cons*Vo(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/qo(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Vo(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-oo,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var t,i,s,r,n,a,o=e.x,l=e.y,h=Math.sin(l),u=Math.cos(l),c=Jo(o-this.long0);return Math.abs(Math.abs(o-this.long0)-Math.PI)<=co&&Math.abs(l+this.lat0)<=co?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*h+this.coslat0*u*Math.cos(c)),e.x=this.a*t*u*Math.sin(c)+this.x0,e.y=this.a*t*(this.coslat0*h-this.sinlat0*u*Math.cos(c))+this.y0,e):(i=2*Math.atan(this.ssfn_(l,h,this.e))-oo,r=Math.cos(i),s=Math.sin(i),Math.abs(this.coslat0)<=co?(n=qo(this.e,l*this.con,this.con*h),a=2*this.a*this.k0*n/this.cons,e.x=this.x0+a*Math.sin(o-this.long0),e.y=this.y0-this.con*a*Math.cos(o-this.long0),e):(Math.abs(this.sinlat0)<co?(t=2*this.a*this.k0/(1+r*Math.cos(c)),e.y=t*s):(t=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*r*Math.cos(c))),e.y=t*(this.cosX0*s-this.sinX0*r*Math.cos(c))+this.y0),e.x=t*r*Math.sin(c)+this.x0,e))},inverse:function(e){var t,i,s,r,n;e.x-=this.x0,e.y-=this.y0;var a=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var o=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,i=this.lat0,a<=co?(e.x=t,e.y=i,e):(i=Math.asin(Math.cos(o)*this.sinlat0+e.y*Math.sin(o)*this.coslat0/a),t=Math.abs(this.coslat0)<co?this.lat0>0?Jo(this.long0+Math.atan2(e.x,-1*e.y)):Jo(this.long0+Math.atan2(e.x,e.y)):Jo(this.long0+Math.atan2(e.x*Math.sin(o),a*this.coslat0*Math.cos(o)-e.y*this.sinlat0*Math.sin(o))),e.x=t,e.y=i,e)}if(Math.abs(this.coslat0)<=co){if(a<=co)return i=this.lat0,t=this.long0,e.x=t,e.y=i,e;e.x*=this.con,e.y*=this.con,s=a*this.cons/(2*this.a*this.k0),i=this.con*Wo(this.e,s),t=this.con*Jo(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=co?n=this.X0:(n=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/a),t=Jo(this.long0+Math.atan2(e.x*Math.sin(r),a*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),i=-1*Wo(this.e,Math.tan(.5*(oo+n)));return e.x=t,e.y=i,e},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(e,t,i){return t*=i,Math.tan(.5*(oo+e))*Math.pow((1-t)/(1+t),.5*i)}};var sh={init:function(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),i=this.a,s=1/this.rf,r=2*s-Math.pow(s,2),n=this.e=Math.sqrt(r);this.R=this.k0*i*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+n*t)/(1-n*t));this.K=a-this.alpha*o+this.alpha*n/2*l},forward:function(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),s=-this.alpha*(t+i)+this.K,r=2*(Math.atan(Math.exp(s))-Math.PI/4),n=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(n)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(n))),o=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(n));return e.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,e.x=this.R*a+this.x0,e},inverse:function(e){for(var t=e.x-this.x0,i=e.y-this.y0,s=t/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),n=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(s)),a=Math.atan(Math.sin(s)/(Math.cos(this.b0)*Math.cos(s)-Math.sin(this.b0)*Math.tan(r))),o=this.lambda0+a/this.alpha,l=0,h=n,u=-1e3,c=0;Math.abs(h-u)>1e-7;){if(++c>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+n/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=o,e.y=h,e},names:["somerc"]};var rh={init:function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var e=Math.sin(this.lat0),t=Math.cos(this.lat0),i=this.e*e;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(t,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-i*i);var s,r,n=qo(this.e,this.lat0,e),a=this.bl/t*Math.sqrt((1-this.es)/(1-i*i));if(a*a<1&&(a=1),isNaN(this.longc)){var o=qo(this.e,this.lat1,Math.sin(this.lat1)),l=qo(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(a+Math.sqrt(a*a-1))*Math.pow(n,this.bl):this.el=(a-Math.sqrt(a*a-1))*Math.pow(n,this.bl);var h=Math.pow(o,this.bl),u=Math.pow(l,this.bl);r=.5*((s=this.el/h)-1/s);var c=(this.el*this.el-u*h)/(this.el*this.el+u*h),d=(u-h)/(u+h),p=Jo(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(c*Math.tan(.5*this.bl*p)/d)/this.bl,this.long0=Jo(this.long0);var f=Jo(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*f)/r),this.alpha=Math.asin(a*Math.sin(this.gamma0))}else s=this.lat0>=0?a+Math.sqrt(a*a-1):a-Math.sqrt(a*a-1),this.el=s*Math.pow(n,this.bl),r=.5*(s-1/s),this.gamma0=Math.asin(Math.sin(this.alpha)/a),this.long0=this.longc-Math.asin(r*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha))},forward:function(e){var t,i,s,r=e.x,n=e.y,a=Jo(r-this.long0);if(Math.abs(Math.abs(n)-oo)<=co)s=n>0?-1:1,i=this.al/this.bl*Math.log(Math.tan(mo+s*this.gamma0*.5)),t=-1*s*oo*this.al/this.bl;else{var o=qo(this.e,n,Math.sin(n)),l=this.el/Math.pow(o,this.bl),h=.5*(l-1/l),u=.5*(l+1/l),c=Math.sin(this.bl*a),d=(h*Math.sin(this.gamma0)-c*Math.cos(this.gamma0))/u;i=Math.abs(Math.abs(d)-1)<=co?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-d)/(1+d))/this.bl,t=Math.abs(Math.cos(this.bl*a))<=co?this.al*this.bl*a:this.al*Math.atan2(h*Math.cos(this.gamma0)+c*Math.sin(this.gamma0),Math.cos(this.bl*a))/this.bl}return this.no_rot?(e.x=this.x0+t,e.y=this.y0+i):(t-=this.uc,e.x=this.x0+i*Math.cos(this.alpha)+t*Math.sin(this.alpha),e.y=this.y0+t*Math.cos(this.alpha)-i*Math.sin(this.alpha)),e},inverse:function(e){var t,i;this.no_rot?(i=e.y-this.y0,t=e.x-this.x0):(i=(e.x-this.x0)*Math.cos(this.alpha)-(e.y-this.y0)*Math.sin(this.alpha),t=(e.y-this.y0)*Math.cos(this.alpha)+(e.x-this.x0)*Math.sin(this.alpha),t+=this.uc);var s=Math.exp(-1*this.bl*i/this.al),r=.5*(s-1/s),n=.5*(s+1/s),a=Math.sin(this.bl*t/this.al),o=(a*Math.cos(this.gamma0)+r*Math.sin(this.gamma0))/n,l=Math.pow(this.el/Math.sqrt((1+o)/(1-o)),1/this.bl);return Math.abs(o-1)<co?(e.x=this.long0,e.y=oo):Math.abs(o+1)<co?(e.x=this.long0,e.y=-1*oo):(e.y=Wo(this.e,l),e.x=Jo(this.long0-Math.atan2(r*Math.cos(this.gamma0)-a*Math.sin(this.gamma0),Math.cos(this.bl*t/this.al))/this.bl)),e},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"]};var nh={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<co)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),i=Math.cos(this.lat1),s=Vo(this.e,t,i),r=qo(this.e,this.lat1,t),n=Math.sin(this.lat2),a=Math.cos(this.lat2),o=Vo(this.e,n,a),l=qo(this.e,this.lat2,n),h=qo(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>co?this.ns=Math.log(s/o)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=s/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var t=e.x,i=e.y;Math.abs(2*Math.abs(i)-Math.PI)<=co&&(i=Ho(i)*(oo-2*co));var s,r,n=Math.abs(Math.abs(i)-oo);if(n>co)s=qo(this.e,i,Math.sin(i)),r=this.a*this.f0*Math.pow(s,this.ns);else{if((n=i*this.ns)<=0)return null;r=0}var a=this.ns*Jo(t-this.long0);return e.x=this.k0*(r*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,e},inverse:function(e){var t,i,s,r,n,a=(e.x-this.x0)/this.k0,o=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+o*o),i=1):(t=-Math.sqrt(a*a+o*o),i=-1);var l=0;if(0!==t&&(l=Math.atan2(i*a,i*o)),0!==t||this.ns>0){if(i=1/this.ns,s=Math.pow(t/(this.a*this.f0),i),-9999===(r=Wo(this.e,s)))return null}else r=-oo;return n=Jo(l/this.ns+this.long0),e.x=n,e.y=r,e},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]};var ah={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(e){var t,i,s,r,n,a,o,l=e.x,h=e.y,u=Jo(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),s=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(s)),n=Math.asin(Math.cos(i)*Math.sin(s)/Math.cos(r)),a=this.n*n,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),e.y=o*Math.cos(a)/1,e.x=o*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e},inverse:function(e){var t,i,s,r,n,a,o,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),n=Math.sqrt(e.x*e.x+e.y*e.y),r=Math.atan2(e.y,e.x)/Math.sin(this.s0),s=2*(Math.atan(Math.pow(this.ro0/n,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(s)-Math.sin(this.ad)*Math.cos(s)*Math.cos(r)),i=Math.asin(Math.cos(s)*Math.sin(r)/Math.cos(t)),e.x=this.long0-i/this.alfa,a=t,o=0;var h=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(o=1),a=e.y,h+=1}while(0===o&&h<15);return h>=15?null:e},names:["Krovak","krovak"]},oh=function(e,t,i,s,r){return e*r-t*Math.sin(2*r)+i*Math.sin(4*r)-s*Math.sin(6*r)},lh=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},hh=function(e){return.375*e*(1+.25*e*(1+.46875*e))},uh=function(e){return.05859375*e*e*(1+.75*e)},ch=function(e){return e*e*e*(35/3072)},dh=function(e,t,i){var s=t*i;return e/Math.sqrt(1-s*s)},ph=function(e){return Math.abs(e)<oo?e:e-Ho(e)*Math.PI},fh=function(e,t,i,s,r){var n,a;n=e/t;for(var o=0;o<15;o++)if(n+=a=(e-(t*n-i*Math.sin(2*n)+s*Math.sin(4*n)-r*Math.sin(6*n)))/(t-2*i*Math.cos(2*n)+4*s*Math.cos(4*n)-6*r*Math.cos(6*n)),Math.abs(a)<=1e-10)return n;return NaN};var mh={init:function(){this.sphere||(this.e0=lh(this.es),this.e1=hh(this.es),this.e2=uh(this.es),this.e3=ch(this.es),this.ml0=this.a*oh(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(e){var t,i,s=e.x,r=e.y;if(s=Jo(s-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(s)),i=this.a*(Math.atan2(Math.tan(r),Math.cos(s))-this.lat0);else{var n=Math.sin(r),a=Math.cos(r),o=dh(this.a,this.e,n),l=Math.tan(r)*Math.tan(r),h=s*Math.cos(r),u=h*h,c=this.es*a*a/(1-this.es);t=o*h*(1-u*l*(1/6-(8-l+8*c)*u/120)),i=this.a*oh(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+o*n/a*u*(.5+(5-l+6*c)*u/24)}return e.x=t+this.x0,e.y=i+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,i,s=e.x/this.a,r=e.y/this.a;if(this.sphere){var n=r+this.lat0;t=Math.asin(Math.sin(n)*Math.cos(s)),i=Math.atan2(Math.tan(s),Math.cos(n))}else{var a=this.ml0/this.a+r,o=fh(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(o)-oo)<=co)return e.x=this.long0,e.y=oo,r<0&&(e.y*=-1),e;var l=dh(this.a,this.e,Math.sin(o)),h=l*l*l/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(o),2),c=s*this.a/l,d=c*c;t=o-l*Math.tan(o)/h*c*c*(.5-(1+3*u)*c*c/24),i=c*(1-d*(u/3+(1+3*u)*u*d/15))/Math.cos(o)}return e.x=Jo(i+this.long0),e.y=ph(t),e},names:["Cassini","Cassini_Soldner","cass"]},yh=function(e,t){var i;return e>1e-7?(1-e*e)*(t/(1-(i=e*t)*i)-.5/e*Math.log((1-i)/(1+i))):2*t};var gh=.3333333333333333,vh=.17222222222222222,Sh=.10257936507936508,bh=.06388888888888888,_h=.0664021164021164,xh=.016415012942191543;var Ch={init:function(){var e,t=Math.abs(this.lat0);if(Math.abs(t-oo)<co?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<co?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=yh(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,i=[];return i[0]=e*gh,t=e*e,i[0]+=t*vh,i[1]=t*bh,t*=e,i[0]+=t*Sh,i[1]+=t*_h,i[2]=t*xh,i}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=yh(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(e){var t,i,s,r,n,a,o,l,h,u,c=e.x,d=e.y;if(c=Jo(c-this.long0),this.sphere){if(n=Math.sin(d),u=Math.cos(d),s=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+u*s:1+this.sinph0*n+this.cosph0*u*s)<=co)return null;t=(i=Math.sqrt(2/i))*u*Math.sin(c),i*=this.mode===this.EQUIT?n:this.cosph0*n-this.sinph0*u*s}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(s=-s),Math.abs(d+this.phi0)<co)return null;i=mo-.5*d,t=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(c),i*=s}}else{switch(o=0,l=0,h=0,s=Math.cos(c),r=Math.sin(c),n=Math.sin(d),a=yh(this.e,n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(o=a/this.qp,l=Math.sqrt(1-o*o)),this.mode){case this.OBLIQ:h=1+this.sinb1*o+this.cosb1*l*s;break;case this.EQUIT:h=1+l*s;break;case this.N_POLE:h=oo+d,a=this.qp-a;break;case this.S_POLE:h=d-oo,a=this.qp+a}if(Math.abs(h)<co)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),i=this.mode===this.OBLIQ?this.ymf*h*(this.cosb1*o-this.sinb1*l*s):(h=Math.sqrt(2/(1+l*s)))*o*this.ymf,t=this.xmf*h*l*r;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(h=Math.sqrt(a))*r,i=s*(this.mode===this.S_POLE?h:-h)):t=i=0}}return e.x=this.a*t+this.x0,e.y=this.a*i+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,i,s,r,n,a,o,l,h,u,c=e.x/this.a,d=e.y/this.a;if(this.sphere){var p,f=0,m=0;if((i=.5*(p=Math.sqrt(c*c+d*d)))>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(m=Math.sin(i),f=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(p)<=co?0:Math.asin(d*m/p),c*=m,d=f*p;break;case this.OBLIQ:i=Math.abs(p)<=co?this.phi0:Math.asin(f*this.sinph0+d*m*this.cosph0/p),c*=m*this.cosph0,d=(f-Math.sin(i)*this.sinph0)*p;break;case this.N_POLE:d=-d,i=oo-i;break;case this.S_POLE:i-=oo}t=0!==d||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(c,d):0}else{if(o=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c/=this.dd,d*=this.dd,(a=Math.sqrt(c*c+d*d))<co)return e.x=0,e.y=this.phi0,e;r=2*Math.asin(.5*a/this.rq),s=Math.cos(r),c*=r=Math.sin(r),this.mode===this.OBLIQ?(o=s*this.sinb1+d*r*this.cosb1/a,n=this.qp*o,d=a*this.cosb1*s-d*this.sinb1*r):(o=d*r/a,n=this.qp*o,d=a*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(d=-d),!(n=c*c+d*d))return e.x=0,e.y=this.phi0,e;o=1-n/this.qp,this.mode===this.S_POLE&&(o=-o)}t=Math.atan2(c,d),l=Math.asin(o),h=this.apa,u=l+l,i=l+h[0]*Math.sin(u)+h[1]*Math.sin(u+u)+h[2]*Math.sin(u+u+u)}return e.x=Jo(this.long0+t),e.y=i,e},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},Th=function(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)};var Mh={init:function(){Math.abs(this.lat1+this.lat2)<co||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Vo(this.e3,this.sin_po,this.cos_po),this.qs1=yh(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Vo(this.e3,this.sin_po,this.cos_po),this.qs2=yh(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=yh(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>co?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,i=e.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var s=yh(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*s)/this.ns0,n=this.ns0*Jo(t-this.long0),a=r*Math.sin(n)+this.x0,o=this.rh-r*Math.cos(n)+this.y0;return e.x=a,e.y=o,e},inverse:function(e){var t,i,s,r,n,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),s=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),s=-1),r=0,0!==t&&(r=Math.atan2(s*e.x,s*e.y)),s=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-s*s)/(2*this.ns0)):(i=(this.c-s*s)/this.ns0,a=this.phi1z(this.e3,i)),n=Jo(r/this.ns0+this.long0),e.x=n,e.y=a,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var i,s,r,n,a,o=Th(.5*t);if(e<co)return o;for(var l=e*e,h=1;h<=25;h++)if(i=Math.sin(o),s=Math.cos(o),o+=a=.5*(n=1-(r=e*i)*r)*n/s*(t/(1-l)-i/n+.5/e*Math.log((1-r)/(1+r))),Math.abs(a)<=1e-7)return o;return null}};var wh={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(e){var t,i,s,r,n,a,o,l=e.x,h=e.y;return s=Jo(l-this.long0),t=Math.sin(h),i=Math.cos(h),r=Math.cos(s),(n=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(n)<=co?(a=this.x0+1*this.a*i*Math.sin(s)/n,o=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)/n):(a=this.x0+this.infinity_dist*i*Math.sin(s),o=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=o,e},inverse:function(e){var t,i,s,r,n,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(r=Math.atan2(t,this.rc),i=Math.sin(r),s=Math.cos(r),a=Th(s*this.sin_p14+e.y*i*this.cos_p14/t),n=Math.atan2(e.x*i,t*this.cos_p14*s-e.y*this.sin_p14*i),n=Jo(this.long0+n)):(a=this.phic0,n=0),e.x=n,e.y=a,e},names:["gnom"]},Eh=function(e,t){var i=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-i)<1e-6)return t<0?-1*oo:oo;for(var s,r,n,a,o=Math.asin(.5*t),l=0;l<30;l++)if(r=Math.sin(o),n=Math.cos(o),a=e*r,o+=s=Math.pow(1-a*a,2)/(2*n)*(t/(1-e*e)-r/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(s)<=1e-10)return o;return NaN};var Ah={init:function(){this.sphere||(this.k0=Vo(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(e){var t,i,s=e.x,r=e.y,n=Jo(s-this.long0);if(this.sphere)t=this.x0+this.a*n*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var a=yh(this.e,Math.sin(r));t=this.x0+this.a*this.k0*n,i=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=i,e},inverse:function(e){var t,i;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=Jo(this.long0+e.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(i=Eh(this.e,2*e.y*this.k0/this.a),t=Jo(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=i,e},names:["cea"]};var Lh={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(e){var t=e.x,i=e.y,s=Jo(t-this.long0),r=ph(i-this.lat0);return e.x=this.x0+this.a*s*this.rc,e.y=this.y0+this.a*r,e},inverse:function(e){var t=e.x,i=e.y;return e.x=Jo(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=ph(this.lat0+(i-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},Ph=20;var Nh={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=lh(this.es),this.e1=hh(this.es),this.e2=uh(this.es),this.e3=ch(this.es),this.ml0=this.a*oh(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,i,s,r=e.x,n=e.y,a=Jo(r-this.long0);if(s=a*Math.sin(n),this.sphere)Math.abs(n)<=co?(t=this.a*a,i=-1*this.a*this.lat0):(t=this.a*Math.sin(s)/Math.tan(n),i=this.a*(ph(n-this.lat0)+(1-Math.cos(s))/Math.tan(n)));else if(Math.abs(n)<=co)t=this.a*a,i=-1*this.ml0;else{var o=dh(this.a,this.e,Math.sin(n))/Math.tan(n);t=o*Math.sin(s),i=this.a*oh(this.e0,this.e1,this.e2,this.e3,n)-this.ml0+o*(1-Math.cos(s))}return e.x=t+this.x0,e.y=i+this.y0,e},inverse:function(e){var t,i,s,r,n,a,o,l,h;if(s=e.x-this.x0,r=e.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=co)t=Jo(s/this.a+this.long0),i=0;else{var u;for(a=this.lat0+r/this.a,o=s*s/this.a/this.a+a*a,l=a,n=Ph;n;--n)if(l+=h=-1*(a*(l*(u=Math.tan(l))+1)-l-.5*(l*l+o)*u)/((l-a)/u-1),Math.abs(h)<=co){i=l;break}t=Jo(this.long0+Math.asin(s*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(r+this.ml0)<=co)i=0,t=Jo(this.long0+s/this.a);else{var c,d,p,f,m;for(a=(this.ml0+r)/this.a,o=s*s/this.a/this.a+a*a,l=a,n=Ph;n;--n)if(m=this.e*Math.sin(l),c=Math.sqrt(1-m*m)*Math.tan(l),d=this.a*oh(this.e0,this.e1,this.e2,this.e3,l),p=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=h=(a*(c*(f=d/this.a)+1)-f-.5*c*(f*f+o))/(this.es*Math.sin(2*l)*(f*f+o-2*a*f)/(4*c)+(a-f)*(c*p-2/Math.sin(2*l))-p),Math.abs(h)<=co){i=l;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),t=Jo(this.long0+Math.asin(s*c/this.a)/Math.sin(i))}return e.x=t,e.y=i,e},names:["Polyconic","poly"]};var Oh={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(e){var t,i=e.x,s=e.y-this.lat0,r=i-this.long0,n=s/ao*1e-5,a=r,o=1,l=0;for(t=1;t<=10;t++)o*=n,l+=this.A[t]*o;var h,u=l,c=a,d=1,p=0,f=0,m=0;for(t=1;t<=6;t++)h=p*u+d*c,d=d*u-p*c,p=h,f=f+this.B_re[t]*d-this.B_im[t]*p,m=m+this.B_im[t]*d+this.B_re[t]*p;return e.x=m*this.a+this.x0,e.y=f*this.a+this.y0,e},inverse:function(e){var t,i,s=e.x,r=e.y,n=s-this.x0,a=(r-this.y0)/this.a,o=n/this.a,l=1,h=0,u=0,c=0;for(t=1;t<=6;t++)i=h*a+l*o,l=l*a-h*o,h=i,u=u+this.C_re[t]*l-this.C_im[t]*h,c=c+this.C_im[t]*l+this.C_re[t]*h;for(var d=0;d<this.iterations;d++){var p,f=u,m=c,y=a,g=o;for(t=2;t<=6;t++)p=m*u+f*c,f=f*u-m*c,m=p,y+=(t-1)*(this.B_re[t]*f-this.B_im[t]*m),g+=(t-1)*(this.B_im[t]*f+this.B_re[t]*m);f=1,m=0;var v=this.B_re[1],S=this.B_im[1];for(t=2;t<=6;t++)p=m*u+f*c,f=f*u-m*c,m=p,v+=t*(this.B_re[t]*f-this.B_im[t]*m),S+=t*(this.B_im[t]*f+this.B_re[t]*m);var b=v*v+S*S;u=(y*v+g*S)/b,c=(g*v-y*S)/b}var _=u,x=c,C=1,T=0;for(t=1;t<=9;t++)C*=_,T+=this.D[t]*C;var M=this.lat0+T*ao*1e5,w=this.long0+x;return e.x=w,e.y=M,e},names:["New_Zealand_Map_Grid","nzmg"]};var Ih={init:function(){},forward:function(e){var t=e.x,i=e.y,s=Jo(t-this.long0),r=this.x0+this.a*s,n=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return e.x=r,e.y=n,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t=Jo(this.long0+e.x/this.a),i=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=i,e},names:["Miller_Cylindrical","mill"]},Fh=20;var Rh={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Ul(this.es)},forward:function(e){var t,i,s=e.x,r=e.y;if(s=Jo(s-this.long0),this.sphere){if(this.m)for(var n=this.n*Math.sin(r),a=Fh;a;--a){var o=(this.m*r+Math.sin(r)-n)/(this.m+Math.cos(r));if(r-=o,Math.abs(o)<co)break}else r=1!==this.n?Math.asin(this.n*Math.sin(r)):r;t=this.a*this.C_x*s*(this.m+Math.cos(r)),i=this.a*this.C_y*r}else{var l=Math.sin(r),h=Math.cos(r);i=this.a*Gl(r,l,h,this.en),t=this.a*s*h/Math.sqrt(1-this.es*l*l)}return e.x=t,e.y=i,e},inverse:function(e){var t,i,s,r;return e.x-=this.x0,s=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,s/=this.C_x*(this.m+Math.cos(t)),this.m?t=Th((this.m*t+Math.sin(t))/this.n):1!==this.n&&(t=Th(Math.sin(t)/this.n)),s=Jo(s+this.long0),t=ph(t)):(t=jl(e.y/this.a,this.es,this.en),(r=Math.abs(t))<oo?(r=Math.sin(t),i=this.long0+e.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),s=Jo(i)):r-co<oo&&(s=this.long0)),e.x=s,e.y=t,e},names:["Sinusoidal","sinu"]};var Dh={init:function(){},forward:function(e){for(var t=e.x,i=e.y,s=Jo(t-this.long0),r=i,n=Math.PI*Math.sin(i);;){var a=-(r+Math.sin(r)-n)/(1+Math.cos(r));if(r+=a,Math.abs(a)<co)break}r/=2,Math.PI/2-Math.abs(i)<co&&(s=0);var o=.900316316158*this.a*s*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return e.x=o,e.y=l,e},inverse:function(e){var t,i;e.x-=this.x0,e.y-=this.y0,i=e.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),t=Math.asin(i);var s=Jo(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));s<-Math.PI&&(s=-Math.PI),s>Math.PI&&(s=Math.PI),i=(2*t+Math.sin(2*t))/Math.PI,Math.abs(i)>1&&(i=1);var r=Math.asin(i);return e.x=s,e.y=r,e},names:["Mollweide","moll"]};var kh={init:function(){Math.abs(this.lat1+this.lat2)<co||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=lh(this.es),this.e1=hh(this.es),this.e2=uh(this.es),this.e3=ch(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Vo(this.e,this.sinphi,this.cosphi),this.ml1=oh(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<co?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Vo(this.e,this.sinphi,this.cosphi),this.ml2=oh(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=oh(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(e){var t,i=e.x,s=e.y;if(this.sphere)t=this.a*(this.g-s);else{var r=oh(this.e0,this.e1,this.e2,this.e3,s);t=this.a*(this.g-r)}var n=this.ns*Jo(i-this.long0),a=this.x0+t*Math.sin(n),o=this.y0+this.rh-t*Math.cos(n);return e.x=a,e.y=o,e},inverse:function(e){var t,i,s,r;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(i=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(i=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var n=0;if(0!==i&&(n=Math.atan2(t*e.x,t*e.y)),this.sphere)return r=Jo(this.long0+n/this.ns),s=ph(this.g-i/this.a),e.x=r,e.y=s,e;var a=this.g-i/this.a;return s=fh(a,this.e0,this.e1,this.e2,this.e3),r=Jo(this.long0+n/this.ns),e.x=r,e.y=s,e},names:["Equidistant_Conic","eqdc"]};var Bh={init:function(){this.R=this.a},forward:function(e){var t,i,s=e.x,r=e.y,n=Jo(s-this.long0);Math.abs(r)<=co&&(t=this.x0+this.R*n,i=this.y0);var a=Th(2*Math.abs(r/Math.PI));(Math.abs(n)<=co||Math.abs(Math.abs(r)-oo)<=co)&&(t=this.x0,i=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var o=.5*Math.abs(Math.PI/n-n/Math.PI),l=o*o,h=Math.sin(a),u=Math.cos(a),c=u/(h+u-1),d=c*c,p=c*(2/h-1),f=p*p,m=Math.PI*this.R*(o*(c-f)+Math.sqrt(l*(c-f)*(c-f)-(f+l)*(d-f)))/(f+l);n<0&&(m=-m),t=this.x0+m;var y=l+c;return m=Math.PI*this.R*(p*y-o*Math.sqrt((f+l)*(l+1)-y*y))/(f+l),i=r>=0?this.y0+m:this.y0-m,e.x=t,e.y=i,e},inverse:function(e){var t,i,s,r,n,a,o,l,h,u,c,d;return e.x-=this.x0,e.y-=this.y0,c=Math.PI*this.R,n=(s=e.x/c)*s+(r=e.y/c)*r,c=3*(r*r/(l=-2*(a=-Math.abs(r)*(1+n))+1+2*r*r+n*n)+(2*(o=a-2*r*r+s*s)*o*o/l/l/l-9*a*o/l/l)/27)/(h=(a-o*o/3/l)/l)/(u=2*Math.sqrt(-h/3)),Math.abs(c)>1&&(c=c>=0?1:-1),d=Math.acos(c)/3,i=e.y>=0?(-u*Math.cos(d+Math.PI/3)-o/3/l)*Math.PI:-(-u*Math.cos(d+Math.PI/3)-o/3/l)*Math.PI,t=Math.abs(s)<co?this.long0:Jo(this.long0+Math.PI*(n-1+Math.sqrt(1+2*(s*s-r*r)+n*n))/2/s),e.x=t,e.y=i,e},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]};var Uh={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(e){var t,i,s,r,n,a,o,l,h,u,c,d,p,f,m,y,g,v,S,b,_,x,C=e.x,T=e.y,M=Math.sin(e.y),w=Math.cos(e.y),E=Jo(C-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=co?(e.x=this.x0+this.a*(oo-T)*Math.sin(E),e.y=this.y0-this.a*(oo-T)*Math.cos(E),e):Math.abs(this.sin_p12+1)<=co?(e.x=this.x0+this.a*(oo+T)*Math.sin(E),e.y=this.y0+this.a*(oo+T)*Math.cos(E),e):(v=this.sin_p12*M+this.cos_p12*w*Math.cos(E),g=(y=Math.acos(v))/Math.sin(y),e.x=this.x0+this.a*g*w*Math.sin(E),e.y=this.y0+this.a*g*(this.cos_p12*M-this.sin_p12*w*Math.cos(E)),e):(t=lh(this.es),i=hh(this.es),s=uh(this.es),r=ch(this.es),Math.abs(this.sin_p12-1)<=co?(n=this.a*oh(t,i,s,r,oo),a=this.a*oh(t,i,s,r,T),e.x=this.x0+(n-a)*Math.sin(E),e.y=this.y0-(n-a)*Math.cos(E),e):Math.abs(this.sin_p12+1)<=co?(n=this.a*oh(t,i,s,r,oo),a=this.a*oh(t,i,s,r,T),e.x=this.x0+(n+a)*Math.sin(E),e.y=this.y0+(n+a)*Math.cos(E),e):(o=M/w,l=dh(this.a,this.e,this.sin_p12),h=dh(this.a,this.e,M),u=Math.atan((1-this.es)*o+this.es*l*this.sin_p12/(h*w)),S=0===(c=Math.atan2(Math.sin(E),this.cos_p12*Math.tan(u)-this.sin_p12*Math.cos(E)))?Math.asin(this.cos_p12*Math.sin(u)-this.sin_p12*Math.cos(u)):Math.abs(Math.abs(c)-Math.PI)<=co?-Math.asin(this.cos_p12*Math.sin(u)-this.sin_p12*Math.cos(u)):Math.asin(Math.sin(E)*Math.cos(u)/Math.sin(c)),d=this.e*this.sin_p12/Math.sqrt(1-this.es),y=l*S*(1-(b=S*S)*(m=(p=this.e*this.cos_p12*Math.cos(c)/Math.sqrt(1-this.es))*p)*(1-m)/6+(_=b*S)/8*(f=d*p)*(1-2*m)+(x=_*S)/120*(m*(4-7*m)-3*d*d*(1-7*m))-x*S/48*f),e.x=this.x0+y*Math.sin(c),e.y=this.y0+y*Math.cos(c),e))},inverse:function(e){var t,i,s,r,n,a,o,l,h,u,c,d,p,f,m,y,g,v,S,b,_,x;if(e.x-=this.x0,e.y-=this.y0,this.sphere){if((t=Math.sqrt(e.x*e.x+e.y*e.y))>2*oo*this.a)return;return i=t/this.a,s=Math.sin(i),r=Math.cos(i),n=this.long0,Math.abs(t)<=co?a=this.lat0:(a=Th(r*this.sin_p12+e.y*s*this.cos_p12/t),o=Math.abs(this.lat0)-oo,n=Math.abs(o)<=co?this.lat0>=0?Jo(this.long0+Math.atan2(e.x,-e.y)):Jo(this.long0-Math.atan2(-e.x,e.y)):Jo(this.long0+Math.atan2(e.x*s,t*this.cos_p12*r-e.y*this.sin_p12*s))),e.x=n,e.y=a,e}return l=lh(this.es),h=hh(this.es),u=uh(this.es),c=ch(this.es),Math.abs(this.sin_p12-1)<=co?(d=this.a*oh(l,h,u,c,oo),t=Math.sqrt(e.x*e.x+e.y*e.y),a=fh((d-t)/this.a,l,h,u,c),n=Jo(this.long0+Math.atan2(e.x,-1*e.y)),e.x=n,e.y=a,e):Math.abs(this.sin_p12+1)<=co?(d=this.a*oh(l,h,u,c,oo),t=Math.sqrt(e.x*e.x+e.y*e.y),a=fh((t-d)/this.a,l,h,u,c),n=Jo(this.long0+Math.atan2(e.x,e.y)),e.x=n,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),m=Math.atan2(e.x,e.y),p=dh(this.a,this.e,this.sin_p12),y=Math.cos(m),v=-(g=this.e*this.cos_p12*y)*g/(1-this.es),S=3*this.es*(1-v)*this.sin_p12*this.cos_p12*y/(1-this.es),x=1-v*(_=(b=t/p)-v*(1+v)*Math.pow(b,3)/6-S*(1+3*v)*Math.pow(b,4)/24)*_/2-b*_*_*_/6,f=Math.asin(this.sin_p12*Math.cos(_)+this.cos_p12*Math.sin(_)*y),n=Jo(this.long0+Math.asin(Math.sin(m)*Math.sin(_)/Math.cos(f))),a=Math.atan((1-this.es*x*this.sin_p12/Math.sin(f))*Math.tan(f)/(1-this.es)),e.x=n,e.y=a,e)},names:["Azimuthal_Equidistant","aeqd"]};var Gh={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(e){var t,i,s,r,n,a,o,l=e.x,h=e.y;return s=Jo(l-this.long0),t=Math.sin(h),i=Math.cos(h),r=Math.cos(s),((n=this.sin_p14*t+this.cos_p14*i*r)>0||Math.abs(n)<=co)&&(a=1*this.a*i*Math.sin(s),o=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*i*r)),e.x=a,e.y=o,e},inverse:function(e){var t,i,s,r,n,a,o;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),i=Th(t/this.a),s=Math.sin(i),r=Math.cos(i),a=this.long0,Math.abs(t)<=co?(o=this.lat0,e.x=a,e.y=o,e):(o=Th(r*this.sin_p14+e.y*s*this.cos_p14/t),n=Math.abs(this.lat0)-oo,Math.abs(n)<=co?(a=this.lat0>=0?Jo(this.long0+Math.atan2(e.x,-e.y)):Jo(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=o,e):(a=Jo(this.long0+Math.atan2(e.x*s,t*this.cos_p14*r-e.y*this.sin_p14*s)),e.x=a,e.y=o,e))},names:["ortho"]},jh={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},zh={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Vh(e,t,i,s){var r;return e<co?(s.value=zh.AREA_0,r=0):(r=Math.atan2(t,i),Math.abs(r)<=mo?s.value=zh.AREA_0:r>mo&&r<=oo+mo?(s.value=zh.AREA_1,r-=oo):r>oo+mo||r<=-(oo+mo)?(s.value=zh.AREA_2,r=r>=0?r-go:r+go):(s.value=zh.AREA_3,r+=oo)),r}function Hh(e,t){var i=e+t;return i<-go?i+=yo:i>+go&&(i-=yo),i}var Jh={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=oo-mo/2?this.face=jh.TOP:this.lat0<=-(oo-mo/2)?this.face=jh.BOTTOM:Math.abs(this.long0)<=mo?this.face=jh.FRONT:Math.abs(this.long0)<=oo+mo?this.face=this.long0>0?jh.RIGHT:jh.LEFT:this.face=jh.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(e){var t,i,s,r,n,a,o={x:0,y:0},l={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,i=e.x,this.face===jh.TOP)r=oo-t,i>=mo&&i<=oo+mo?(l.value=zh.AREA_0,s=i-oo):i>oo+mo||i<=-(oo+mo)?(l.value=zh.AREA_1,s=i>0?i-go:i+go):i>-(oo+mo)&&i<=-mo?(l.value=zh.AREA_2,s=i+oo):(l.value=zh.AREA_3,s=i);else if(this.face===jh.BOTTOM)r=oo+t,i>=mo&&i<=oo+mo?(l.value=zh.AREA_0,s=-i+oo):i<mo&&i>=-mo?(l.value=zh.AREA_1,s=-i):i<-mo&&i>=-(oo+mo)?(l.value=zh.AREA_2,s=-i-oo):(l.value=zh.AREA_3,s=i>0?-i+go:-i-go);else{var h,u,c,d,p,f;this.face===jh.RIGHT?i=Hh(i,+oo):this.face===jh.BACK?i=Hh(i,+go):this.face===jh.LEFT&&(i=Hh(i,-oo)),d=Math.sin(t),p=Math.cos(t),f=Math.sin(i),h=p*Math.cos(i),u=p*f,c=d,this.face===jh.FRONT?s=Vh(r=Math.acos(h),c,u,l):this.face===jh.RIGHT?s=Vh(r=Math.acos(u),c,-h,l):this.face===jh.BACK?s=Vh(r=Math.acos(-h),c,-u,l):this.face===jh.LEFT?s=Vh(r=Math.acos(-u),c,h,l):(r=s=0,l.value=zh.AREA_0)}return a=Math.atan(12/go*(s+Math.acos(Math.sin(s)*Math.cos(mo))-oo)),n=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(s))))),l.value===zh.AREA_1?a+=oo:l.value===zh.AREA_2?a+=go:l.value===zh.AREA_3&&(a+=1.5*go),o.x=n*Math.cos(a),o.y=n*Math.sin(a),o.x=o.x*this.a+this.x0,o.y=o.y*this.a+this.y0,e.x=o.x,e.y=o.y,e},inverse:function(e){var t,i,s,r,n,a,o,l,h,u,c,d,p={lam:0,phi:0},f={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,i=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?f.value=zh.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(f.value=zh.AREA_1,t-=oo):e.x<0&&-e.x>=Math.abs(e.y)?(f.value=zh.AREA_2,t=t<0?t+go:t-go):(f.value=zh.AREA_3,t+=oo),h=go/12*Math.tan(t),n=Math.sin(h)/(Math.cos(h)-1/Math.sqrt(2)),a=Math.atan(n),(o=1-(s=Math.cos(t))*s*(r=Math.tan(i))*r*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?o=-1:o>1&&(o=1),this.face===jh.TOP)l=Math.acos(o),p.phi=oo-l,f.value===zh.AREA_0?p.lam=a+oo:f.value===zh.AREA_1?p.lam=a<0?a+go:a-go:f.value===zh.AREA_2?p.lam=a-oo:p.lam=a;else if(this.face===jh.BOTTOM)l=Math.acos(o),p.phi=l-oo,f.value===zh.AREA_0?p.lam=-a+oo:f.value===zh.AREA_1?p.lam=-a:f.value===zh.AREA_2?p.lam=-a-oo:p.lam=a<0?-a-go:-a+go;else{var m,y,g;h=(m=o)*m,y=(h+=(g=h>=1?0:Math.sqrt(1-h)*Math.sin(a))*g)>=1?0:Math.sqrt(1-h),f.value===zh.AREA_1?(h=y,y=-g,g=h):f.value===zh.AREA_2?(y=-y,g=-g):f.value===zh.AREA_3&&(h=y,y=g,g=-h),this.face===jh.RIGHT?(h=m,m=-y,y=h):this.face===jh.BACK?(m=-m,y=-y):this.face===jh.LEFT&&(h=m,m=y,y=-h),p.phi=Math.acos(-g)-oo,p.lam=Math.atan2(y,m),this.face===jh.RIGHT?p.lam=Hh(p.lam,-oo):this.face===jh.BACK?p.lam=Hh(p.lam,-go):this.face===jh.LEFT&&(p.lam=Hh(p.lam,+oo))}return 0!==this.es&&(u=p.phi<0?1:0,c=Math.tan(p.phi),d=this.b/Math.sqrt(c*c+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),u&&(p.phi=-p.phi)),p.lam+=this.long0,e.x=p.lam,e.y=p.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},qh=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Wh=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Yh=.8487,Qh=1.3523,Xh=fo/5,Kh=1/Xh,Zh=18,$h=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},eu=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};var tu={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(e){var t=Jo(e.x-this.long0),i=Math.abs(e.y),s=Math.floor(i*Xh);s<0?s=0:s>=Zh&&(s=Zh-1),i=fo*(i-Kh*s);var r={x:$h(qh[s],i)*t,y:$h(Wh[s],i)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*Yh+this.x0,r.y=r.y*this.a*Qh+this.y0,r},inverse:function(e){var t={x:(e.x-this.x0)/(this.a*Yh),y:Math.abs(e.y-this.y0)/(this.a*Qh)};if(t.y>=1)t.x/=qh[Zh][0],t.y=e.y<0?-oo:oo;else{var i=Math.floor(t.y*Zh);for(i<0?i=0:i>=Zh&&(i=Zh-1);;)if(Wh[i][0]>t.y)--i;else{if(!(Wh[i+1][0]<=t.y))break;++i}var s=Wh[i],r=5*(t.y-s[0])/(Wh[i+1][0]-s[0]);r=function(e,t,i,s){for(var r=t;s;--s){var n=e(r);if(r-=n,Math.abs(n)<i)break}return r}(function(e){return($h(s,e)-t.y)/eu(s,e)},r,co,100),t.x/=$h(qh[i],r),t.y=(5*i+r)*po,e.y<0&&(t.y=-t.y)}return t.x=Jo(t.x+this.long0),t},names:["Robinson","robin"]};var iu,su={init:function(){this.name="geocent"},forward:function(e){return al(e,this.es,this.a)},inverse:function(e){return ol(e,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};vl.defaultDatum="WGS84",vl.Proj=nl,vl.WGS84=new vl.Proj("WGS84"),vl.Point=kl,vl.toPoint=cl,vl.defs=Bo,vl.transform=fl,vl.mgrs=El,vl.version="__VERSION__",(iu=vl).Proj.projections.add(zl),iu.Proj.projections.add(Ql),iu.Proj.projections.add(Kl),iu.Proj.projections.add(th),iu.Proj.projections.add(ih),iu.Proj.projections.add(sh),iu.Proj.projections.add(rh),iu.Proj.projections.add(nh),iu.Proj.projections.add(ah),iu.Proj.projections.add(mh),iu.Proj.projections.add(Ch),iu.Proj.projections.add(Mh),iu.Proj.projections.add(wh),iu.Proj.projections.add(Ah),iu.Proj.projections.add(Lh),iu.Proj.projections.add(Nh),iu.Proj.projections.add(Oh),iu.Proj.projections.add(Ih),iu.Proj.projections.add(Rh),iu.Proj.projections.add(Dh),iu.Proj.projections.add(kh),iu.Proj.projections.add(Bh),iu.Proj.projections.add(Uh),iu.Proj.projections.add(Gh),iu.Proj.projections.add(Jh),iu.Proj.projections.add(tu),iu.Proj.projections.add(su);var ru=vl;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/window.proj4=ru,window.Proj4js=ru,Ka.a.Proj={},Ka.a.Proj._isProj4Obj=function(e){return void 0!==e.inverse&&void 0!==e.forward},Ka.a.Proj.Projection=Ka.a.Class.extend({initialize:function(e,t,i){var s=Ka.a.Proj._isProj4Obj(e);this._proj=s?e:this._projFromCodeDef(e,t);var r=i;Ka.a.Util.isArray(i)&&(r=Ka.a.bounds(i)),this.bounds=s?t:r},project:function(e){var t=this._proj.forward([e.lng,e.lat]);return new Ka.a.Point(t[0],t[1])},unproject:function(e,t){this.bounds&&(e.x=e.x<this.bounds.min.x?this.bounds.min.x:e.x>this.bounds.max.x?this.bounds.max.x:e.x,e.y=e.y<this.bounds.min.y?this.bounds.min.y:e.y>this.bounds.max.y?this.bounds.max.y:e.y);var i=this._proj.inverse([e.x,e.y]);return new Ka.a.LatLng(i[1],i[0],t)},_projFromCodeDef:function(e,t){if(t)ru.defs(e,t);else if(void 0===ru.defs[e]){var i=e.split(":");if(i.length>3&&(e=i[i.length-3]+":"+i[i.length-1]),void 0===ru.defs[e])throw"No projection definition for code "+e}return ru(e)},getUnits:function(){return this._proj.oProj.units||"degrees"}});var nu=Ka.a.Class.extend({includes:Ka.a.CRS,options:{transformation:new Ka.a.Transformation(1,0,-1,0)},initialize:function(e,t){var i,s,r;if(Ka.a.Proj._isProj4Obj(e)?(i=(s=e).srsCode,t=t||{},this.projection=new Ka.a.Proj.Projection(s,t.bounds)):(i=e,r=(t=t||{}).def||"",this.projection=new Ka.a.Proj.Projection(i,r,t.bounds)),Ka.a.Util.setOptions(this,t),this.code=i,this.transformation=this.options.transformation,this.options.dpi=this.options.dpi||96,this.options.bounds&&(this.options.bounds=Ka.a.bounds(this.options.bounds)),!this.options.origin&&this.options.bounds&&(this.options.origin=[this.options.bounds.min.x,this.options.bounds.max.y]),this.options.origin&&(this.options.origin instanceof Ka.a.Point&&(this.options.origin=[this.options.origin.x,this.options.origin.y]),this.transformation=new Ka.a.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales&&this.options.scales.length>0)this.scales=this.options.scales,this._scales=this._toProj4Scales(this.options.scales,this.options.dpi);else if(this.options.scaleDenominators&&this.options.scaleDenominators.length>0){this.scales=[];for(let e=0;e<this.options.scaleDenominators.length;e++)this.scales[e]=1/this.options.scaleDenominators[e];this._scales=this._toProj4Scales(this.scales,this.options.dpi)}else if(this.options.resolutions&&this.options.resolutions.length>0){this._scales=[];for(let e=this.options.resolutions.length-1;e>=0;e--)this.options.resolutions[e]&&(this._scales[e]=1/this.options.resolutions[e])}else this.options.bounds&&(this._scales=this._getDefaultProj4ScalesByBounds(this.options.bounds));this._rectify(),this.infinite=!this.options.bounds},_rectify:function(){if(this._scales&&(this.resolutions||(this.resolutions=[],this.resolutions=this._proj4ScalesToResolutions(this._scales)),!this.scales)){this.scales=[];for(let t=0;t<this.resolutions.length;t++){var e=this.resolutions[t]*this.options.dpi*(1/.0254)*this._getMeterPerMapUnit(this.projection.getUnits());this.scales[t]=1/e}}},scale:function(e){var t,i=Math.floor(e);return e===i?this._scales[e]:(t=this._scales[i])+(this._scales[i+1]-t)*(e-i)},zoom:function(e){var t,i,s=this._closestElement(this._scales,e),r=this._scales.indexOf(s);return s?e===s?r:(i=r+1,void 0===(t=this._scales[i])?r:(e-s)/(t-s)+r):0},distance:Ka.a.CRS.Earth.distance,R:Ka.a.CRS.Earth.R,_closestElement:function(e,t){for(var i,s=e.length;s--;)e[s]<=t&&(void 0===i||i<e[s])&&(i=e[s]);return i},_proj4ScalesToResolutions(e){var t=[];if(!e)return t;for(var i=0;i<e.length;i++)t[i]=1/e[i];return t},_toProj4Scales:function(e,t){var i=[];if(!e)return i;for(var s=0;s<e.length;s++){var r=this.projection?this._getMeterPerMapUnit(this.projection.getUnits()):1;i[s]=1/(.0254/((t||96)*e[s])/r)}return i},_getMeterPerMapUnit:function(e){var t=1;return"meter"===e?t=1:"degrees"===e?t=2*Math.PI*6378137/360:"kilometer"===e?t=.001:"inch"===e?t=1/.025399999918:"feet"===e&&(t=.3048),t},_getDefaultProj4ScalesByBounds:function(e){if(!e)return[];for(var t=e.getSize(),i=Math.max(t.x,t.y)/256,s=[],r=0;r<23;r++)s[r]=Math.pow(2,r)/i;return s}}),au=function(e,t){return new nu(e,t)};Ka.a.Proj.CRS=au;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var ou,lu=Ka.a.CRS.Baidu=Ka.a.extend({},Ka.a.CRS.EPSG3857,{code:"Baidu",scale:function(e){return 6378137*Math.PI*2/Math.pow(2,18-e)},transformation:(ou=.5/(6378137*Math.PI),new Ka.a.Transformation(ou,0,-ou,0))}),hu=[];for(let e=1;e<19;e++)hu.push(1.40625/Math.pow(2,e));var uu=Ka.a.CRS.TianDiTu_WGS84=Ka.a.Proj.CRS("EPSG:4326",{origin:[-180,90],resolutions:hu,bounds:Ka.a.bounds([-180,-90],[180,90])}),cu=[];for(let e=1;e<19;e++)cu.push(156543.03392804062/Math.pow(2,e));var du=Ka.a.CRS.TianDiTu_Mercator=Ka.a.Proj.CRS("EPSG:3857",{origin:[-20037508.3427892,20037508.3427892],resolutions:cu,bounds:Ka.a.bounds([-20037508.3427892,-20037508.3427892],[20037508.3427892,20037508.3427892])});Ka.a.CRS.BaiduCRS=lu,Ka.a.CRS.TianDiTu_WGS84CRS=uu,Ka.a.CRS.TianDiTu_MercatorCRS=du;var pu={Prefix:"<a href='https://leafletjs.com' title='A JS library for interactive maps'>Leaflet</a>\n with <span>© <a href='https://iclient.supermap.io' title='SuperMap iClient' target='_blank'>SuperMap iClient</a></span>",Common:{attribution:"Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' title='SuperMap iServer' target='_blank'>SuperMap iServer</a></span>"},Online:{attribution:"Map Data <span>© <a href='https://www.supermapol.com' title='SuperMap Online' target='_blank'>SuperMap Online</a></span>"},ECharts:{attribution:"© 2018 百度 ECharts"},MapV:{attribution:"© 2018 百度 MapV "},Turf:{attribution:"<span>© <a href='https://turfjs.org/' title='turfjs' target='_blank'>turfjs</a></span>"},Baidu:{attribution:"Map Data © 2018 Baidu - GS(2016)2089号 - Data © 长地万方"},Cloud:{attribution:"Map Data ©2014 SuperMap - GS(2014)6070号-data©Navinfo"},Tianditu:{attribution:"Map Data <a href='https://www.tianditu.gov.cn' target='_blank'><img style='background-color:transparent;bottom:2px;opacity:1;' src='https://api.tianditu.gov.cn/img/map/logo.png' width='53px' height='22px' opacity='0'></a>"}};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/Ka.a.supermap=Ka.a.supermap||{},Ka.a.supermap.control=Ka.a.supermap.control||{},Ka.a.supermap.components=Ka.a.supermap.components||{},Ka.a.Control.Attribution.include({options:{position:"bottomright",prefix:pu.Prefix}}),Ka.a.Map.include({latLngToAccurateContainerPoint:function(e){var t=this.project(Ka.a.latLng(e))._subtract(this.getPixelOrigin());return Ka.a.point(t).add(this._getMapPanePos())}}),[Ka.a.Polyline,Ka.a.Polygon,Ka.a.Marker,Ka.a.CircleMarker,Ka.a.Circle,Ka.a.LayerGroup].map(e=>(e.defaultFunction=e.prototype.toGeoJSON,e.include({toGeoJSON:function(t){return e.defaultFunction.call(this,t||10)}}),e));
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var fu=Ka.a.Evented.extend({options:{url:null,proxy:null,serverType:null,withCredentials:!1,crossOrigin:null},initialize:function(e,t){e&&(e=e.indexOf("/")!==e.length-1?e:e.substr(0,e.length-1)),this.url=e,Ka.a.setOptions(this,t),this.fire("initialized",this)},destroy:function(){this.fire("destroy",this)}});Ka.a.supermap.ServiceBase=fu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var mu=fu.extend({options:{projection:null},initialize:function(e,t){t=t||{},Ka.a.setOptions(this,t),t.projection&&(this.options.projection=t.projection),fu.prototype.initialize.call(this,e,t)},getMapInfo:function(e){var t=this;new rr(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e},projection:t.options.projection}).processAsync()},getTilesets:function(e){var t=this;new tn(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}}),yu=function(e,t){return new mu(e,t)};Ka.a.supermap.mapService=yu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var gu=Ka.a.Control.extend({options:{layer:null,position:"topleft",title:"switch tile version",tooltip:"top",collapsed:!0,nextText:"+",lastText:"-",ico:"V",orientation:"horizontal",switch:!0},onAdd:function(){"vertical"!==this.options.orientation&&(this.options.orientation="horizontal");var e=this._initLayout();return this.options.layer&&this.setLayer(this.options.layer),e},setContent:function(e){var t=Ka.a.Util.extend({},e);this.setVersionName(t.desc).setToolTip(t.desc)},setVersionName:function(e){var t=e;return e||(t=this.getValue()),this._sliderValue.innerHTML=t,this},setToolTip:function(e){return this.tooltip.innerHTML=e,this},updateLength:function(e){e>0&&(this.length=e,this.max=this.length-1,this.slider.setAttribute("max",this.max))},setLayer:function(e){e&&(this.options.layer=e);var t=this,i=t.options.layer;i.on("tilesetsinfoloaded",function(e){var i=e&&e.tileVersions;t.update(i)}),i.on("tileversionschanged",function(e){var i=e&&e.tileVersion;t.setContent(i)}),t.getTileSetsInfo()},update:function(e){this.tileVersions=e,this.updateLength(this.tileVersions.length)},getTileSetsInfo:function(){var e=this;e.options.layer&&new mu(e.options.layer._url).getTilesets(function(t){e.options.layer.setTileSetsInfo(t.result)})},removeLayer:function(){this.options.layer=null},nextTilesVersion:function(){return this.firstLoad?(this.options.layer.nextTilesVersion(),this.firstLoad=!1,this):parseInt(this.slider.value)>this.max-1?this:(this.slider.value=parseInt(this.slider.value)+1,this.options.layer.nextTilesVersion(),this)},lastTilesVersion:function(){return parseInt(this.slider.value)<this.min+1?this:(this.slider.value=parseInt(this.slider.value)-1,this.options.layer.lastTilesVersion(),this)},tilesVersion:function(e){for(var t=this.options.layer,i=this.tileVersions,s=i.length,r=0;r<s;r++)if(i[r].name==e){t.updateCurrentTileSetsIndex(r),t.changeTilesVersion();break}},getValue:function(){return this.slider.value},getVersion:function(){var e=this.tileVersions[this.getValue()];return e&&e.name},_initLayout:function(){var e="leaflet-control-ctv";this._container=Ka.a.DomUtil.create("div",e+" "+e+"-"+this.options.orientation),this._sliderBtn=Ka.a.DomUtil.create("a",e+"-toggle",this._container),this._sliderBtn.setAttribute("title",this.options.title),this._sliderBtn.innerHTML=this.options.ico,this._sliderValue=Ka.a.DomUtil.create("p",e+"-value",this._container),this._sliderValue.innerHTML=this.options.ico;return this._sliderContent=Ka.a.DomUtil.create("div","leaflet-ctv-slider-main tooltip",this._container),this.tooltip=Ka.a.DomUtil.create("span","tooltip-text tooltip-"+this.options.tooltip,this._sliderContent),this.tooltip.innerHTML=this.options.ico,this.options.switch&&(this._next=Ka.a.DomUtil.create("a","leaflet-ctv-slider-incdec leaflet-ctv-slider-next",this._sliderContent),this._next.innerHTML=this.options.nextText,Ka.a.DomEvent.on(this._next,"click",this.nextTilesVersion,this),Ka.a.DomUtil.addClass(this._container,e+"-incdec")),this._sliderContainer=Ka.a.DomUtil.create("div","leaflet-ctv-slider-container",this._sliderContent),this.slider=Ka.a.DomUtil.create("input","leaflet-ctv-slider",this._sliderContainer),this.min=null==this.min||isNaN(this.min)?0:parseInt(this.min),this.slider.setAttribute("title",this.options.title),this.slider.setAttribute("id","slider"),this.slider.setAttribute("type","range"),this.slider.setAttribute("min",this.min),this.slider.setAttribute("max",0),this.slider.setAttribute("step",1),this.slider.setAttribute("value",0),this.firstLoad=!0,"oninput"in this.slider||"onchange"in this.slider?Ka.a.DomEvent.on(this.slider,"change",this._tilesVersion,this):this.slider.onpropertychange=this._tilesVersion,this.options.switch&&(this._last=Ka.a.DomUtil.create("a","leaflet-ctv-slider-incdec leaflet-ctv-slider-last",this._sliderContent),this._last.innerHTML=this.options.lastText,Ka.a.DomEvent.on(this._last,"click",this.lastTilesVersion,this)),"vertical"===this.options.orientation?(this.slider.style.width="170px",this._sliderContainer.style.height="170px"):this._sliderContainer.style.width="150px",Ka.a.DomEvent.disableClickPropagation(this._container),this.options.collapsed?(Ka.a.Browser.android||Ka.a.DomEvent.on(this._container,"mouseenter",this._expand,this).on(this._container,"mouseleave",this._collapse,this),Ka.a.Browser.touch?Ka.a.DomEvent.on(this._sliderBtn,"click",Ka.a.DomEvent.stop).on(this._sliderBtn,"click",this._expand,this):Ka.a.DomEvent.on(this._sliderBtn,"focus",this._expand,this)):this._expand(),this._container},_expand:function(){Ka.a.DomUtil.addClass(this._container,"leaflet-control-ctv-expanded")},_collapse:function(){Ka.a.DomUtil.removeClass(this._container,"leaflet-control-ctv-expanded")},_tilesVersion:function(){var e=this.getVersion();this.tilesVersion(e)}});Ka.a.Map.mergeOptions({changeTileVersionControl:!1}),Ka.a.Map.addInitHook(function(){this.options.changeTileVersionControl&&(this.changeTileVersionControl=new gu,this.addControl(this.changeTileVersionControl))});var vu=function(e){return new gu(e)};Ka.a.supermap.control.changeTileVersion=vu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Su=Ka.a.Control.extend({options:{position:"bottomright",imageUrl:null,link:null,width:null,height:null,alt:"SuperMap iClient"},onAdd:function(){var e=Ka.a.DomUtil.create("div","iclient-leaflet-logo");e.style.marginTop=0,e.style.marginBottom=0,e.style.marginLeft=0,e.style.marginRight=0;var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAAAdCAYAAAAjHtusAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDozYWZlOGIwMi01MWE3LTRiZjYtYWVkYS05MGQ2ZTQ4YjZiMmUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODg0NkFBQUE3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODg0NkFBQTk3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4MWI3NzdhNC1lZmEyLTQ1MzUtOGQzNi03MmRjNDkyODMzN2UiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpjYTYzODVjMi1jNDQ1LTExN2EtYTc0ZC1lM2I5MzJlMGE4Y2QiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5q1HM0AAAF/ElEQVR42tSabYhUVRjHZ7W01C1uaCRW4F3oi9SXCUnwQ9gsGUFvOEtQH1bLu5VS9sbYh5KicjYt29qiGQwVg2xWWKgocob91AvC+CWsoJqB3qHMSdTMpZyeU/+Df07n3pk7997Z6cBv99z7nHvOvf/z/pxJNZvNVI/jCKXmv6EquAmVkxPSlvtp2GItr0/96fFQForChJAWDiVYTkMYMu4XBFcYjLOwWS3sNwmn8NGzZ0h4Flv/zwIdchAnh/slCGmmKUNIBzYPaXOUr0vPuEjD71JAPh7l61embzinhV3V8nnCGmGT8LwlzSL8/yUh4Tfjo9T/CgnCIYNKycA2Qq21AcHU/VHE80Idoo3Qs0W6p0UtUnkZvEMDeVcCyqxEafF7hL8Qf0oYsIj+lfC9cH1CwhchWAGCtZO+AooQOkdC1Km1VtCb63StW73uFSzgKFUkNwBbmZGGmqowhvg8ZNpH9oXChcIcYRdeNomgxLkaH+S1SGubAxyIpFv+Zp+0DYjrAS00j/dem2VGEl6FJ4Qa4quEu8j2hTCJ+GJhe4JjfQMf6JCYPPbysMPxBlp0BUKOogEF9Rg9/heNvNKYfM0KsZUZaYxX4STGrzJa+zbhPeFH2DcK10KItcI+pI0rVElwXl1ULaKnIJhDw0oRQpTQc1zcbwRU8ATy4DR6yMlTzwkqMziEWHvubJ4Nk4ZtHdnqwvwY17xq3Z4FjrG+z2Kdrdf2ZSGD+xlLPh6t1R0jP9fI22ZzKI92yvQl7EbmBxI4S7Y+vIAOL87QZqsc5uNnssxZIcfYjXT9snCR7jjobidp+FkxA2v+Cq1QervMDmp4P7Xs3YZtE9kOC3P/By6JGaETl8ElwueYTNTDq4UDsKnd7YfCNbT239LF1udS72xYJt1UWxNfN4IIP4bWuTpEja01JtMFZFsm/AHbtHBlDE6yasA4moYTrUbvdBTXHqUrAH4uSadbyzF+vbBM2IsNkS3MNa5305JxqfA02T4TnkX8XOH1mPw8ruVejpxbI9hZD2Cz1U7LdrrUvjP/WfZinNZhr6V27hP+FPZh9aLvLxVO4DllX0G2OcKnlO/DCblxaz6uXBtmi+8mBaP3/SP8IuEIiTRoPPQm2TaEmEyXo0JU+F0YiPFD0hhOsiE/vqeEVwyTgF8L51OilcIZ2I4Ll5NttvAJPfukUeB2sk0ZPSbKIUUJpCII7+DasWy08uhNNazT0wGHI7mAtB7KqMKm38HhDdAUibTVKGicbB8YAqrJ9DRsp43JdB4qUof1HQrPE6XTQWu3Ce/inVzjXhXpMiTwUYugNVQ+p80jrUsV5EH0POKeuXO9QjhFq5GryNYvfEMCDhsftYVsB9ETtG0V9ZjfhCURhbcJFpfwVZ9jvhxsLHwTYtp2svlWQw3vXL8UnqHVSIG8l8ex+tHhBXgjddgqHEZ8ufAA2aaEnYgrF/KrPXrEmMUqZ9THLW06xhoBaVueQpkug+ewOUphE3Qv2Q5gGamXYa+QbVq4O+DQ5FHyZqrjxNt7UHh9uuRa0F7HjCF8o9PCTOGnscM7g2u1Hl9C9oeEnxC/1ajZg8JLiM9Hj9GHJseMShwL2DO0G5yEWn3Zh1QUods5CPkIoqlwAZxhXMsb6HrcEPBxchhdJ6wj29vCW4hfLOzo8J3rltYX50nXQAATSf/K4DEaGlTLvplsk/QCpoD60EQ7gLYZc8H9wq+I3yncEOEcNhuz6HWf3XEiwU/4Y8YEqVp2P10rt+8REvBGw026i4aDcbL9jF8r8Blmf4fCOzhViiscskygXRdehf3CO4hfigmTBXyQrl8TFtD1IzQX3CbcQrY3hPcRv4z8OmHPXwchVNln2MmE7BX6VwIFi/he6uxvb6JM3m0fdqvx/ATidxg2JeC7VDErAw5NzGfvwRJVheEIQ8Mg/pdwIM+UOmi9Q8ivCsrIy0tF+wVbEcLrd3Pb2XisEb4Tdlhsi4WP4RBbaLGrHfC3PrvMIezy9rTpGm5lz9LOMG15xvFxD/j5gjzjjDbMOzk+9zzt3v5bgAEAibzFeFHVgYkAAAAASUVORK5CYII=";this.options.imageUrl&&(t=this.options.imageUrl);var i=this.options.alt,s="94px",r="29px",n="width:"+s+";height:"+r+";";this.options.imageUrl&&(n="width:"+(s=this.options.width)+";height:"+(r=this.options.height)+";",s&&r||(n=""));var a=this.options.link||"https://iclient.supermap.io";return e.innerHTML="<a href='"+a+"' target='_blank' style='border: none;display: block;'><img src="+t+" alt='"+i+"' style='border: none;"+n+"margin-right:5px;margin-bottom:2px;white-space: nowrap'></a>",e}});Ka.a.Map.mergeOptions({logoControl:!0}),Ka.a.Map.addInitHook(function(){!this._logoAdded&&this.options.logoControl&&(!0===this.options.logoControl?this.logoControl=new Su:this.options.logoControl instanceof Ka.a.Control&&(this.logoControl=this.options.logoControl),this.logoControl&&(this.addControl(this.logoControl),this._logoAdded=!0))});var bu=function(e){return new Su(e)};Ka.a.supermap.control.logo=bu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class _u{static toSuperMapBounds(e){return e&&-1!==["FeatureCollection","Feature"].indexOf(e.type)&&(e=Ka.a.geoJSON(e).getBounds()),e instanceof Ka.a.LatLngBounds?new ve(e.getSouthWest().lng,e.getSouthWest().lat,e.getNorthEast().lng,e.getNorthEast().lat):e instanceof Ka.a.Bounds?new ve(e.min.x,e.min.y,e.max.x,e.max.y):this.isArray(e)?new ve(e[0],e[1],e[2],e[3]):new ve}static isArray(e){return"[object Array]"==Object.prototype.toString.call(e)}static toProcessingParam(e){var t={};if(e.length<1)t="";else{for(var i=[],s=0;s<e.length;s++){var r={};r.x=e[s][0],r.y=e[s][1],i.push(r)}t.type="REGION",t.points=i}return t}}Ka.a.supermap.CommontypesConversion=_u;Ka.a.Util.supermap_callbacks={};var xu=function(e){return e?(new Ve).toGeoJSON(e):e},Cu=function(e){if(!e)return e;var t,i=new Ve;if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e.type))t=i.read(e,e.type);else if("function"==typeof e.toGeoJSON){var s=e.toGeoJSON();t=s?i.read(s,s.type):e}var r=t;return Ka.a.Util.isArray(t)&&(1===t.length?r=t[0]:t.length>1&&(r=[],t.map(function(e){return r.push(e.geometry),e}))),r&&r.geometry?r.geometry:r},Tu=function(e){var t;if(e===d.METER)t=1;else if(e===d.DEGREE)t=2*Math.PI*6378137/360;else if(e===d.KILOMETER)t=.001;else if(e===d.INCH)t=1/.025399999918;else{if(e!==d.FOOT)return t;t=.3048}return t},Mu=function(e,t,i){var s=e*t*(1/.0254)*Tu(i);return s=1/s},wu=function(e,t,i){var s=e*t*(1/.0254)*Tu(i);return s=1/s},Eu=function(e,t,i,s){return s=s||6378137,i=i||"",e>0&&t>0?(e=Ka.a.Util.NormalizeScale(e),"degree"===i.toLowerCase()||"degrees"===i.toLowerCase()||"dd"===i.toLowerCase()?254/t/e/(2*Math.PI*s/360)/1e4:254/t/e/1e4):-1},Au=function(e){return e>1?1/e:e};Ka.a.Util.toGeoJSON=xu,Ka.a.Util.toSuperMapGeometry=Cu,Ka.a.Util.resolutionToScale=Mu,Ka.a.Util.scaleToResolution=wu,Ka.a.Util.getMeterPerMapUnit=Tu,Ka.a.Util.GetResolutionFromScaleDpi=Eu,Ka.a.Util.NormalizeScale=Au;Ka.a.Util.transform=function(e,t=Ka.a.CRS.EPSG4326,i){let s=null,r=null;if(-1===["FeatureCollection","Feature","Geometry"].indexOf(e.type))if(e.toGeoJSON)e=e.toGeoJSON();else if(e instanceof Ka.a.LatLngBounds)e=Ka.a.rectangle(e).toGeoJSON();else{if(!(e instanceof Ka.a.Bounds))throw new Error("This tool only supports data conversion in geojson format or Vector Layers of Leaflet.");e=Ka.a.rectangle([[e.getTopLeft().x,e.getTopLeft().y],[e.getBottomRight().x,e.getBottomRight().y]]).toGeoJSON()}const n={point:function(e){return r(e)},multipoint:function(e){return n.linestring.apply(this,[e])},linestring:function(e){let t=[],i=null;for(let s=0,r=e.length;s<r;++s){try{i=n.point.apply(this,[e[s]])}catch(e){throw e}t.push(i)}return t},multilinestring:function(e){return n.polygon.apply(this,[e])},polygon:function(e){let t,i=[];for(let s=0,r=e.length;s<r;++s){try{t=n.linestring.apply(this,[e[s]])}catch(e){throw e}i.push(t)}return i},multipolygon:function(e){let t=[],i=null;for(let s=0,r=e.length;s<r;++s){try{i=n.polygon.apply(this,[e[s]])}catch(e){throw e}t.push(i)}return t}};return function(e,t){if(s=e,r=t,"Feature"===e.type)s=a(e);else if("FeatureCollection"===e.type){let t=[];for(let i=0;i<e.features.length;++i)try{t.push(a(e.features[i]))}catch(e){t=null}s.features=t}return s}(e,function(e){var s=t.unproject({x:e[0],y:e[1]});const r=i.project(s);return[r.x,r.y]});function a(e){const t=e.geometry;if(!ye.isArray(t.coordinates))throw"Geometry must have coordinates array: "+t;if(!n[t.type.toLowerCase()])throw"Unsupported geometry type: "+t.type;try{t.coordinates=n[t.type.toLowerCase()].apply(this,[t.coordinates])}catch(e){throw e}return e.geometry=t,e}};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Lu=Ka.a.TileLayer.extend({url:"http://online{num}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles={styles}&udt=20150815&scaler=1",options:{minZoom:3,maxZoom:19,bounds:Ka.a.latLngBounds(Ka.a.latLng(-85.0511287798,-180),Ka.a.latLng(85.0511287798,180)),retina:Ka.a.Browser.retina,attribution:pu.Baidu.attribution},initialize:function(e,t){e&&(this.url=e),Ka.a.setOptions(this,t),this.options.retina&&(this.options.maxZoom=18),Ka.a.stamp(this)},getTileUrl:function(e){var t=Ka.a.Util.template(this.url,{num:Math.abs((e.x+e.y)%8)+1,x:e.x,y:-e.y-1,z:this._getZoomForUrl(),styles:this.options.retina?"ph":"pl"});return this.options.tileProxy&&(t=this.options.tileProxy+encodeURIComponent(t)),t}}),Pu=function(e,t){return new Lu(e,t)};Ka.a.supermap.baiduTileLayer=Pu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Nu=Ka.a.TileLayer.extend({defaultURL:"http://t2.supermapcloud.com/FileService/image",options:{mapName:"quanguo",type:"web",minZoom:3,maxZoom:18,attribution:pu.Cloud.attribution},initialize:function(e,t){Ka.a.setOptions(this,t);var i=e||this.defaultURL;this._url=i+"?map="+this.options.mapName+"&type="+this.options.type,Ka.a.stamp(this)},getTileUrl:function(e){var t=this._url+"&x="+e.x+"&y="+e.y+"&z="+e.z;return this.options.tileProxy&&(t=this.options.tileProxy+encodeURIComponent(t)),t}}),Ou=function(e,t){return new Nu(e,t)};Ka.a.supermap.cloudTileLayer=Ou;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Iu=Xa.Layer.extend({options:{layersID:null,redirect:!1,transparent:!0,cacheEnabled:!0,clipRegionEnabled:!1,clipRegion:null,prjCoordSys:null,overlapDisplayed:!1,overlapDisplayedOptions:null,opacity:1,alt:"",pane:"tilePane",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:"",serverType:n.ISERVER,attribution:pu.Common.attribution,updateInterval:150,tileProxy:null,format:"png"},initialize:function(e,t){this._url=e,Xa.Util.setOptions(this,t)},onAdd:function(e){this.update=Xa.Util.throttle(this.update,this.options.updateInterval,this),e.on("moveend",this.update,this),this._currentImage&&this._currentImage._bounds.equals(this._map.getBounds())?e.addLayer(this._currentImage):this._currentImage&&(this._map.removeLayer(this._currentImage),this._currentImage=null),this.update()},onRemove:function(){this._currentImage&&this._map.removeLayer(this._currentImage),this._map.off("moveend",this.update,this)},bringToFront:function(){return this.options.position="front",this._currentImage&&this._currentImage.bringToFront(),this},bringToBack:function(){return this.options.position="back",this._currentImage&&this._currentImage.bringToBack(),this},getOpacity:function(){return this.options.opacity},setOpacity:function(e){return this.options.opacity=e,this._currentImage&&this._currentImage.setOpacity(e),this},getImageUrl:function(e){let t=ye.urlPathAppend(this._url,`image.${this.options.format}`),i=t+Xa.Util.getParamString(Object.assign({},this._initAllRequestParams(),e),t);return i=this._appendCredential(i),this.options.tileProxy&&(i=this.options.tileProxy+encodeURIComponent(i)),this.options.cacheEnabled||(i+="&_t="+(new Date).getTime()),i},_getImageParams:function(){var e=this._calculateImageSize();return{viewBounds:this._compriseBounds(this._calculateBounds()),width:e.x,height:e.y}},_initAllRequestParams:function(){var e=this.options||{},t={},i=!0===e.redirect&&e.redirect;t.redirect=i;var s=!0===e.transparent&&e.transparent;t.transparent=s;var r=!1!==e.cacheEnabled||e.cacheEnabled;return t.cacheEnabled=r,e.prjCoordSys&&(t.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.layersID&&(t.layersID=e.layersID),e.rasterfunction&&(t.rasterfunction=JSON.stringify(e.rasterfunction)),e.clipRegionEnabled&&e.clipRegion&&(t.clipRegionEnabled=e.clipRegionEnabled,t.clipRegion=JSON.stringify(ze.fromGeometry(Cu(e.clipRegion)))),!1===e.overlapDisplayed?(t.overlapDisplayed=!1,e.overlapDisplayedOptions&&(t.overlapDisplayedOptions=this.overlapDisplayedOptions.toString())):t.overlapDisplayed=!0,t},_requestImage:function(e,t){var i=this.getImageUrl(e);this._loadImage(i,t)},_loadImage:function(e,t){if(this._map){var i=new Xa.ImageOverlay(e,t,{opacity:0,alt:this.options.alt,zIndex:this.options.zIndex,className:this.options.className,errorOverlayUrl:this.options.error,crossOrigin:this.options.crossOrigin,pane:this.options.pane||this.getPane(),interactive:this.options.interactive}).addTo(this._map),s=function(e){i.off("error",s,this);var r=this._map;if(r){var n=e.target,a=this._currentImage;n._bounds&&n._bounds.equals(t)&&n._bounds.equals(r.getBounds())?(this._currentImage=n,"front"===this.options.position&&this.bringToFront(),"back"===this.options.position&&this.bringToBack(),this._currentImage._map&&this._currentImage.setOpacity(this.options.opacity),a&&r.removeLayer(a),a&&a._map&&a._map.removeLayer(a)):r.removeLayer(n),this.fire("load",{bounds:t})}};i.once("load",s,this),i.once("error",function(){this._map.removeLayer(i),this.fire("error"),i.off("load",s,this)},this),this.fire("loading",{bounds:t})}},update:function(){if(this._map){var e=this._map.getZoom(),t=this._map.getBounds();if(e>this._map.options.maxZoom||e<this._map.options.zoom)this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null);else{var i=this._getImageParams();i?this._requestImage(i,t):this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null)}}},_calculateBounds:function(){var e=this._map.getPixelBounds(),t=this._map.unproject(e.getBottomLeft()),i=this._map.unproject(e.getTopRight()),s=this._map.options.crs.project(i),r=this._map.options.crs.project(t);return Ka.a.bounds(s,r)},_compriseBounds:function(e){var t={leftBottom:{x:e.getBottomLeft().x,y:e.getTopRight().y},rightTop:{x:e.getTopRight().x,y:e.getBottomLeft().y}};return JSON.stringify(t)},_calculateImageSize:function(){var e=this._map,t=e.getPixelBounds(),i=e.getSize(),s=e.unproject(t.getBottomLeft()),r=e.unproject(t.getTopRight()),n=e.latLngToLayerPoint(r).y,a=e.latLngToLayerPoint(s).y;return(n>0||a<i.y)&&(i.y=a-n),i},_appendCredential:function(e){var t,i,s=e;switch(this.options.serverType){case n.IPORTAL:(t=(i=Ze.getToken(this._url))?new Ne(i,"token"):null)||(t=(i=Ze.getKey(this._url))?new Ne(i,"key"):null);break;case n.ONLINE:t=(i=Ze.getKey(this._url))?new Ne(i,"key"):null;break;default:t=(i=Ze.getToken(this._url))?new Ne(i,"token"):null}return t&&(s=ye.urlAppend(s,t.getUrlParameters())),s}}),Fu=function(e,t){return new Iu(e,t)};Ka.a.supermap.imageMapLayer=Fu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Ru=Ka.a.TileLayer.extend({options:{version:"1.0.0",style:"",tilematrixSet:"",format:"image/png",tileSize:256,matrixIds:null,layer:"",requestEncoding:"KVP",attribution:""},initialize:function(e,t){this._url=e,Ka.a.setOptions(this,t);var i=this.options;if("REST"===i.requestEncoding){this.formatSuffix="."+({"image/png":"png","image/png8":"png","image/png24":"png","image/png32":"png",png:"png","image/jpeg":"jpg","image/jpg":"jpg",jpeg:"jpg",jpg:"jpg"}[i.format]||i.format.split("/").pop()||"png")}else i.requestEncoding="KVP"},getTileUrl:function(e){var t=this._getZoomForUrl(),i=this.options.matrixIds?this.options.matrixIds[t].identifier:t,s=Ka.a.Util.template(this._url,{s:this._getSubdomain(e)}),r={service:"WMTS",request:"GetTile",version:this.options.version,style:this.options.style,tilematrixSet:this.options.tilematrixSet,format:this.options.format,width:this.options.tileSize,height:this.options.tileSize,layer:this.options.layer,tilematrix:i,tilerow:e.y,tilecol:e.x};if(this.options.tileProxy&&(s=this.options.tileProxy+s),"KVP"===this.options.requestEncoding)s+=Ka.a.Util.getParamString(r,s);else if("REST"===this.options.requestEncoding){s+="/"+r.layer+"/"+r.style+"/"+r.tilematrixSet+"/"+r.tilematrix+"/"+r.tilerow+"/"+r.tilecol+this.formatSuffix}return s}}),Du=function(e,t){return new Ru(e,t)};Ka.a.supermap.wmtsLayer=Du;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var ku=Ru.extend({layerLabelMap:{vec:"cva",ter:"cta",img:"cia"},layerZoomMap:{vec:18,ter:14,img:18},options:{layerType:"vec",isLabel:!1,attribution:pu.Tianditu.attribution,url:"https://t{s}.tianditu.gov.cn/{layer}_{proj}/wmts?",zoomOffset:1,key:"",dpi:96,style:"default",format:"tiles",subdomains:[0,1,2,3,4,5,6,7]},initialize:function(e){e=e||{},Ka.a.setOptions(this,e),this.options.layer=this.options.isLabel?this.layerLabelMap[this.options.layerType]:this.options.layerType,this.options.maxZoom=this.layerZoomMap[this.options.layerType]-1,Ru.prototype.initialize.call(this,this.options.url,this.options),Ka.a.stamp(this)},onAdd:function(e){this.options.tilematrixSet="EPSG:4326"===e.options.crs.code?"c":"w",this.options.key&&(this._url=`${this._url}tk=${this.options.key}`),this._url=this._url.replace("{layer}",this.options.layer).replace("{proj}",this.options.tilematrixSet),Ru.prototype.onAdd.call(this,e)}}),Bu=function(e){return new ku(e)};Ka.a.supermap.tiandituTileLayer=Bu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Uu=Ka.a.TileLayer.extend({options:{layersID:null,redirect:!1,transparent:!0,cacheEnabled:!0,clipRegionEnabled:!1,clipRegion:null,prjCoordSys:null,overlapDisplayed:!1,overlapDisplayedOptions:null,tileversion:null,crs:null,serverType:n.ISERVER,format:"png",tileProxy:null,attribution:pu.Common.attribution,subdomains:null},initialize:function(e,t){this._url=e,Ka.a.TileLayer.prototype.initialize.apply(this,arguments),Ka.a.setOptions(this,t),Ka.a.stamp(this),this.tileSetsIndex=-1,this.tempIndex=-1},onAdd:function(e){this._crs=this.options.crs||e.options.crs,Ka.a.TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this.getScaleFromCoords(e),i=this._getLayerUrl()+"&scale="+t+"&x="+e.x+"&y="+e.y;return this.options.tileProxy&&(i=this.options.tileProxy+encodeURIComponent(i)),this.options.cacheEnabled||(i+="&_t="+(new Date).getTime()),this.options.subdomains&&(i=Ka.a.Util.template(i,{s:this._getSubdomain(e)})),i},getScale:function(e){var t=e||this._map.getZoom();return this.scales[t]},getScaleFromCoords:function(e){var t,i=this;return i.scales&&i.scales[e.z]?i.scales[e.z]:(i.scales=i.scales||{},t=i.getDefaultScale(e),i.scales[e.z]=t,t)},getDefaultScale:function(e){var t=this._crs;if(t.scales)return t.scales[e.z];var i=this._tileCoordsToBounds(e),s=t.project(i.getNorthEast()),r=t.project(i.getSouthWest()),n=this.options.tileSize,a=Math.max(Math.abs(s.x-r.x)/n,Math.abs(s.y-r.y)/n),o=d.METER;if(t.code){var l=t.code.split(":");if(l&&l.length>1){var h=parseInt(l[1]);o=h&&h>=4e3&&h<=5e3?d.DEGREE:d.METER}}return Mu(a,96,o)},setTileSetsInfo:function(e){this.tileSets=e,Ka.a.Util.isArray(this.tileSets)&&(this.tileSets=this.tileSets[0]),this.tileSets&&(this.fire("tilesetsinfoloaded",{tileVersions:this.tileSets.tileVersions}),this.changeTilesVersion())},lastTilesVersion:function(){this.tempIndex=this.tileSetsIndex-1,this.changeTilesVersion()},nextTilesVersion:function(){this.tempIndex=this.tileSetsIndex+1,this.changeTilesVersion()},changeTilesVersion:function(){var e=this;if(null!=e.tileSets&&!(e.tempIndex===e.tileSetsIndex||this.tempIndex<0)){var t=e.tileSets.tileVersions;if(t&&e.tempIndex<t.length&&e.tempIndex>=0){var i=t[e.tempIndex].name;e.mergeTileVersionParam(i)&&(e.tileSetsIndex=e.tempIndex,e.fire("tileversionschanged",{tileVersion:t[e.tempIndex]}))}}},updateCurrentTileSetsIndex:function(e){this.tempIndex=e},mergeTileVersionParam:function(e){return!!e&&(this.requestParams.tileversion=e,this._paramsChanged=!0,this.redraw(),this._paramsChanged=!1,!0)},_getLayerUrl:function(){return this._paramsChanged&&(this._layerUrl=this._createLayerUrl()),this._layerUrl||this._createLayerUrl()},_createLayerUrl:function(){let e=ye.urlPathAppend(this._url,`tileImage.${this.options.format}`);return this.requestParams=this.requestParams||this._getAllRequestParams(),e=ye.urlAppend(e,Xa.Util.getParamString(this.requestParams)),e=this._appendCredential(e),this._layerUrl=e,e},_getAllRequestParams:function(){var e=this.options||{},t={},i=this.options.tileSize;i instanceof Ka.a.Point||(i=Ka.a.point(i,i)),t.width=i.x,t.height=i.y,t.redirect=!0===e.redirect,t.transparent=!0===e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),e.prjCoordSys&&(t.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.layersID&&(t.layersID=e.layersID.toString()),e.clipRegionEnabled&&e.clipRegion&&(e.clipRegion=ze.fromGeometry(Cu(e.clipRegion)),t.clipRegionEnabled=e.clipRegionEnabled,t.clipRegion=JSON.stringify(e.clipRegion));var s=this._crs;if(s.options&&s.options.origin)t.origin=JSON.stringify({x:s.options.origin[0],y:s.options.origin[1]});else if(s.projection&&s.projection.bounds){var r=s.projection.bounds,n=Ka.a.point(r.min.x,r.max.y);t.origin=JSON.stringify({x:n.x,y:n.y})}return!1===e.overlapDisplayed?(t.overlapDisplayed=!1,e.overlapDisplayedOptions&&(t.overlapDisplayedOptions=this.overlapDisplayedOptions.toString())):t.overlapDisplayed=!0,!0===t.cacheEnabled&&e.tileversion&&(t.tileversion=e.tileversion.toString()),e.rasterfunction&&(t.rasterfunction=JSON.stringify(e.rasterfunction)),t},_appendCredential:function(e){var t,i,s=e;switch(this.options.serverType){case n.IPORTAL:(t=(i=Ze.getToken(this._url))?new Ne(i,"token"):null)||(t=(i=Ze.getKey(this._url))?new Ne(i,"key"):null);break;case n.ONLINE:t=(i=Ze.getKey(this._url))?new Ne(i,"key"):null;break;default:t=(i=Ze.getToken(this._url))?new Ne(i,"token"):null}return t&&(s=ye.urlAppend(s,t.getUrlParameters())),s}}),Gu=function(e,t){return new Uu(e,t)};Ka.a.supermap.tiledMapLayer=Gu;var ju=i(3),zu=i.n(ju),Vu={TEXT:{fontSize:"14px",fontFamily:"Arial Unicode MS Regular,Microsoft YaHei",textAlign:"left",color:"rgba(255,255,255,0)",fillColor:"rgba(80,80,80,1)",weight:1,globalAlpha:1},POINT:{fillColor:"#ffcc00",color:"#cc3333",weight:1,radius:3,opacity:1},LINE:{color:"rgba(0,0,0,0)",weight:1,lineCap:"butt",lineJoin:"round",dashOffset:0,dashArray:[],opacity:1},REGION:{color:"rgba(0,0,0,0)",fillColor:"rgba(0,0,0,0)",weight:1,lineCap:"butt",lineJoin:"round",dashOffset:0,opacity:1,fillOpacity:1,dashArray:[]}};Ka.a.supermap.DefaultStyle=Vu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/var Hu={TEXT:{"text-size":"fontSize","text-face-name":"fontFamily","text-align":"textAlign","text-name":"textName","text-weight":"fontWeight","text-halo-color":"color","text-fill":"fillColor","text-comp-op":"globalCompositeOperation"},POINT:{"point-file":"iconUrl","point-fill":"fillColor","point-radius":"radius","point-halo-color":"color","point-comp-op":"globalCompositeOperation"},LINE:{"line-color":"color","line-width":"weight","line-cap":"lineCap","line-join":"lineJoin","line-dash-offset":"dashOffset","line-opacity":"opacity","line-dasharray":"dashArray","line-comp-op":"globalCompositeOperation"},REGION:{"line-color":"color","line-width":"weight","line-cap":"lineCap","line-join":"lineJoin","line-dash-offset":"dashOffset","line-opacity":"opacity","line-dasharray":"dashArray","polygon-fill":"fillColor","polygon-opacity":"fillOpacity","polygon-comp-op":"globalCompositeOperation"}},Ju={lineWidth:{leafletStyle:"weight",type:"number",unit:"mm",defaultValue:.1},fillForeColor:{leafletStyle:"fillColor",type:"color",defaultValue:"rgba(0,0,0,0)"},foreColor:{leafletStyle:"color",type:"color",defaultValue:"rgba(0,0,0,0)"},markerSize:{leafletStyle:"markerSize",type:"number",unit:"mm",defaultValue:2.4},lineColor:{leafletStyle:"color",type:"color",defaultValue:"#000000"}},qu={clear:"",src:"",dst:"","src-over":"source-over","dst-over":"destination-over","src-in":"source-in","dst-in":"destination-in","src-out":"source-out","dst-out":"destination-out","src-atop":"source-atop","dst-atop":"destination-atop",xor:"xor",plus:"lighter",minus:"",multiply:"",screen:"",overlay:"",darken:"",lighten:"lighter","color-dodge":"","color-burn":"","hard-light":"","soft-light":"",difference:"",exclusion:"",contrast:"",invert:"","invert-rgb":"","grain-merge":"","grain-extract":"",hue:"",saturation:"",color:"",value:""};Ka.a.supermap.CartoStyleMap=Hu,Ka.a.supermap.ServerStyleMap=Ju,Ka.a.supermap.CompOpMap=qu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Wu{constructor(e){this.cartoCSS=null,this.mapUrl=e}pretreatedCartoCSS(e,t){t&&(e=this.processCharacters(e)),this.cartoCSS=this.cartoCSS||{};var i=new Bn(e).getShaders();if(i)for(var s=0;s<i.length;s++){var r=i[s].elements[0],n=i[s].attachment;this.cartoCSS[r.clean]=this.cartoCSS[r.clean]||{},this.cartoCSS[r.clean][n]=this.cartoCSS[r.clean][n]||[],this.cartoCSS[r.clean][n].push(i[s])}}processCharacters(e){var t=e;if(t){t=(t=t.replace(/[@]/gi,"___")).replace(/\\#/gi,"#");var i={};return this.layersInfo&&Object.keys(this.layersInfo).sort().forEach(function(e){var s=e.replace(/[@#\s]/gi,"___"),r=e,n=Object.keys(i);for(let t=n.length;t>-1;t--)if(e.indexOf(n[t])>-1){r=e.replace(n[t],i[n[t]]);break}r=r.replace(/[#]/gi,"#"),i[e]=s,t=t.replace(new RegExp(r,"g"),s)}),t=(t=t.replace(/[#]/gi,"\n#")).replace(/\[zoom/gi,"[scale")}}pickShader(e){if(!this.cartoCSS)return null;var t=e.replace(/[@#\s]/gi,"___");return this.cartoCSS[t]}getDefaultStyle(e){var t={},i=Vu[e];for(var s in i){var r=i[s];t[s]=r}return t}getStyleFromiPortalMarker(e){return 0==e.indexOf("./")?null:(0==e.indexOf("http://support.supermap.com.cn:8092/static/portal")&&(e=e.replace("http://support.supermap.com.cn:8092/static/portal","http://support.supermap.com.cn:8092/apps/viewer/static")),Ka.a.icon({iconUrl:e,iconSize:Ka.a.point(48,43),iconAnchor:Ka.a.point(24,43),popupAnchor:Ka.a.point(0,-43)}))}getStyleFromiPortalStyle(e,t,i){var s=i?JSON.parse(i):null,r={};if("Point"===t||"MultiPoint"===t){var n=s||e.pointStyle;return n.externalGraphic?0==n.externalGraphic.indexOf("./")?null:(0==n.externalGraphic.indexOf("http://support.supermap.com.cn:8092/static/portal")&&(n.externalGraphic=n.externalGraphic.replace("http://support.supermap.com.cn:8092/static/portal","http://support.supermap.com.cn:8092/apps/viewer/static")),Ka.a.icon({iconUrl:n.externalGraphic,iconSize:Ka.a.point(n.graphicWidth,n.graphicHeight),iconAnchor:Ka.a.point(-n.graphicXOffset,-n.graphicYOffset),popupAnchor:Ka.a.point(0,-n.graphicHeight)})):(r.radius=n.pointRadius,r.color=n.strokeColor,r.opacity=n.strokeOpacity,r.lineCap=n.strokeLineCap,r.weight=n.strokeWidth,r.fillColor=n.fillColor,r.fillOpacity=n.fillOpacity,r.dashArray=this.dashStyle(n,1),r)}if("LineString"===t||"MultiLineString"===t||"Box"===t){var a=s||e.lineStyle;return r.color=a.strokeColor,r.opacity=a.strokeOpacity,r.fillOpacity=a.fillOpacity,r.lineCap=a.strokeLineCap,r.weight=a.strokeWidth,r.dashArray=this.dashStyle(a,1),r}if("Polygon"===t||"MultiPolygon"===t){var o=s||e.polygonStyle;return r.color=o.strokeColor,r.opacity=o.strokeOpacity,r.lineCap=o.strokeLineCap,r.weight=o.strokeWidth,r.fillColor=o.fillColor,r.fillOpacity=o.fillOpacity,r.dashArray=this.dashStyle(o,1),r}}dashStyle(e,t){if(!e)return[];var i=e.strokeWidth*t,s=e.strokeDashstyle;switch(s){case"solid":return[];case"dot":return[1,4*i];case"dash":return[4*i,4*i];case"dashdot":return[4*i,4*i,1,4*i];case"longdash":return[8*i,4*i];case"longdashdot":return[8*i,4*i,1,4*i];default:return s?ye.isArray(s)?s:(s=ue.trim(s).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(","):[]}}getValidStyleFromCarto(e,t,i,s,r){if(!i)return null;var n=s.type,a=s.properties.attributes||{},o=this.getDefaultStyle(n);r=void 0===r||r,a.FEATUREID=s.properties.id,a.SCALE=t;for(var l,h,u=Hu[n],c=0,d=i.length;c<d;c++){var p=i[c],f=u[p.property],m=p.getValue(a,e,!0);if(null!==m&&f)if("fontSize"===f)r&&(m*=.8),l=m+"px",o.fontSize=l;else if("fontName"===f)h=m,o.fontName=h;else{if("globalCompositeOperation"===f){if(!(m=qu[m]))continue}else if(r&&"iconUrl"===f){m=(m=this.mapUrl+"/tileFeature/symbols/"+m.replace(/(___)/gi,"@")).replace(/(__0__0__)/gi,"__8__8__"),o.iconUrl=m;continue}"weight"===f&&m<1&&(m=Math.ceil(m)),o[f]=m}}return o}getValidStyleFromLayerInfo(e,t){var i=e.type,r=this.getDefaultStyle(i),n=t&&t.layerStyle;if(!n)return r;if("POINT"===i){var a=Math.ceil(n.markerSize*s.DOTS_PER_INCH*s.INCHES_PER_UNIT.mm)||8,o={transparent:!0,resourceType:"SYMBOLMARKER",picWidth:a,picHeight:a,style:JSON.stringify(n)};return r.iconUrl=ye.urlAppend(this.mapUrl+"/symbol.png",ye.getParameterString(o)),r.iconSize=[a,a],r}if("TEXT"===i){if(n=e.properties.textStyle||t.layerStyle,r.fontWeight=n.bold?n.fontWeight:"normal",n.fontHeight){var l=n.fontHeight*s.DOTS_PER_INCH*s.INCHES_PER_UNIT.mm*.85;r.fontSize=l+"px",r.textHeight=l}if(n.fontName&&(r.fontFamily=n.fontName.indexOf("@")?n.fontName.replace(/@/g,""):n.fontName),n.align){var h=n.align.replace(/TOP|MIDDLE|BASELINE|BOTTOM/,"");r.textAlign=h.toLowerCase()}return r.weight=n.outline?n.outlineWidth:0,n.backColor&&(r.color="rgba("+n.backColor.red+","+n.backColor.green+","+n.backColor.blue+",1)"),n.foreColor&&(r.fillColor="rgba("+n.foreColor.red+","+n.foreColor.green+","+n.foreColor.blue+",1)"),r.rotation=n.rotation||0,r}var u=n.fillSymbolID>7?0:n.fillSymbolID,c=n.lineSymbolID>5?0:n.lineSymbolID;for(var d in n){var p=Ju[d];if(p){var f=p.leafletStyle;switch(p.type){case"number":{let e=n[d];p.unit&&(e=e*s.DOTS_PER_INCH*s.INCHES_PER_UNIT[p.unit]*2.5),r[f]=e;break}case"color":{var m=n[d];let e,t=1;if("fillColor"===f)0!==u&&1!==u||(t=1-u,e="rgba("+m.red+","+m.green+","+m.blue+","+t+")");else if("color"===f){if(0===c||5===c)t=0===c?1:0;else{var y=[1,0];switch(c){case 1:y=[9.7,3.7];break;case 2:y=[3.7,3.7];break;case 3:y=[9.7,3.7,2.3,3.7];break;case 4:y=[9.7,3.7,2.3,3.7,2.3,3.7]}r.lineDasharray=y}e="rgba("+m.red+","+m.green+","+m.blue+","+t+")"}r[f]=e;break}}}}return t.textField&&(r.textAlign="LEFT"),r}}Ka.a.supermap.CartoCSSToLeaflet=Wu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Yu=Ka.a.Class.extend({initialize:function(e){var t=(e=e||{}).latLng||e._latLng;this._latLng=Ka.a.latLng(t.lat,t.lng),this._style=e.style||e._canvas,this.attributes=e.attributes,this.id=e.id?e.id:null},getId(){return this.id},setId(e){this.id=e},setLatLng:function(e){this._latLng=e},setCanvas:function(e){this._style=e},setAttributes:function(e){this.attributes=e},getLatLng:function(){return this._latLng},getCanvas:function(){return this._style},getAttributes:function(){return this.attributes},setStyle:function(e){this._style=e},getStyle:function(){return this._style}}),Qu=function(e){return new Yu(e)};Ka.a.supermap.graphic=Qu;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Xu=Ka.a.Class.extend({initialize:function(e,t){this.geometry=e,this.attributes=t},toFeature:function(){let e=this.geometry;const t=[];let i;if(e.toGeoJSON)return(i=e.toGeoJSON()).properties=this.attributes,(new Ve).read(i)[0];if(3===e.length)e=new Me(e[1],e[0],e[2]);else if(2===e.length)e=new Ce(t[0],t[1]);else if(e instanceof Ka.a.LatLng)e=new Ce(e.lng,e.lat);else if(e instanceof Ka.a.Point)e=new Ce(e.x,e.y);else if(e instanceof Ka.a.CircleMarker){var s=e.getLatLng();e=new Ce(s.lng,s.lat)}return new Re(e,this.attributes)},reverseLatLngs:function(e){Ka.a.Util.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++)e[t]=[e[t].lng,e[t].lat];return e}}),Ku=function(e,t){return new Xu(e,t)};Ka.a.supermap.themeFeature=Ku;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Zu=Ka.a.Layer.extend({options:{alwaysMapCRS:!1,id:ye.createUniqueID("themeLayer_"),opacity:1,TFEvents:[],attribution:pu.Common.attribution},initialize:function(e,t){Ka.a.Util.setOptions(this,t),this.name=e,this.features=[],this.TFEvents=this.options.TFEvents,this.levelRenderer=new Ma,this.movingOffset=[0,0]},getEvents:function(){var e={zoomend:this._reset,moveend:this._reset,resize:this._resize};return this._map._zoomAnimated&&(e.zoomanim=this._zoomAnim),e},onRemove:function(e){Ka.a.DomUtil.remove(this.container),e.off("mousemove",this.mouseMoveHandler)},onAdd:function(e){var t=this;if(t.map=t._map=e,t._initContainer(),t.levelRenderer){var i=e.getSize();t.container.style.width=i.x+"px",t.container.style.height=i.y+"px",t._updateOpacity(),t.renderer=t.levelRenderer.init(t.container),t.renderer.clear(),t.features&&t.features.length>0&&t._reset(),t.addTFEvents(),t.mouseMoveHandler=function(e){var i=e.layerPoint;t.currentMousePosition=Ka.a.point(i.x+t.movingOffset[0],i.y+t.movingOffset[1])},e.on("mousemove",t.mouseMoveHandler),t.update(e.getBounds())}else e.removeLayer(t)},addFeatures:function(e){},redrawThematicFeatures:function(e){},destroyFeatures:function(e){if(void 0===e&&(e=this.features),e){this.removeFeatures(e);for(var t=e.length-1;t>=0;t--)e[t].destroy()}},removeFeatures:function(e){var t=this;if(e&&0!==e.length){if(e===t.features)return t.removeAllFeatures();Ka.a.Util.isArray(e)||(e=[e]);for(var i=[],s=e.length-1;s>=0;s--){var r=e[s],n=Ka.a.Util.indexOf(t.features,r);-1!==n?t.features.splice(n,1):i.push(r)}for(var a=[],o=0,l=t.features.length;o<l;o++)r=t.features[o],a.push(r);t.features=[],t.addFeatures(a),t.renderer&&(t._map?t.redrawThematicFeatures(t._map.getBounds()):t.redrawThematicFeatures());var h=0==i.length;t.fire("featuresremoved",{features:i,succeed:h})}},removeAllFeatures:function(){this.renderer&&this.renderer.clear(),this.features=[],this.fire("featuresremoved",{features:[],succeed:!0})},getFeatures:function(){for(var e=this.features.length,t=new Array(e),i=0;i<e;++i)t[i]=this.features[i];return t},getFeatureBy:function(e,t){var i=null;for(var s in this.features)if(this.features[s][e]===t){i=this.features[s];break}return i},getFeatureById:function(e){return this.getFeatureBy("id",e)},getFeaturesByAttribute:function(e,t){var i,s=[];for(var r in this.features)(i=this.features[r])&&i.attributes&&i.attributes[e]===t&&s.push(i);return s},update:function(e){var t=this._map.containerPointToLayerPoint([0,0]);Ka.a.DomUtil.setPosition(this.container,t);var i=this;i.renderer&&i.redrawThematicFeatures(e),i.currentMousePosition&&(i.currentMousePosition=Ka.a.point(i.currentMousePosition.x-i.movingOffset[0],i.currentMousePosition.y-i.movingOffset[1])),i.movingOffset=[0,0],i._zoom=i._map.getZoom(),i._center=i._map.getCenter()},setOpacity:function(e){e!==this.options.opacity&&(isNaN(e)||(this.options.opacity=e,this._updateOpacity()))},redraw:function(){var e=this;return!!e.renderer&&(e._map?e.redrawThematicFeatures(e._map.getBounds()):e.redrawThematicFeatures(),!0)},on:function(e,t,i){return this.renderer?this.renderer.on(e,t):Ka.a.Layer.prototype.on.call(this,e,t),this},off:function(e,t,i){return this.renderer?this.renderer.un(e,t):Ka.a.Layer.prototype.off.call(this,e,t),this},fire:function(e,t,i){return this.renderer&&this.renderer.trigger(e,t),Ka.a.Layer.prototype.fire.call(this,e,t,i),this},addTFEvents:function(){for(var e=this.TFEvents,t=e.length,i=0;i<t;i++)this.renderer.on(e[i][0],e[i][1])},getLocalXY:function(e){if(!this._map)return e;var t=e;Ka.a.Util.isArray(e)&&(t=Ka.a.point(e[0],e[1])),e instanceof Ka.a.Point||(t=e instanceof Ce||e instanceof Me?Ka.a.point(e.x,e.y):Ka.a.point(e.lon,e.lat));var i=this._map.latLngToAccurateContainerPoint(this.options.alwaysMapCRS?this._map.options.crs.unproject(t):Ka.a.latLng(t.y,t.x));return[i.x,i.y]},toiClientFeature:function(e){ye.isArray(e)||(e=[e]);let t=[];for(let i=0;i<e.length;i++)if(e[i]instanceof Xu)t.push(e[i].toFeature());else if(e[i]instanceof Re)t.push(e[i]);else if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e[i].type)){const s=new Ve;t=t.concat(s.read(e[i]))}else{if(!e[i].geometry||!e[i].geometry.parts)throw new Error(`features[${i}]'s type is not be supported.`);t.push(Mr.fromJson(e[i]).toFeature())}return t},toFeature:function(e){return this.toiClientFeature(e)},_initContainer:function(){var e=this.getPane(),t="themeLayer leaflet-layer leaflet-zoom-"+(this._map.options.zoomAnimation&&Ka.a.Browser.any3d?"animated":"hide");this.container=Ka.a.DomUtil.create("div",t,e);var i=Ka.a.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);this.container.id=this.options.id,this.container.style[i]="50% 50%",this.container.style.position="absolute",this.container.style.zIndex=200},_zoomAnim:function(e){var t=this._map.getZoomScale(e.zoom),i=this._map._getCenterOffset(e.center)._multiplyBy(-t).subtract(this._map._getMapPanePos());Ka.a.DomUtil.setTransform?Ka.a.DomUtil.setTransform(this.container,i,t):this.container.style[Ka.a.DomUtil.TRANSFORM]=Ka.a.DomUtil.getTranslateString(i)+" scale("+t+")"},_updateOpacity:function(){var e=this;ye.modifyDOMElement(e.container,null,null,null,null,null,null,e.options.opacity),null!==e._map&&e._map.fire("changelayer",{layer:e,property:"opacity"})},_reset:function(){var e=this,t=e._map.getBounds();e.update(t);var i=e._map.getSize(),s=this._map.containerPointToLayerPoint([0,0]);Ka.a.DomUtil.setPosition(this.container,s),parseFloat(e.container.width)!==parseFloat(i.x)&&(e.container.width=i.x+"px"),parseFloat(e.container.height)!==parseFloat(i.y)&&(e.container.height=i.y+"px"),e.redraw()},_resize:function(){var e=this._map.getSize();this.container.style.width=e.x+"px",this.container.style.height=e.y+"px",this.renderer.resize()}}),$u=Zu.extend({options:{nodesClipPixel:2,isHoverAble:!1,isMultiHover:!1,isClickAble:!0,isAllowFeatureStyle:!1},initialize:function(e,t){Zu.prototype.initialize.call(this,e,t),Ka.a.Util.setOptions(this,t);this.cache={},this.cacheFields=[],this.style={},this.highlightStyle={}},addFeatures:function(e){var t=this;t.fire("beforefeaturesadded",{features:e}),this.features=this.toiClientFeature(e),t.isCustomSetMaxCacheCount||(t.maxCacheCount=5*t.features.length),t.renderer&&(t._map?t.redrawThematicFeatures(t._map.getBounds()):t.redrawThematicFeatures())},removeFeatures:function(e){this.clearCache(),Zu.prototype.removeFeatures.call(this,arguments)},removeAllFeatures:function(){this.clearCache(),Zu.prototype.removeAllFeatures.call(this,arguments)},redrawThematicFeatures:function(e){var t=this,i=t.renderer.getHoverOne(),s=null;if(i&&i.refDataID&&(s=i.refDataID),this.options.alwaysMapCRS&&e&&e instanceof Ka.a.LatLngBounds){var r=this._map.options.crs;e=Ka.a.bounds(r.project(e.getSouthWest()),r.project(e.getNorthEast()))}e=_u.toSuperMapBounds(e),t.renderer.clearAll();for(var n=t.features,a=t.cache,o=t.cacheFields,l=t._map.getZoom(),h=t.maxCacheCount,u=0,c=n.length;u<c;u++){var d=n[u],p=d.geometry.getBounds();if(!e||e.intersectsBounds(p)){var f=d.id+"_zoom_"+l.toString();if(a[f])a[f].updateAndAddShapes();else{var m=t.createThematicFeature(n[u]);if(!(m.getShapesCount()<1)&&(a[f]=m,o.push(f),o.length>h)){var y=o[0];o.splice(0,1),delete a[y]}}}}if(t.renderer.render(),s&&t.options.isHoverAble&&t.options.isMultiHover){var g=this.getShapesByFeatureID(s);this.renderer.updateHoverShapes(g)}},createThematicFeature:function(e){var t=this,i=t.getStyleByData(e);e.style&&t.isAllowFeatureStyle&&(i=ye.copyAttributesWithClip(e.style));var s={};s.nodesClipPixel=t.options.nodesClipPixel,s.isHoverAble=t.options.isHoverAble,s.isMultiHover=t.options.isMultiHover,s.isClickAble=t.options.isClickAble,s.highlightStyle=ua.transformStyle(t.highlightStyle);for(var r=new fa(e,t,ua.transformStyle(i),s),n=0;n<r.shapes.length;n++)t.renderer.addShape(r.shapes[n]);return r},redraw:function(){return this.clearCache(),Zu.prototype.redraw.apply(this,arguments)},clearCache:function(){this.cache={},this.cacheFields=[]},clear:function(){this.renderer.clearAll(),this.renderer.refresh(),this.removeAllFeatures(),this.clearCache()},getCacheCount:function(){return this.cacheFields.length},setMaxCacheCount:function(e){isNaN(e)||(this.maxCacheCount=e,this.isCustomSetMaxCacheCount=!0)},getShapesByFeatureID:function(e){var t=[],i=this.renderer.getAllShapes();if(!e)return i;for(var s=0,r=i.length;s<r;s++){var n=i[s];n.refDataID&&e===n.refDataID&&t.push(n)}return t}}),ec=$u.extend({initialize:function(e,t){$u.prototype.initialize.call(this,e,t),this.style=[],this.themeField=null,this.styleGroups=[]},getStyleByData:function(e){var t=this,i=e,s=ye.copyAttributesWithClip({},t.style),r=t.styleGroups,n=!1,a=null,o=t.styleGroups&&t.styleGroups.length>0;if(t.themeField&&o&&i.attributes){var l=t.themeField,h=i.attributes;for(var u in h)if(l===u){n=!0,a=h[u];break}}if(n)for(var c=0,d=r.length;c<d;c++)if(a.toString()===r[c].value.toString()){var p=r[c].style;s=ye.copyAttributesWithClip(s,p)}return s}}),tc=function(e,t){return new ec(e,t)};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/Ka.a.supermap.uniqueThemeLayer=tc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var ic=$u.extend({initialize:function(e,t){$u.prototype.initialize.call(this,e,t),this.style=[],this.themeField=null,this.styleGroups=[]},getStyleByData:function(e){var t=this,i=e,s=ye.copyAttributesWithClip({},t.style),r=t.styleGroups,n=!1,a=null,o=t.styleGroups&&t.styleGroups.length>0;if(t.themeField&&o&&i.attributes){var l=t.themeField,h=i.attributes;for(var u in h)if(l===u){n=!0,a=h[u];break}}if(n)for(var c=0,d=r.length;c<d;c++){if(c===d-1?a>=r[c].start&&a<=r[c].end:a>=r[c].start&&a<r[c].end){var p=r[c].style;s=ye.copyAttributesWithClip(s,p)}}return s}}),sc=function(e,t){return new ic(e,t)};Ka.a.supermap.rangeThemeLayer=sc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var rc=$u.extend({options:{isOverLay:!0,isAvoid:!0},initialize:function(e,t){$u.prototype.initialize.call(this,e,t),Ka.a.Util.setOptions(this,t),this.style=[],this.themeField=null,this.styleGroups=[],this.defaultStyle={fontColor:"#000000",fontOpacity:1,fontSize:"12px",fontStyle:"normal",fontWeight:"normal",labelAlign:"cm",labelXOffset:0,labelYOffset:0,labelRotation:0,fill:!1,fillColor:"#ee9900",fillOpacity:.4,stroke:!1,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",labelRect:!0,labelSelect:!0,_isGeoTextStrategyStyle:!0},this.getPxBoundsMode=0,this.labelFeatures=[]},onAdd:function(e){$u.prototype.onAdd.call(this,e),this.container.style.zIndex=200},redrawThematicFeatures:function(e){if(this.features.length>0&&0==this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),i=0,s=t.length;i<s;i++)this.labelFeatures.push(t[i]);this.features=this.getDrawnLabels(this.labelFeatures),$u.prototype.redrawThematicFeatures.call(this,e)},removeFeatures:function(e){this.labelFeatures=[],$u.prototype.removeFeatures.call(this,arguments)},removeAllFeatures:function(){this.labelFeatures=[],$u.prototype.removeAllFeatures.call(this,arguments)},getDrawnLabels:function(e){for(var t,i,s,r,n=[],a=[],o={labelAlign:"cm",labelXOffset:0,labelYOffset:0},l=this._map,h=l.getSize(),u=l.getZoom(),c=0,d=e.length;c<d;c++){((i=e[c]).isStyleChange||void 0===i.isStyleChange)&&(i=this.setStyle(i));var p=this.getLabelPxLocation(i);if(p.x>=0&&p.x<=h.x&&p.y>=0&&p.y<=h.y){if(i.style.minZoomLevel>-1&&u<=i.style.minZoomLevel)continue;if(i.style.maxZoomLevel>-1&&u>i.style.maxZoomLevel)continue;var f=null;i.isStyleChange?(i.isStyleChange=null,f=this.calculateLabelBounds(i,p)):f=i.geometry.bsInfo.w&&i.geometry.bsInfo.h?this.calculateLabelBounds2(i,p):this.calculateLabelBounds(i,p);var m=new ve(0,h.y,h.x,0),y=f.length;if(this.options.isAvoid){var g=this.getAvoidInfo(m,f);if(g){if("left"===g.aspectW){i.style.labelXOffset+=g.offsetX;for(let e=0;e<y;e++)f[e].x+=g.offsetX}else if("right"===g.aspectW){i.style.labelXOffset+=-g.offsetX;for(let e=0;e<y;e++)f[e].x+=-g.offsetX}if("top"===g.aspectH){i.style.labelYOffset+=g.offsetY;for(let e=0;e<y;e++)f[e].y+=g.offsetY}else if("bottom"===g.aspectH){i.style.labelYOffset+=-g.offsetY;for(let e=0;e<y;e++)f[e].y+=-g.offsetY}i.isStyleChange=!0}}if(this.options.isOverLay){var v=!1;if(0!=c)for(let e=0;e<a.length;e++)if(this.isQuadrilateralOverLap(f,a[e])){v=!0;break}if(v)continue;a.push(f)}var S=[];for(let e=0;e<y-1;e++)S.push(l.containerPointToLatLng(f[e]));var b=S[3],_=S[1],x=new ve(b.lng,b.lat,_.lng,_.lat).getCenterLonLat(),C=new Me(x.lon,x.lat,i.attributes[this.themeField]);C.calculateBounds(),s=ye.cloneObject(i.style),r=ye.cloneObject(ye.copyAttributes(s,o)),(t=new Re(C,i.attributes,r)).id=i.id,t.fid=i.fid,n.push(t)}}return n},getStyleByData:function(e){var t=e;if(t.style=ye.copyAttributes(t.style,this.defaultStyle),this.style&&this.style.fontSize&&parseFloat(this.style.fontSize)<12&&(this.style.fontSize="12px"),t.style=ye.copyAttributes(t.style,this.style),this.themeField&&this.styleGroups&&t.attributes){var i=this.themeField,s=t.attributes,r=this.styleGroups,n=!1,a=null;for(var o in s)if(i===o){n=!0,a=s[o];break}if(n)for(var l=0,h=r.length;l<h;l++)if(a>=r[l].start&&a<r[l].end){var u=r[l].style;u&&u.fontSize&&parseFloat(u.fontSize)<12&&(u.fontSize="12px"),t.style=ye.copyAttributes(t.style,u)}t.style.label=t.attributes[this.themeField]}return t.style},setLabelsStyle:function(e){for(var t,i=[],s=0,r=e.length;s<r;s++){var n=e[s];if("SuperMap.Geometry.GeoText"!==n.geometry.CLASS_NAME)return e;(n.geometry.bsInfo.w||n.geometry.bsInfo.h)&&(n.geometry.bsInfo.w=null,n.geometry.bsInfo.h=null,n.geometry.labelWTmp=null),(t=this.setStyle(n)).layer=this.layer,i.push(t)}return i},setStyle:function(e){var t=e;if(t.style=ye.copyAttributes(t.style,this.defaultStyle),this.style&&this.style.fontSize&&parseFloat(this.style.fontSize)<12&&(this.style.fontSize="12px"),t.style=ye.copyAttributes(t.style,this.style),this.groupField&&this.styleGroups&&t.attributes){var i=this.groupField,s=t.attributes,r=this.styleGroups,n=!1,a=null;for(var o in s)if(i===o){n=!0,a=s[o];break}if(n)for(var l=0,h=r.length;l<h;l++)if(a>=r[l].start&&a<r[l].end){var u=r[l].style;u&&u.fontSize&&parseFloat(u.fontSize)<12&&(u.fontSize="12px"),t.style=ye.copyAttributes(t.style,u)}}return t.style.label=t.geometry.text,t},getLabelPxLocation:function(e){var t=e.geometry,i=e.style,s=t.getCentroid(),r=this._map.latLngToContainerPoint(this.options.alwaysMapCRS?this._map.options.crs.unproject(Ka.a.point(s.x,s.y)):Ka.a.latLng(s.y,s.x)),n=Ka.a.point(r.x,r.y);if(i.labelXOffset||i.labelYOffset){var a=isNaN(i.labelXOffset)?0:i.labelXOffset,o=isNaN(i.labelYOffset)?0:i.labelYOffset,l=n.add(Ka.a.point(a,-o));return Ka.a.point(l.x,l.y)}return Ka.a.point(n.x,n.y)},calculateLabelBounds:function(e,t){var i=e.geometry,s=null,r=null;if(0==this.getPxBoundsMode)s=i.getLabelPxBoundsByText(t,e.style);else{if(1!==this.getPxBoundsMode)return null;r=this.getLabelInfo(e.geometry.getCentroid(),e.style),s=i.getLabelPxBoundsByLabel(t,r.w,r.h,e.style)}var n=[];return n=e.style.labelRotation%180==0?[{x:s.left,y:s.top},{x:s.right,y:s.top},{x:s.right,y:s.bottom},{x:s.left,y:s.bottom},{x:s.left,y:s.top}]:this.rotationBounds(s,t,e.style.labelRotation),i.bounds=new ve(n[1].x,n[3].y,n[2].x,n[4].y),n},calculateLabelBounds2:function(e,t){var i,s,r,n,a,o=e.geometry.bsInfo,l=e.style,h=ye.cloneObject(t);if(l.labelAlign&&"cm"!==l.labelAlign)switch(l.labelAlign){case"lt":h.x+=o.w/2,h.y+=o.h/2;break;case"lm":h.x+=o.w/2;break;case"lb":h.x+=o.w/2,h.y-=o.h/2;break;case"ct":h.y+=o.h/2;break;case"cb":h.y-=o.h/2;break;case"rt":h.x-=o.w/2,h.y+=o.h/2;break;case"rm":h.x-=o.w/2;break;case"rb":h.x-=o.w/2,h.y-=o.h/2}s=h.x-o.w/2,r=h.y+o.h/2,a=l.fontStyle&&"italic"===l.fontStyle?h.x+o.w/2+parseInt(parseFloat(l.fontSize)/2):h.x+o.w/2,n=h.y-o.h/2,i=new ve(s,r,a,n);var u=[];return u=l.labelRotation%180==0?[{x:i.left,y:i.top},{x:i.right,y:i.top},{x:i.right,y:i.bottom},{x:i.left,y:i.bottom},{x:i.left,y:i.top}]:this.rotationBounds(i,t,l.labelRotation),e.geometry.bounds=new ve(u[1].x,u[3].y,u[2].x,u[4].y),u},getLabelInfo:function(e,t){var i={l:"left",r:"right",t:"top",b:"bottom"},s={l:0,r:-1,t:0,b:-1};t=ye.extend({fontColor:"#000000",labelAlign:"cm"},t);var r=this.getLocalXY(e),n=0;if(t.labelXOffset||t.labelYOffset){var a=isNaN(t.labelXOffset)?0:t.labelXOffset,o=isNaN(t.labelYOffset)?0:t.labelYOffset;r[0]+=a,r[1]-=o}var l=document.createElement("canvas");l.globalAlpha=0,l.lineWidth=1;var h=l.getContext("2d");h.fillStyle=t.fontColor,h.globalAlpha=t.fontOpacity||1;var u,c,d,p=[t.fontStyle?t.fontStyle:"normal","normal",t.fontWeight?t.fontWeight:"normal",t.fontSize?t.fontSize:"1em",t.fontFamily?t.fontFamily:"sans-serif"].join(" "),f=t.label.split("\n"),m=f.length;if(h.fillText){h.font=p,h.textAlign=i[t.labelAlign[0]]||"center",h.textBaseline=i[t.labelAlign[1]]||"middle",null==(u=s[t.labelAlign[1]])&&(u=-.5),c=h.measureText("Mg").height||h.measureText("xx").width,r[1]+=c*u*(m-1);for(let e=0;e<m;e++)n<(d=h.measureText(f[e]).width)&&(n=d)}else if(h.mozDrawText){h.mozTextStyle=p,null==(u=s[t.labelAlign[1]])&&(u=-.5),c=h.mozMeasureText("xx"),r[1]+=c*(1+u*m);for(let e=0;e<m;e++)n<(d=h.measureText(f[e]).width)&&(n=d)}var y={};return n?(y.w=n,y.h=t.fontSize,y.rows=f.length,y):null},rotationBounds:function(e,t,i){var s=Ka.a.point(e.left,e.top),r=Ka.a.point(e.right,e.top),n=Ka.a.point(e.right,e.bottom),a=Ka.a.point(e.left,e.bottom),o=[];o.push(this.getRotatedLocation(s.x,s.y,t.x,t.y,i)),o.push(this.getRotatedLocation(r.x,r.y,t.x,t.y,i)),o.push(this.getRotatedLocation(n.x,n.y,t.x,t.y,i)),o.push(this.getRotatedLocation(a.x,a.y,t.x,t.y,i));for(var l=[],h=0;h<o.length;h++)l.push({x:o[h].x,y:o[h].y});return l.push({x:o[0].x,y:o[0].y}),l},getRotatedLocation:function(e,t,i,s,r){var n,a,o={};return t=-t,s=-s,r=-r,n=(e-i)*Math.cos(r/180*Math.PI)-(t-s)*Math.sin(r/180*Math.PI)+i,a=(e-i)*Math.sin(r/180*Math.PI)+(t-s)*Math.cos(r/180*Math.PI)+s,o.x=n,o.y=-a,o},getAvoidInfo:function(e,t){if(5!==t.length)return null;for(var i=[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.right,y:e.bottom},{x:e.left,y:e.bottom},{x:e.left,y:e.top}],s=!1,r=i.length,n=t.length,a=0,o=0,l="",h="",u=0;u<r-1;u++)for(var c=0;c<n-1;c++){"SuperMap.Geometry.Point"===ye.lineIntersection(i[u],i[u+1],t[c],t[c+1]).CLASS_NAME&&(d(t[c]),d(t[c+1]),s=!0)}return s?{aspectW:h,aspectH:l,offsetX:a,offsetY:o}:null;function d(t){if(!e.contains(t.x,t.y)){if(t.y<e.top){let i=Math.abs(e.top-t.y);i>o&&(o=i,l="top")}if(t.y>e.bottom){let i=Math.abs(t.y-e.bottom);i>o&&(o=i,l="bottom")}if(t.x<e.left){let i=Math.abs(e.left-t.x);i>a&&(a=i,h="left")}if(t.x>e.right){let i=Math.abs(t.x-e.right);i>a&&(a=i,h="right")}}}},isQuadrilateralOverLap:function(e,t){var i=e.length,s=t.length;if(5!==i||5!==s)return null;var r=!1;for(let s=0;s<i;s++)if(this.isPointInPoly(e[s],t)){r=!0;break}for(let i=0;i<s;i++)if(this.isPointInPoly(t[i],e)){r=!0;break}for(let a=0;a<i-1&&!r;a++)for(var n=0;n<s-1;n++){if("SuperMap.Geometry.Point"===ye.lineIntersection(e[a],e[a+1],t[n],t[n+1]).CLASS_NAME){r=!0;break}}return r},isPointInPoly:function(e,t){for(var i=!1,s=-1,r=t.length,n=r-1;++s<r;n=s)(t[s].y<=e.y&&e.y<t[n].y||t[n].y<=e.y&&e.y<t[s].y)&&e.x<(t[n].x-t[s].x)*(e.y-t[s].y)/(t[n].y-t[s].y)+t[s].x&&(i=!i);return i}}),nc=function(e,t){return new rc(e,t)};Ka.a.supermap.labelThemeLayer=nc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var ac=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},getFeaturesByIDs:function(e,t,i){var s=this;new os(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},getFeaturesByBounds:function(e,t,i){var s=this;new ts(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},getFeaturesByBuffer:function(e,t,i){var s=this;new ss(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},getFeaturesBySQL:function(e,t,i){var s=this;new hs(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},getFeaturesByGeometry:function(e,t,i){var s=this;new ns(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},editFeatures:function(e,t){if(e&&e.dataSourceName&&e.dataSetName){var i=this,s=i.url,r=e.dataSourceName,n=e.dataSetName;s=ye.urlPathAppend(s,"datasources/"+r+"/datasets/"+n),new pi(s,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))}},_processParams:function(e){if(!e)return{};e.returnContent=null==e.returnContent||e.returnContent,e.fromIndex=e.fromIndex?e.fromIndex:0,e.toIndex=e.toIndex?e.toIndex:-1,e.isUseBatch=null!=e.isUseBatch&&e.isUseBatch,e.bounds&&(e.bounds=_u.toSuperMapBounds(e.bounds)),e.geometry&&(e.geometry=Cu(e.geometry)),e.editType&&(e.editType=e.editType.toLowerCase());var t=this;if(e.features){var i=[];Ka.a.Util.isArray(e.features)?e.features.map(function(e){return i.push(t._createServerFeature(e)),e}):i.push(t._createServerFeature(e.features)),e.features=i}return e},_createServerFeature:function(e){var t,i={},s=[],r=[];for(var n in(t=e||{}).properties)s.push(n),r.push(t.properties[n]);return i.fieldNames=s,i.fieldValues=r,t.id&&(i.id=t.id),i.geometry=Cu(t),i},_processFormat:function(e){return e||r.GEOJSON}}),oc=function(e,t){return new ac(e,t)};Ka.a.supermap.featureService=oc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var lc=Ka.a.Path.extend({options:{fontStyle:"normal",fontWeight:"normal",fontSize:"1em",fontFamily:"sans-serif",textAlign:"center",textBaseline:"middle",vfactor:-.5,labelRotation:0,globalAlpha:1,label:""},initialize:function(e,t){Ka.a.Util.setOptions(this,t),this._latlng=e},setLatLng:function(e){return this._latlng=e,this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._clickTolerance(),t=[e,e];this._pxBounds=new Ka.a.Bounds(this._point.subtract(t),this._point.add(t))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateUnicode(this)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._clickTolerance()}}),hc=function(e,t){return new lc(e,t)};Ka.a.Canvas.include({_updateUnicode:function(e){if(!this._drawing)return;let t={x:e._point.x,y:e._point.y},i=this._ctx,s=[e.options.fontStyle,"normal",e.options.fontWeight,e.options.fontSize,e.options.fontFamily].join(" "),r=e.options.label.replace(/^&#x/,""),n=(r=String.fromCharCode(parseInt(r,16))).split("\n"),a=n.length;if(i.fillStyle=e.options.fontColor,i.globalAlpha=1,e.options.fontOpacity>=0&&e.options.fontOpacity<1&&(i.globalAlpha=e.options.fontOpacity),i.fillText){i.font=s,i.textAlign=e.options.textAlign,i.textBaseline=e.options.textBaseline;let r=e.options.vfactor,o=i.measureText("Mg").height||i.measureText("xx").width;t.y+=o*r*(a-1);for(let s=0;s<a;s++)0!=e.options.labelRotation?(i.save(),i.translate(t.x,t.y),i.rotate(e.options.labelRotation*Math.PI/180),i.fillText(n[s],0,o*s),i.restore()):i.fillText(n[s],t.x,t.y)}else if(i.mozDrawText){i.mozTextStyle=s;let r=e.options.textAlign,o=e.options.vfactor,l=i.mozMeasureText("xx");t.y+=l*(1+o*a);for(let e=0;e<a;e++){let s=t.x+r*i.mozMeasureText(n[e]),a=t.y+e*l;i.translate(s,a),i.mozDrawText(n[e]),i.translate(-s,-a)}}}}),Ka.a.supermap.unicodeMarker=hc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var uc=Ka.a.LayerGroup.extend({options:{map:"map",server:"https://www.supermapol.com",featureLayerPopupEnable:!0,featureLayerPopup:null,credentialValue:null,credentialKey:"key",attribution:pu.Online.attribution},defaultFeatureLayerPopup:function(e){return e.feature.properties.attributes.title+":"+e.feature.properties.attributes.description},initialize:function(e,t){(e||t)&&(this._layers={},Ka.a.setOptions(this,t),this.id=e,this.load(),this.cartoCSSToLeaflet=new Wu)},load:function(){this.options.server.indexOf("http://")<0&&this.options.server.indexOf("https://")<0&&(this.options.server="http://"+this.options.server);var e=this.options.server+"/web/maps/"+this.id+".json";this.options.credentialValue&&(e+="?"+this.options.credentialKey+"="+this.options.credentialValue);var t=this;Ke.get(e).then(function(e){return e.json()}).then(function(e){if(e){var i=e.layers;t.mapInfo=e,t.createLayersByJson(i)}})},addLayerWrapper:function(e,t,i){return t&&this.createMap(i),this.addLayer(e),e.labelLayer&&this.addLayer(e.labelLayer),this},createLayersByJson:function(e){if(Ka.a.Util.isArray(e)&&0!==e.length){this.layers=[];for(var t=[],i=0;i<e.length;i++){var s=e[i];s._originIndex=i,"BASE_LAYER"===(s.layerType=s.layerType||"BASE_LAYER")?(s.isBaseLayer=!0,this.createLayer(s.type,s)):t.unshift(s)}for(;t.length>0;){var r=t.pop(),n=r.type,a=r.layerType=r.layerType||"BASE_LAYER";"OVERLAY_LAYER"!==a&&(n=a),this.createLayer(n,r)}this.fire("maploaded",{map:this._map})}},createCRS:function(e,t,i,s,r){return e<0?new eo({bounds:r,origin:s,resolutions:i}):910112===e||910102===e?Ka.a.CRS.BaiduCRS:(910111===e&&(e=3857),910101===e&&(e=4326),Ka.a.Proj.CRS("EPSG:"+e,{origin:s,resolutions:i,bounds:r}))},createMap:function(e){var t=e.crs||Ka.a.CRS.EPSG3857,i=Ka.a.latLngBounds(t.unproject(e.bounds.min),t.unproject(e.bounds.max));this._map=Ka.a.map(this.options.map,{center:i.getCenter(),maxZoom:e.maxZoom||22,minZoom:e.minZoom||0,zoom:e.zoom||0,crs:t,renderer:Ka.a.canvas()}),t instanceof eo?this._map.setZoom(e.zoom?e.zoom+2:2,{maxZoom:e.maxZoom||22}):this._map.fitBounds(i,{maxZoom:e.maxZoom||22})},getResolutionsFromScales:function(e,t,i,s){for(var r=[],n=0;n<e.length;n++)r.push(Ka.a.Util.GetResolutionFromScaleDpi(e[n],t,i,s));return r},createLayer:function(e,t){var i=t.prjCoordSys,s=i&&i.epsgCode||this.mapInfo.epsgCode,r=this.mapInfo.center||t.center,n=this.mapInfo.level||t.level,a=this.mapInfo.extent||t.bounds,o=t.scales,l=t.isBaseLayer,h=t.opacity,u=Ka.a.bounds([a.leftBottom.x,a.leftBottom.y],[a.rightTop.x,a.rightTop.y]),c=t.bounds?Ka.a.bounds([t.bounds.leftBottom.x,t.bounds.leftBottom.y],[t.bounds.rightTop.x,t.bounds.rightTop.y]):u;r||(r=c.getCenter());var d,p=Ka.a.point(c.min.x,c.max.y),f=o?this.getResolutionsFromScales(o,96,t.units):null,m=this.createCRS(s,i?i.type:"",f,p,c),y={bounds:u,center:Ka.a.point(r.x,r.y),crs:m,zoom:n};switch(e){case"SUPERMAP_REST":d=Gu(t.url,{transparent:!0,opacity:h});break;case"SUPERMAP_REST_VECTOR":break;case"TIANDITU_VEC":case"TIANDITU_IMG":case"TIANDITU_TER":y.crs=4326===s?Ka.a.CRS.TianDiTu_WGS84:Ka.a.CRS.TianDiTu_Mercator,y.minZoom=1,y.zoom=1+y.zoom,d=this.createTiandituLayer(t);break;case"BAIDU":y.crs=Ka.a.CRS.BaiduCRS,y.zoom=3+y.zoom,y.minZoom=3,d=Pu();break;case"BING":break;case"WMS":d=this.createWmsLayer(t);break;case"WMTS":y.resolutions=this.getResolutionsFromScales(o,90.71446714322,t.units);var g=t.identifier,v=g.substring(g.indexOf("_")+1);d=Du(t.url,{layer:v,style:"default",tilematrixSet:g,format:"image/png"});break;case"CLOUD":y.crs=Ka.a.CRS.EPSG3857,y.zoom=3+y.zoom,y.minZoom=3,d=Ou(t.url,{opacity:h});break;case"MARKER_LAYER":d=this.createMarkersLayer(t,m);break;case"FEATURE_LAYER":"ANIMATORVECTOR"==t.identifier||(d="THEME"==t.identifier?this.createThemeLayer(t):this.createVectorLayer(t,m));break;default:throw new Error("unSupported Layer Type")}d&&t.isVisible&&this.addLayerWrapper(d,l,y)},createTiandituLayer:function(e){var t=e.type.split("_")[1].toLowerCase(),i="OVERLAY_LAYER"===e.layerType;return new ku({layerType:t,isLabel:i})},createMarkersLayer:function(e,t){var i=this,s=e.markers||[],r=Ka.a.geoJSON(Ka.a.Util.toGeoJSON(s),{pointToLayer:function(e,t){var i=new Ka.a.Marker(t);return i.setStyle=function(e){e&&i.setIcon(e)},i},coordsToLatLng:function(e){var i=t.unproject(Ka.a.point(e[0],e[1]));return new Ka.a.LatLng(i.lat,i.lng,e[2])},style:function(e){return i.cartoCSSToLeaflet.getStyleFromiPortalMarker(e.properties.icon)}});return this.options.featureLayerPopupEnable&&r.bindPopup(this.options.featureLayerPopup||this.defaultFeatureLayerPopup),r},createWmsLayer:function(e){var t=e.url,i=e.opacity,s=e.subLayers;return s&&"undefined"!==s&&"null"!==s||(s="0"),Ka.a.tileLayer.wms(t,{layers:s,format:"image/png",transparent:!0,noWrap:!0,opacity:i})},createVectorLayer:function(e,t){var i=e.style,s=e.opacity,n=this,a=function(e){var i=t.unproject(Ka.a.point(e[0],e[1]));return new Ka.a.LatLng(i.lat,i.lng,e[2])};if(!e.url){var o=Ka.a.geoJSON(Ka.a.Util.toGeoJSON(e.features),{pointToLayer:function(e,t){var i=new Ka.a.Marker(t);return i.setStyle=function(e){e&&i.setIcon(e)},i},coordsToLatLng:a,style:function(e){let t=n.cartoCSSToLeaflet.getStyleFromiPortalStyle(i||{},e.geometry.type,e.properties.style);return t.dashArray&&0==t.dashArray.length&&(t.dashArray=null),t},opacity:s});return this.options.featureLayerPopupEnable&&o.bindPopup(this.options.featureLayerPopup||this.defaultFeatureLayerPopup),o}for(var l=e.url,h=e.name,u=e.features,c=0;c<u.length;c++){var d=u[c];d.visible&&this.getFeaturesBySQL(l,h,d.name,"",r.GEOJSON,e=>{var t=Ka.a.geoJSON(e.result,{pointToLayer:function(e,t){var i=new Ka.a.Marker(t);return i.setStyle=function(e){e&&i.setIcon(e)},i},coordsToLatLng:a,style:function(e){return this.cartoCSSToLeaflet.getStyleFromiPortalStyle(i||{},e.geometry.type,e.properties.style)},opacity:s});this.options.featureLayerPopupEnable&&t.bindPopup(n.options.featureLayerPopup||n.defaultFeatureLayerPopup),this.addLayer(t)})}},getFeaturesBySQL:function(e,t,i,s,r,n){var a=new ls({queryParameter:{name:i+"@"+t,attributeFilter:s=s||"SMID > 0"},datasetNames:[t+":"+i],fromIndex:0,toIndex:1e5});oc(e).getFeaturesBySQL(a,n,r)},createThemeLayer:function(e){var t,i=e.themeSettings&&JSON.parse(e.themeSettings),s=i.type;if(e.themeSettings=i,(t="HEAT"===s?this.createHeatLayer(e,i):"UNIQUE"===s?this.createUniqueLayer(e,i):"RANGE"===s?this.createRangeLayer(e,i):this.createBaseThemeLayer(e,i))&&(this.addFeature2ThemeLayer(e,t),t.on("add",e=>{this.registerThemeEvent(e.target)})),i&&i.labelField){var r=this.createLabelLayer(e,i);r.on("add",e=>{this.registerThemeEvent(e.target)}),t.labelLayer=r}return t},createBaseThemeLayer:function(e,t){let i=e.style,s=e.opacity,r=t.vectorType,n=i.pointStyle;n.fill="LINE"!==r;var a={};a.radius=n.pointRadius,a.color=n.strokeColor,a.opacity=n.strokeOpacity,a.lineCap=n.strokeLineCap,a.weight=n.strokeWidth,a.fillColor=n.fillColor,a.fillOpacity=n.fillOpacity;var o=(e,t)=>Ka.a.circleMarker(t,a);return n.unicode&&(o=((e,t)=>new lc(t,n))),Ka.a.geoJSON({type:"GeometryCollection",geometries:[]},{pointToLayer:o,opacity:s})},createUniqueLayer:function(e,t){for(var i=e.title,s=t.field,r=[],n=t.settings,a=e.isVisible,o=e.opacity,l=t.vectorType,h=0;h<n.length;h++){var u={};u.value=n[h].value,u.style=n[h].style,r.push(u)}var c=new ec(i,{opacity:o,visibility:a});this.registerThemeEvent(c),c.style=e.style.pointStyle,c.style.fill="LINE"!==l,c.style.stroke=!0,c.themeField=s,c.styleGroups=r;var d=this;return c.on("click",function(e){if(e.target&&e.target.refDataID){var t=c.getFeatureById(e.target.refDataID);d.events.triggerEvent("uniquefeatureclicked",t,c)}}),c},createRangeLayer:function(e,t){var i=e.title,s=t.field,r=[],n=t.settings,a=e.isVisible,o=e.opacity,l=t.vectorType,h=e.style.pointStyle;h.fill="LINE"!==l;for(var u=0;u<n.length;u++){var c={};c.start=n[u].start,c.end=n[u].end,c.style=n[u].style,r.push(c)}var d=new ic(i,{visibility:a,opacity:o});return this.registerThemeEvent(d),d.style=e.style.pointStyle,d.style.stroke=!0,d.themeField=s,d.styleGroups=r,d},createLabelLayer:function(e,t){var i,s=e.title,r=t.labelField,n=t.settings,a=e.isVisible;i=!n||n.length>0?{fillColor:"#ffffff"}:n[0].style;var o=Ka.a.Util.extend(new Un,i);o.fontWeight="bold",o.fontSize="14px",o.labelRect=!0,o.strokeColor=o.fillColor,o.fontColor=t.labelColor,t.labelFont&&(o.fontFamily=t.labelFont);var l=new rc(s,{visibility:a,opacity:.7});return this.registerThemeEvent(l),l.style=o,l.themeField=r,l.styleGroups=[],l},createHeatLayer:function(e,t){let i,s=t.colors||["blue","cyan","lime","yellow","red"],r={};for(let e=0,t=s.length,i=1;e<t;e++)r[i/t]=s[e],i++;let n=t.settings[0].radius;return"千米"!==t.heatUnit&&"km"!==t.heatUnit||(n=1e3*t.heatRadius),t.settings[0]&&t.settings[0].featureWeight&&(i=t.settings[0].featureWeight),Ka.a.heatLayer([],{radius:n/2,minOpacity:e.opacity,gradient:r,blur:n/2,featureWeight:i})},addFeature2ThemeLayer:function(e,t){if("FEATURE_LAYER"===e.layerType&&"THEME"===e.identifier){var i=this,s=!!e.datasourceName,n=e.cartoCSS;if(n)var a=this.getCartoCSS2Obj(n).needTransform,o=this.getCartoCSS2Obj(n).isAddFile;var l,h,u,c=e.url,d=e.credential,p=e.themeSettings,f=p.filter;if(o){var m=JSON.parse(e.datasourceName),y=this.getSQLFromFilter(f);if(c)this.getFeatureFromFileAdded(e,function(s){var r,n=[];if("EXCEL"===s.type||"CSV"===s.type)for(var o=0,l=(r=i.parseFeatureFromEXCEL.apply(i,[s.content.rows,s.content.colTitles,!1,m])).length;o<l;o++)zu()({attr:r[o].attributes},y).length>0&&n.push(r[o]);else for(var h=0,u=(r=i.parseFeatureFromJson(s.content)).length;h<u;h++)zu()({attr:r[h].attributes},y).length>0&&n.push(r[h]);var c=e.prjCoordSys&&e.prjCoordSys.epsgCode;a?i.changeFeatureLayerEpsgCode(c,"4326",t,n,function(e){A(e)}):A(n)},function(){});else{for(var g=[],v=e.features,S=0,b=v.length;S<b;S++){var _=v[S];if(zu()({attr:_.attributes},y).length>0){var x=_.geometry.points[0].x,C=_.geometry.points[0].y,T=new Ce(x,C),M=new Re(T,_.attributes,_.style);g.push(M)}}A(g)}}else if(s){var w=e.datasourceName;u=(h=(l=e.subLayers&&JSON.parse(e.subLayers)).length&&l.length>0?l[0]:l)&&h.name,this.getFeaturesBySQL(e.url,w,u,p.filter,r.ISERVER,i=>{var s,r,n=i.result,o=[];if(n&&n.features){for(var l=0,h=(s=n.features).length;l<h;l++)r=Mr.fromJson(s[l]).toFeature(),o.push(r);var u=e.prjCoordSys&&e.prjCoordSys.epsgCode;a?this.changeFeatureLayerEpsgCode(u,"4326",t,o,function(e){A(e)}):A(s)}})}else{u=(h=(l=e.subLayers&&JSON.parse(e.subLayers)).length&&l.length>0?l[0]:l)&&h.name;var E=e.prjCoordSys&&e.prjCoordSys.epsgCode;this.getFeaturesBySQL(c,d,u,f,r.ISERVER,function(e){a?i.changeFeatureLayerEpsgCode(E,"4326",t,e,function(e){A(e)}):A(e)})}}function A(s){if(t&&t.labelLayer instanceof rc&&i.addFeature2LabelLayer(t.labelLayer,s,e),Ka.a.HeatLayer&&t instanceof Ka.a.HeatLayer){var r=[];for(let e=0,i=s.length;e<i;e++){let i=s[e].geometry;r[e]=Ka.a.latLng(i.y,i.x),t.options.featureWeight&&(r[e]=[r[e].lat,r[e].lng,parseFloat(s[e].attributes[t.options.featureWeight])])}t.setLatLngs(r)}else t instanceof Ka.a.GeoJSON?t.addData((new Ve).toGeoJSON(s)):t.addFeatures(s)}},addFeature2LabelLayer:function(e,t,i){if(t){for(var s,r,n=i.themeSettings,a=(n="string"==typeof n?JSON.parse(i.themeSettings):i.themeSettings).labelField,o=e.style,l=[],h=i.styleString&&JSON.parse(i.styleString),u=0;u<t.length;u++){r=this.getLabelLngLat(n.vectorType,t[u]),this.setLabelOffset(n.vectorType,h,t[u],o);var c=t[u].attributes;s=new Xu([r.lat,r.lng,c[a]],c),l.push(s)}e.style=o,e.addFeatures(l)}},setLabelOffset:function(e,t,i,s){if("POINT"===e){var r=t.pointStyle.pointRadius||0,n=t.pointStyle.strokeWidth||0,a=parseInt(t.pointStyle.fontSize)||0;s.labelXOffset=0,s.labelYOffset=t.pointStyle.unicode?20+a:25+(r+n)}},getLabelLngLat:function(e,t){var i={};if("POINT"===e){var s=t.geometry;i.lng=s.x,i.lat=s.y}else if("LINE"===e){var r,n,a=t.geometry.components;if(a[0].x)r=a.length,n=parseInt(r/2),i.lng=a[n].x,i.lat=a[n].y;else{var o=a[0].components;r=o.length,n=parseInt(r/2),i.lng=o[n].x,i.lat=o[n].y}}else{var l=t.geometry.getCentroid();i.lng=l.x,i.lat=l.y}return i},changeFeatureLayerEpsgCode:function(e,t,i,s,r){var n,a,o=this,l=[];if(e&&t){if(s&&s.length>0){for(n=0,a=s.length;n<a;n++){var h=s[n].geometry.getVertices();l=l.concat(h)}e="EPSG:"+e,t="EPSG:"+t,o.coordsTransform(e,t,l,function(e,t){return function(e){var i=e.length;for(n=0;n<i;n++){var s=l[n],a=e[n];s.x=a.x,s.y=a.y,s.calculateBounds()}for(n=0,i=t.length;n<i;n++){var h=t[n].geometry;h.components&&o.calculateComponents(h.components),h.calculateBounds()}r&&r.call(o,t)}}(0,s))}return!0}},calculateComponents:function(e){if(e)if(e.components)this.calculateComponents(e.components);else for(var t=0,i=e.length;t<i;t++){var s=e[t];s.components&&this.calculateComponents(s.components),s.calculateBounds()}},coordsTransform:function(e,t,i,s){var r,n=this.SERVER_TYPE_MAP[e],a=this.SERVER_TYPE_MAP[t];if(e!==t&&n&&a){var o=this.SERVER_TYPE_MAP["EPSG:3857"],l=this.SERVER_TYPE_MAP["EPSG:4326"];if(n!==o&&n!==l||a!==o&&a!==l){var h=n+"_"+a;this.postTransform(h,i,s)}else this.projTransform(e,t,i,s)}else{if(i&&void 0!==i.length){r=[];for(var u=0,c=i.length;u<c;u++){var d={x:i[u].x,y:i[u].y};r.push(d)}}else r={x:i.x,y:i.y};s&&s.call(this,r)}},projTransform:function(e,t,i,s){var r;if(ru){if(i&&void 0!==i.length){r=[];for(var n=0,a=i.length;n<a;n++){var o=ru(e,t,[i[n].x,i[n].y]);r.push({x:o[0],y:o[1]})}}else r={x:(r=ru(e,t,[i.x,i.y]))[0],y:r[1]};s&&(this.fire("coordconvertsuccess",{newCoor:r}),s.call(this,r))}},postTransform:function(e,t,i){var s=[];if(!e)return i.call(this,null);if(t&&void 0!==t.length)for(var r=0,n=t.length;r<n;r++)s.push({x:t[r].x,y:t[r].y});else s=[{x:t.x,y:t.y}];if(0===s.length)return i.call(this,null);var a={convertType:e,points:s},o=this.server+"/apps/viewer/coordconvert.json";a=JSON.stringify(a);var l={};!ye.isInTheSameDomain(o)&&this.proxy&&(l.proxy=this.proxy),Ke.post(o,a,l).then(e=>e.json()).then(e=>{var s=e;t||void 0===t.length||(s=s[0]),this.fire("coordconvertsuccess",{newCoors:s}),i.call(this,s)}).catch(e=>{this.actived&&this.fire("coordconvertfailed",{err:e})})},getSQLFromFilter:function(e){return e?" * where ("+(e=e.replace(/=/g,"==").replace(/and|AND/g,"&&").replace(/or|OR/g,"||").replace(/>==/g,">=").replace(/<==/g,"<="))+")":" * where (1==1||1>=0)"},getAttributesObjFromTable:function(e,t){if(0!==e.length&&0!==t.length){for(var i=[],s=0;s<e.length;s++){for(var r={},n=0;n<t.length;n++)r[t[n]]=e[s][n];i.push(r)}return i}},parseFeatureFromEXCEL:function(e,t,i,s){for(var r=this.getAttributesObjFromTable(e,t),n=[],a=0,o=r.length;a<o;a++){var l=r[a][s.lon],h=r[a][s.lat];if(l&&h){l=parseFloat(l),h=parseFloat(h);var u,c=new Ce(l,h);u=i?new Yu(c,r[a],null):new Re(c,r[a],null),n.push(u)}}return n},parseFeatureFromJson:function(e){var t=new Ve,i=t.read(e);if(null==i){var s=JSON.parse(e.replace(/'/,'"'));(s.isAnalyseResult||"MapEditor"===s.type||"DataInsights"===s.type||"ISERVER"===s.type)&&(s=s.data.recordsets[0].features),i=(t=new Ve).read(s)}for(var r=0,n=i.length;r<n;r++)i[r].attributes=i[r].attributes.properties||i[r].attributes;return i},getFeatureFromFileAdded:function(e,t,i,s){var r=s?e.url+"?currentPage=1&&pageSize=9999999":e.url;Ke.get(r).then(e=>e.json()).then(e=>{t&&t(e)}).catch(e=>i&&i(e))},getCartoCSS2Obj:function(e){var t,i=!1;return e.indexOf("}")>-1?(i=(e=JSON.parse(e)).needTransform,t=e.isAddFile):"needTransform"===e?(i=!0,t=!1):t="true"===e,{isAddFile:t,needTransform:i}},registerThemeEvent:function(e){e.on("click",t=>{if(!e.map)return;let i;this.selectedFeature&&(this.fire("featureunselected",{feature:this.selectedFeature}),this.selectedFeature=null),t.target&&t.target.refDataID&&(i=e.getFeatureById(t.target.refDataID)),i&&(this.selectedFeature=i,this.fire("featureselected",{feature:i}))}),e.on("mousemove",t=>{if(e.map&&t.target&&t.target.refDataID){let i;t.target&&t.target.refDataID&&(i=e.getFeatureById(t.target.refDataID)),i&&this.fire("featuremousemove",{feature:i})}})},SERVER_TYPE_MAP:{"EPSG:4326":"WGS84","EPSG:3857":"MERCATOR","EPSG:900913":"MERCATOR","EPSG:102113":"MERCATOR","EPSG:910101":"GCJ02","EPSG:910111":"GCJ02MERCATOR","EPSG:910102":"BD","EPSG:910112":"BDMERCATOR"}}),cc=function(e,t){return new uc(e,t)};Ka.a.supermap.webmap=cc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var dc=fu.extend({options:{geometry:null,prjCoordSys:null,excludeField:null},initialize:function(e,t){t=t||{},Ka.a.setOptions(this,t),t.projection&&(this.options.prjCoordSys=t.projection),fu.prototype.initialize.call(this,e,t),this.dataFlow=new ti(e,t),this.dataFlow.events.on({broadcastSocketConnected:this._defaultEvent,broadcastSocketError:this._defaultEvent,broadcastFailed:this._defaultEvent,broadcastSucceeded:this._defaultEvent,subscribeSocketConnected:this._defaultEvent,subscribeSocketError:this._defaultEvent,messageSucceeded:this._defaultEvent,setFilterParamSucceeded:this._defaultEvent,scope:this})},initBroadcast:function(){return this.dataFlow.initBroadcast(),this},broadcast:function(e){this.dataFlow.broadcast(e)},initSubscribe:function(){return this.dataFlow.initSubscribe(),this},setExcludeField:function(e){return this.dataFlow.setExcludeField(e),this.options.excludeField=e,this},setGeometry:function(e){return this.dataFlow.setGeometry(e),this.options.geometry=e,this},unSubscribe:function(){this.dataFlow.unSubscribe()},unBroadcast:function(){this.dataFlow.unBroadcast()},_defaultEvent:function(e){this.fire(e.eventType||e.type,e)}}),pc=function(e,t){return new dc(e,t)};Ka.a.supermap.dataFlowService=pc;var fc=i(6),mc=fc.baiduMapLayer?fc.baiduMapLayer.__proto__:Function;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/class yc extends mc{constructor(e,t,i,s){if(super(e,i,s),mc){s=s||{},this.init(s),this.argCheck(s),this.canvasLayer=t,this.clickEvent=this.clickEvent.bind(this),this.mousemoveEvent=this.mousemoveEvent.bind(this),this._moveStartEvent=this.moveStartEvent.bind(this),this._moveEndEvent=this.moveEndEvent.bind(this),this._zoomStartEvent=this.zoomStartEvent.bind(this),this.bindEvent()}}clickEvent(e){var t=this.map.containerPointToLayerPoint([0,0]),i=this.devicePixelRatio=this.canvasLayer.devicePixelRatio=window.devicePixelRatio||1,s=e.layerPoint;super.clickEvent(Ka.a.point((s.x-t.x)/i,(s.y-t.y)/i),e)}mousemoveEvent(e){var t=e.layerPoint;super.mousemoveEvent(t,e)}bindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.on("click",this.clickEvent),this.options.methods.mousemove&&e.on("mousemove",this.mousemoveEvent)),this.map.on("movestart",this._moveStartEvent),this.map.on("moveend",this._moveEndEvent),this.map.on("zoomstart",this._zoomStartEvent)}destroy(){this.unbindEvent(),this.clearData(),this.animator&&this.animator.stop(),this.animator=null,this.canvasLayer=null}unbindEvent(){var e=this.map;this.options.methods&&(this.options.methods.click&&e.off("click",this.clickEvent),this.options.methods.mousemove&&e.off("mousemove",this.mousemoveEvent)),this.map.off("movestart",this._moveStartEvent),this.map.off("moveend",this._moveEndEvent),this.map.off("zoomstart",this._zoomStartEvent)}getContext(){return this.canvasLayer.getCanvas().getContext(this.context)}addData(e,t){var i=e;e&&e.get&&(i=e.get()),this.dataSet.add(i),this.update({options:t})}update(e){var t=e||{},i=t.data;i&&i.get&&(i=i.get()),void 0!=i&&this.dataSet.set(i),super.update({options:t.options})}getData(){return this.dataSet}removeData(e){if(this.dataSet){var t=this.dataSet.get({filter:function(t){return null==e||"function"!=typeof e||!e(t)}});this.dataSet.set(t),this.update({options:null})}}clearData(){this.dataSet&&this.dataSet.clear(),this.update({options:null})}_canvasUpdate(e){if(this.canvasLayer){var t=this,i=t.options.animation,s=this.getContext(),r=this.map;if(t.isEnabledTime()){if(void 0===e)return void this.clear(s);"2d"===this.context&&(s.save(),s.globalCompositeOperation="destination-out",s.fillStyle="rgba(0, 0, 0, .1)",s.fillRect(0,0,s.canvas.width,s.canvas.height),s.restore())}else this.clear(s);if("2d"===this.context)for(var n in t.options)s[n]=t.options[n];else s.clear(s.COLOR_BUFFER_BIT);if(!(t.options.minZoom&&r.getZoom()<t.options.minZoom||t.options.maxZoom&&r.getZoom()>t.options.maxZoom)){var a=r.getBounds(),o=a.getEast()-a.getWest(),l=a.getNorth()-a.getSouth(),h=r.getSize(),u=o/h.x,c=l/h.y,d=Tu("DEGREE")*u,p=this.canvasLayer.getTopLeft(),f=r.latLngToAccurateContainerPoint(p),m={transferCoordinate:function(e){var i,s={x:(i="2d"===t.context?r.latLngToAccurateContainerPoint(Ka.a.latLng(e[1],e[0])):{x:(e[0]-p.lng)/u,y:(p.lat-e[1])/c}).x-f.x,y:i.y-f.y};return[s.x,s.y]}};void 0!==e&&(m.filter=function(t){var s=i.trails||10;return e&&t.time>e-s&&t.time<e});var y=t.dataSet.get(m);this.processData(y);var g=r.latLngToContainerPoint(Ka.a.latLng(0,0)),v={x:g.x-f.x,y:g.y-f.y};"m"===t.options.unit?(t.options.size&&(t.options._size=t.options.size/d),t.options.width&&(t.options._width=t.options.width/d),t.options.height&&(t.options._height=t.options.height/d)):(t.options._size=t.options.size,t.options._height=t.options.height,t.options._width=t.options.width),this.drawContext(s,y,t.options,v),t.options.updateCallback&&t.options.updateCallback(e)}}}init(e){this.options=e,this.initDataRange(e),this.context=this.options.context||"2d",this.options.zIndex&&this.canvasLayer&&this.canvasLayer.setZIndex(this.options.zIndex),this.initAnimator()}addAnimatorEvent(){}moveStartEvent(){var e=this.options.animation;this.isEnabledTime()&&this.animator&&(this.steps.step=e.stepsRange.start,this._hide())}moveEndEvent(){this.canvasLayer.draw(),this._show()}zoomStartEvent(){this._hide()}clear(e){e&&e.clearRect&&e.clearRect(0,0,e.canvas.width,e.canvas.height)}_hide(){this.canvasLayer.canvas.style.display="none"}_show(){this.canvasLayer.canvas.style.display="block"}draw(){this.canvasLayer.draw()}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/var gc=Ka.a.Layer.extend({options:{attributionPrefix:null,attribution:pu.MapV.attribution},initialize:function(e,t,i){i=i||{},this.dataSet=e||{},this.mapVOptions=t||{},this.render=this.render.bind(this),Ka.a.Util.setOptions(this,i),this.options.attributionPrefix&&(this.options.attribution=this.options.attributionPrefix+this.options.attribution),this.canvas=this._createCanvas(),Ka.a.stamp(this)},onAdd:function(e){this._map=e;var t=this.getPane(),i=this.container=Ka.a.DomUtil.create("div","leaflet-layer leaflet-zoom-animated",t);i.appendChild(this.canvas);var s=e.getSize();i.style.width=s.x+"px",i.style.height=s.y+"px",this.renderer=new yc(e,this,this.dataSet,this.mapVOptions),this.draw(),this.fire("loaded")},onRemove:function(){Ka.a.DomUtil.remove(this.container),this.renderer.destroy()},addData:function(e,t){this.renderer.addData(e,t)},update:function(e){this.renderer.update(e)},getData:function(){return this.renderer&&(this.dataSet=this.renderer.getData()),this.dataSet},removeData:function(e){this.renderer&&this.renderer.removeData(e)},clearData:function(){this.renderer.clearData()},draw:function(){return this._reset()},setZIndex:function(e){this.canvas.style.zIndex=e},render:function(){this.renderer._canvasUpdate()},getCanvas:function(){return this.canvas},getContainer:function(){return this.container},getTopLeft:function(){var e,t=this._map;t&&(e=t.getBounds().getNorthWest());return e},_createCanvas:function(){var e=document.createElement("canvas");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.pointerEvents="none",e.style.zIndex=this.options.zIndex||600;var t="undefined"==typeof window?{}:window,i=this.devicePixelRatio=t.devicePixelRatio||1;return this.mapVOptions.context&&"2d"!==this.mapVOptions.context||e.getContext("2d").scale(i,i),e},_resize:function(){var e=this.canvas;if(e){var t=this._map,i=t.getSize();e.width=i.x,e.height=i.y,e.style.width=i.x+"px",e.style.height=i.y+"px";var s=t.getBounds(),r=t.latLngToLayerPoint(s.getNorthWest());Ka.a.DomUtil.setPosition(e,r)}},_reset:function(){this._resize(),this._render()},redraw:function(){this._resize(),this._render()},_render:function(){this.render()}}),vc=function(e,t,i){return new gc(e,t,i)};Ka.a.supermap.mapVLayer=vc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Sc=gc.extend({initialize:function(e,t){t=t||{},Ka.a.Util.setOptions(this,t),this.data=[],this.mapVOptions={draw:"simple"},gc.prototype.initialize.call(this,new window.mapv.DataSet([]),this.mapVOptions,t),this.idCache={},this.url=e,this._last=new Date,this._imageCache={}},onMessageSuccessed:function(e){const t=e.featureResult.properties.id,i=e.featureResult.geometry,s={geometry:e.featureResult.geometry};if("Point"===i.type&&this.options.pointToLayer){const r=this.options.pointToLayer(e.featureResult,Ka.a.latLng(i.coordinates[1],i.coordinates[0]));if(r instanceof Ka.a.Marker){this.mapVOptions.draw="icon";let n=r.options.icon;const a=`${n._getIconUrl("icon")}_${n.options.iconSize?n.options.iconSize[0]:null}_${n.options.iconSize?n.options.iconSize[1]:null}`;let o=this._imageCache[a];o||(o=n.createIcon(),this._imageCache[a]=o,o.onload=(()=>{this.update({data:this.data,options:this.mapVOptions})})),s.icon=o,(n.options.iconSize||o.style.height)&&(this.mapVOptions.offset={x:0,y:-(n.options.iconSize[1]||o.style.height)/2}),this.options.deg&&(s.deg=this.options.deg,"function"==typeof s.deg&&this.idCache[t]&&this.data[this.idCache[t]]&&(s.deg=s.deg(e.featureResult,Ka.a.latLng(i.coordinates[1],i.coordinates[0]),this.data[this.idCache[t]])))}if(r instanceof Ka.a.CircleMarker){this.mapVOptions.draw="simple";const e=this._toMapvStyle(r);for(const t in e)e.hasOwnProperty(t)&&(s[t]=e[t])}}else if(this.options.style){const t=this._toMapvStyle(this.options.style(e.featureResult));for(const e in t)t.hasOwnProperty(e)&&(s[e]=t[e])}void 0==this.idCache[t]?(this.data.push(s),this.idCache[t]=this.data.length-1):this.data[this.idCache[t]]=s,new Date-this._last>200&&(this._last=new Date,this.update({data:this.data,options:this.mapVOptions}))},_toMapvStyle:function(e){const t={draw:"simple"};return t.strokeStyle=e.color,t.lineWidth=e.width,t.globalAlpha=e.fillOpacity||e.opacity,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.fillStyle=e.fillColor,t.size=e.radius,t}}),bc=Ka.a.GeoJSON.extend({initialize:function(e,t){(t=t||{}).style&&!t.pointToLayer&&(t.pointToLayer=function(e,i){return Ka.a.circleMarker(i,t.style())}),Ka.a.Util.setOptions(this,t),this._layers={},Ka.a.stamp(this),this.url=e,this.idCache={}},onMessageSuccessed:function(e){const t=e.featureResult,i=e.featureResult.properties[this.options.idField];let s=null;void 0!==i&&this.idCache[i]?(s=this.getLayer(this.idCache[i]),this._updateLayerData(s,t)):((s=Ka.a.GeoJSON.geometryToLayer(t,this.options)).feature=Ka.a.GeoJSON.asFeature(t),this.addLayer(s),void 0!==i&&(this.idCache[i]=this.getLayerId(s))),this.options.onEachFeature&&this.options.onEachFeature(t,s)},_updateLayerData:function(e,t){t.properties&&(e.feature.properties=t.properties);var i=[];switch(t.geometry.type){case"Point":i=Ka.a.GeoJSON.coordsToLatLng(t.geometry.coordinates),e.setLatLng(i);break;case"LineString":i=Ka.a.GeoJSON.coordsToLatLngs(t.geometry.coordinates,0),e.setLatLngs(i);break;case"MultiLineString":case"Polygon":i=Ka.a.GeoJSON.coordsToLatLngs(t.geometry.coordinates,1),e.setLatLngs(i);break;case"MultiPolygon":i=Ka.a.GeoJSON.coordsToLatLngs(t.geometry.coordinates,2),e.setLatLngs(i)}}}),_c=Ka.a.LayerGroup.extend({options:{geometry:null,prjCoordSys:null,excludeField:null,idField:"id",render:"normal"},initialize:function(e,t){t=t||{},Ka.a.Util.setOptions(this,t),this.url=e,this._layers={},this.dataService=new dc(this.url,{geometry:this.options.geometry,prjCoordSys:this.options.prjCoordSys,excludeField:this.options.excludeField})},onAdd:function(e){this.dataService.initSubscribe(),this.dataService.on("subscribeSocketConnected",e=>this.fire("subscribesucceeded",e)),this.dataService.on("subscribeSocketError",e=>this.fire("subscribefailed",e)),this.dataService.on("messageSucceeded",e=>this._onMessageSuccessed(e)),this.dataService.on("setFilterParamSucceeded",e=>this.fire("setfilterparamsucceeded",e)),"mapv"===this.options.render?this.addLayer(new Sc(this.url,this.options)):this.addLayer(new bc(this.url,this.options)),Ka.a.LayerGroup.prototype.onAdd.call(this,e)},onRemove:function(e){Ka.a.LayerGroup.prototype.onRemove.call(this,e),this.dataService&&this.dataService.unSubscribe()},setExcludeField:function(e){return this.dataService.setExcludeField(e),this.options.excludeField=e,this},setGeometry:function(e){return this.dataService.setGeometry(e),this.options.geometry=e,this},_onMessageSuccessed:function(e){this.getLayers().map(t=>(t.onMessageSuccessed&&(t.onMessageSuccessed(e),this.fire("dataupdated",{layer:t,data:e.featureResult})),t))}}),xc=function(e,t){return new _c(e,t)};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/Ka.a.supermap.dataFlowLayer=xc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
const Cc=Ka.a.Layer.extend({includes:[],_echartsContainer:null,_map:null,_ec:null,_echartsOptions:null,options:{attribution:pu.ECharts.attribution,loadWhileAnimating:!1},initialize:function(e,t){Ka.a.Util.setOptions(this,t),this.setOption(e)},setOption:function(e,t,i){const s=e.baseOption||e;s.LeafletMap=s.LeafletMap||{roam:!0},s.animation=!0===s.animation,this._echartsOptions=e,this._ec&&this._ec.setOption(e,t,i)},getEcharts:function(){return this._ec},_disableEchartsContainer:function(){this._echartsContainer.style.visibility="hidden"},_enableEchartsContainer:function(){this._echartsContainer.style.visibility="visible"},onAdd:function(e){this._map=e,this._initEchartsContainer(),this._ec=Na.a.init(this._echartsContainer),this._ec.leafletMap=e;const t=this;e.on("zoomstart",function(){t._disableEchartsContainer()}),!t.options.loadWhileAnimating&&e.on("movestart",function(){t._disableEchartsContainer()}),Na.a.registerAction({type:"LeafletMapLayout",event:"LeafletMapLayout",update:"updateLayout"},function(e){}),Na.a.registerCoordinateSystem("leaflet",Tc),Na.a.extendComponentModel({type:"LeafletMap",getBMap:function(){return this.__LeafletMap},defaultOption:{roam:!1}}),Na.a.extendComponentView({type:"LeafletMap",render:function(e,i,s){let r=!0,n=i.scheduler.ecInstance.leafletMap;const a=s.getZr().painter.getViewportRoot(),o=n.options.zoomAnimation&&Ka.a.Browser.any3d;a.className=" leaflet-layer leaflet-zoom-"+(o?"animated":"hide")+" echarts-layer";const l=Ka.a.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);a.style[l]="50% 50%";const h=e.coordinateSystem,u=s.getZr().painter.getLayers(),c=function(){if(r)return;const i=t._map.containerPointToLayerPoint([0,0]),n=[i.x||0,i.y||0];if(a.style.left=n[0]+"px",a.style.top=n[1]+"px",!t.options.loadWhileAnimating){for(let e in u)u.hasOwnProperty(e)&&u[e]&&(o=u[e].ctx)&&o.clearRect&&o.clearRect(0,0,o.canvas.width,o.canvas.height);t._enableEchartsContainer()}var o;h.setMapOffset(n),e.__mapOffset=n,s.dispatchAction({type:"LeafletMapLayout"})};function d(){r||(s.dispatchAction({type:"LeafletMapLayout"}),t._enableEchartsContainer())}t._oldMoveHandler&&n.off(t.options.loadWhileAnimating?"move":"moveend",t._oldMoveHandler),t._oldZoomEndHandler&&n.off("zoomend",t._oldZoomEndHandler),n.on(t.options.loadWhileAnimating?"move":"moveend",c),n.on("zoomend",d),t._oldMoveHandler=c,t._oldZoomEndHandler=d,r=!1}}),this._ec.setOption(this._echartsOptions)},onRemove:function(){this._ec.clear(),this._ec.dispose(),delete this._ec,Ka.a.DomUtil.remove(this._echartsContainer),this._oldZoomEndHandler&&(this._map.off("zoomend",this._oldZoomEndHandler),this._oldZoomEndHandler=null),this._oldMoveHandler&&(this._map.off(this.options.loadWhileAnimating?"move":"moveend",this._oldMoveHandler),this._oldMoveHandler=null),this._resizeHandler&&(this._map.off("resize",this._resizeHandler),this._resizeHandler=null),delete this._map},_initEchartsContainer:function(){const e=this._map.getSize(),t=document.createElement("div");t.style.position="absolute",t.style.height=e.y+"px",t.style.width=e.x+"px",t.style.zIndex=10,this._echartsContainer=t,this.getPane().appendChild(this._echartsContainer);const i=this;function s(e){let t=e.newSize;i._echartsContainer.style.width=t.x+"px",i._echartsContainer.style.height=t.y+"px",i._ec.resize()}this._map.on("resize",s),this._resizeHandler=s}});function Tc(e){this._LeafletMap=e,this.dimensions=["lng","lat"],this._mapOffset=[0,0]}Tc.prototype.dimensions=["lng","lat"],Tc.prototype.setMapOffset=function(e){this._mapOffset=e},Tc.prototype.getBMap=function(){return this._LeafletMap},Tc.prototype.prepareCustoms=function(){const e=Na.a.util,t=this.getViewRect();return{coordSys:{type:"leaflet",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:e.bind(this.dataToPoint,this),size:e.bind(function(t,i){return i=i||[0,0],e.map([0,1],function(e){const s=i[e],r=t[e]/2,n=[],a=[];return n[e]=s-r,a[e]=s+r,n[1-e]=a[1-e]=i[1-e],Math.abs(this.dataToPoint(n)[e]-this.dataToPoint(a)[e])},this)},this)}}},Tc.prototype.dataToPoint=function(e){null===e[1]&&(e[1]=Ka.a.CRS.EPSG3857.projection.MAX_LATITUDE);const t=this._LeafletMap.latLngToLayerPoint([e[1],e[0]]),i=this._mapOffset;return[t.x-i[0],t.y-i[1]]},Tc.prototype.fixLat=function(e){return e>=90?89.99999999999999:e<=-90?-89.99999999999999:e},Tc.prototype.pointToData=function(e){let t=this._mapOffset,i=this._LeafletMap.layerPointToLatLng([e[0]+t[0],e[1]+t[1]]);return[i.lng,i.lat]},Tc.prototype.getViewRect=function(){const e=this._LeafletMap.getSize();return new Na.a.graphic.BoundingRect(0,0,e.x,e.y)},Tc.prototype.getRoamTransform=function(){return Na.a.matrix.create()},Tc.dimensions=Tc.prototype.dimensions,Tc.create=function(e){let t,i=e.scheduler.ecInstance.leafletMap;e.eachComponent("LeafletMap",function(e){t||(t=new Tc(i)),e.coordinateSystem=t,e.coordinateSystem.setMapOffset(e.__mapOffset||[0,0])}),e.eachSeries(function(e){e.get("coordinateSystem")&&"leaflet"!==e.get("coordinateSystem")||(t||(t=new Tc(i)),e.coordinateSystem=t,e.animation=!0===e.animation)})};const Mc=function(e,t){return new Cc(e,t)};Ka.a.supermap.echartsLayer=Mc;function wc(e){var t=document.createElement("canvas");return t&&t.getContext(e)}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/var Ec=Ka.a.Class.extend({options:{radius:10,angele:60,spaceAngle:0,count:3,fill:!1,stroke:!0,color:"#3388ff",weight:1,lineCap:"round",lineJoin:"round",fillColor:"#66ccff",fillOpacity:.2,fillRule:"evenodd",opacity:1,strokeWidth:1},initialize:function(e){e=e||{},Ka.a.Util.setOptions(this,e),this._canvas=document.createElement("canvas"),this._canvas.width=2*(this.options.radius+this.options.weight),this._canvas.height=2*(this.options.radius+this.options.weight),this._ctx=this._canvas.getContext("2d");var t=void 0===this.options.strokeWidth?1:this.options.strokeWidth;this.options.width=2*(this.options.radius+t)+1,this._initStyle()},getStyle:function(){return this._canvas},drawSector:function(e,t,i,s,r,n){r=r/180*Math.PI,n=n/180*Math.PI,e.moveTo(t,i),e.lineTo(t+s*Math.cos(r),i+s*Math.sin(r)),e.arc(t,i,s,r,n),e.lineTo(t,i)},_initStyle:function(){var e=0,t=this.options,i=t.angle;if(t.spaceAngle=360/t.count-t.angle,!(t.spaceAngle<0)){this._ctx.beginPath(),this.anchor=[t.width/2,t.width/2];for(var s=0;s<t.count;s++)this.drawSector(this._ctx,this.anchor[0],this.anchor[1],t.radius,e,i),i=(e=i+t.spaceAngle)+t.angle;this._fillStroke()}},_fillStroke:function(){var e=this.options;e.fill&&(this._ctx.globalAlpha=e.fillOpacity,this._ctx.fillStyle=e.fillColor||e.color,this._ctx.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(this._ctx.globalAlpha=e.opacity,this._ctx.lineWidth=e.weight,this._ctx.strokeStyle=e.color,this._ctx.lineCap=e.lineCap,this._ctx.lineJoin=e.lineJoin,this._ctx.stroke())}}),Ac=function(e){return new Ec(e)};Ka.a.supermap.cloverStyle=Ac;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Lc=Ka.a.Class.extend({options:{stroke:!0,color:"#3388ff",weight:1,opacity:1,lineCap:"round",lineJoin:"round",fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",radius:3},initialize:function(e){e=e||{},Ka.a.Util.setOptions(this,e),this._canvas=document.createElement("canvas"),this._canvas.width=2*(this.options.radius+this.options.weight),this._canvas.height=2*(this.options.radius+this.options.weight),this._ctx=this._canvas.getContext("2d"),this._initStyle()},getCanvas:function(){return this._canvas},getStyle:function(){return this._canvas},_initStyle:function(){this._ctx.beginPath(),this._ctx.arc(this._canvas.width/2,this._canvas.height/2,this.options.radius,0,2*Math.PI),this._fillStroke()},_fillStroke:function(){var e=this.options;e.fill&&(this._ctx.globalAlpha=e.fillOpacity,this._ctx.fillStyle=e.fillColor||e.color,this._ctx.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(this._ctx.globalAlpha=e.opacity,this._ctx.lineWidth=e.weight,this._ctx.strokeStyle=e.color,this._ctx.lineCap=e.lineCap,this._ctx.lineJoin=e.lineJoin,this._ctx.stroke())}}),Pc=function(e){return new Lc(e)};Ka.a.supermap.circleStyle=Pc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Nc=Ka.a.Class.extend({options:{img:null,origin:[0,0],anchor:null,size:null},initialize:function(e){e=e||{},Ka.a.Util.setOptions(this,e),this._canvas=document.createElement("canvas"),this._canvas.width=2*(this.options.radius+this.options.weight),this._canvas.height=2*(this.options.radius+this.options.weight),this._ctx=this._canvas.getContext("2d")},getStyle:function(){return this.options}}),Oc=function(e){return new Nc(e)};Ka.a.supermap.imageStyle=Oc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
const Ic=Ka.a.Util.falseFn;var Fc=Ka.a.Class.extend({initialize:function(e,t){this.layer=e,t=t||{},Ka.a.Util.setOptions(this,t)},getRenderer:function(){return this.options.renderer},update:function(){this.getRenderer()._clear(),this.getRenderer()._draw()},_handleClick:function(e){let t=this.layer,i=t._map,s=t._getGraphicsInBounds();e.target=null;for(let r=s.length-1;r>=0;r--){let n,a,o;const l=i.latLngToLayerPoint(s[r].getLatLng());let h=s[r].getStyle();if(!h&&this.defaultStyle&&(h=this.defaultStyle),h.img){let e=h.img.width,t=h.img.height;h.size&&h.size[0]&&h.size[1]&&(e=h.size[0],t=h.size[1]);const i=h.anchor||[e/2,t/2];n=Ka.a.point(l.x-i[0],l.y-i[1]),a=Ka.a.point(n.x+e,n.y+t)}else n=Ka.a.point(l.x-h.width/2,l.y-h.height/2),a=Ka.a.point(l.x+h.width/2,l.y+h.height/2);if((o=Ka.a.bounds(n,a)).contains(i.latLngToLayerPoint(e.latlng)))return this.layer._renderer._ctx.canvas.style.cursor="pointer",e.target=s[r],void("click"===e.type&&t.options.onClick&&t.options.onClick.call(t,s[r],e));this.layer._renderer._ctx.canvas.style.cursor="auto"}},_clearBuffer:Ic});Ka.a.Canvas.include({drawGraphics:function(e,t){var i=this;i._drawing&&e.forEach(function(e){var s=e.getStyle();!s&&t&&(s=t),s.img?i._drawImage.call(i,i._ctx,s,e.getLatLng()):i._drawCanvas.call(i,i._ctx,s,e.getLatLng())})},_drawCanvas:function(e,t,i){var s=t,r=this._map.latLngToLayerPoint(i),n=r.x-s.width/2,a=r.y-s.height/2,o=s.width,l=s.height;e.drawImage(s,n,a,o,l)},_drawImage:function(e,t,i){var s,r;if(t.size){var n=t.size;s=n[0],r=n[1]}else s=t.img.width,r=t.img.height;var a=this._coordinateToPoint(i),o=Ka.a.point(a),l=Ka.a.point(t.anchor||[s/2,r/2]);a=[o.x-l.x,o.y-l.y],e.drawImage(t.img,a[0],a[1],s,r)},_coordinateToPoint:function(e){if(!this._map)return e;var t=e;Ka.a.Util.isArray(e)?t=Ka.a.latLng(e[0],e[1]):e instanceof Ka.a.LatLng&&(t=Ka.a.latLng(e.lat,e.lng));var i=this._map.latLngToLayerPoint(t);return[i.x,i.y]}});
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
const Rc=Ka.a.Util.falseFn,Dc=function(){let e=document.createElement("div"),t=["transform","WebkitTransform","MozTransform","OTransform","msTransform"];for(let i=0;i<t.length;i++){let s=t[i];if(void 0!==e.style[s])return s}return t[0]}();var kc=Ka.a.Class.extend({initialize:function(e,t){this.layer=e;let i=t||{};Ka.a.Util.setOptions(this,i),this.options.radius=this._pixelToMeter(this.options.radius),this._initContainer()},getRenderer:function(){return this},update:function(e){e&&e.length>-1&&(this._data=e),this._renderLayer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0}),this._refreshData();let t=this._getLayerState();t.data=this._data||[],this._layerDefaultStyleCache=null,this._renderLayer.setNeedsRedraw(!0),this._renderLayer.setState(t)},drawGraphics:function(e){this._clearBuffer();let t=this.layer._map.getSize();this._container.width!==t.x&&(this._container.width=t.x),this._container.height!==t.y&&(this._container.height=t.y);let i=this.layer._map.getPanes().mapPane._leaflet_pos;this._container.style[Dc]="translate("+-Math.round(i.x)+"px,"+-Math.round(i.y)+"px)",this._data=e||[],this._renderLayer||this._createInnerRender(),this._draw()},_initContainer:function(){this._container=this._createCanvas(this.options.width,this.options.height),this._layerContainer=this.options.container,this._wrapper=Ka.a.DomUtil.create("div","deck-wrapper",this._layerContainer),this._wrapper.appendChild(this._container)},_createCanvas:function(e,t){let i=Ka.a.DomUtil.create("canvas","graphicLayer leaflet-layer leaflet-zoom-hide");return i.oncontextmenu=Ka.a.Util.falseFn,i.width=e,i.height=t,i.style.width=e+"px",i.style.height=t+"px",i},_pixelToMeter:function(e){const t=this.layer._map.getBounds();return e*((t.getEast()-t.getWest())/this.layer._map.getSize().x*(6378137*Math.PI/180))},_createInnerRender:function(){let e=this,t=this._getLayerState(),{color:i,radius:s,opacity:r,highlightColor:n,radiusScale:a,radiusMinPixels:o,radiusMaxPixels:l,strokeWidth:h,outline:u}=t,c={id:"scatter-plot",data:e._data,pickable:Boolean(this.options.onClick)||Boolean(this.options.onHover),autoHighlight:!0,color:i,opacity:r,radius:s,radiusScale:a,highlightColor:n,radiusMinPixels:o,radiusMaxPixels:l,strokeWidth:h,outline:u,getPosition:function(e){if(!e)return[0,0,0];let t=e.getLatLng();return t&&[t.lng,t.lat,0]},getColor:function(t){let i=e._getLayerDefaultStyle(),s=t&&t.options;return s&&s.color||i.color},getRadius:function(t){let i=e._getLayerDefaultStyle(),s=t&&t.getStyle();return s&&s.radius||i.radius},updateTriggers:{getColor:[i],getRadius:[s]}},d=this;this.options.onClick&&(c.onClick=function(){d._container.style.cursor="pointer",d.options.onClick.apply(d,arguments)}),this.options.onHover&&(c.onHover=function(){d._container.style.cursor="pointer",d.options.onHover.apply(d,arguments)}),e._renderLayer=new window.DeckGL.ScatterplotLayer(c)},_getLayerDefaultStyle:function(){if(this._layerDefaultStyleCache)return this._layerDefaultStyleCache;let{color:e,opacity:t,radius:i,radiusScale:s,radiusMinPixels:r,radiusMaxPixels:n,strokeWidth:a,outline:o}=this.layer.options;return i=this._pixelToMeter(i),this._layerDefaultStyleCache={color:e,opacity:t,radius:i,radiusScale:s,radiusMinPixels:r,radiusMaxPixels:n,strokeWidth:a,outline:o},this._layerDefaultStyleCache},_getLayerState:function(){let e=this.layer.getState();return e.zoom=e.zoom-1,e},_draw:function(){let e=this._getLayerState();this._refreshData(),e.data=this._data||[];let t={};for(let i in e)t[i]=e[i];this._layerDefaultStyleCache=null,this._renderLayer.setNeedsRedraw(!0),t.layers=[this._renderLayer],t.canvas=this._container,t.onBeforeRender=this._onBeforeRender.bind(this),t.onAfterRender=this._onAfterRender.bind(this),this.deckGL?this.deckGL.setProps(t):this.deckGL=new window.DeckGL.experimental.DeckGLJS(t)},_clearBuffer:function(){if(this.deckGL){let e=this.deckGL.layerManager;e&&e.context.gl.clear(e.context.gl.COLOR_BUFFER_BIT)}return this},_refreshData:function(){let e=this._data||[],t=Ka.a.Util.isArray(e)?[].concat(e):[e];this._renderLayer.props.data||(this._renderLayer.props.data=[]),this._renderLayer.props.data.length=0;for(let e=0;e<t.length;e++)this._renderLayer.props.data.push(t[e]);this._data=this._renderLayer.props.data},_handleClick:Rc,_onBeforeRender:Rc,_onAfterRender:Rc,_removePath:function(){return this._wrapper.parentElement.removeChild(this._wrapper),this._container=null,this._wrapper=null,this},_initPath:Rc,_addPath:Rc});
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/const Bc=["canvas","webgl"],Uc={color:[0,0,0,255],opacity:.8,radius:10,radiusScale:1,radiusMinPixels:0,radiusMaxPixels:Number.MAX_SAFE_INTEGER,strokeWidth:1,outline:!1};var Gc=Ka.a.Path.extend({initialize:function(e,t){this.graphics=[].concat(e);let i=t||{};i.pane="overlayPane",Ka.a.Util.setOptions(this,i),this.options.render=this.options.render||Bc[0],
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class{static supportWebGL(){return wc("webgl")}static supportWebGL2(){return wc("webgl2")}static supportCanvas(){return wc("2d")}}.supportWebGL2()||(this.options.render=Bc[0]),this.on("click mousemove dblclick mousedown mouseup mouseout contextmenu",this._handleClick,this)},getEvents:function(){return{resize:this._resize.bind(this),moveend:this._moveEnd.bind(this)}},onAdd:function(e){this._map=e,this.defaultStyle=this._getDefaultStyle(this.options),this._renderer=this._createRenderer(),this._container=this._renderer._container,this.addInteractiveTarget(this._container),Ka.a.Path.prototype.onAdd.call(this)},onRemove:function(){this.off("click mousemove dblclick mousedown mouseup contextmenu",this._handleClick,this),this._renderer._removePath(this)},setGraphics:function(e){this.graphics=this.graphics||[],this.graphics.length=0;let t=Ka.a.Util.isArray(e)?[].concat(e):[e];this.graphics=[].concat(t),this.update()},addGraphics:function(e){this.graphics=this.graphics||[];let t=Ka.a.Util.isArray(e)?[].concat(e):[e];this.graphics=this.graphics.concat(t),this.update()},getGraphicBy(e,t){let i=null;for(let s in this.graphics)if(this.graphics[s][e]===t){i=this.graphics[s];break}return i},getGraphicById(e){return this.getGraphicBy("id",e)},getGraphicsByAttribute(e,t){var i,s=[];for(let r in this.graphics)(i=this.graphics[r])&&i.attributes&&i.attributes[e]===t&&s.push(i);return s},removeGraphics(e=null){if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,void this.update();ye.isArray(e)||(e=[e]);for(let t=e.length-1;t>=0;t--){let i=e[t],s=ye.indexOf(this.graphics,i);-1!==s&&this.graphics.splice(s,1)}this.update()},setStyle:function(e){let t=this.options,i={color:t.color,radius:t.radius,opacity:t.opacity,highlightColor:t.highlightColor,radiusScale:t.radiusScale,radiusMinPixels:t.radiusMinPixels,radiusMaxPixels:t.radiusMaxPixels,strokeWidth:t.strokeWidth,outline:t.outline};this.options=Ka.a.Util.extend(this.options,i,e),this.defaultStyle=this._getDefaultStyle(this.options),this.update()},update:function(){this._layerRenderer.update(this.graphics)},clear:function(){this.removeGraphics()},getRenderer:function(){return this._renderer},getState:function(){let e=this._map,t=e.getSize().x,i=e.getSize().y,s=e.getCenter(),r={longitude:s.lng,latitude:s.lat,zoom:e.getZoom(),maxZoom:e.getMaxZoom(),pitch:0,bearing:0},n={};for(let e in r)n[e]=r[e];n.width=t,n.height=i;let a=this.options;return n.color=a.color,n.radius=a.radius,n.opacity=a.opacity,n.highlightColor=a.highlightColor,n.radiusScale=a.radiusScale,n.radiusMinPixels=a.radiusMinPixels,n.radiusMaxPixels=a.radiusMaxPixels,n.strokeWidth=a.strokeWidth,n.outline=a.outline,n},_resize:function(){let e=this._map.getSize();this._container.width=e.x,this._container.height=e.y,this._container.style.width=e.x+"px",this._container.style.height=e.y+"px";let t=this._map.containerPointToLayerPoint([0,0]);Ka.a.DomUtil.setPosition(this._container,t),this._update()},_moveEnd:function(){this._layerRenderer instanceof kc&&this._update()},_createRenderer:function(){let e,t=this._map,i=t.getSize().x,s=t.getSize().y;if(this.options.render===Bc[0])e=new Fc(this,{width:i,height:s,renderer:t.getRenderer(this)});else{let r=Ka.a.Util.setOptions({},Uc),n=Ka.a.Util.setOptions({options:r},this.options);(n=Ka.a.Util.setOptions(this,n)).container=t.getPane("overlayPane"),n.width=i,n.height=s,e=new kc(this,n)}return e.defaultStyle=this.defaultStyle,this._layerRenderer=e,this._layerRenderer.getRenderer()},_update:function(){this._map&&this._updatePath()},_updatePath:function(){let e=this._getGraphicsInBounds();this._renderer.drawGraphics(e,this.defaultStyle)},_project:function(){let e=this;e._getGraphicsInBounds().map(function(t){let i=e._map.latLngToLayerPoint(t.getLatLng()),s=e._clickTolerance(),r=[t._anchor+s,t._anchor+s];return t._pxBounds=new Ka.a.Bounds(i.subtract(r),i.add(r)),t}),e._pxBounds=Ka.a.bounds(Ka.a.point(0,0),Ka.a.point(this._container.width,this._container.height))},_getDefaultStyle:function(e){const t={};if(e.color){t.fill=!0;const i=this.toRGBA(e.color);t.color=i,t.fillColor=i}return e.opacity&&(t.opacity=e.opacity,t.fillOpacity=e.opacity),e.radius&&(t.radius=e.radius),e.strokeWidth&&(t.weight=e.strokeWidth),e.outline&&(t.stroke=e.outline),new Lc(t).getStyle()},toRGBA:e=>`rgba(${e[0]},${e[1]},${e[2]},${(e[3]||255)/255})`,_getGraphicsInBounds:function(){let e=[],t=this._map.getBounds();return this.graphics.map(function(i){return t.contains(i.getLatLng())&&e.push(i),i}),e},_handleClick:function(e){this._layerRenderer._handleClick(e)},beforeAdd:Ka.a.Util.falseFn,_containsPoint:Ka.a.Util.falseFn});let jc=function(e,t){return new Gc(e,t)};Ka.a.supermap.graphicLayer=jc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var zc=Zu.extend({options:{isOverLay:!0},initialize:function(e,t,i){var s=[];s.push(e),s.push(i),Zu.prototype.initialize.apply(this,s),this.chartsType=t,this.themeFields=i&&i.themeFields?i.themeFields:null,this.charts=i&&i.charts?i.charts:[],this.cache=i&&i.cache?i.cache:{},this.chartsSetting=i&&i.chartsSetting?i.chartsSetting:{}},setChartsType:function(e){this.chartsType=e,this.redraw()},addFeatures:function(e){var t=this;t.fire("beforefeaturesadded",{features:e}),this.features=this.toiClientFeature(e),t.renderer&&(t._map?t.redrawThematicFeatures(t._map.getBounds()):t.redrawThematicFeatures())},redrawThematicFeatures:function(e){var t=this;t.renderer.clearAll();var i=t.features;if(this.options.alwaysMapCRS&&e&&e instanceof Ka.a.LatLngBounds){var s=this._map.options.crs;e=Ka.a.bounds(s.project(e.getSouthWest()),s.project(e.getNorthEast()))}e=_u.toSuperMapBounds(e);for(var r=0,n=i.length;r<n;r++){var a=i[r],o=a.geometry.getBounds();if(!e||e.intersectsBounds(o)){var l=t.cache,h=a.id;if(!l[h]){l[h]=h;var u=t.createThematicFeature(a),c=t.overlayWeightField&&a.attributes[t.overlayWeightField]&&!isNaN(a.attributes[t.overlayWeightField]);u&&c&&(u.__overlayWeight=a.attributes[t.overlayWeightField]),u&&t.charts.push(u)}}}t.drawCharts()},createThematicFeature:function(e){var t,i=this;return ca[i.chartsType]&&i.themeFields&&i.chartsSetting&&(t=new ca[i.chartsType](e,i,i.themeFields,i.chartsSetting)),!!t&&(t.assembleShapes(),t)},drawCharts:function(){var e=this;e.renderer&&(e.overlayWeightField&&e._sortChart(),e.options&&!e.options.isOverLay?e._addOverlayShape():e._addNoOverlayShape(),e.renderer.render())},getShapesByFeatureID:function(e){var t=[],i=this.renderer.getAllShapes();if(!e)return i;for(var s=0,r=i.length;s<r;s++){var n=i[s];n.refDataID&&e===n.refDataID&&t.push(n)}return t},isQuadrilateralOverLap:function(e,t){var i=e.length,s=t.length;if(5!==i||5!==s)return null;for(var r=!1,n=0;n<i;n++)if(this.isPointInPoly(e[n],t)){r=!0;break}for(let i=0;i<s;i++)if(this.isPointInPoly(t[i],e)){r=!0;break}for(let n=0;n<i-1&&!r;n++)for(let i=0;i<s-1;i++){if("SuperMap.Geometry.Point"===ye.lineIntersection(e[n],e[n+1],t[i],t[i+1]).CLASS_NAME){r=!0;break}}return r},isPointInPoly:function(e,t){for(var i=!1,s=-1,r=t.length,n=r-1;++s<r;n=s)(t[s].y<=e.y&&e.y<t[n].y||t[n].y<=e.y&&e.y<t[s].y)&&e.x<(t[n].x-t[s].x)*(e.y-t[s].y)/(t[n].y-t[s].y)+t[s].x&&(i=!i);return i},isChartInMap:function(e,t){for(var i=e,s=!1,r=0,n=t.length;r<n;r++){var a=t[r];if(a.x>=i.left&&a.x<=i.right&&a.y>=i.top&&a.y<=i.bottom){s=!0;break}}return s},clearCache:function(){this.cache={},this.charts=[]},removeFeatures:function(e){this.clearCache(),Zu.prototype.removeFeatures.apply(this,arguments)},removeAllFeatures:function(){this.clearCache(),Zu.prototype.removeAllFeatures.apply(this,arguments)},redraw:function(){return this.clearCache(),Zu.prototype.redraw.apply(this,arguments)},clear:function(){var e=this;e.renderer&&(e.renderer.clearAll(),e.renderer.refresh()),e.removeAllFeatures(),e.clearCache()},getWeightFieldValue:function(e,t,i){if((void 0===i||isNaN(i))&&(i=0),!e.attributes)return i;var s=e.attributes[t];return(void 0===s||isNaN(s))&&(s=i),s},_sortChart:function(){this.charts&&this.charts.sort(function(e,t){return void 0===e.__overlayWeight&&void 0===t.__overlayWeight?0:void 0!==e.__overlayWeight&&void 0===t.__overlayWeight?-1:void 0===e.__overlayWeight&&void 0!==t.__overlayWeight?1:void 0!==e.__overlayWeight&&void 0!==t.__overlayWeight?parseFloat(e.__overlayWeight)<parseFloat(t.__overlayWeight)?1:-1:0})},_addOverlayShape:function(){for(var e=this.charts,t=0,i=e.length;t<i;t++)for(var s=e[t],r=s.resetLocation(),n=s.shapes,a=0,o=n.length;a<o;a++)n[a].refOriginalPosition=r,this.renderer.addShape(n[a])},_addNoOverlayShape:function(){var e=this,t=e._map.getBounds(),i=this._map.options.crs;this.options.alwaysMapCRS&&(t=Ka.a.bounds(i.project(t.getSouthWest()),i.project(t.getNorthEast()))),t=_u.toSuperMapBounds(t);for(var s=e.charts,r=[],n=e.getLocalXY(new ge(t.left,t.top)),a=e.getLocalXY(new ge(t.right,t.bottom)),o=new ve(n[0],a[1],a[0],n[1]),l=0,h=s.length;l<h;l++){var u=s[l],c=u.resetLocation(),d=u.chartBounds,p=[{x:d.left,y:d.top},{x:d.left,y:d.bottom},{x:d.right,y:d.bottom},{x:d.right,y:d.top},{x:d.left,y:d.top}];if(!o||e.isChartInMap(o,p)){var f=!1;for(let t=0;t<r.length;t++)if(e.isQuadrilateralOverLap(p,r[t])){f=!0;break}if(!f){r.push(p);var m=u.shapes;for(let t=0,i=m.length;t<i;t++)m[t].refOriginalPosition=c,e.renderer.addShape(m[t])}}}}}),Vc=function(e,t,i){return new zc(e,t,i)};Ka.a.supermap.graphThemeLayer=Vc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Hc=zc.extend({initialize:function(e,t,i){zc.prototype.initialize.apply(this,arguments),this.symbolType=t,this.symbolSetting={}},setSymbolType:function(e){this.symbolType=e,this.redraw()},createThematicFeature:function(e){var t,i=this;return ca[i.symbolType]&&i.themeField&&i.symbolSetting&&(t=new ca[i.symbolType](e,i,[i.themeField],i.symbolSetting)),!!t&&(t.assembleShapes(),t)}}),Jc=function(e,t,i){return new Hc(e,t,i)};Ka.a.supermap.rankSymbolThemeLayer=Jc;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var qc=Ka.a.SVG.extend({initialize:function(e,t,i){Ka.a.SVG.prototype.initialize.call(this,i),this._tileCoord=e,this._size=t,this._initContainer(),this._container.setAttribute("width",this._size.x),this._container.setAttribute("height",this._size.y),this._container.setAttribute("viewBox",[0,0,this._size.x,this._size.y].join(" ")),this._layers={}},getCoord:function(){return this._tileCoord},getContainer:function(){return this._container},onAdd:Ka.a.Util.falseFn,addTo:function(e){if(this._map=e,this.options.interactive)for(var t in this._layers){var i=this._layers[t];i._path.style.pointerEvents="auto",this._map._targets[Ka.a.stamp(i._path)]=i}},removeFrom:function(e){var t=e||this._map;if(this.options.interactive)for(var i in this._layers){var s=this._layers[i];delete t._targets[Ka.a.stamp(s._path)]}delete this._map},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup||(this._rootGroup=this._container),this._rootGroup.appendChild(e._path),this._layers[Ka.a.stamp(e)]=e},_updateIcon:function(e){var t=e._path=Ka.a.SVG.create("image"),i=e.options,s=i.iconUrl;if(i.iconSize){var r=Ka.a.point(i.iconSize),n=r&&r.divideBy(2,!0),a=e._point.subtract(n);t.setAttribute("x",a.x),t.setAttribute("y",a.y),t.setAttribute("width",r.x+"px"),t.setAttribute("height",r.y+"px")}else{var o=new Image;o.src=s,Ka.a.DomEvent.on(o,"load",function(){var i=Ka.a.point([o.width,o.height]),s=i&&i.divideBy(2,!0),r=e._point.subtract(s);t.setAttribute("x",r.x),t.setAttribute("y",r.y),t.setAttribute("width",i.x+"px"),t.setAttribute("height",i.y+"px")})}t.setAttribute("href",s)}}),Wc=Ka.a.Canvas.extend({initialize:function(e,t,i){Ka.a.Canvas.prototype.initialize.call(this,i),this._tileCoord=e,this._size=t,this._initContainer(),this._container.setAttribute("width",this._size.x),this._container.setAttribute("height",this._size.y),this._layers={},this._drawnLayers={},this._drawing=!0,i.interactive&&(this._container.style.pointerEvents="auto")},getCoord:function(){return this._tileCoord},getContainer:function(){return this._container},getOffset:function(){return this._tileCoord.scaleBy(this._size).subtract(this._map.getPixelOrigin())},onAdd:Ka.a.Util.falseFn,addTo:function(e){this._map=e},removeFrom:function(e){delete this._map},_updateDashArray:function(e){var t=e.options.dashArray;if(t&&"string"==typeof t){var i,s=t.split(","),r=[];for(i=0;i<s.length;i++)r.push(Number(s[i]));e.options._dashArray=r}else e.options._dashArray=t},_onClick:function(e){var t,i,s=this._map.mouseEventToLayerPoint(e).subtract(this.getOffset());for(var r in this._layers)(t=this._layers[r]).options.interactive&&t._containsPoint(s)&&!this._map._draggableMoved(t)&&(i=t);i&&(Ka.a.DomEvent.stop(e),this._fireEvent([i],e))},_onMouseMove:function(e){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(e).subtract(this.getOffset());this._handleMouseHover(e,t)}},_updateIcon:function(e){if(this._drawing){var t=e.options,i=this._ctx,s=e._getImage();if(t.iconSize&&s.complete){var r=Ka.a.point(t.iconSize),n=r&&r.divideBy(2,!0),a=e._point.subtract(n);i.drawImage(s,a.x,a.y,r.x,r.y)}else Ka.a.DomEvent.on(s,"load",function(){var t=Ka.a.point([s.width,s.height]),r=t&&t.divideBy(2,!0),n=e._point.subtract(r);i.drawImage(s,n.x,n.y,t.x,t.y)});this._drawnLayers[e._leaflet_id]=e}}}),Yc={LABEL:"LABEL",TEXT:"TEXT",POINT:"POINT",LINE:"LINE",REGION:"REGION"},Qc=Ka.a.Class.extend({initialize:function(e){this.properties=e.properties,this.type=e.type,this.layerName=e.layerName},render:function(e,t){this._renderer=e,this._container=e._container,this.options=t,e._initPath(this),e._updateStyle(this);var i=this.getElement();i&&this.layerName&&Ka.a.DomUtil.addClass(i,this.layerName)},updateStyle:function(e,t){this.options=t,e._updateStyle(this)},getElement:function(){return this._path||this._renderer._container},_getPixelBounds:function(){for(var e=this._parts,t=Ka.a.bounds([]),i=0;i<e.length;i++)for(var s=e[i],r=0;r<s.length;r++)t.extend(s[r]);var n=this._clickTolerance(),a=new Ka.a.Point(n,n);return t.min._subtract(a),t.max._add(a),t},_clickTolerance:Ka.a.Path.prototype._clickTolerance}),Xc=Ka.a.Path.extend({includes:Qc.prototype,options:{color:"white",fillColor:"black",fill:!0,fillOpacity:1,opacity:.6,weight:1,rotation:0,stroke:!0,fontFamily:"Arial Unicode MS Regular",fontSize:14,fontWeight:"normal",textAlign:"center",offsetX:1,offsetY:1},initialize:function(e,t){Qc.prototype.initialize.call(this,e),this._makeFeatureParts(e,t),this.options.offsetX=t||1,this.options.offsetY=t||1},render:function(e,t){if(this.properties.texts&&(this._text=this.properties.texts[0]),!this._text){var i=this.properties.attributes;this._text=i&&this.properties.textField&&i[this.properties.textField]||""}var s=this.options;this._pxBounds=Ka.a.bounds(this._point,this._point),Qc.prototype.render.apply(this,[e,t]),this.options=Ka.a.Util.extend(s,t),this._updatePath()},_makeFeatureParts:function(e,t){t=t||{x:1,y:1};var i=e.geometry[0];"object"==typeof i[0]&&"x"in i[0]?(this._point=Ka.a.point(i[0]).scaleBy(t),this._empty=Ka.a.Util.falseFn):(this._point=Ka.a.point(i).scaleBy(t),this._empty=Ka.a.Util.falseFn)},makeInteractive:function(){this._updateBounds()},updateStyle:function(e,t){return this._updateBounds(),Qc.prototype.updateStyle.call(this,e,t)},_updateBounds:function(){var e=this._renderer._getTextWidth(this),t=[e/2,e/2];this._pxBounds=Ka.a.bounds(this._point.subtract(t),this._point.add(t))},_updatePath:function(){this._renderer._updateText(this)},_containsPoint:function(e){return!1}});
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/Wc.include({_getTextWidth:function(e){return this._ctx.measureText(e._text).width},_updateText:function(e){if(this._drawing&&!e._empty()){var t=this.getContainer(),i=this._map.getSize();t.width=i.x,t.height=i.y,t.style.width=i.x+"px",t.style.height=i.y+"px";var s=this._ctx,r=e.options,n=r.offsetX||1,a=r.offsetY||1,o=e._point.subtract(Ka.a.point(n,a));r.fill&&(this._drawnLayers[e._leaflet_id]=e,s.fillRect(0,0,i.x,i.y),s.font=[r.fontWeight?r.fontWeight:"normal",r.fontSize?r.fontSize:"14px",r.fontFamily?r.fontFamily:"Arial Unicode MS Regular,Microsoft Yahei"].join(" "),s.textAlign=r.textAlign,s.lineWidth=r.weight,s.fillStyle=r.fillColor,s.fillText(e._text,o.x,o.y),s.strokeStyle=r.color,s.strokeText(e._text,o.x,o.y),s.rotate(r.rotation))}}}),qc.include({_getTextWidth:function(e){return e._path.getComputedTextLength()||0},_initPath:function(e){var t;Xc&&e instanceof Xc?(t=e._path=Ka.a.SVG.create("text")).textContent=e._text:t=e._path=Ka.a.SVG.create("path"),e.options.className&&Ka.a.DomUtil.addClass(t,e.options.className),e.options.interactive&&Ka.a.DomUtil.addClass(t,"leaflet-interactive"),this._updateStyle(e),this._layers[Ka.a.stamp(e)]=e},_updateText:function(e){var t=e._path,i=e.options,s=i.offsetX||1,r=i.offsetY||1,n=e._point.subtract(Ka.a.point(s,r));t.setAttribute("x",n.x),t.setAttribute("y",n.y),i.rotation=i.rotation||0,t.setAttribute("transform","rotate("+i.rotation/Math.PI*180+" "+n.x+" "+n.y+")"),t.setAttribute("text-anchor","center"===i.textAlign?"middle":i.textAlign),t.style.fontSize=i.fontSize,t.style.fontFamily=i.fontFamily,t.style.fontWeight=i.fontWeight||"normal",t.style.glyphOrientationVertical=i.rotation||"",i.stroke?(t.setAttribute("stroke",i.color),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-linejoin","round"),t.setAttribute("stroke-opacity",i.opacity),t.setAttribute("stroke-width",i.weight>1?i.weight/10:i.weight)):t.setAttribute("stroke","none"),i.fill?(t.setAttribute("fill",i.fillColor||i.color),t.setAttribute("fill-opacity",i.fillOpacity)):t.setAttribute("fill","none")}});
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Kc=Ka.a.CircleMarker.extend({includes:Qc.prototype,statics:{iconCache:{}},initialize:function(e,t){Qc.prototype.initialize.call(this,e),this._makeFeatureParts(e,t)},getLatLng:function(){return this._renderer._map.layerPointToLatLng(this._point)},render:function(e,t){Qc.prototype.render.call(this,e,t),this._radius=t.radius||Ka.a.CircleMarker.prototype.options.radius,this._updatePath()},_makeFeatureParts:function(e,t){t=t||{x:1,y:1};var i=e.geometry[0];"object"==typeof i[0]&&"x"in i[0]?(this._point=Ka.a.point(i[0]).scaleBy(t),this._empty=Ka.a.Util.falseFn):(this._point=Ka.a.point(i).scaleBy(t),this._empty=Ka.a.Util.falseFn)},makeInteractive:function(){this._updateBounds()},updateStyle:function(e,t){return this._radius=t.radius||this._radius,this._updateBounds(),Qc.prototype.updateStyle.call(this,e,t)},_updateBounds:function(){if(this.options.iconUrl&&this.options.iconSize){var e=Ka.a.point(this.options.iconSize),t=e&&e.divideBy(2,!0),i=this._point.subtract(t);this._pxBounds=new Ka.a.Bounds(i,i.add(e))}else Ka.a.CircleMarker.prototype._updateBounds.call(this)},_updatePath:function(){this.options.iconUrl?this._renderer._updateIcon(this):Ka.a.CircleMarker.prototype._updatePath.call(this)},_getImage:function(){if(!this.options.iconUrl)return null;var e=this.options.iconUrl,t=Kc.iconCache[e];if(!t){var i=this.options.iconSize||[50,50];t=Kc.iconCache[e]=this._createIcon(e,i)}return t},_createIcon:function(e,t){var i=e;if(!i)throw new Error("iconUrl not set in Icon options (see the docs).");var s=document.createElement("img");s.src=i,s.className="leaflet-marker-icon "+(this.layerName||"");var r=t;if("number"==typeof r&&(r=[r,r]),r){var n=Ka.a.point(r),a=Ka.a.point(n&&n.divideBy(2,!0));n&&(s.style.width=n.x+"px",s.style.height=n.y+"px"),a&&(s.style.marginLeft=-a.x+"px",s.style.marginTop=-a.y+"px")}return s.onload=function(){r||(s.style.width=this.width+"px",s.style.height=this.height+"px")},s},_containsPoint:function(e){return this.options.iconUrl?this._pxBounds.contains(e):Ka.a.CircleMarker.prototype._containsPoint.call(this,e)}}),Zc={_makeFeatureParts:function(e,t){t=t||{x:1,y:1};var i,s=e.geometry;this._parts=[];for(var r=0;r<s.length;r++){for(var n=s[r],a=[],o=0;o<n.length;o++)i=n[o],a.push(Ka.a.point(i).scaleBy(t));this._parts.push(a)}},makeInteractive:function(){this._pxBounds=this._getPixelBounds()}},$c=Ka.a.Polyline.extend({includes:[Qc.prototype,Zc],initialize:function(e,t){Qc.prototype.initialize.call(this,e),this._makeFeatureParts(e,t)},render:function(e,t){t.fill=!1,Qc.prototype.render.call(this,e,t),this._updatePath()},updateStyle:function(e,t){t.fill=!1,Qc.prototype.updateStyle.call(this,e,t)}}),ed=Ka.a.Polygon.extend({includes:[Qc.prototype,Zc],initialize:function(e,t){Qc.prototype.initialize.call(this,e),this._makeFeatureParts(e,t)},render:function(e,t){Qc.prototype.render.call(this,e,t),this._updatePath()}}),td=i(12),id=i.n(td),sd=i(13),rd=Ka.a.Class.extend({initialize:function(e){this.url=e},getTile:function(){var e=this;return Ke.get(e.url,null,{timeout:1e4}).then(function(e){return e.ok?e.blob().then(function(e){var t=new FileReader;return new Promise(function(i){t.addEventListener("loadend",function(){var e=new id.a(t.result);return i(new sd.VectorTile(e))}),t.readAsArrayBuffer(e)})}):{layers:[]}}).then(function(t){return e._processVectorTileSpec(t)})},_processVectorTileSpec:function(e){var t=[];for(var i in e.layers){for(var s=[],r=0;r<e.layers[i].length;r++){var n=e.layers[i].feature(r);switch(n.geometry=n.loadGeometry(),n.layerName=i,n.properties={attributes:Ka.a.Util.extend({},n.properties),id:n.id},n.type){case 1:n.type=Yc.POINT;break;case 2:n.type=Yc.LINE;break;case 3:n.type=Yc.REGION}s.push(n)}var a={};a.features=s,a.layerName=i,a.extent=e.layers[i].extent,t.push(a)}return t}}),nd=Ka.a.Class.extend({initialize:function(e){this.url=e},getTile:function(){var e=this;return Ke.get(e.url,null,{timeout:1e4}).then(function(e){return e.json()}).then(function(t){return e._processRecordSets(t,e)})},_processRecordSets:function(e,t){var i=e.recordsets;if(!(i=t._convertToGeoJSON(i)))return null;for(var s=0;s<i.length;s++){for(var r=i[s],n=0;n<r.features.length;n++){var a=r.features[n];(a=t._convertToVectorLayerFeature(a,t)).layerName=r.layerName,r.features[n]=a}r.extent=256,delete r.fieldTypes,delete r.fields}return i},_convertToVectorLayerFeature:function(e,t){if(e.geometry){var i,s,r,n,a={},o=e.geometry,l=o.type,h=o.coordinates,u=e.properties,c=u.id;if("Point"===l)a=u&&u.texts?t._createFeature(c,Yc.TEXT,[h],u):t._createFeature(c,Yc.POINT,[h],u);else if("MultiPoint"===l)a=t._createFeature(c,Yc.POINT,h,u);else if("LineString"===l)a=t._createFeature(c,Yc.LINE,[h],u);else if("MultiLineString"===l||"Polygon"===l){for(r=[],i=0;i<h.length;i++)n=h[i],"Polygon"===l&&(n.outer=0===i),r.push(n);var d="Polygon"===l?Yc.REGION:Yc.LINE;a=t._createFeature(c,d,r,u)}else{if("MultiPolygon"!==l)throw new Error("Illegal GeoJSON object");for(r=[],i=0;i<h.length;i++)for(s=0;s<h[i].length;s++)(n=h[i][s]).outer=0===s,r.push(n);a=t._createFeature(c,Yc.REGION,r,u)}return a}},_convertToGeoJSON:function(e){if(e){for(var t=0;t<e.length;t++){for(var i=e[t],s=0;s<i.features.length;s++){for(var r=i.features[s],n=[],a=0,o=0;o<r.geometry.parts.length;o++){for(var l=2*r.geometry.parts[o],h=0,u=a;h<l;h+=2,u+=2){var c=r.geometry.points[u],d=r.geometry.points[u+1];n.push({x:c,y:d})}a+=l}r.geometry.points=n}i.features=xu(i.features).features}return e}},_createFeature:function(e,t,i,s){return{id:e,type:t,geometry:i,properties:s}}}),ad={JSON:"JSON",MVT:"MVT",PBF:"PBF"};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/Ka.a.supermap.VectorTileFormat=ad;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var od=Ka.a.Class.extend({initialize:function(e,t){this.layer=e.layer,this.tileSize=e.layer.getTileSize(),this.format=e.format,this.coords=e.coords,this.renderer=e.renderer,this.done=t,this.layer._textVectorTiles={}},renderTile:function(){var e=this,t=e.layer,i=e.coords,s=t._getTileUrl(i);([ad.MVT,ad.PBF].indexOf(e.format.toUpperCase())>-1?new rd(s):new nd(s)).getTile().then(function(t){e.render(t,i)})},render:function(e,t){if(e){for(var i=this,s=i.renderer,r=i.layer,n=0;n<e.length;n++){var a=e[n],o=a.layerName;r._dataLayerNames[o]=!0;for(var l=i.tileSize.divideBy(a.extent),h=r.getLayerStyleInfo(a.layerName),u=0;u<a.features.length;u++){var c=a.features[u];if(c){h&&h.type===Yc.LABEL&&c.type===Yc.POINT&&c.properties.attributes&&(c.type=Yc.TEXT);var d=i._getStyleOptions(t,c,o,i);if(d.length){var p=i._createFeatureLayer(c,l);if(p){var f={scope:i,coords:t,renderer:s};if(!i._extractTextLayer(c,p,d,f)){for(var m=0;m<d.length;m++){var y=i._validateStyle(d[m],c.type);p.render(s,y),s._addPath(p)}r.options.interactive&&p.makeInteractive();var g=r._getFeatureKey(c.id,o);s._features[g]={layerName:o,feature:p}}}}}}}r._map&&s.addTo(r._map),Ka.a.Util.requestAnimFrame(i.done.bind(t,null,i.layer._vectorTiles[i.layer._tileCoordsToKey(t)]))}},_extractTextLayer:function(e,t,i,s){if(e.type!==Yc.TEXT)return!1;var r=s.scope,n=s.coords,a=r.layer,o=a._tileCoordsToKey(n),l=e.id,h=e.layerName,u=a._textVectorTiles[o];return u||(u={layers:{},coords:n,renderer:s.renderer}),u.layers[l]={layer:t,style:i,layerName:h},a._textVectorTiles[o]=u,!0},_getStyleOptions:function(e,t,i,s){var r=s,n=r.layer,a=n.getVectorTileLayerStyle(e,t)||r._defaultStyle(t.type),o=t.id,l=n._getFeatureKey(o,i),h=n._overriddenStyles[l];return a=(a=(a=h||a)instanceof Function?a(t.properties,e.z):a)instanceof Array?a:[a]},_createFeatureLayer:function(e,t){var i;switch(e.type){case Yc.POINT:i=new Kc(e,t);break;case Yc.LINE:i=new $c(e,t);break;case Yc.REGION:i=new ed(e,t);break;case Yc.TEXT:i=new Xc(e,t)}var s=this.layer;return i&&s.options.interactive&&i.addEventParent(s),i},_validateStyle:function(e,t){switch(Ka.a.Path.prototype.options.weight=1,Ka.a.Path.prototype.options.fillOpacity=1,t){case Yc.POINT:return Ka.a.extend({},Ka.a.CircleMarker.prototype.options,e);case Yc.LINE:return Ka.a.extend({},Ka.a.Polyline.prototype.options,e);case Yc.REGION:return Ka.a.extend({},Ka.a.Polygon.prototype.options,e);case Yc.TEXT:return Ka.a.extend({},Xc.prototype.options,e)}},_defaultStyle:function(e){var t=Ka.a.Path.prototype.options;switch(t.weight=1,t.fillOpacity=1,t.radius=3,e){case Yc.POINT:return Ka.a.extend({},t,Ka.a.CircleMarker.prototype.options);case Yc.LINE:return Ka.a.extend({},t,Ka.a.Polyline.prototype.options);case Yc.REGION:return Ka.a.extend({},t,Ka.a.Polygon.prototype.options);case Yc.TEXT:return Ka.a.extend({},t,Xc.prototype.options)}}}),ld=Ka.a.GridLayer.extend({options:{vectorTileLayerStyles:null,renderer:"SVG",format:ad.JSON,interactive:!0,maxZoom:23},initialize:function(e){var t=this;Ka.a.setOptions(t,e),Ka.a.GridLayer.prototype.initialize.call(t,e),t._vectorTiles={},t._overriddenStyles={},t.vectorTileLayerStyles=t.options.vectorTileLayerStyles,t.on("tileunload",function(e){var i=t._tileCoordsToKey(e.coords),s=t._vectorTiles[i];s&&t._map&&s.removeFrom(t._map),delete t._vectorTiles[i]},t),t.on("tileerror ",t._renderText,t),t.on("load",t._renderText,t),t._dataLayerNames={}},createTile:function(e,t){var i=this,s=i.getTileSize(),r=null;return r="Canvas"===i.options.renderer?new Wc(e,s,i.options):new qc(e,s,i.options),i._vectorTiles[i._tileCoordsToKey(e)]=r,r._features={},new od({layer:i,format:i.options.format,coords:e,renderer:r},t).renderTile(),r.getContainer()},getStyles:function(){return this.vectorTileLayerStyles},getStyle:function(e){return this.vectorTileLayerStyles&&this.vectorTileLayerStyles[e]},setFeatureStyle:function(e,t,i){var s=this._getFeatureKey(e,t);for(var r in this._overriddenStyles[s]=i,this._vectorTiles){var n=this._vectorTiles[r],a=n._features[s];if(a){var o=a.feature;this._updateStyles(o,n,i)}}return this},resetFeatureStyle:function(e,t){var i=this._getFeatureKey(e,t);for(var s in delete this._overriddenStyles[i],this._vectorTiles){var r=this._vectorTiles[s],n=r._features[i];if(n){var a=n.feature,o=this.vectorTileLayerStyles[n.layerName];this._updateStyles(a,r,o)}}return this},getDataLayerNames:function(){return Object.keys(this._dataLayerNames)},_removeAllTiles:function(){Ka.a.GridLayer.prototype._removeAllTiles.call(this),this._textVectorTiles={}},_renderText:function(){var e=this._textVectorTiles;for(var t in e){var i=e[t],s=i.renderer;for(var r in i.layers){for(var n=i.layers[r],a=n.style,o=n.layer,l=0;l<a.length;l++)o.render(s,a[l]),s._addPath(o);this.options.interactive&&o.makeInteractive()}}},_getFeatureKey:function(e,t){return(e=e||0)+"_"+(t=t||"null")},_updateStyles:function(e,t,i){(i=i instanceof Function?i(e.properties,t.getCoord().z):i)instanceof Array||(i=[i]);for(var s=0;s<i.length;s++){var r=this._extendStyle(i[s],e.type);e.updateStyle(t,r)}},_extendStyle:function(e,t){switch(t){case Yc.POINT:return Ka.a.extend({},Ka.a.CircleMarker.prototype.options,e);case Yc.LINE:return Ka.a.extend({},Ka.a.Polyline.prototype.options,e);case Yc.REGION:return Ka.a.extend({},Ka.a.Polygon.prototype.options,e);case Yc.TEXT:return Ka.a.extend({},Xc.prototype.options,e)}}}),hd=ld.extend({options:{serverType:null,crs:null,cartoCSS:null,layerNames:null,layersID:null,serverCartoCSSStyle:!0,processCharacters:!1,returnAttributes:!1,expands:null,cacheEnabled:!1,tileTemplate:null,subdomains:"abc",timeout:1e4,attribution:pu.Common.attribution},initialize:function(e,t){(t=t||{}).noWrap=null==t.noWrap||t.noWrap,Ka.a.setOptions(this,t),ld.prototype.initialize.call(this,t),Ka.a.stamp(this);var i=this;if(!e||e.indexOf("http")<0)return e="",this;i.url=e,e.indexOf("/")===e.length-1&&(e=e.substr(0,e.length-1),i.url=e),this.cartoCSSToLeaflet=new Wu(i.url),i.initLayersInfo(),!i.options.serverCartoCSSStyle&&i.options.cartoCSS&&i.setClientCartoCSS(i.options.cartoCSS)},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._map=e,this._initLayerUrl(),!this.options.tileTemplate&&this.options.serverCartoCSSStyle||this._initGrid()},initLayersInfo:function(){var e=this,t=ye.urlPathAppend(e.url,"layers");Ke.get(t,null,{timeout:e.options.timeout}).then(function(e){return e.json()}).then(function(t){if(e.layersInfoInitialized=!0,e.layersInfo=t,e.layersInfo){for(var i={},s=0,r=e.layersInfo.length;s<r;s++)for(var n=e.layersInfo[s].subLayers.layers,a=0,o=n.length;a<o;a++)n[a].layerIndex=o-a,i[n[a].name]=n[a];e.layersInfo=i,e.cartoCSSToLeaflet.layersInfo=i,e.options.serverCartoCSSStyle&&e.getVectorStylesFromServer()}}).catch(function(e){console.error("error",e)})},getLayerStyleInfo:function(e){var t,i=this;if(i.layersStyles=i.layersStyles||{},t=i.layersStyles[e])return t;if(!i.layersInfo)return{};var s=i.layersInfo[e];if(!s)return null;switch(t={layerIndex:s.layerIndex,ugcLayerType:s.ugcLayerType},s.ugcLayerType){case"VECTOR":t.layerStyle=s.style?s.style:null;break;case"THEME":var r=s.theme;t.layerStyle=r?r.defaultStyle:null,r&&"LABEL"===r.type&&(t.type=r.type,t.textField=r.labelExpression);break;default:s.style&&(t.layerStyle=s.style)}return i.layersStyles[e]=t,t},getVectorStylesFromServer:function(){var e=this,t=ye.urlPathAppend(e.url,"tileFeature/vectorstyles");Ke.get(t,null,{timeout:e.options.timeout}).then(function(e){return e.json()}).then(function(t){if(!t||!t.style)return null;t.style&&"cartoCSS"===t.type&&e.setServerCartoCSS(t.style),e.options&&e.setClientCartoCSS(e.options.cartoCSS),e._initGrid()}).catch(function(e){console.error("error",e)})},setServerCartoCSS:function(e){this.cartoCSSToLeaflet.pretreatedCartoCSS(e,!0)},setClientCartoCSS:function(e){let t=!1;this.options.processCharacters&&(t=this.options.processCharacters),this.cartoCSSToLeaflet.pretreatedCartoCSS(e,t)},getVectorTileLayerStyle:function(e,t){if(!t)return null;var i=this,s=t.layerName,r=i.getLayerStyleInfo(s);if(r&&r.textField){var n=r.textField;if(n&&n.indexOf(".")){var a=n.split(".");n=a&&a.length>0&&a[a.length-1]}t.properties.textField=n}i.vectorTileLayerStyles=i.vectorTileLayerStyles||{};var o=i.vectorTileLayerStyles[s];if(o)return t=this._mergeFeatureTextField(t,o),o;var l=this.getScaleFromCoords(e),h=this.cartoCSSToLeaflet.pickShader(s)||[];for(var u in o=[],h)for(var c=h[u],d=0;d<c.length;d++){var p=this.cartoCSSToLeaflet.getValidStyleFromCarto(e.z,l,c[d],t,this.options.serverCartoCSSStyle);p&&o.push(p)}return"TEXT"!==(t=this._mergeFeatureTextField(t,o)).type&&0!==o.length||(o=this.cartoCSSToLeaflet.getValidStyleFromLayerInfo(t,r),"TEXT"===t.type&&(o.textName="["+t.properties.textField+"]")),i.vectorTileLayerStyles[s]=o,o},getScale:function(e){var t=e||this._map.getZoom();return this.scales[t]},getScaleFromCoords:function(e){var t,i=this;return i.scales&&i.scales[e.z]?i.scales[e.z]:(i.scales=i.scales||{},t=i.getDefaultScale(e),i.scales[e.z]=t,t)},getDefaultScale:function(e){var t=this._crs;if(t.scales)return t.scales[e.z];var i=this._tileCoordsToBounds(e),s=t.project(i.getNorthEast()),r=t.project(i.getSouthWest()),n=this.options.tileSize,a=Math.max(Math.abs(s.x-r.x)/n,Math.abs(s.y-r.y)/n),o=d.METER;if(t.code){var l=t.code.split(":");if(l&&l.length>1){var h=parseInt(l[1]);o=h&&h>=4e3&&h<=5e3?d.DEGREE:d.METER}}return Mu(a,96,o)},_mergeFeatureTextField:function(e,t){if(!this.options.serverCartoCSSStyle||!t||"TEXT"!==e.type)return e;var i=t;Ka.a.Util.isArray(t)||(i=[t]);for(var s=0;s<i.length;s++){var r=i[s].textName;r&&e.properties&&(e.properties.textField=r.substring(1,r.length-1))}return e},_getTileUrl:function(e){return this.options.tileTemplate?this._getTileTemplateUrl(e):this._getDefaultTileUrl(e)},_getTileTemplateUrl:function(e){var t=this,i=t.options.tileTemplate,s={s:t._getSubdomain(e),x:e.x,y:e.y,z:e.z};if(t._map&&!t._map.options.crs.infinite){var r=t._globalTileRange.max.y-e.y;t.options.tms&&(s.y=r),s["-y"]=r}return Ka.a.Util.template(i,Ka.a.extend(s,t.options))},_initGrid:function(){ld.prototype.onAdd.call(this,this._map)},_getSubdomain:Ka.a.TileLayer.prototype._getSubdomain,_getDefaultTileUrl:function(e){var t=e.x,i=e.y,s=this._tileUrl+"&x="+t+"&y="+i;return s+="&scale="+this.getScaleFromCoords(e)},_initLayerUrl:function(){var e=this.options;if(this.url){var t=e.format.toString().toLowerCase();this._tileUrl=ye.urlPathAppend(this.url,"tileFeature."+t),this._tileUrl=ye.urlAppend(this._tileUrl,encodeURI(this._createURLParam(e)))}},_createURLParam:function(e){var t=[],i=this._getCredential();if(i&&t.push(i),e.layersID&&t.push("layersID="+e.layersID),e.layerNames){Ka.a.Util.isArray(e.layerNames)||(e.layerNames=[e.layerNames]);var s="["+e.layerNames.join(",")+"]";t.push("layerNames="+s)}var r=this._crs;if(r.options&&r.options.origin)t.push("origin="+JSON.stringify({x:r.options.origin[0],y:r.options.origin[1]}));else if(r.projection&&r.projection.bounds){var n=r.projection.bounds,a=Ka.a.point(n.min.x,n.max.y);t.push("origin="+JSON.stringify({x:a.x,y:a.y}))}e.expands&&t.push("expands="+e.expands),t.push("returnAttributes="+e.returnAttributes),t.push("cacheEnabled="+e.cacheEnabled);var o=this.options.tileSize;return t.push("width="+o),t.push("height="+o),t.join("&")},_getCredential:function(e){var t,i;switch(this.options.serverType){case n.IPORTAL:(t=(i=Ze.getToken(e))?new Ne(i,"token"):null)||(t=(i=Ze.getKey(e))?new Ne(i,"key"):null);break;case n.ONLINE:t=(i=Ze.getKey(e))?new Ne(i,"key"):null;break;default:t=(i=Ze.getToken(e))?new Ne(i,"token"):null}return t?t.getUrlParameters():null}}),ud=function(e,t){return new hd(e,t)};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/Ka.a.supermap.tiledVectorLayer=ud;var cd=i(7),dd=Ka.a.GeoJSON.extend({turfMap:{"Measurement.along":["line","distance","units"],"Measurement.area":["geojson"],"Measurement.bbox":["geojson"],"Measurement.bboxPolygon":["bbox"],"Measurement.bearing":["start","end","final"],"Measurement.center":["geojson","properties"],"Measurement.centerOfMass":["geojson","properties"],"Measurement.centroid":["geojson","properties"],"Measurement.destination":["origin","distance","bearing","units"],"Measurement.distance":["from","to","units"],"Measurement.envelope":["geojson"],"Measurement.length":["geojson","units"],"Measurement.midpoint":["point1","point2"],"Measurement.pointOnFeature":["geojson"],"Measurement.polygonTangents":["point","polygon"],"Measurement.rhumbBearing":["start","end","final"],"Measurement.rhumbDestination":["origin","distance","bearing","units"],"Measurement.rhumbDistance":["from","to","units"],"Measurement.square":["bbox"],"Measurement.greatCircle":["start","end","properties","npoints","offset"],"CoordinateMutation.cleanCoords":["geojson","mutate"],"CoordinateMutation.flip":["geojson","mutate"],"CoordinateMutation.rewind":["geojson","reverse","mutate"],"CoordinateMutation.round":["num","precision"],"CoordinateMutation.truncate":["geojson","precision","coordinates","mutate"],"Transformation.bboxClip":["feature","bbox"],"Transformation.bezierSpline":["line","resolution","sharpness"],"Transformation.buffer":["geojson","radius","units","steps"],"Transformation.circle":["center","radius","steps","units","properties"],"Transformation.clone":["geojson"],"Transformation.concave":["points","maxEdge","units"],"Transformation.convex":["geojson","concavity"],"Transformation.difference":["polygon1","polygon2"],"Transformation.dissolve":["featureCollection","propertyName"],"Transformation.intersect":["poly1","poly2"],"Transformation.lineOffset":["geojson","distance","units"],"Transformation.simplify":["feature","tolerance","highQuality"],"Transformation.tesselate":["poly"],"Transformation.transformRotate":["geojson","angle","pivot","mutate"],"Transformation.transformTranslate":["geojson","distance","direction","units","zTranslation","mutate"],"Transformation.transformScale":["geojson","factor","origin","mutate"],"Transformation.union":["A"],"Transformation.voronoi":["points","bbox"],"featureConversion.combine":["fc"],"featureConversion.explode":["geojson"],"featureConversion.flatten":["geojson"],"featureConversion.lineStringToPolygon":["lines","properties","autoComplete","orderCoords"],"featureConversion.polygonize":["geojson"],"featureConversion.polygonToLineString":["polygon","properties"],"Misc.kinks":["featureIn"],"Misc.lineArc":["center","radius","bearing1","bearing2","steps","units"],"Misc.lineChunk":["geojson","segmentLength","units","reverse"],"Misc.lineIntersect":["line1","line2"],"Misc.lineOverlap":["line1","line2"],"Misc.lineSegment":["geojson"],"Misc.lineSlice":["startPt","stopPt","line"],"Misc.lineSliceAlong":["line","startDist","stopDist","units"],"Misc.lineSplit":["line","splitter"],"Misc.mask":["polygon","mask"],"Misc.pointOnLine":["lines","pt","units"],"Misc.sector":["center","radius","bearing1","bearing2","steps","units"],"Misc.shortestPath":["start","end","obstacles","units","resolution"],"Misc.unkinkPolygon":["geojson"],"Helper.featureCollection":["features","bbox","id"],"Helper.feature":["geometry","properties","bbox","id"],"Helper.geometryCollection":["geometries","properties","bbox","id"],"Helper.lineString":["coordinates","properties","bbox","id"],"Helper.multiLineString":["coordinates","properties","bbox","id"],"Helper.multiPoint":["coordinates","properties","bbox","id"],"Helper.multiPolygon":["coordinates","properties","bbox","id"],"Helper.point":["coordinates","properties","bbox","id"],"Helper.polygon":["coordinates","properties","bbox","id"],"Data.sample":["featurecollection","num"],"Interpolation.interpolate":["points","cellSize","gridType","property","units","weight"],"Interpolation.isobands":["pointGrid","breaks","zProperty","commonProperties","breaksProperties"],"Interpolation.isolines":["pointGrid","breaks","zProperty","commonProperties","breaksProperties"],"Interpolation.planepoint":["point","triangle"],"Interpolation.tin":["points","z"],"Joins.pointsWithinPolygon":["points","polygons"],"Joins.tag":["points","polygons","field","outField","mask","properties"],"Grids.hexGrid":["bbox","cellSide","units","triangles"],"Grids.pointGrid":["bbox","cellSide","units","mask","properties"],"Grids.squareGrid":["bbox","cellSide","units","mask","properties"],"Grids.triangleGrid":["bbox","cellSide","units","mask","properties"],"Classification.nearestPoint":["targetPoint","points"],"Aggregation.collect":["polygons","points","inProperty","outProperty"],"Aggregation.clustersDbscan":["points","maxDistance","units","minPoints","mutate"],"Aggregation.clustersKmeans":["points","numberOfClusters","mutate"],"Meta.coordAll":["geojson"],"Meta.coordEach":["geojson","callback","excludeWrapCoord"],"Meta.coordReduce":["geojson","callback","initialValue","excludeWrapCoord"],"Meta.featureEach":["geojson","callback"],"Meta.featureReduce":["geojson","callback","initialValue"],"Meta.flattenEach":["geojson","callback"],"Meta.flattenReduce":["geojson","callback","initialValue"],"Meta.getCoord":["coord"],"Meta.getCoords":["coords"],"Meta.getGeom":["geojson"],"Meta.getGeomType":["geojson","name"],"Meta.geomEach":["geojson","callback"],"Meta.geomReduce":["geojson","callback","initialValue"],"Meta.propEach":["geojson","callback"],"Meta.propReduce":["geojson","callback","initialValue"],"Meta.segmentEach":["geojson","callback"],"Meta.segmentReduce":["geojson","callback","initialValue"],"Meta.getCluster":["geojson","filter"],"Meta.clusterEach":["geojson","property","callback"],"Meta.clusterReduce":["geojson","property","callback","initialValue"],"Assertions.collectionOf":["featureCollection","type","name"],"Assertions.containsNumber":["coordinates"],"Assertions.geojsonType":["value","type","name"],"Assertions.featureOf":["feature","type","name"],"Booleans.booleanClockwise":["line"],"Booleans.booleanContains":["feature1","feature2"],"Booleans.booleanCrosses":["feature1","feature2"],"Booleans.booleanDisjoint":["feature1","feature2"],"Booleans.booleanEqual":["feature1","feature2"],"Booleans.booleanOverlap":["feature1","feature2"],"Booleans.booleanParallel":["feature1","feature2"],"Booleans.booleanPointInPolygon":["point","polygon","ignoreBoundary"],"Booleans.booleanPointOnLine":["point","linestring","ignoreEndVertices"],"UnitConversion.bearingToAngle":["bearing"],"UnitConversion.convertArea":["area","originalUnit","finalUnit"],"UnitConversion.convertLength":["length","originalUnit","finalUnit"],"UnitConversion.degreesToradians":["degrees"],"UnitConversion.lengthToRadians":["distance","units"],"UnitConversion.lengthToDegrees":["distance","units"],"UnitConversion.radiansToLength":["radians","units"],"UnitConversion.radiansToDegrees":["radians"],"UnitConversion.toMercator":["geojson","mutate"],"UnitConversion.toWgs84":["geojson","mutate"]},options:{attribution:pu.Turf.attribution},initialize:function(e){e=e||{},Ka.a.Util.setOptions(this,e),Ka.a.stamp(this),this._layers={}},turfOptionMap:{"Measurement.along":["line","distance",{units:""}],"Measurement.bboxPolygon":["bbox",{properties:"",id:""}],"Measurement.bearing":["start","end",{final:""}],"Measurement.center":["geojson",{properties:""}],"Measurement.destination":["origin","distance","bearing",{units:"",properties:""}],"Measurement.distance":["from","to",{units:""}],"Measurement.length":["geojson",{units:""}],"Measurement.rhumbBearing":["start","end",{final:""}],"Measurement.rhumbDestination":["origin","distance","bearing",{units:"",properties:""}],"Measurement.rhumbDistance":["from","to",{units:""}],"Measurement.greatCircle":["start","end",{properties:"",npoints:"",offset:""}],"CoordinateMutation.cleanCoords":["geojson",{mutate:""}],"CoordinateMutation.flip":["geojson",{mutate:""}],"CoordinateMutation.rewind":["geojson",{mutate:"",reverse:""}],"CoordinateMutation.truncate":["geojson",{precision:"",coordinates:"",mutate:""}],"Transformation.bezierSpline":["line",{resolution:"",sharpness:""}],"Transformation.buffer":["geojson","radius",{units:"",steps:""}],"Transformation.circle":["center","radius",{units:"",steps:"",properties:""}],"Transformation.concave":["points",{maxEdge:"",units:""}],"Transformation.convex":["geojson",{concavity:""}],"Transformation.dissolve":["featureCollection",{propertyName:""}],"Transformation.lineOffset":["geojson","distance",{units:""}],"Transformation.simplify":["geojson",{tolerance:"",highQuality:""}],"Transformation.transformRotate":["geojson","angle",{pivot:"",mutate:""}],"Transformation.transformTranslate":["geojson","distance","direction",{units:"",zTranslation:"",mutate:""}],"Transformation.transformScale":["geojson","factor",{origin:"",mutate:""}],"Transformation.voronoi":["points",{bbox:""}],"featureConversion.lineStringToPolygon":["lines",{properties:"",autoComplete:"",orderCoords:""}],"featureConversion.polygonToLineString":["polygon",{properties:""}],"Misc.lineArc":["center","radius","bearing1","bearing2",{steps:"",units:""}],"Misc.lineChunk":["geojson","segmentLength",{units:"",reverse:""}],"Misc.lineOverlap":["line1","line2",{tolerance:""}],"Misc.lineSliceAlong":["line","startDist","stopDist",{units:""}],"Misc.pointOnLine":["lines","pt",{units:""}],"Misc.sector":["center","radius","bearing1","bearing2",{units:"",steps:"",properties:""}],"Misc.shortestPath":["start","end",{obstacles:"",units:"",resolution:""}],"Helper.feature":["geometry","properties",{bbox:"",id:""}],"Helper.geometryCollection":["geometries","properties",{bbox:"",id:""}],"Helper.lineString":["coordinates","properties",{bbox:"",id:""}],"Helper.multiLineString":["coordinates","properties",{bbox:"",id:""}],"Helper.multiPoint":["coordinates","properties",{bbox:"",id:""}],"Helper.multiPolygon":["coordinates","properties",{bbox:"",id:""}],"Helper.point":["coordinates","properties",{bbox:"",id:""}],"Helper.polygon":["coordinates","properties",{bbox:"",id:""}],"Interpolation.interpolate":["points","cellSize",{gridType:"",property:"",units:"",weight:""}],"Interpolation.isobands":["pointGrid","breaks",{zProperty:"",commonProperties:"",breaksProperties:""}],"Interpolation.isolines":["pointGrid","breaks",{zProperty:"",commonProperties:"",breaksProperties:""}],"Grids.hexGrid":["bbox","cellSide",{units:"",triangles:"",properties:"",mask:""}],"Grids.pointGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Grids.squareGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Grids.triangleGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Aggregation.clustersDbscan":["points","maxDistance",{units:"",minPoints:"",mutate:""}],"Aggregation.clustersKmeans":["points",{numberOfClusters:"",mutate:""}],"Booleans.booleanPointInPolygon":["point","polygon",{ignoreBoundary:""}],"Booleans.booleanPointOnLine":["point","linestring",{ignoreEndVertices:""}],"UnitConversion.toMercator":["geojson",{mutate:""}],"UnitConversion.toWgs84":["geojson",{mutate:""}]},process:function(e,t,i,s){var r;try{r=cd[e.split(".")[1]].apply(this,this.parse(e,t))}catch(i){r=cd[e.split(".")[1]].apply(this,this.parseOption(e,t))}(s=null==s||s)&&this.addData([r]),i&&i(r)},parse:function(e,t){if("Transformation.union"===e)return t.A;var i=[],s=this.turfMap[e];return s&&s.map(function(e){return i.push(t[e]),t[e]}),i},parseOption(e,t){var i=[];return this.turfOptionMap[e].map(function(e){if(e instanceof Object){var s=e;Object.keys(s).forEach(function(e){s[e]=t[e]}),i.push(s)}else i.push(t[e]);return t}),i}}),pd=function(e){return new dd(e)};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/Ka.a.supermap.turfLayer=pd;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var fd=Ka.a.Layer.extend({options:{alwaysMapCRS:!1,id:ye.createUniqueID("heatMapLayer_"),featureWeight:null,opacity:1,colors:["blue","cyan","lime","yellow","red"],useGeoUnit:!1,radius:50,attribution:pu.Common.attribution},initialize:function(e,t){Ka.a.Util.setOptions(this,t),this.name=e,this.features=[],this.maxWeight=null,this.minWeight=null,this.rootCanvas=null,this.canvasContext=null,this.maxWidth=null,this.maxHeight=null,this.id=this.options.id,this.featureWeight=this.options.featureWeight,this.colors=this.options.colors,this.useGeoUnit=this.options.useGeoUnit,this.opacity=this.options.opacity,this.radius=this.options.radius,this.blur=this.options.blur,this.movingOffset=[0,0]},onRemove:function(e){Ka.a.DomUtil.remove(this.rootCanvas),e.off("mousemove",this.mouseMoveHandler)},onAdd:function(e){var t=this;if(t._map=e,t._createCanvasContainer(),t.rootCanvas){var i=e.getSize();t.rootCanvas.width=t.maxWidth=i.x,t.rootCanvas.height=t.maxHeight=i.y,t._updateOpacity(),t.mouseMoveHandler=function(e){var i=e.layerPoint;t.currentMousePosition=Ka.a.point(i.x+t.movingOffset[0],i.y+t.movingOffset[1])},e.on("mousemove",t.mouseMoveHandler),t.update()}else e.removeLayer(t)},addFeatures:function(e){this.features=this.toiClientFeature(e),this.refresh()},refresh:function(){if(0!==this.features.length&&this._map){var e=this._map.getBounds();this.updateHeatPoints(e)}},updateHeatPoints:function(e){this.features&&this.features.length>0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)},convertFastToPixelPoints:function(e){var t,i,s,r,n,a,o,l=[],h=e.getEast()-e.getWest(),u=e.getNorth()-e.getSouth(),c=this._map.getSize();r=h/c.x>u/c.y?h/c.x:u/c.y,this.useRadius=this.useGeoUnit?parseInt(this.radius/r):this.radius;for(var d=0;d<this.features.length;d++){var p=this.features[d],f=p.geometry,m=this.getLocalXY(new ge(f.x,f.y));this.featureWeight?(m.weight=p.attributes[this.featureWeight],this.maxWeight||(n=n||m.weight,a=a||m.weight,n=Math.max(n,m.weight),a=Math.min(a,m.weight))):m.weight=1,t=Math.floor(m[0]),i=Math.floor(m[1]),s=m.weight,l.push([t,i,s])}this.maxWeight?this.draw(l,this.maxWeight):(o=n&&a?(n+a)/2:1,this.draw(l,o))},draw:function(e,t){if(!(this.maxHeight>0&&this.maxWidth>0))return!1;var i=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var s=0;s<e.length;s++){var r=e[s];this.canvasContext.globalAlpha=Math.max(r[2]/t,.05),this.canvasContext.drawImage(this.circle,r[0]-this.useRadius,r[1]-this.useRadius)}var n=i.getImageData(0,0,this.maxWidth,this.maxHeight);this.colorize(n.data,this.grad),i.putImageData(n,0,0)},colorize:function(e,t){for(var i,s=0;s<e.length;s+=4)(i=4*e[s+3])&&(e[s]=t[i],e[s+1]=t[i+1],e[s+2]=t[i+2])},drawCircle:function(e){var t=this.blur||e/2,i=this.circle=document.createElement("canvas"),s=i.getContext("2d");i.height=2*e,i.width=2*e,s.shadowOffsetX=s.shadowOffsetY=2*e,s.shadowBlur=t,s.shadowColor="#000000",s.beginPath(),s.arc(-e,-e,e/2,0,2*Math.PI,!0),s.closePath(),s.fill()},createGradient:function(){var e=this.colors,t=document.createElement("canvas"),i=t.getContext("2d"),s=i.createLinearGradient(0,0,0,256);t.height=256,t.width=1;for(var r=1,n=0,a=e.length;n<a;n++)s.addColorStop(r/a,e[n]),r++;i.fillStyle=s,i.fillRect(0,0,1,256),this.grad=i.getImageData(0,0,1,256).data},update:function(){var e=this._map.containerPointToLayerPoint([0,0]);Ka.a.DomUtil.setPosition(this.rootCanvas,e);var t=this;t.refresh(),t.currentMousePosition&&(t.currentMousePosition=Ka.a.point(t.currentMousePosition.x-t.movingOffset[0],t.currentMousePosition.y-t.movingOffset[1])),t.movingOffset=[0,0],t._zoom=t._map.getZoom(),t._center=t._map.getCenter()},getLocalXY:function(e){if(!this._map)return e;var t=e;Ka.a.Util.isArray(e)&&(t=Ka.a.point(e[0],e[1])),e instanceof Ka.a.Point||(t=e instanceof Ce||e instanceof Me?Ka.a.point(e.x,e.y):Ka.a.point(e.lon,e.lat));var i=this._map.latLngToContainerPoint(this.options.alwaysMapCRS?this._map.options.crs.unproject(t):Ka.a.latLng(t.y,t.x));return[i.x,i.y]},setOpacity:function(e){e!==this.options.opacity&&(e&&(this.options.opacity=e),this._updateOpacity())},removeFeatures:function(e){if(e&&0!==e.length&&this.features&&0!==this.features.length){if(e===this.features)return this.removeAllFeatures();ye.isArray(e)||(e=[e]);for(var t,i,s=[],r=0,n=e.length;r<n;r++)t=e[r],-1!==(i=ye.indexOf(this.features,t))?this.features.splice(i,1):s.push(t);var a=0==s.length;this._map.fire("featuresremoved",{features:s,succeed:a}),this.refresh()}},removeAllFeatures:function(){this.features=[],this.refresh()},_createCanvasContainer:function(){var e=this.getPane(),t="heatMapLayer leaflet-layer leaflet-zoom-"+(this._map.options.zoomAnimation&&Ka.a.Browser.any3d?"animated":"hide");this.rootCanvas=Ka.a.DomUtil.create("canvas",t,e);var i=Ka.a.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);this.rootCanvas.id=this.id,this.rootCanvas.style[i]="50% 50%",this.rootCanvas.style.position="absolute",this.rootCanvas.style.zIndex=200,ye.modifyDOMElement(this.rootCanvas,null,null,null,null,null,null,this.opacity),this.canvasContext=this.rootCanvas.getContext("2d")},_updateOpacity:function(){var e=this;ye.modifyDOMElement(e.rootCanvas,null,null,null,null,null,null,e.options.opacity),null!==e._map&&e._map.fire("changelayer",{layer:e,property:"opacity"})},getEvents:function(){var e={zoomend:this._reset,moveend:this._reset,resize:this._resize};return this._map._zoomAnimated&&(e.zoomanim=this._zoomAnim),e},toiClientFeature:function(e){Ka.a.Util.isArray(e)||(e=[e]);let t=[];for(let i=0,s=e.length;i<s;i++)if(e[i]instanceof md)t.push(e[i].toFeature());else if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e[i].type)){const s=new Ve;t=t.concat(s.read(e[i]))}else{if(!e[i].geometry||!e[i].geometry.parts)throw new Error("Features's type does not match, please check.");t.push(Mr.fromJson(e[i]).toFeature())}return t},_zoomAnim:function(e){var t=this._map.getZoomScale(e.zoom),i=this._map._getCenterOffset(e.center)._multiplyBy(-t).subtract(this._map._getMapPanePos());Ka.a.DomUtil.setTransform?Ka.a.DomUtil.setTransform(this.rootCanvas,i,t):this.rootCanvas.style[Ka.a.DomUtil.TRANSFORM]=Ka.a.DomUtil.getTranslateString(i)+" scale("+t+")"},_reset:function(){var e=this;e.update();var t=e._map.getSize(),i=this._map.containerPointToLayerPoint([0,0]);Ka.a.DomUtil.setPosition(this.rootCanvas,i),parseFloat(e.rootCanvas.width)!==parseFloat(t.x)&&(e.rootCanvas.width=t.x),parseFloat(e.rootCanvas.height)!==parseFloat(t.y)&&(e.rootCanvas.height=t.y),e.refresh()},_resize:function(){var e=this._map.getSize();this.maxWidth=e.x,this.maxHeight=e.y}});Ka.a.supermap.heatMapLayer=function(e,t){return new fd(e,t)};var md=Ka.a.Class.extend({initialize:function(e,t){this.geometry=e,this.attributes=t},toFeature:function(){var e=this.geometry,t=[];if(e instanceof Ka.a.LatLng)t=[e.lng,e.lat];else if(e instanceof Ka.a.Point)t=[e.x,e.y];else if(e instanceof Ka.a.CircleMarker){var i=e.getLatLng();t=[i.lng,i.lat]}else t=e;return 2===t.length&&(e=new Ce(t[0],t[1])),new Re(e,this.attributes)}});Ka.a.supermap.heatMapFeature=function(e,t){return new md(e,t)};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var yd=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},code:function(e,t){var i=this;new St(this.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).code(ye.urlPathAppend(i.url,"geocoding"),e)},decode:function(e,t){var i=this;new St(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).decode(ye.urlPathAppend(i.url,"geodecoding"),e)}}),gd=function(e,t){return new yd(e,t)};Ka.a.supermap.addressMatchService=gd;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var vd=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},queryChart:function(e,t,i){var s=this,r=s._processParams(e),n=s._processFormat(i);new Yt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:n}).processAsync(r)},getChartFeatureInfo:function(e){var t=this,i=t.url.concat();i=ye.urlPathAppend(i,"chartFeatureInfoSpecs"),new Ht(i,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()},_processParams:function(e){if(!e)return{};e.returnContent=null==e.returnContent||e.returnContent,e.chartQueryFilterParameters&&!Ka.a.Util.isArray(e.chartQueryFilterParameters)&&(e.chartQueryFilterParameters=[e.chartQueryFilterParameters]),e.bounds&&(e.bounds=_u.toSuperMapBounds(e.bounds))},_processFormat:function(e){return e||r.GEOJSON}}),Sd=function(e,t){return new vd(e,t)};Ka.a.supermap.chartService=Sd;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var bd=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},getFields:function(e,t){var i=this;new us(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t},datasource:e.datasource,dataset:e.dataset}).processAsync()},getFieldStatisticsInfo:function(e,t){if(e instanceof Li){var i=this,s=e.fieldName,r=e.statisticMode;r&&!Ka.a.Util.isArray(r)&&(r=[r]),i.currentStatisticResult={fieldName:s},i._statisticsCallback=t,r.forEach(t=>{i.currentStatisticResult[t]=null,i._fieldStatisticRequest(e.datasource,e.dataset,s,t)})}},_fieldStatisticRequest:function(e,t,i,s){var r=this;new Pi(r.url,{eventListeners:{scope:r,processCompleted:r._processCompleted,processFailed:r._statisticsCallback},datasource:e,dataset:t,field:i,statisticMode:s,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers}).processAsync()},_processCompleted:function(e){var t=this,i=!0,s=e.result;for(var r in this.currentStatisticResult&&null==t.currentStatisticResult[s.mode]&&(this.currentStatisticResult[s.mode]=s.result),t.currentStatisticResult)if(null==t.currentStatisticResult[r]){i=!1;break}i&&t._statisticsCallback({result:t.currentStatisticResult})}}),_d=function(e,t){return new bd(e,t)};Ka.a.supermap.fieldService=_d;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var xd=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},getGridCellInfos:function(e,t){if(e instanceof cs){var i=this;new ds(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}}}),Cd=function(e,t){return new xd(e,t)};Ka.a.supermap.gridCellInfosService=Cd;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Td=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},getLayersInfo:function(e){var t=this;new Hs(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,serverType:t.options.serverType,eventListeners:{processCompleted:e,processFailed:e}}).processAsync()},setLayerInfo:function(e,t){if(e instanceof wr){var i=this,s=e.resourceID,r=e.tempLayerName,n=e.layerInfo;if(s&&r){var a=ye.urlPathAppend(i.url,`tempLayersSet/${s}/${r}`);new Er(a,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(n)}}},setLayersInfo:function(e,t){if(e instanceof Ar){var i=this,s=e.resourceID,r=!!e.isTempLayers&&e.isTempLayers,n=e.layersInfo;if((!r||s)&&n)new Lr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{processCompleted:t,processFailed:t},resourceID:s,isTempLayers:r}).processAsync(n)}},setLayerStatus:function(e,t){if(e instanceof Pr){var i=this;new Nr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{processCompleted:t,processFailed:t}}).processAsync(e)}}}),Md=function(e,t){return new Td(e,t)};Ka.a.supermap.layerInfoService=Md;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var wd=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},measureDistance:function(e,t){return this.measure(c.DISTANCE,e,t),this},measureArea:function(e,t){return this.measure(c.AREA,e,t),this},measure:function(e,t,i){if(t instanceof or){var s=this;t.geometry&&(t.geometry=Cu(t.geometry)),new lr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,measureMode:e,eventListeners:{scope:s,processCompleted:i,processFailed:i}}).processAsync(t)}}}),Ed=function(e,t){return new wd(e,t)};Ka.a.supermap.measureService=Ed;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Ad=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},sinksFacilityAnalyst:function(e,t){var i=this;new yi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)},sourcesFacilityAnalyst:function(e,t){var i=this;new vi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)},traceUpFacilityAnalyst:function(e,t){var i=this;new Ti(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)},traceDownFacilityAnalyst:function(e,t){var i=this;new xi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)},upstreamFacilityAnalyst:function(e,t){var i=this;new wi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}}),Ld=function(e,t){return new Ad(e,t)};Ka.a.supermap.networkAnalyst3DService=Ld;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Pd=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},burstPipelineAnalyst:function(e,t){var i=this;new Vt(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))},computeWeightMatrix:function(e,t){var i=this;new ei(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))},findClosestFacilities:function(e,t,i){var s=this;new Oi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},streamFacilityAnalyst:function(e,t,i){var s=this;new bi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},findLocation:function(e,t,i){var s=this;new Fi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},findPath:function(e,t,i){var s=this;new Bi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},findTSPPaths:function(e,t,i){var s=this;new zi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},findMTSPPaths:function(e,t,i){var s=this;new Di(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},findServiceAreas:function(e,t,i){var s=this;new Gi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},updateEdgeWeight:function(e,t){var i=this;new cn(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)},updateTurnNodeWeight:function(e,t){var i=this;new pn(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)},_processParams:function(e){if(!e)return{};if(e.centers&&Ka.a.Util.isArray(e.centers)&&e.centers.map(function(t,i){return e.centers[i]=t instanceof Ka.a.LatLng?{x:t.lng,y:t.lat}:t,e.centers[i]}),e.nodes&&Ka.a.Util.isArray(e.nodes)&&e.nodes.map(function(t,i){return e.nodes[i]=t instanceof Ka.a.LatLng?{x:t.lng,y:t.lat}:t,e.nodes[i]}),e.event&&e.event instanceof Ka.a.LatLng&&(e.event={x:e.event.lng,y:e.event.lat}),e.facilities&&Ka.a.Util.isArray(e.facilities)&&e.facilities.map(function(t,i){return e.facilities[i]=t instanceof Ka.a.LatLng?{x:t.lng,y:t.lat}:t,e.facilities[i]}),e.parameter&&e.parameter.barrierPoints){var t=e.parameter.barrierPoints;Ka.a.Util.isArray(t)?t.map(function(t,i){return e.parameter.barrierPoints[i]=t instanceof Ka.a.LatLng?{x:t.lng,y:t.lat}:t,e.parameter.barrierPoints[i]}):e.parameter.barrierPoints=[t instanceof Ka.a.LatLng?{x:t.lng,y:t.lat}:t]}return e},_processFormat:function(e){return e||r.GEOJSON}}),Nd=function(e,t){return new Pd(e,t)};Ka.a.supermap.networkAnalystService=Nd;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Od=fu.extend({initialize:function(e,t){t=t||{},Ka.a.setOptions(this,t),fu.prototype.initialize.call(this,e,t),this.kernelDensityJobs={},this.summaryMeshJobs={},this.queryJobs={},this.summaryRegionJobs={},this.vectorClipJobs={},this.overlayGeoJobs={},this.buffersJobs={},this.topologyValidatorJobs={},this.summaryAttributesJobs={}},getKernelDensityJobs:function(e,t){var i=this,s=i._processFormat(t);new Zs(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e},format:s}).getKernelDensityJobs()},getKernelDensityJob:function(e,t,i){var s=this,r=s._processFormat(i);new Zs(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:r}).getKernelDensityJob(e)},addKernelDensityJob:function(e,t,i,s){var r=this,n=r._processParams(e),a=r._processFormat(s);new Zs(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.kernelDensityJobs[e.id]=e.state}},format:a}).addKernelDensityJob(n,i)},getKernelDensityJobState:function(e){return this.kernelDensityJobs[e]},getSummaryMeshJobs:function(e,t){var i=this,s=i._processFormat(t);new Ur(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e},format:s}).getSummaryMeshJobs()},getSummaryMeshJob:function(e,t,i){var s=this,r=s._processFormat(i);new Ur(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:r}).getSummaryMeshJob(e)},addSummaryMeshJob:function(e,t,i,s){var r=this,n=r._processParams(e),a=r._processFormat(s);new Ur(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.summaryMeshJobs[e.id]=e.state}},format:a}).addSummaryMeshJob(n,i)},getSummaryMeshJobState:function(e){return this.summaryMeshJobs[e]},getQueryJobs:function(e,t){var i=this,s=i._processFormat(t);new Ir(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e},format:s}).getQueryJobs()},getQueryJob:function(e,t,i){var s=this,r=s._processFormat(i);new Ir(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:r}).getQueryJob(e)},addQueryJob:function(e,t,i,s){var r=this,n=r._processParams(e),a=r._processFormat(s);new Ir(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.queryJobs[e.id]=e.state}},format:a}).addQueryJob(n,i)},getQueryJobState:function(e){return this.queryJobs[e]},getSummaryRegionJobs:function(e,t){var i=this,s=i._processFormat(t);new jr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e},format:s}).getSummaryRegionJobs()},getSummaryRegionJob:function(e,t,i){var s=this,r=s._processFormat(i);new jr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:r}).getSummaryRegionJob(e)},addSummaryRegionJob:function(e,t,i,s){var r=this,n=r._processParams(e),a=r._processFormat(s);new jr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.summaryRegionJobs[e.id]=e.state}},format:a}).addSummaryRegionJob(n,i)},getSummaryRegionJobState:function(e){return this.summaryRegionJobs[e]},getVectorClipJobs:function(e,t){var i=this,s=i._processFormat(t);new mn(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e},format:s}).getVectorClipJobs()},getVectorClipJob:function(e,t,i){var s=this,r=s._processFormat(i);new mn(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:r}).getVectorClipJob(e)},addVectorClipJob:function(e,t,i,s){var r=this,n=r._processParams(e),a=r._processFormat(s);new mn(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.vectorClipJobs[e.id]=e.state}},format:a}).addVectorClipJob(n,i)},getVectorClipJobState:function(e){return this.vectorClipJobs[e]},getOverlayGeoJobs:function(e,t){var i=this,s=i._processFormat(t);new cr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e},format:s}).getOverlayGeoJobs()},getOverlayGeoJob:function(e,t,i){var s=this,r=s._processFormat(i);new cr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:r}).getOverlayGeoJob(e)},addOverlayGeoJob:function(e,t,i,s){var r=this,n=r._processParams(e),a=r._processFormat(s);new cr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.overlayGeoJobs[e.id]=e.state}},format:a}).addOverlayGeoJob(n,i)},getoverlayGeoJobState:function(e){return this.overlayGeoJobs[e]},getBuffersJobs:function(e,t){var i=this,s=i._processFormat(t);new Gt(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e},format:s}).getBuffersJobs()},getBuffersJob:function(e,t,i){var s=this,r=s._processFormat(i);new Gt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:r}).getBuffersJob(e)},addBuffersJob:function(e,t,i,s){var r=this,n=r._processParams(e),a=r._processFormat(s);new Gt(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.buffersJobs[e.id]=e.state}},format:a}).addBuffersJob(n,i)},getBuffersJobState:function(e){return this.buffersJobs[e]},getTopologyValidatorJobs:function(e,t){var i=this,s=i._processFormat(t);new rn(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e},format:s}).getTopologyValidatorJobs()},getTopologyValidatorJob:function(e,t,i){var s=this,r=s._processFormat(i);new rn(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:r}).getTopologyValidatorJob(e)},addTopologyValidatorJob:function(e,t,i,s){var r=this,n=r._processParams(e),a=r._processFormat(s);new rn(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.topologyValidatorJobs[e.id]=e.state}},format:a}).addTopologyValidatorJob(n,i)},getTopologyValidatorJobState:function(e){return this.topologyValidatorJobs[e]},getSummaryAttributesJobs:function(e,t){var i=this,s=i._processFormat(t);new kr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e},format:s}).getSummaryAttributesJobs()},getSummaryAttributesJob:function(e,t,i){var s=this,r=s._processFormat(i);new kr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:r}).getSummaryAttributesJob(e)},addSummaryAttributesJob:function(e,t,i,s){var r=this,n=r._processParams(e),a=r._processFormat(s);new kr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t,processRunning:function(e){r.summaryAttributesJobs[e.id]=e.state}},format:a}).addSummaryAttributesJob(n,i)},getSummaryAttributesJobState:function(e){return this.summaryAttributesJobs[e]},_processFormat:function(e){return e||r.GEOJSON},_processParams:function(e){return e?(e.bounds&&(e.bounds=_u.toSuperMapBounds(e.bounds)),e.query&&(e.query=_u.toSuperMapBounds(e.query)),e.geometryQuery&&(e.geometryQuery=_u.toProcessingParam(e.geometryQuery)),e.geometryClip&&(e.geometryClip=_u.toProcessingParam(e.geometryClip)),e):{}}}),Id=function(e,t){return new Od(e,t)};Ka.a.supermap.processingService=Id;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Fd=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},queryByBounds:function(e,t,i){var s=this;new fr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},queryByDistance:function(e,t,i){var s=this;new yr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},queryBySQL:function(e,t,i){var s=this;new br(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},queryByGeometry:function(e,t,i){var s=this;new vr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},_processParams:function(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.queryParams&&!Ka.a.Util.isArray(e.queryParams)&&(e.queryParams=[e.queryParams]),e.bounds&&(e.bounds=_u.toSuperMapBounds(e.bounds)),e.geometry&&(e.geometry instanceof Ka.a.Point?e.geometry=new Ce(e.geometry.x,e.geometry.y):e.geometry=Cu(e.geometry)),e):{}},_processFormat:function(e){return e||r.GEOJSON}}),Rd=function(e,t){return new Fd(e,t)};Ka.a.supermap.queryService=Rd;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Dd=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},getAreaSolarRadiationResult:function(e,t,i){var s=this;new Tt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(e)},bufferAnalysis:function(e,t,i){var s=this;new Rt(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},densityAnalysis:function(e,t,i){var s=this;new ci(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},generateSpatialData:function(e,t,i){var s=this;new Hi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(e)},geoRelationAnalysis:function(e,t,i){var s=this;new Ki(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(e)},interpolationAnalysis:function(e,t,i){var s=this;new Xs(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},mathExpressionAnalysis:function(e,t,i){var s=this;new ar(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},overlayAnalysis:function(e,t,i){var s=this;new hr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},routeCalculateMeasure:function(e,t,i){var s=this;new xr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},routeLocate:function(e,t,i){var s=this;new Tr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},surfaceAnalysis:function(e,t,i){var s=this;new Vr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},terrainCurvatureCalculate:function(e,t,i){var s=this;new Jr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(e)},thiessenAnalysis:function(e,t,i){var s=this;new $r(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,crossOrigin:s.options.crossOrigin,headers:s.options.headers,serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}).processAsync(s._processParams(e))},geometrybatchAnalysis:function(e,t,i){for(var s=this,r=new en(s.url,{serverType:s.options.serverType,eventListeners:{scope:s,processCompleted:t,processFailed:t},format:s._processFormat(i)}),n=[],a=0;a<e.length;a++){var o=e[a];n.push({analystName:o.analystName,param:s._processParams(o.param)})}r.processAsync(n)},_processParams:function(e){if(!e)return{};if(e.bounds&&(e.bounds=_u.toSuperMapBounds(e.bounds)),e.inputPoints)for(let t=0;t<e.inputPoints.length;t++){let i=e.inputPoints[t];Ka.a.Util.isArray(i)&&(e.inputPoints[t]={x:i[0],y:i[1],tag:i[2]})}if(e.points)for(let t=0;t<e.points.length;t++){let i=e.points[t];Ka.a.Util.isArray(i)?e.points[t]={x:i[0],y:i[1]}:i instanceof Ka.a.LatLng?e.points[t]={x:i.lng,y:i.lat}:e.points[t]={x:i.x,y:i.y}}if(e.point&&(Ka.a.Util.isArray(e.point)?e.point={x:e.point[0],y:e.point[1]}:e.point instanceof Ka.a.LatLng?e.point={x:e.point.lng,y:e.point.lat}:e.point={x:e.point.x,y:e.point.y}),e.extractRegion&&(e.extractRegion=Cu(e.extractRegion)),e.extractParameter&&e.extractParameter.clipRegion&&(e.extractParameter.clipRegion=Cu(e.extractParameter.clipRegion)),e.clipParam&&e.clipParam.clipRegion&&(e.clipParam.clipRegion=Cu(e.clipParam.clipRegion)),e.sourceGeometry){var t=null;e.sourceGeometrySRID&&(t=e.sourceGeometrySRID),e.sourceGeometry=Cu(e.sourceGeometry),t&&(e.sourceGeometry.SRID=t),delete e.sourceGeometry.sourceGeometrySRID}if(e.operateGeometry&&(e.operateGeometry=Cu(e.operateGeometry)),e.sourceGeometries){for(var i=[],s=0;s<e.sourceGeometries.length;s++)i.push(Cu(e.sourceGeometries[s]));e.sourceGeometries=i}if(e.operateGeometries){for(var r=[],n=0;n<e.operateGeometries.length;n++)r.push(Cu(e.operateGeometries[n]));e.operateGeometries=r}if(e.sourceRoute&&e.sourceRoute instanceof Ka.a.Polyline){var a={type:"LINEM"};a.parts=[e.sourceRoute.getLatLngs().length],a.points=[];for(let t=0;t<e.sourceRoute.getLatLngs().length;t++){let i=e.sourceRoute.getLatLngs()[t];a.points=a.points.concat({x:i.lng,y:i.lat,measure:i.alt})}e.sourceRoute=a}return e.operateRegions&&Ka.a.Util.isArray(e.operateRegions)&&e.operateRegions.map(function(t,i){return e.operateRegions[i]=Cu(t),e.operateRegions[i]}),e},_processFormat:function(e){return e||r.GEOJSON}}),kd=function(e,t){return new Dd(e,t)};Ka.a.supermap.spatialAnalystService=kd;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Bd=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},getThemeInfo:function(e,t){var i=this;new Zr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)}}),Ud=function(e,t){return new Bd(e,t)};Ka.a.supermap.themeService=Ud;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Gd=fu.extend({initialize:function(e,t){fu.prototype.initialize.call(this,e,t)},queryStop:function(e,t){var i=this;new Rr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(e)},analysisTransferPath:function(e,t){var i=this;new on(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))},analysisTransferSolution:function(e,t){var i=this;new hn(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:i,processCompleted:t,processFailed:t}}).processAsync(i._processParams(e))},_processParams:function(e){return e?(e.points&&Ka.a.Util.isArray(e.points)&&e.points.map(function(t,i){return e.points[i]=t instanceof Ka.a.LatLng?{x:t.lng,y:t.lat}:t,e.points[i]}),e):{}}}),jd=function(e,t){return new Gd(e,t)};Ka.a.supermap.trafficTransferAnalystService=jd;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var zd=Ka.a.Control.extend({options:{position:"topright",style:(e,t)=>t?Ka.a.circleMarker(t,{fillColor:"blue",weight:1,opacity:1,color:"blue",fillOpacity:.6}):{fillColor:"blue",weight:1,opacity:1,color:"blue",fillOpacity:.6},onEachFeature:null},initialize(e){Ka.a.setOptions(this,e),this._event=new Ka.a.Evented,this.rootContainer=null},onAdd(e){return this.map=e,this.rootContainer=this._initView(),this.rootContainer},on(e,t){this._event.on(e,t)},off(e,t){this._event.off(e,t)},_initView(){},_preventMapEvent(e,t){e&&t&&(e.addEventListener("mouseover",function(){t.dragging.disable(),t.scrollWheelZoom.disable(),t.doubleClickZoom.disable()}),e.addEventListener("mouseout",function(){t.dragging.enable(),t.scrollWheelZoom.enable(),t.doubleClickZoom.enable()}))}});Ka.a.supermap.components.componentsViewBase=function(e){return new zd(e)};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Vd=Ka.a.Evented.extend({initialize(){this.fileModel=new Aa},readFile(e){let t=e.target,i=t.files[0];if(i.size>this.fileModel.FileConfig.fileMaxSize)return this.fire("filesizeexceed",{messageType:"warring",message:Oa.i18n("msg_fileSizeExceeded")}),!1;let s=t.value,r=i.name,n=Qa.getFileType(r);if(!n)return this.fire("errorfileformat",{messageType:"failure",message:Oa.i18n("msg_fileTypeUnsupported")}),!1;""!==r&&(this.fileModel.set("loadFileObject",{file:i,filePath:s,fileName:r,fileType:n}),this._readData())},_readData(){const e=this,t=this.fileModel.loadFileObject.fileType;Ra.readFile(t,{file:this.fileModel.loadFileObject.file,path:this.fileModel.loadFileObject.filePath},i=>{Ra.processDataToGeoJson(t,i,e=>{e&&this.fire("openfilesucceeded",{result:e,layerName:this.fileModel.loadFileObject.fileName.split(".")[0]})},t=>{e.fire("openfilefailed",{messageType:"failure",message:t})},this)},()=>{e.fire("openfilefailed",{messageType:"failure",message:Oa.i18n("msg_openFileFail")})},this)}}),Hd=function(e){return new Vd(e)};Ka.a.supermap.components.openFileViewModel=Hd,Ka.a.supermap.components.util=Qa;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Jd=zd.extend({options:{layer:null},initialize(e){zd.prototype.initialize.apply(this,[e]),this.viewModel=new Vd},setViewStyle(e,t){this.rootContainer.style[e]=t},_initView(){const e=Ka.a.DomUtil.create("div","component-openfile");return e.id="openFile",this.fileSelect=Ka.a.DomUtil.create("div","",e),this.label=Ka.a.DomUtil.create("label","component-openfile__span--select",this.fileSelect),this.label.htmlFor="input_file",Ka.a.DomUtil.create("div","supermapol-icons-upload",this.label),Ka.a.DomUtil.create("span","component-openfile__span",this.label).appendChild(document.createTextNode(Oa.i18n("text_chooseFile"))),this.fileInput=Ka.a.DomUtil.create("input","component-openfile__input",this.fileSelect),this.fileInput.id="input_file",this.fileInput.type="file",this.fileInput.accept=".json,.geojson,.csv,.xls,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",this.fileInput.onchange=(e=>{this.messageBox.closeView(),this.viewModel.readFile(e)}),this.messageBox=new La,this.viewModel.on("filesizeexceed",e=>{this.messageBox.showView(e.message,e.messageType)}),this.viewModel.on("errorfileformat",e=>{this.messageBox.showView(e.message,e.messageType)}),this.viewModel.on("openfilefailed",e=>{this.messageBox.showView(e.message,e.messageType),this._event.fire("openfilefailed",e)}),this.viewModel.on("readdatafail",e=>{this.messageBox.showView(e.message,e.messageType)}),this.viewModel.on("openfilesucceeded",e=>{this._event.fire("openfilesucceeded",e)}),this._preventMapEvent(e,this.map),e}}),qd=function(e){return new Jd(e)};Ka.a.supermap.components.openFile=qd;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class Wd{constructor(e){this.layers=[],e&&e.length>0&&this.addLayers(e),this.currentLayerDataModel=null}addLayers(e,t,i,s){for(let r=0;r<e.length;r++){let n=e[r].layerName;if(e[r].layer instanceof Ka.a.GeoJSON){let i=new Yd(e[r].layer);this.layers[n]=i,t&&t.call(s,{layerName:n,layer:i})}else i&&i.call(s,"")}}setCurrentLayerDataModel(e){this.layers[e]&&(this.currentLayerDataModel=this.layers[e])}}Ka.a.supermap.components.GeoJsonLayersDataModel=Wd;class Yd{constructor(e){if(this.layer=e,this.features=e.getLayers(),this.attributeNames=[],this.features[0].feature.properties)for(let e in this.features[0].feature.properties)this.attributeNames.push(e);this.operatingAttributeNames=[],this.attributes={}}setOperatingAttributeNames(e){this.operatingAttributeNames=e}getAllAttributeNames(){return this.attributeNames}getAttributeNamesByType(e){if(this.features[0].feature.properties){let t=this.features[0].feature.properties,i=[];if("Num"===e)for(let e in t)isNaN(t[e])||i.push(e);else i=this.attributeNames;return i}}getAllFeatures(){return this.features}getAttributeValueByAttributeName(e){if(this.attributes[e])return this.attributes[e];this.attributes[e]=[];for(let t=0;t<this.features.length;t++)this.attributes[e].push([this.features[t].feature.properties[e]]);return this.attributes[e]}getFeaturesByKeyWord(e){let t=[],i=new RegExp(e.toLowerCase());const s=this;return this.features.forEach(function(e){if(!e.feature.properties)return null;let r,n=e.feature.properties;for(let a=0,o=(r=s.operatingAttributeNames.length>0?s.operatingAttributeNames:s.attributeNames).length;a<o;a++)if(n[r[a]]&&i.test(n[r[a]].toString().toLowerCase())){let i=r[a],s=n[r[a]];e.filterAttribute={filterAttributeName:i,filterAttributeValue:s},t.push(e);break}}),t}}
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/var Qd=Ka.a.Evented.extend({options:{cityGeoCodingConfig:{addressUrl:"https://www.supermapol.com/iserver/services/localsearch/rest/searchdatas/China/poiinfos",key:"fvV2osxwuZWlY0wJb8FEb2i5"}},initialize(e,t){if(!e)return new Error("Cannot find map, fileModel.map cannot be null.");this.map=e,Ka.a.Util.setOptions(this,t),this.dataModel=new Wd,this.geoCodeParam={keyWords:"北京市",city:"北京市",pageSize:this.options.pageSize,pageNum:this.options.pageNum},this.searchCache={}},search(e,t){t?this.searchFromLayer(e,t):this.searchFromCityLocalSearchService(e)},searchFromLayer(e,t){if(this.dataModel.layers[t]){let i=this.dataModel.layers[t].getFeaturesByKeyWord(e);i&&i.length>0?this.fire("searchlayersucceeded",{result:i}):this.fire("searchfailed",{searchType:"searchLayersField"})}},searchFromCityLocalSearchService(e){if(this.searchCache[e])this.fire("geocodesucceeded",{result:this.searchCache[e]});else{this.geoCodeParam.keyWords=e||this.geoCodeParam.city;const t=this;let i=this._getSearchUrl(this.geoCodeParam);Ke.get(i).then(e=>e.json()).then(e=>{if(e.error||0===e.poiInfos.length)t.fire("searchfailed",{searchType:"searchGeocodeField"});else if(e.poiInfos){const i=t._dataToGeoJson(e.poiInfos,t.geoCodeParam);t.fire("geocodesucceeded",{result:i})}})}},addSearchLayers(e){this.dataModel.addLayers(e,e=>{this.fire("newlayeradded",{layerName:e.layerName})},null,this)},panToLayer(e){this.dataModel.layers[e]&&this.map.flyToBounds(this.dataModel.layers[e].layer.getBounds())},panToCity(e){this.geoCodeParam.keyWords=e,this.geoCodeParam.city=e;const t=this;let i=this._getSearchUrl(this.geoCodeParam);Ke.get(i).then(e=>e.json()).then(e=>{if(e.poiInfos.length>0){const i=Ka.a.latLng(e.poiInfos[0].location.y,e.poiInfos[0].location.x);t.map.setView(i,8)}else t.fire("searchfailed",{searchType:"cityGeocodeField"})})},_dataToGeoJson(e,t){let i=[];for(let s=0;s<e.length;s++){let r={type:"Feature",geometry:{type:"Point",coordinates:[e[s].location.x,e[s].location.y]},properties:{name:e[s].name||t.keyWords,address:e[s].formatedAddress||e[s].address}};i.push(r)}return i},_getSearchUrl(e){return this.options.cityGeoCodingConfig.addressUrl+`.json?keywords=${e.keyWords}&city=${e.city}&pageSize=${e.pageSize}&pageNum=${e.pageNum}&key=${this.options.cityGeoCodingConfig.key}`}});Ka.a.supermap.components.searchViewModel=function(e){return new Qd(e)};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Xd=zd.extend({options:{cityConfig:{HOT:{HOT:["北京市","上海市","广州市","深圳市","南京市","杭州市","天津市","重庆市","成都市","青岛市","苏州市","无锡市","常州市","温州市","武汉市","长沙市","南昌市","三亚市","合肥市","石家庄市"]},AB:{A:["阿拉善盟","鞍山市","安庆市","安阳市","阿坝藏族羌族自治州","安顺市","阿里地区","安康市","阿克苏地区","阿勒泰地区","阿拉尔市"],B:["北京市","保定市","包头市","巴彦淖尔市","本溪市","白山市","白城市","蚌埠市","亳州市","滨州市","北海市","百色市","白沙黎族自治县","保亭黎族苗族自治县","巴中市","毕节地区","保山市","宝鸡市","白银市","博尔塔拉蒙古自治州","巴音郭楞蒙古自治州","北区"]},CD:{C:["重庆市","成都市","常州市","长沙市","承德市","沧州市","长治市","赤峰市","朝阳市","长春市","滁州市","巢湖市","池州市","常德市","郴州市","潮州市","崇左市","澄迈县","昌江黎族自治县","楚雄彝族自治州","昌都地区","昌吉回族自治州"],D:["大同市","大连市","丹东市","大庆市","大兴安岭地区","东营市","德州市","东莞市","儋州市","东方市","定安县","德阳市","达州市","大理白族自治州","德宏傣族景颇族自治州","迪庆藏族自治州","定西市","东区","大埔区","大堂区"]},EFG:{E:["鄂尔多斯市","鄂州市","恩施土家族苗族自治州"],F:["抚顺市","阜新市","阜阳市","福州市","抚州市","佛山市","防城港市"],G:["广州市","赣州市","桂林市","贵港市","广元市","广安市","贵阳市","固原市","高雄市","高雄县","甘南藏族自治州","甘孜藏族自治州"]},H:{H:["杭州市","合肥市","邯郸市","衡水市","呼和浩特市","呼伦贝尔市","葫芦岛市","哈尔滨市","鹤岗市","黑河市","淮安市","湖州市","淮南市","淮北市","黄山市","菏泽市","鹤壁市","黄石市","黄冈市","衡阳市","怀化市","惠州市","河源市","贺州市","河池市","海口市","红河哈尼族彝族自治州","汉中市","海东地区","海北藏族自治州","黄南藏族自治州","海南藏族自治州","果洛藏族自治州","海西蒙古族藏族自治州","哈密地区","和田地区","花莲县","黄大仙区","花地玛堂区"]},J:{J:["晋城市","晋中市","锦州市","吉林市","鸡西市","佳木斯市","嘉兴市","金华市","景德镇市","九江市","吉安市","济南市","济宁市","焦作市","济源市","荆门市","荆州市","江门市","湛江市","揭阳市","嘉峪关市","金昌市","酒泉市","基隆市","嘉义市","嘉义县","九龙城区","嘉模堂区"]},KL:{K:["开封市","昆明市","克拉玛依市","克孜勒苏柯尔克孜自治州","喀什地区"],L:["廊坊市","临汾市","吕梁市","辽阳市","辽源市","连云港市","丽水市","六安市","龙岩市","莱芜市","临沂市","聊城市","洛阳市","漯河市","娄底市","柳州市","来宾市","临高县","乐东黎族自治县","陵水黎族自治县","泸州市","乐山市","凉山彝族自治州","六盘水市","丽江市","临沧市","拉萨市","林芝地区","兰州市","陇南市","临夏回族自治州"]},MNP:{M:["牡丹江市","马鞍山市","茂名市","梅州市","绵阳市","眉山市","苗栗县"],N:["南京市","南昌市","南通市","宁波市","南平市","宁德市","南阳市","南宁市","南沙群岛","内江市","南充市","怒江傈傈族自治州","那曲地区","南投县"],P:["盘锦市","莆田市","萍乡市","平顶山市","濮阳市","攀枝花市","平凉市","屏东县","澎湖县"]},QR:{Q:["青岛市","秦皇岛市","齐齐哈尔市","黔西南布依族苗族自治州","七台河市","衢州市","泉州市","潜江市","清远市","钦州市","琼海市","曲靖市","庆阳市","荃湾区","黔东南苗族侗族自治州","黔南布依族苗族自治州","琼中黎族苗族自治县"],R:["日照市","日喀则地区"]},S:{S:["上海市","深圳市","苏州市","石家庄市","三亚市","朔州市","沈阳市","四平市","松原市","双鸭山市","绥化市","宿迁市","绍兴市","宿州市","三明市","上饶市","三门峡市","商丘市","十堰市","随州市","邵阳市","韶关市","汕头市","汕尾市","三亚市","遂宁市","思茅市","山南地区","商洛市","石嘴山市","石河子市","深水埗区","沙田区","神农架林区","圣安多尼堂区","圣方济各堂区"]},T:{T:["天津市","唐山市","太原市","通辽市","铁岭市","通化市","泰州市","台州市","铜陵市","泰安市","天门市","屯昌县","铜仁地区","铜川市","天水市","吐鲁番地区","塔城地区","图木舒克市","台北市","台中市","台南市","台北县","桃园县","台中县","台南县","台东县","屯门区"]},W:{W:["无锡市","温州市","武汉市","乌海市","乌兰察布市","芜湖市","潍坊市","威海市","梧州市","五指山市","文昌市","万宁市","文山壮族苗族自治州","渭南市","武威市","吴忠市","乌鲁木齐市","五家渠市","湾仔区","望德堂区"]},X:{X:["邢台市","忻州市","兴安盟","徐州市","宣城市","厦门市","新余市","新乡市","许昌市","信阳市","襄樊市","孝感市","咸宁市","仙桃市","湘潭市","西安市","咸阳市","西宁市","新竹市","新竹县","西贡区","锡林郭勒盟","西沙群岛","湘西土家族苗族自治州","西双版纳傣族自治州"]},Y:{Y:["阳泉市","运城市","营口市","延边朝鲜族自治州","伊春市","盐城市","扬州市","鹰潭市","宜春市","烟台市","宜昌市","岳阳市","益阳市","永州市","阳江市","云浮市","玉林市","宜宾市","雅安市","玉溪市","延安市","榆林市","玉树藏族自治州","银川市","伊犁哈萨克自治州","宜兰县","云林县","油尖旺区","元朗区"]},Z:{Z:["郑州市","张家口市","镇江市","舟山市","漳州市","淄博市","枣庄市","周口市","驻马店市","株洲市","张家界市","珠海市","肇庆市","中山市","自贡市","资阳市","遵义市","昭通市","张掖市","中卫市","彰化县","中西区","中沙群岛的岛礁及其海域"]}},cityGeoCodingConfig:{addressUrl:"https://www.supermapol.com/iserver/services/localsearch/rest/searchdatas/China/poiinfos",key:"fvV2osxwuZWlY0wJb8FEb2i5"},isGeoCoding:!0,pageSize:10,pageNum:1,perPageDataNum:8},initialize(e){zd.prototype.initialize.apply(this,[e]),this.currentSearchLayerName="",this.isSearchLayer=!1,this.perPageDataNum=this.options.perPageDataNum},onAdd:function(e){return this.viewModel=new Qd(e,this.options),zd.prototype.onAdd.apply(this,[e])},addSearchLayer(e){this.viewModel.addSearchLayers(e)},_initView(){const e=this,t=document.createElement("div");t.setAttribute("class","component-search-container");const i=document.createElement("div");i.setAttribute("class","component-search");const s=document.createElement("div");s.setAttribute("class","component-search__settings");const r=document.createElement("div");r.setAttribute("class","component-search__settings__name"),s.appendChild(r);const n=document.createElement("span");n.setAttribute("class","supermapol-icons-solid-down-triangle"),s.appendChild(n);let a=null;if(this.options.isGeoCoding){const e=new qa({config:this.options.cityConfig});a=e.getElement(),e.content.onclick=(e=>{"SPAN"===e.target.nodeName&&e.target.innerText&&(this.viewModel.panToCity(e.target.innerHTML),this.messageBox.closeView(),r.removeChild(r.firstChild),r.insertBefore(document.createTextNode(e.target.innerHTML),r.firstChild),this.isSearchLayer=!1)}),r.appendChild(document.createTextNode(e.content.getElementsByTagName("span")[0].innerText))}const o=function(){const t=document.createElement("div");t.setAttribute("class","component-search__layers");const i=document.createElement("div");i.setAttribute("class","component-search-layers-content"),t.appendChild(i);const s=document.createElement("div");s.setAttribute("class","component-search__layers__header");const n=document.createElement("div");n.setAttribute("class","load-btn"),s.appendChild(n);const a=document.createElement("span");a.setAttribute("class","supermapol-icons-poi-load"),n.appendChild(a);const o=document.createElement("span");o.appendChild(document.createTextNode(Oa.i18n("text_loadSearchCriteria"))),n.appendChild(o);const l=document.createElement("div");l.setAttribute("class","save-btn"),s.appendChild(l);const h=document.createElement("span");h.setAttribute("class","supermapol-icons-poi-save"),l.appendChild(h);const u=document.createElement("span");u.appendChild(document.createTextNode(Oa.i18n("text_saveSearchCriteria"))),l.appendChild(u);const c=document.createElement("div");return c.setAttribute("class","component-search__layers__body"),c.onclick=(t=>{e.clearSearchResult();let i=null;if("component-search__layers__itme__singleselect"===t.target.classList[0])i=t.target;else{if("component-single-default-img"!==t.target.classList[0]&&"single-label"!==t.target.classList[0])return;i=t.target.parentNode}document.getElementsByClassName("component-single-checked-img").length>0&&document.getElementsByClassName("component-single-checked-img")[0].setAttribute("class","component-single-default-img"),i.firstChild.setAttribute("class","component-single-checked-img"),e.currentSearchLayerName=i.lastChild.innerText,e.isSearchLayer=!0,r.removeChild(r.firstChild),r.insertBefore(document.createTextNode(e.currentSearchLayerName),r.firstChild),e.viewModel.panToLayer(e.currentSearchLayerName),e.messageBox.closeView()}),i.appendChild(c),t}();let l=[];a&&l.push({title:Oa.i18n("title_searchCity"),content:a}),l.push({title:Oa.i18n("title_searchLayer"),content:o});const h=new Wa({tabs:l}),u=h.getElement();h.closeView(),i.appendChild(u),s.onclick=(()=>{u.hidden?h.showView():h.closeView()}),i.appendChild(s),r.innerText||r.appendChild(document.createTextNode(Oa.i18n("text_label_chooseSearchLayers")));const c=document.createElement("div");c.setAttribute("class","component-search__input");const d=document.createElement("input");d.type="text",d.placeholder=Oa.i18n("text_label_searchTips"),c.appendChild(d),this.poiInput=d;const p=document.createElement("span");p.setAttribute("class","supermapol-icons-close"),p.hidden=!0,c.appendChild(p),i.appendChild(c);const f=document.createElement("div");f.setAttribute("class","component-search-icon supermapol-icons-search"),f.onclick=(()=>{m.closeView(),this.clearSearchResult(),this.messageBox.closeView(),h.closeView();const e=this.poiInput.value.trim();""!==e?this.isSearchLayer?this.viewModel.search(e,this.currentSearchLayerName):this.viewModel.search(e):this.messageBox.showView(Oa.i18n("msg_searchKeywords"))}),d.onkeypress=(e=>{if(13==e.which){var t=document.createEvent("HTMLEvents");t.initEvent("click",!1,!0),f.dispatchEvent(t)}}),i.appendChild(f);const m=new Ya;this._resultDomObj=m;const y=function(){const t=m.getElement();return t.style.position="absolute",t.style.top="44px",t.style.right="0",m.closeView(),m.content.onclick=(t=>{let i=null;if("component-search-result-info"===t.target.parentNode.className)i=t.target.parentNode.parentNode;else if("component-search__resultitme"===t.target.parentNode.className)i=t.target.parentNode;else{if("component-search__resultitme"!==t.target.className)return;i=t.target}document.getElementsByClassName("component-search__resultitme-selected").length>0&&document.getElementsByClassName("component-search__resultitme-selected")[0].classList.remove("component-search__resultitme-selected"),i.firstChild.classList.add("component-search__resultitme-selected");let s=i.children[1].firstChild.innerText;e._linkageFeature(s)}),t}();return i.appendChild(y),p.onclick=(e=>{this.clearSearchResult(),d.value="",e.target.hidden=!0,m.closeView()}),d.oninput=(()=>{p.hidden=!1}),this.messageBox=new La,this._addViewModelListener(),t.appendChild(i),this._preventMapEvent(t,this.map),t},_createSearchLayerItem(e){const t=document.createElement("div");t.setAttribute("class","component-search__layers__itme");const i=document.createElement("div");i.setAttribute("class","component-search__layers__itme__singleselect");const s=document.createElement("div");s.setAttribute("class","component-single-default-img"),i.appendChild(s);const r=document.createElement("span");r.setAttribute("class","single-label"),r.innerHTML=e,i.appendChild(r),t.appendChild(i),document.getElementsByClassName("component-search__layers__body")[0].appendChild(t)},_createResultItem(e,t){const i=document.createElement("div");i.setAttribute("class","component-search__resultitme");let s=document.createElement("div");"Point"===e||"MultiPoint"===e?s.setAttribute("class","supermapol-icons-marker-layer component-search-result-icon"):"LineString"===e||"MultiLineString "===e?s.setAttribute("class","supermapol-icons-line-layer component-search-result-icon"):"Polygon"===e||"MultiPolygon"===e?s.setAttribute("class","supermapol-icons-polygon-layer component-search-result-icon"):s.setAttribute("class","supermapol-icons-point-layer component-search-result-icon"),i.appendChild(s);const r=document.createElement("div");r.setAttribute("class","component-search-result-info");const n=document.createElement("div");r.appendChild(n);const a=document.createElement("div");return t.name?(n.innerHTML=t.name,a.innerHTML=t.address,r.appendChild(a)):n.innerHTML=t.filterAttributeName+": "+t.filterAttributeValue,i.appendChild(r),document.createElement("div").setAttribute("class","component-checkbox component-checkbox-default-img"),i},_addViewModelListener(){this.viewModel.on("searchlayerschanged",e=>{for(let t=0;t<e.length;t++)this._createSearchLayerItem(e[t])}),this.viewModel.on("newlayeradded",e=>{this._createSearchLayerItem(e.layerName)}),this.viewModel.on("searchlayersucceeded",e=>{const t=e.result;this.clearSearchResult(),this.searchResultLayer=Ka.a.featureGroup(t,{pointToLayer:this.options.style,style:this.options.style}).bindPopup(function(e){if(e.feature.properties)return new Ha({attributes:e.feature.properties}).getElement()}).addTo(this.map),this.searchResultLayer.eachLayer(e=>{this.options.onEachFeature?this.options.onEachFeature(e.toGeoJSON(),e):this._featureOnclickEvent.bind(this)(e.toGeoJSON(),e)}),this.searchLayersData=t,this._prepareResultData(t),this._event.fire("searchlayersucceeded",{result:this.searchResultLayer.toGeoJSON()})}),this.viewModel.on("geocodesucceeded",e=>{const t=e.result;this.clearSearchResult(),this.searchResultLayer=Ka.a.geoJSON(t,{pointToLayer:this.options.style,style:this.options.style,onEachFeature:this.options.onEachFeature||this._featureOnclickEvent.bind(this)}).bindPopup(function(e){if(e.feature.properties)return new Ha({attributes:e.feature.properties}).getElement()}).addTo(this.map),this.searchLayersData=t,this._prepareResultData(t),this._event.fire("geocodesucceeded",{result:t})}),this.viewModel.on("searchfailed",e=>{let t="";t="searchGeocodeField"===e.searchType?Oa.i18n("msg_searchGeocodeField"):"cityGeocodeField"===e.searchType?Oa.i18n("msg_cityGeocodeField"):Oa.i18n("msg_getFeatureField"),this.messageBox.showView(t),this._event.fire("searchfailed",{message:t})})},_prepareResultData(e){this.currentResult=e;let t=Math.ceil(e.length/this.perPageDataNum);this._resultDomObj.setPageLink(t),this._createResultListByPageNum(1,e),this._resultDomObj.showView(),this._resultDomObj.setLinkageEvent(function(e){i._createResultListByPageNum(e,i.currentResult)});const i=this},_createResultListByPageNum(e,t){let i,s=0;1===e&&t.length<this.perPageDataNum?i=t.length-1:e*this.perPageDataNum>t.length?(s=this.perPageDataNum*(e-1),i=t.length-1):(s=this.perPageDataNum*(e-1),i=e*this.perPageDataNum-1);const r=document.createElement("div");for(let e=s;e<=i;e++){let i,s="Point";t[e].filterAttribute?(s=t[e].feature.geometry.type,i=t[e].filterAttribute):i=t[e].properties,r.appendChild(this._createResultItem(s,i))}this._resultDomObj.setContent(r),this._resultDomObj.showView(),r.firstChild.getElementsByClassName("component-search-result-icon")[0].classList.add("component-search__resultitme-selected");const n=r.firstChild.getElementsByClassName("component-search-result-info")[0].firstChild.innerText;!this._selectMarkerFeature&&this._linkageFeature(n)},_flyToBounds(e){const t=e.getSouthWest(),i=e.getNorthEast();t.lat===i.lat&&t.lng===i.lng?this.map.flyTo(t):this.map.fitBounds(e)},_linkageFeature(e){let t="";t=this.isSearchLayer?e.split(":")[1].trim():e,this._selectFeature&&this._selectFeature.addTo(this.map),this.searchResultLayer.eachLayer(e=>{(!t||e.filterAttribute&&e.filterAttribute.filterAttributeValue===t||e.feature.properties&&e.feature.properties.name===t)&&(e.remove(),this._setSelectedLayerStyle(e))})},clearSearchResult(){this.searchResultLayer&&(this.map.closePopup(),!this.isSearchLayer&&this.map.removeLayer(this.searchResultLayer),this._selectMarkerFeature&&this.map.removeLayer(this._selectMarkerFeature),this._selectFeaturethis&&this.map.removeLayer(this._selectFeature),this._selectMarkerFeature=null,this._selectFeature=null,this.searchResultLayer=null,this.currentResult=null)},_featureOnclickEvent(e,t){t.on("click",()=>{let i,s,r=document.getElementsByClassName("component-pagination__link")[0];this._resultDomObj._changePageEvent({target:r.children[0].children[0]}),this._selectFeature&&this._selectFeature.addTo(this.map),t.remove();for(let r=0;r<this.searchLayersData.length;r++){let n=this.searchLayersData[r];if(n.properties&&n.properties.name===e.properties.name||n.filterAttribute&&n.filterAttribute.filterAttributeName+": "+n.filterAttribute.filterAttributeValue==t.filterAttribute.filterAttributeName+": "+t.filterAttribute.filterAttributeValue){s=r%this.perPageDataNum,i=parseInt(r/this.perPageDataNum)+1;break}}if(i>1)for(let e=1;e<i;e++){let e;e=document.getElementsByClassName("component-pagination__link")[0],this._resultDomObj._changePageEvent({target:e.children[e.children.length-2].children[0]})}let n=document.getElementsByClassName("component-search-result-info"),a=n[s].children[0];if(a.innerHTML===e.properties.name||a.innerHTML===t.filterAttribute.filterAttributeName+": "+t.filterAttribute.filterAttributeValue){let e=n[s].parentNode;document.getElementsByClassName("component-search__resultitme-selected").length>0&&document.getElementsByClassName("component-search__resultitme-selected")[0].classList.remove("component-search__resultitme-selected"),e.firstChild.classList.add("component-search__resultitme-selected"),this._setSelectedLayerStyle(t)}},this)},_setSelectedLayerStyle(e){let t;this._selectMarkerFeature&&this._selectMarkerFeature.remove(),this._selectMarkerFeature=null,this._selectFeature=e,this._selectMarkerFeature=Ka.a.geoJSON(e.toGeoJSON(),{pointToLayer:(e,t)=>Ka.a.marker(t,{icon:Ka.a.divIcon({className:"component-select-marker-icon",iconAnchor:[15,0]})}),style:{fillColor:"red",weight:1,opacity:1,color:"red",fillOpacity:.2}}).addTo(this.map),this._selectMarkerFeature.bindPopup(function(){return new Ha({attributes:e.feature.properties}).getElement()},{closeOnClick:!1}).openPopup().addTo(this.map),this._flyToBounds(this.searchResultLayer.getBounds()),e.getLatLng?t=e.getLatLng():e.getCenter&&(t=e.getCenter()),this.map.setView(t)}}),Kd=function(e){return new Xd(e)};Ka.a.supermap.components.search=Kd;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var Zd=Ka.a.Evented.extend({options:{_defaultLayerOptions:{style:null,onEachFeature:function(e,t){let i="属性信息如下:<br>";for(let t in e.properties)i+=t+": "+e.properties[t]+"<br>";t.bindPopup(i)}}},initialize(e,t=null){if(!e)return new Error("Cannot find map, fileModel.map cannot be null.");this.map=e,Ka.a.Util.extend(this.options._defaultLayerOptions,t),this.options._defaultLayerOptions.pointToLayer=this.options._defaultLayerOptions.style,this.popupsStatus=!0,this.dataFlowStatus=!1,this.dataFlowUrl="",this.currentFeatures=[],this.dataFlowLayer=null},subscribe(e){if(this.dataFlowUrl===e){if(this.dataFlowStatus)return void this.fire("dataflowservicesubscribed")}else this.dataFlowUrl=e;this.dataFlowStatus=!0,this.dataFlowLayer&&(this.dataFlowLayer.remove(),this.dataFlowLayer=null);const t=new _c(e,this.options._defaultLayerOptions);t.on("subscribesucceeded",e=>{this.fire("subscribesucceeded",{result:e})}),t.on("subscribefailed",e=>{this.fire("subscribefailed",{result:e})}),t.on("dataupdated",e=>{this.fire("dataupdated",{result:e});let t=e.layer.getBounds(),i=_u.toSuperMapBounds(this.map.getBounds()),s=_u.toSuperMapBounds(t);i.intersectsBounds(s)||(s.left===s.right&&s.top===s.bottom?this.map.setView(t.getCenter()):this.map.flyToBounds(t)),this.popupsStatus&&this.openPopups()}),t.addTo(this.map),this.dataFlowLayer=t},cancelSubscribe(){this.dataFlowLayer&&(this.dataFlowStatus=!1,this.dataFlowLayer.dataService.unSubscribe(),this.dataFlowLayer.remove(),this.dataFlowLayer=null)},openPopups(){if(this.popupsStatus=!0,this.dataFlowLayer){const e=this.dataFlowLayer.getLayers();for(let t=0;t<e.length;t++)for(let i=0;i<e[t].getLayers().length;i++)e[t].getLayers()[i].openPopup()}},closePopups(){if(this.popupsStatus=!1,this.dataFlowLayer){const e=this.dataFlowLayer.getLayers();for(let t=0;t<e.length;t++)for(let i=0;i<e[t].getLayers().length;i++)e[t].getLayers()[i].closePopup()}}});Ka.a.supermap.components.dataFlowViewModel=function(e){return new Zd(e)};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var $d=zd.extend({initialize(e){zd.prototype.initialize.apply(this,[e])},onAdd(e){let t={};return this.options.style&&(t.style=this.options.style),this.options.onEachFeature&&(t.style=this.options.onEachFeature),this.viewModel=new Zd(e,t),zd.prototype.onAdd.apply(this,[e])},_initView(){const e=new Ga({title:Oa.i18n("title_dataFlowService")}),t=e.getElement(),i=e.getContentElement();i.style.padding="10px 18px";const s=document.createElement("div");s.setAttribute("class","component-dataflow__container");const r=document.createElement("div");r.setAttribute("class","component-input-default");const n=document.createElement("input");n.setAttribute("class","component-input-default"),n.type="text",n.placeholder=Oa.i18n("text_input_value_inputDataFlowUrl"),n.title=Oa.i18n("text_input_value_inputDataFlowUrl"),r.appendChild(n);const a=document.createElement("span");a.setAttribute("class","supermapol-icons-close"),a.hidden=!0,a.onclick=(e=>{n.value="",e.target.hidden=!0}),n.oninput=(()=>{a.hidden=!1}),r.appendChild(a),s.appendChild(r),i.appendChild(s);const o=document.createElement("div");o.setAttribute("class","component-dataflow__container");const l=document.createElement("div");l.setAttribute("class","component-checkbox-container");const h=document.createElement("div");h.setAttribute("class","component-checkbox-default component-checkbox-selected-img"),h.checked=!0,l.appendChild(h);const u=document.createElement("div");u.setAttribute("class","component-label component-label-selected"),u.innerHTML=Oa.i18n("text_displayFeaturesInfo"),l.appendChild(u),h.onclick=(e=>{e.target.checked=!e.target.checked,e.target.checked?(u.setAttribute("class","component-label component-label-selected"),e.target.setAttribute("class","component-checkbox-default component-checkbox-selected-img"),this.viewModel.openPopups()):(u.setAttribute("class","component-label"),e.target.setAttribute("class","component-checkbox-default component-checkbox-default-img"),this.viewModel.closePopups())}),o.appendChild(l),i.appendChild(o);const c=document.createElement("div");c.setAttribute("class","component-dataflow__container component-init-center");const d=document.createElement("button");d.setAttribute("class","component-button-default"),d.innerHTML=Oa.i18n("text_subscribe"),d.onclick=(()=>{const e=n.value;""!==e?this.viewModel.subscribe(e):this.messageBox.showView(Oa.i18n("msg_inputDataFlowUrlFirst"))}),c.appendChild(d);const p=document.createElement("button");return p.setAttribute("class","component-button-default"),p.innerHTML=Oa.i18n("text_cancelSubscribe"),p.onclick=(()=>{this.viewModel.cancelSubscribe()}),c.appendChild(p),i.appendChild(c),this.messageBox=new La,this.viewModel.on("dataflowservicesubscribed",()=>{this.messageBox.showView(Oa.i18n("msg_dataflowservicesubscribed"))}),this.viewModel.on("subscribesucceeded",()=>{this.messageBox.showView(Oa.i18n("msg_subscribesucceeded"))}),this.viewModel.on("dataupdated",e=>{this.messageBox.closeView(),this._event.fire("dataupdated",e)}),this._preventMapEvent(t,this.map),t}}),ep=function(e){return new $d(e)};Ka.a.supermap.components.dataFlow=ep;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class tp{constructor(e,t){this.layerName=e,this.layer=t}}var ip=function(e,t){return new tp(e,t)};Ka.a.supermap.components.geoJSONLayerWithName=ip;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class sp extends Ka.a.Evented{initialize(e){this.workerUrl=e,this.turfLayers=[]}getLayersData(e){let t={},i={},s={},r={};for(let t=0;t<e;t++)e[t]=new tp(e[t].layerName,e[t].layer);this.geoJsonLayersDataModel=new Wd(e);let n=[];for(let t=0;t<e.length;t++)n[e[t].layerName]={fields:e[t].fields,layer:e[t].layer.toGeoJSON()};for(let e in this.geoJsonLayersDataModel.layers){let t;t=n[e].fields?n[e].fields:this.geoJsonLayersDataModel.layers[e].getAttributeNamesByType("Num");let o=[];for(let i=0;i<t.length;i++){o[t[i]]=this.geoJsonLayersDataModel.layers[e].getAttributeValueByAttributeName(t[i]);let s=o[t[i]];for(var a=0;a<s.length;a++)""!=s[a]&&void 0!==s[a]||(s.splice(a,1),a-=1),s[a]=parseFloat(s[a]);o[t[i]]=Array.from(new Set(s.sort(function(e,t){return e-t})))}let l={layerName:e,fields:t,fieldsValue:o,features:n[e].layer},h=n[e].layer.features[0].geometry.type;"Point"===h?i[e]=l:"LineString"===h?s[e]=l:"Polygon"===h&&(r[e]=l)}return t.point=i,t.lineString=s,t.polygon=r,t}analysis(e,t){this.geoJsonLayersDataModel.setCurrentLayerDataModel(e.analysisLayers),this.worker=new Worker(this.workerUrl);let i=this.geoJsonLayersDataModel.currentLayerDataModel.layer.toGeoJSON();if("isolines"===e.analysisMethod){let s=e.analysisFieldsValue.split(","),r=i;for(let e=0;e<s.length;e++)s[e]=parseFloat(s[e]);let n=this,a={pointGrid:r,analysisMethod:e.analysisMethod,breaks:s,zProperty:e.analysisFields,analysisCellSize:e.analysisCellSize,options:{gridType:"point",property:e.analysisFields,weight:Number(e.analysisBreaks)}};this.worker.postMessage(a),this.worker.onmessage=(i=>{if(0===i.data.features.length)n.fire("analysisfailed");else{n.fire("analysissucceeded",{data:i.data});let s=Ka.a.geoJSON(i.data,{style:{color:"#1060C2",weight:3},onEachFeature:function(e,t){e.properties&&t.bindPopup(new Ha(e.properties).getElement()),t.on({mouseover:function(){t.setStyle({color:"#ffffff",weight:5})},mouseout:function(){t.setStyle({color:"#1060C2",weight:3})},click:function(){t.setStyle({color:"#ffffff",weight:5})}})}}).addTo(t);n.turfLayers.push(s),n.fire("layerloaded",{layer:s,name:e.resultLayersName}),n.worker.terminate()}})}else if("buffer"===e.analysisMethod){let s=this,r={analysisMethod:"buffer",radius:e.radius,unit:e.unit,isSave:e.isSaveStatus,isUnion:e.isUnion,geoJson:i};this.worker.postMessage(r),this.worker.onmessage=(i=>{let r=Ka.a.geoJSON(i.data,{style:{color:"#ffffff",fillColor:"#1060C2",fillOpacity:.5,weight:1.5},onEachFeature:function(e,t){e.properties&&t.bindPopup(new Ha(e.properties).getElement()),t.on({mouseover:function(){t.setStyle({color:"#ffffff",fillColor:"rgb(46,40,79)",fillOpacity:.5,weight:5})},mouseout:function(){t.setStyle({color:"#ffffff",fillColor:"#1060C2",fillOpacity:.5,weight:1.5})},click:function(){t.setStyle({color:"#ffffff",fillColor:"rgb(46,40,79)",fillOpacity:.5,weight:2})}})}}).addTo(t);s.turfLayers.push(r),s.fire("layerloaded",{layer:r,name:e.resultLayersName}),s.worker.terminate()})}}clearLayers(){for(let e in this.turfLayers)this.turfLayers[e].clearLayers();this.fire("layersremoved",{layers:this.turfLayers})}cancelAnalysis(){this.worker.terminate()}}Ka.a.supermap.components.clientComputationViewModel=function(e){return new sp(e)};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var rp=zd.extend({initialize:function(e,t){if(!e)throw new Error("workerUrl is required");this.workerUrl=e,zd.prototype.initialize.apply(this,[t])},onAdd:function(e){return this.map=e,zd.prototype.onAdd.apply(this,[e])},addLayer:function(e){this.layers=this.layers||[],this.layers.push(e);let t=this.viewModel.getLayersData(this.layers);this.fillDataToView(t)},fillDataToView:function(e){if(!e)return;this.fillData=e;let t={};switch(document.getElementById("dropDownTop").getAttribute("data-value")){case"isolines":case"buffer":t=e.point}if("{}"==JSON.stringify(t))return;let i=[];for(let e in t)i.push(e);let s=document.getElementById("layersSelect"),r=document.getElementById("layerSelectName");s.innerHTML="",r.title=i[0],r.innerHTML=i[0],this._createOptions(s,i),this.layerSelectObj.optionClickEvent(s,r,this.layersSelectOnchange);let n=t[r.title],a=n.fields,o=n.fieldsValue;this.currentData=n,this.currentFillData=t;let l=document.getElementById("fieldsSelect");l.innerHTML="";let h=document.getElementById("fieldsSelectName");h.innerHTML=a[0],h.title=a[0],this._createOptions(l,a),this.fieldsSelectObj.optionClickEvent(l,h,this.fieldsSelectOnchange);let u=h.title,c=document.getElementById("getValueTextArea");c.value=o[u].toString().replace(/,/g,",\r\n"),c.setAttribute("data-value",o[u]);let d=document.getElementById("resultLayersName");switch(document.getElementById("dropDownTop").getAttribute("data-value")){case"isolines":d.value=Oa.i18n("text_label_isolines")+r.title;break;case"buffer":d.value=Oa.i18n("text_label_buffer")+r.title}},_initView:function(){this.workerUrl&&(this.viewModel=new sp(this.workerUrl));let e=new Ga({title:Oa.i18n("title_clientComputing")}).getElement();e.classList.add("component-analysis"),e.children[0].style.fontSize="12px";let t=[{title:Oa.i18n("text_isoline"),dataValue:"isolines",remark:Oa.i18n("text_extractDiscreteValue"),icon:{className:"component-analyst-isoline-img"}},{title:Oa.i18n("text_buffer"),dataValue:"buffer",remark:Oa.i18n("text_specifyTheDistance"),icon:{className:"component-analyst-buffer-img"}}],i=e.children[1];i.classList.add("component-content--scroll"),i.classList.add("component-content--analysis");let s=new za(t).getElement();i.appendChild(s);let r=s.children[0].children[0],n=s.children[0].children[2].children[0];r.children[0].id="dropDownTop";let a=Ka.a.DomUtil.create("div","component-analysis__container",i),o=Ka.a.DomUtil.create("div","component-analysis__container__analysisLayer",a),l=Ka.a.DomUtil.create("div","component-analysis__selecttool",o);l.id="layerSelectControl";let h={optionsArr:[""],labelName:Oa.i18n("text_label_analysisLayer")},u=new ja(h),c=u.getElement();this.layerSelectObj=u,l.appendChild(c);let d=c.children[1].children[0];d.id="layerSelectName",c.children[1].children[2].children[0].children[0].id="layersSelect";let p=Ka.a.DomUtil.create("div","component-analysis__container__analysistype",a),f=Ka.a.DomUtil.create("div","component-clientcomputation__isoline",p),m={optionsArr:[""],labelName:Oa.i18n("text_label_extractField"),optionsClickCb:this.fieldsSelectOnchange},y=Ka.a.DomUtil.create("div","component-analysis__selecttool",f),g=new ja(m),v=g.getElement();this.fieldsSelectObj=g;let S=v.children[1].children[0];S.id="fieldsSelectName";let b=v.children[1].children[2].children[0].children[0];b.id="fieldsSelect",y.appendChild(v);let _=Ka.a.DomUtil.create("div","component-analysis__container",f);Ka.a.DomUtil.create("span","component-textarea__name",_).innerHTML=Oa.i18n("text_label_extractedValue");let x=Ka.a.DomUtil.create("div","component-textarea",_);x.id="getValueText";let C=Ka.a.DomUtil.create("div","",x),T=Ka.a.DomUtil.create("div","component-scrollarea-content",C);T.setAttribute("tabindex","1");let M=Ka.a.DomUtil.create("textarea","component-textarea__content",T);M.id="getValueTextArea",M.setAttribute("rows","20");let w=Ka.a.DomUtil.create("div","",f);Ka.a.DomUtil.create("span","",w).innerHTML=Oa.i18n("text_label_distanceAttenuation");let E=Ka.a.DomUtil.create("input","",w);E.value="3";let A=Ka.a.DomUtil.create("div","",f);Ka.a.DomUtil.create("span","",A).innerHTML=Oa.i18n("text_label_gridSize");let L=Ka.a.DomUtil.create("input","",A);L.value="30";let P=Ka.a.DomUtil.create("div","component-clientcomputation__buffer hidden",p),N=Ka.a.DomUtil.create("div","component-clientcomputation__buffer--radius",P);Ka.a.DomUtil.create("span","",N).innerHTML=Oa.i18n("text_label_bufferRadius");let O=Ka.a.DomUtil.create("div","",N),I=Ka.a.DomUtil.create("input","buffer-radius-input",O);I.id="bufferRadiusInput",I.value="10",I.setAttribute("placeholder",Oa.i18n("text_label_defaultkilometers"));let F=Ka.a.DomUtil.create("div","component-clientcomputation__buffer--unit",O);F.id="bufferUnit";let R={optionsArr:[Oa.i18n("text_option_kilometer")],labelName:Oa.i18n("text_label_unit")},D=new ja(R).getElement(),k=D.children[1].children[0];k.id="bufferUnitSelectName",D.children[1].children[2].children[0].children[0].id="bufferUnitSelect",D.children[0].style.display="none",F.appendChild(D);let B=Ka.a.DomUtil.create("div","",N),U=Ka.a.DomUtil.create("div","component-clientcomputation__buffer--issaveattrs",B);U.id="saveAttrsContainer";let G=Ka.a.DomUtil.create("div","checkbox checkbox-fault",U);G.id="saveAttrsCheckbox";let j=Ka.a.DomUtil.create("div","lable",U);j.id="saveAttrsLabel",j.innerHTML=Oa.i18n("text_retainOriginal");let z=Ka.a.DomUtil.create("div","component-clientcomputation__buffer--isunion",B);z.id="isUnionContainer";let V=Ka.a.DomUtil.create("div","checkbox checkbox-fault",z);V.id="isUnionCheckbox";let H=Ka.a.DomUtil.create("div","lable",z);H.innerHTML=Oa.i18n("text_mergeBuffer"),H.id="isUnionLabel";let J=Ka.a.DomUtil.create("div","component-analysis__container__resultLayersName",a);Ka.a.DomUtil.create("span","",J).innerHTML=Oa.i18n("text_label_resultLayerName");let q=Ka.a.DomUtil.create("input","",J);q.id="resultLayersName";let W=Ka.a.DomUtil.create("div","component-analysis__container__analysisbtn",a),Y=Ka.a.DomUtil.create("div","component-analysis__analysisbtn",W),Q=Ka.a.DomUtil.create("button","component-analysis__analysisbtn--analysis",Y);Q.innerHTML=Oa.i18n("btn_analyze");let X=Ka.a.DomUtil.create("div","component-analysis__analysisbtn--analysing-container hidden",Y),K=Ka.a.DomUtil.create("div","component-analysis__analysisbtn--analysising",X),Z=Ka.a.DomUtil.create("div","component-analysis__svg-container",K);Z.id="analyse_background",Z.innerHTML='<svg class="component-analysis__svg-rotate" width="16px" height="16px" version="1.1" xmlns="http://www.w3.org/2000/svg">\n <path id="ring" fill="#FFF" transform="translate(8,8)" d="M 0 0 v -8 A 8 8 0 1 1 -8.00 0 z"></path>\n <circle cx="8" cy="8" r="6" fill="#38ADF5"></circle>\n <rect class="svg-top" x="8" y="0" rx="2" ry="2" width="2" height="2" style="fill: rgb(255, 255, 255); stroke-width: 0;"></rect>\n <rect class="svg-left" x="0" y="8" rx="2" ry="2" width="2" height="2" style="fill: rgb(255, 255, 255); stroke-width: 0;"></rect>\n </svg>',Ka.a.DomUtil.create("span","",K).innerHTML=Oa.i18n("btn_analyzing");let $=Ka.a.DomUtil.create("button","component-analysis__analysisbtn--cancel",X);$.innerHTML=Oa.i18n("btn_cancelAnalysis");let ee=Ka.a.DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",Y);ee.innerHTML=Oa.i18n("btn_emptyTheAnalysisLayer");for(let e=0;e<n.children.length;e++)n.children[e].onclick=(()=>{r.innerHTML=n.children[e].outerHTML,r.children[0].id="dropDownTop";let t=document.getElementById("layersSelect"),s=document.getElementById("layerSelectName"),a=n.children[e].getAttribute("data-value"),o={};switch(a){case"buffer":f.classList.add("hidden"),P.classList.remove("hidden"),i.style.height="422px",q.value=Oa.i18n("text_label_buffer")+s.title,o=this.fillData.point;break;case"isolines":f.classList.remove("hidden"),P.classList.add("hidden"),i.style.height="712px",q.value=Oa.i18n("text_label_isolines")+s.title,o=this.fillData.point}if(this.currentFillData===o)return;if(t.innerHTML="","{}"==JSON.stringify(o))return q.value="",s.title="",void(s.innerHTML="");let l=[];for(let e in o)l.push(e);s.title=l[0],s.innerHTML=l[0],this._createOptions(t,l),this.layerSelectObj.optionClickEvent(t,s,this.layersSelectOnchange),"buffer"===a?q.value=Oa.i18n("text_label_buffer")+l[0]:"isolines"===a&&(q.value=Oa.i18n("text_label_isolines")+l[0]),this.currentData=o[s.title],this.currentFillData=o});this.fieldsSelectOnchange=function(e){if(this.currentData){let t=this.currentData,i=e.title;M.value=t.fieldsValue[i].toString().replace(/,/g,",\r\n"),M.setAttribute("data-value",t.fieldsValue[i])}}.bind(this),this.layersSelectOnchange=function(e){if(this.currentData){let t=e.title,i=this.currentFillData[t];this.currentData=i,b.innerHTML="",this._createOptions(b,i.fields);let s=document.getElementById("fieldsSelectName"),r=i.fields[0];s.title=r,s.innerHTML=r;let n=r;this.fieldsSelectObj.optionClickEvent(b,s,this.fieldsSelectOnchange),M.value=i.fieldsValue[n].toString().replace(/,/g,",\r\n"),M.setAttribute("data-value",i.fieldsValue[n]);let a=document.getElementById("dropDownTop").getAttribute("data-value");switch(a){case"buffer":q.value=Oa.i18n("text_label_buffer")+t;break;case"isolines":q.value=Oa.i18n("text_label_isolines")+t}}}.bind(this);let te=!0;j.classList.add("selected"),G.classList.add("checkbox-active"),U.onclick=(()=>{te?(G.classList.add("checkbox-fault"),G.classList.remove("checkbox-active"),j.classList.remove("selected"),te=!1):(G.classList.add("checkbox-active"),G.classList.remove("checkbox-fault"),j.classList.add("selected"),te=!0,ie&&(V.classList.add("checkbox-fault"),V.classList.remove("checkbox-active"),ie=!1))});let ie=!1;return z.onclick=(()=>{ie?(V.classList.add("checkbox-fault"),V.classList.remove("checkbox-active"),H.classList.remove("selected"),ie=!1):(V.classList.add("checkbox-active"),V.classList.remove("checkbox-fault"),H.classList.add("selected"),ie=!0,te&&(G.classList.add("checkbox-fault"),G.classList.remove("checkbox-active"),te=!1))}),this.messageBox=new La,Q.onclick=(()=>{let e;switch(X.style.display="block",Q.style.display="none",document.getElementById("dropDownTop").getAttribute("data-value")){case"isolines":e=function(){let e=document.getElementById("dropDownTop").getAttribute("data-value"),t=document.getElementById("resultLayersName").value,i=d.title,s=S.title,r=M.value.replace(/[\r\n]/g,"").split(",").toString(),n=E.value,a=L.value;return{analysisMethod:e,analysisLayers:i,analysisFields:s,analysisFieldsValue:r,analysisBreaks:n,analysisCellSize:a,resultLayersName:t}}();break;case"buffer":e=function(){let e=document.getElementById("dropDownTop"),t=document.getElementById("resultLayersName").value,i=d.title,s=e.getAttribute("data-value"),r=I.value,n=k.title;return{analysisMethod:s,analysisLayers:i,radius:r,unit:n,resultLayersName:t,isSaveStatus:te,isUnion:ie}}()}this.viewModel.analysis(e,this.map),this.viewModel.on("layerloaded",e=>{X.style.display="none",Q.style.display="block",this._event.fire("analysissucceeded",{layer:e.layer,name:e.name})}),this.viewModel.on("analysisfailed",()=>{X.style.display="none",Q.style.display="block",this.messageBox.showView(Oa.i18n("msg_resultIsEmpty"),"failure"),this._event.fire("analysisfailed")})}),$.onclick=(()=>{X.style.display="none",Q.style.display="block",this.viewModel.cancelAnalysis()}),ee.onclick=(()=>{this.viewModel.on("layersremoved",e=>{this._event.fire("layersremoved",{layers:e.layers})}),this.viewModel.clearLayers()}),this._preventMapEvent(e,this.map),e},_createOptions(e,t){for(let i in t){let s=document.createElement("div"),r=t[i];s.className="component-selecttool__option",s.title=r,s.innerHTML=r,s.setAttribute("data-value",r),e.appendChild(s)}}}),np=function(e){return new rp(e)};Ka.a.supermap.components.clientComputation=np;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class ap{constructor(e){this.layerName=e.layerName,this.layer=e.layer,this.fields=e.fields||null}}var op=function(e){return new ap(e)};Ka.a.supermap.components.clientComputationLayer=op;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class lp extends Ka.a.Evented{initialize(e){this.processingUrl=e}getDatasetsName(){let e=this.processingUrl;this.dataset=[],this.dataset.datasetNames=[],this.dataset.childUrl=[];let t="http://"+e.split("/")[2],i=t+"/iserver/services/datacatalog/rest/datacatalog/sharefile.json",s=t+"/iserver/services/datacatalog/rest/datacatalog/relationship/datasets.json",r=this;Ke.get(i).then(function(e){return e.json()}).then(function(e){r.dataset.datasetNames=r.dataset.datasetNames.concat(e.datasetNames),r.dataset.childUrl=r.dataset.childUrl.concat(e.childUriList);let t=r;Ke.get(s).then(function(e){return e.json()}).then(function(e){t.dataset.datasetNames=t.dataset.datasetNames.concat(e.datasetNames),t.dataset.childUrl=t.dataset.childUrl.concat(e.childUriList);let i=[];for(let e in t.dataset.datasetNames)i[t.dataset.datasetNames[e]]=t.dataset.childUrl[e];t.fire("datasetsloaded",{result:{dataset:t.dataset,datasetHash:i}})})})}getDatasetInfo(e){let t,i=this;Ke.get(e).then(function(e){return e.json()}).then(function(e){let s=e.datasetInfo;"LINE"===s.datasetType||"LINE"===s.type?t="LINE":"POINT"===s.datasetType||"POINT"===s.type||"CSV"===s.type?t="POINT":"REGION"!==s.datasetType&&"REGION"!==s.type||(t="REGION");let r=[],n=s.fieldInfos||s.fieldInfo||null;if(n){for(let e in n)r.push(n[e].name);i.fire("datasetinfoloaded",{result:{type:t,fields:r}})}else{let s=e.childUriList[0].replace("//fields","/fields");Ke.get(s).then(function(e){return e.json()}).then(function(e){let s=e.fieldNames,r=[];for(let e in s)r.push(s[e]);i.fire("datasetinfoloaded",{result:{type:t,fields:r}})})}})}}Ka.a.supermap.components.DistributedAnalysisModel=lp;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class hp extends Ka.a.Evented{initialize(e){this.processingUrl=e}getDatasetsName(){let e=this.processingUrl;this.resultLayers=[],this.datasetNames=[],this.distributedAnalysisModel=new lp(e),this.distributedAnalysisModel.getDatasetsName();let t=this;this.distributedAnalysisModel.on("datasetsloaded",function(e){t.fire("datasetsloaded",{result:e.result})})}getDatasetInfo(e){this.distributedAnalysisModel.getDatasetInfo(e);let t=this;this.distributedAnalysisModel.on("datasetinfoloaded",function(e){let i=e.result.type,s=e.result.fields;t.fire("datasetinfoloaded",{result:{type:i,fields:s}})})}analysis(e,t){let i=new Od(this.processingUrl);if(e.analysisParam instanceof Ks){let s=e.analysisParam,r=this;i.addKernelDensityJob(s,function(i){i.error?r.fire("analysisfailed",{error:i.error}):i.result.setting.serviceInfo.targetServiceInfos.map(function(i){return"RESTMAP"===i.serviceType&&Ke.get(i.serviceAddress+"/maps").then(function(e){return e.json()}).then(function(i){let s=i[0].path;r.fire("analysissucceed",{result:i});let n=Ka.a.supermap.tiledMapLayer(s,{noWrap:!0,transparent:!0});r.resultLayers.push(n),n.addTo(t);let a=new Date,o=e.resultLayerName||a.getTime();r.fire("layerloaded",{layer:n,name:o})}),i})})}}clearLayers(){for(let e in this.resultLayers)this.resultLayers[e].remove();this.fire("layersremoved",{layers:this.resultLayers}),this.resultLayers=[]}}Ka.a.supermap.components.distributedAnalysisViewModel=function(e){return new hp(e)};
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var up=zd.extend({initialize:function(e,t){zd.prototype.initialize.apply(this,[t]),this.viewModel=new hp(e)},onAdd:function(e){return this._fillDataToView(),zd.prototype.onAdd.apply(this,[e])},_fillDataToView:function(){this.viewModel.on("datasetsloaded",e=>{let t=e.result.dataset.datasetNames;this.datasetSelect.innerHTML="",this._createOptions(this.datasetSelect,t),this.datasetSelectObj.optionClickEvent(this.datasetSelect,this.datasetSelectName,this.datasetSelectOnchange),this.dataHash=e.result.datasetHash}),this.viewModel.getDatasetsName()},_initView:function(){let e=new Ga({title:Oa.i18n("title_distributedAnalysis")}).getElement();e.classList.add("component-analysis"),e.children[0].style.fontSize="12px";let t=Ka.a.DomUtil.create("div","component-content component-content--scroll component-content--analysis",e),i=[{title:Oa.i18n("text_densityAnalysis"),dataValue:"density",remark:Oa.i18n("text_CalculateTheValuePerUnitArea"),icon:{className:"component-analyst-density-img"}}],s=new za(i).getElement();t.appendChild(s);let r=s.children[0].children[0].children[0],n=Ka.a.DomUtil.create("div","component-analysis__container",t),a=Ka.a.DomUtil.create("div","analysistype",n),o=Ka.a.DomUtil.create("div","component-analysis__container__analysisLayer",a),l=Ka.a.DomUtil.create("div","component-analysis__selecttool",o),h={optionsArr:[Oa.i18n("text_option_selectDataset")],labelName:Oa.i18n("text_label_dataset"),optionsClickCb:te.bind(this)},u=new ja(h),c=u.getElement();this.datasetSelectObj=u,l.appendChild(c);let d=c.children[1].children[0];this.datasetSelectName=d;let p=c.children[1].children[2].children[0].children[0];p.children[0].style.display="none",this.datasetSelect=p;let f=Ka.a.DomUtil.create("div","component-analysis__idw",o),m=[{optionsArr:[Oa.i18n("text_option_simplePointDensityAnalysis"),Oa.i18n("text_option_nuclearDensityAnalysis")],labelName:Oa.i18n("text_label_analyticalMethod")},{optionsArr:[Oa.i18n("text_option_quadrilateral"),Oa.i18n("text_option_hexagon")],labelName:Oa.i18n("text_label_meshType")}],y=Ka.a.DomUtil.create("div","component-analysis__idw__selecttool",f);for(let e in m){let t=new ja(m[e]).getElement();y.appendChild(t)}let g={optionsArr:[Oa.i18n("text_option_notSet")],labelName:Oa.i18n("text_label_weightField")},v=new ja(g),S=v.getElement();y.appendChild(S),this.weightFieldsSelectObj=v;let b=y.children[0].children[1].children[0];b.setAttribute("data-value","0");let _=y.children[0].children[1].children[2].children[0].children[0];this._setEleAtribute(["0","1"],"data-value",_.children);let x=y.children[1].children[1].children[0];x.setAttribute("data-value","0");let C=y.children[1].children[1].children[2].children[0].children[0];this._setEleAtribute(["0","1"],"data-value",C.children);let T=y.children[2].children[1].children[0],M=y.children[2].children[1].children[2].children[0].children[0],w=[{spanName:Oa.i18n("text_label_queryRange"),value:""}];for(let e in w)this._creatInputBox(w[e],y);let E=y.children[3].children[1];E.setAttribute("placeholder",Oa.i18n("text_label_queryRangeTips")),E.title=Oa.i18n("text_label_queryRangeTips");let A={labelName:Oa.i18n("text_label_gridSizeInMeters"),selectOptions:{optionsArr:["Meter","Kilometer","Yard","Foot","Mile"]}},L=this._creatUnitSelectBox(A,y),P=L.children[1].children[0];P.value="1000";let N=L.children[1].children[1].children[0].children[0].children[0],O={labelName:Oa.i18n("text_label_searchRadius"),selectOptions:{optionsArr:["Meter","Kilometer","Yard","Foot","Mile"]}},I=this._creatUnitSelectBox(O,y),F=I.children[1].children[0];F.value="300";let R=I.children[1].children[1].children[0].children[0].children[0],D={labelName:Oa.i18n("text_label_areaUnit"),optionsArr:["SquareMile","SquareMeter","Hectare","Acre","SquareFoot","SquareYard"]},k=new ja(D).getElement();y.appendChild(k);let B=k.children[1].children[0],U=Ka.a.DomUtil.create("div","range-content",a),G={optionsArr:[Oa.i18n("text_option_notSet"),Oa.i18n("text_option_equidistantSegmentation"),Oa.i18n("text_option_logarithm"),Oa.i18n("text_option_equalCountingSegment"),Oa.i18n("text_option_squareRootSegmentation")],labelName:Oa.i18n("text_label_thematicMapSegmentationMode"),optionsClickCb:function(e){"NOTSET"!==e.getAttribute("data-value")?(V.classList.remove("hidden"),H.classList.remove("hidden")):(V.classList.add("hidden"),H.classList.add("hidden"))}};U.appendChild(new ja(G).getElement());let j=U.children[0].children[1].children[0];j.setAttribute("data-value","NOTSET");let z=U.children[0].children[1].children[2].children[0].children[0];this._setEleAtribute(["NOTSET","EQUALINTERVAL","LOGARITHM","QUANTILE","SQUAREROOT"],"data-value",z.children);let V=this._creatInputBox({spanName:Oa.i18n("text_label_thematicMapSegmentationParameters"),value:"20"},U);V.classList.add("hidden");let H=new ja({optionsArr:[Oa.i18n("text_option_greenOrangePurpleGradient"),Oa.i18n("text_option_greenOrangeRedGradient"),Oa.i18n("text_option_rainbowGradient"),Oa.i18n("text_option_spectralGradient"),Oa.i18n("text_option_terrainGradient")],labelName:Oa.i18n("text_label_thematicMapColorGradientMode")}).getElement();U.appendChild(H),H.classList.add("hidden");let J=H.children[1].children[2].children[0].children[0],q=H.children[1].children[0];q.setAttribute("data-value","GREENORANGEVIOLET");this._setEleAtribute(["GREENORANGEVIOLET","GREENORANGERED","RAINBOW","SPECTRUM","TERRAIN"],"data-value",J.children);let W=Ka.a.DomUtil.create("div","",a);Ka.a.DomUtil.create("span","",W).innerHTML=Oa.i18n("text_label_resultLayerName");let Y=Ka.a.DomUtil.create("input","component-distributeanalysis__input",W),Q=Ka.a.DomUtil.create("div","component-analysis__container__analysisbtn",n),X=Ka.a.DomUtil.create("div","component-analysis__analysisbtn",Q),K=Ka.a.DomUtil.create("button","component-analysis__analysisbtn--analysis",X);K.innerHTML=Oa.i18n("btn_analyze");let Z=Ka.a.DomUtil.create("div","component-analysis__analysisbtn--analysing-container hidden",X),$=Ka.a.DomUtil.create("div","component-analysis__analysisbtn--analysising",Z);$.style.width="200px",Ka.a.DomUtil.create("div","component-analysis__svg-container",$).innerHTML='<svg class="component-analysis__svg-rotate" width="16px" height="16px" version="1.1" xmlns="http://www.w3.org/2000/svg">\n <path id="ring" fill="#FFF" transform="translate(8,8)" d="M 0 0 v -8 A 8 8 0 1 1 -8.00 0 z"></path>\n <circle cx="8" cy="8" r="6" fill="#38ADF5"></circle>\n <rect class="svg-top" x="8" y="0" rx="2" ry="2" width="2" height="2" style="fill: rgb(255, 255, 255); stroke-width: 0;"></rect>\n <rect class="svg-left" x="0" y="8" rx="2" ry="2" width="2" height="2" style="fill: rgb(255, 255, 255); stroke-width: 0;"></rect>\n </svg>',Ka.a.DomUtil.create("span","",$).innerHTML=Oa.i18n("btn_analyzing");let ee=Ka.a.DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",X);function te(e){if(this.messageBox.closeView(),this.dataHash){M.innerHTML="";let t=this.dataHash[e.title],i=this;this.viewModel.on("datasetinfoloaded",function(e){T.title=Oa.i18n("text_option_notSet"),T.innerHTML=Oa.i18n("text_option_notSet"),M.innerHTML="";let t=r.getAttribute("data-value"),s=e.result.type,n=e.result.fields;"density"===t&&("REGION"===s||"LINE"===s?i.messageBox.showView(Oa.i18n("msg_datasetOrMethodUnsupport"),"failure"):(i.messageBox.closeView(),i._createOptions(M,n),i.weightFieldsSelectObj.optionClickEvent(M,T)))}),this.viewModel.getDatasetInfo(t)}}return ee.id="deleteLayersBtn",ee.innerHTML=Oa.i18n("btn_emptyTheAnalysisLayer"),this.messageBox=new La,this.datasetSelectOnchange=te.bind(this),K.onclick=(()=>{this.messageBox.closeView();let e=function(){let e,t,i=r.getAttribute("data-value"),s=b.getAttribute("data-value"),n=x.getAttribute("data-value"),a=E.value,o=N.title,l=R.title,h=B.title,u=q.getAttribute("data-value"),c=j.getAttribute("data-value"),p=new Date,f=Y.value||p.getTime();e="NOTSET"===c?"":{rangeMode:c,rangeCount:V.value,colorGradientType:u};"density"===i&&(t=new Ks({datasetName:d.title,method:s,meshType:n,resolution:P.value,fields:T.title,radius:F.value,meshSizeUnit:o,radiusUnit:l,areaUnit:h,query:a,mappingParameters:new kt({rangeMode:e.rangeMode,rangeCount:e.rangeCount,colorGradientType:e.colorGradientType})}));return{analysisParam:t,resultLayerName:f}}();d.title===Oa.i18n("text_option_selectDataset")?this.messageBox.showView(Oa.i18n("msg_selectDataset"),"failure"):T.title===Oa.i18n("text_option_notSet")?this.messageBox.showView(Oa.i18n("msg_setTheWeightField"),"failure"):(this.messageBox.closeView(),Z.style.display="block",K.style.display="none",this.viewModel.on("layerloaded",e=>{Z.style.display="none",K.style.display="block",this._event.fire("analysissucceeded",{layer:e.layer,name:e.name})}),this.viewModel.on("analysisfailed",e=>{this.messageBox.showView(Oa.i18n("msg_theFieldNotSupportAnalysis"),"failure"),Z.style.display="none",K.style.display="block",this._event.fire("analysisfailed",{error:e.error})}),this.viewModel.analysis(e,this.map))}),ee.onclick=(()=>{this.viewModel.on("layersremoved",e=>{this._event.fire("layersremoved",{layers:e.layers})}),this.viewModel.clearLayers()}),this._preventMapEvent(e,this.map),e},_createOptions(e,t){for(let i in t){let s=document.createElement("div");s.className="component-selecttool__option",s.title=t[i],s.innerHTML=t[i],s.setAttribute("data-value",t[i]),e.appendChild(s)}},_creatInputBox(e,t){let i=Ka.a.DomUtil.create("div","",t);Ka.a.DomUtil.create("span","",i).innerHTML=e.spanName;let s=Ka.a.DomUtil.create("input","",i);return s.value=e.value,s.className="component-distributeanalysis__input",i},_creatUnitSelectBox(e,t){let i=Ka.a.DomUtil.create("div","component-clientcomputation__buffer--radius",t);Ka.a.DomUtil.create("span","",i).innerHTML=e.labelName;let s=Ka.a.DomUtil.create("div","",i);Ka.a.DomUtil.create("input","buffer-radius-input",s);let r=Ka.a.DomUtil.create("div","component-clientcomputation__buffer--unit",s),n=e.selectOptions,a=new ja(n).getElement();return r.appendChild(a),i},_setEleAtribute(e,t,i){for(let s=0;s<i.length;s++)i[s].setAttribute(t,e[s])}}),cp=function(e){return new up(e)};Ka.a.supermap.components.distributedAnalysis=cp;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
class dp extends Ka.a.Evented{initialize(e){this.dataserviceUrl=e,this.resultLayers=[]}getFeatures(e,t){let i=this.dataserviceUrl,s=this,r=Ka.a.supermap.featureService(i);e instanceof as?r.getFeaturesByIDs(e,function(e){s._getQureyResult(e,t)}):e instanceof ls?r.getFeaturesBySQL(e,function(e){s._getQureyResult(e,t)}):e instanceof $i?r.getFeaturesByBounds(e,function(e){s._getQureyResult(e,t)}):e instanceof is?r.getFeaturesByBuffer(e,function(e){s._getQureyResult(e,t)}):e instanceof rs&&r.getFeaturesByGeometry(e,function(e){s._getQureyResult(e,t)})}_getQureyResult(e,t){if(e.error)return void this.fire("getfeaturesfailed",{error:e.error});let i=Ka.a.geoJSON(e.result.features,{onEachFeature:function(e,t){t.bindPopup("ID: "+e.properties.SMID)},pointToLayer:function(e,t){return Ka.a.circleMarker(t,{radius:6})}}).addTo(t);this.resultLayers.push(i),this.fire("getfeaturessucceeded",{result:e.result.features})}clearLayers(){for(let e in this.resultLayers)this.resultLayers[e].remove();this.resultLayers=[]}}var pp=function(e){return new pp(e)};Ka.a.supermap.components.dataServiceQueryViewModel=pp;
|
||
/* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
|
||
* This program are made available under the terms of the Apache License, Version 2.0
|
||
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
|
||
var fp=zd.extend({initialize:function(e,t,i){if(zd.prototype.initialize.apply(this,[i]),this.dataServiceUrl=e,!t||0===t.length)throw new Error("Please configure the dataset of the query!");t instanceof Array?this.dataSetNames=t:this.dataSetNames=t.split(" ")},onAdd:function(e){return zd.prototype.onAdd.apply(this,[e])},onRemove:function(){this.map.off("pm:create")},setDataSetNames(e){e instanceof Array?this.dataSetNames=e:this.dataSetNames=e.split(" ")},setGetFeatureMode(e){this.getFeatureMode=e,this._getFeatureModeOnchange(this.getFeatureMode)},setDataServiceUrl(e){this.dataServiceUrl=e,this.viewModel=new dp(this.dataServiceUrl)},_getFeatureModeOnchange(e){let t;t=e&&"{}"!=JSON.stringify(e)?e:["ID","SQL","BOUNDS","BUFFER","SPATIAL"];let i=document.getElementById("queryModelControl");i.innerHTML="",this.creatQueryModeSelect(t,i)},_initView:function(){this.viewModel=new dp(this.dataServiceUrl),this.messageBox=new La;let e=new Ga({title:Oa.i18n("title_dataServiceQuery")}).getElement();e.classList.add("component-servicequery__container"),e.children[0].classList.add("component-servicequery__title");let t=e.children[1];t.classList.add("component-content--scroll"),t.classList.add("data-services");let i,s=Ka.a.DomUtil.create("div","component-analysis__container",t),r=Ka.a.DomUtil.create("div","component-servicequery__analysistype",s),n=Ka.a.DomUtil.create("div","component-analysis__container__analysisLayer",r),a=this.options.getFeatureMode;i=a&&"{}"!=JSON.stringify(a)?a:["ID","SQL","BOUNDS","BUFFER","SPATIAL"];let o=Ka.a.DomUtil.create("div","",n);o.id="queryModelContainer";let l=Ka.a.DomUtil.create("div","component-analysis__selecttool",o);l.id="queryModelControl",this.creatQueryModeSelect=function(e,t){let i;if(e instanceof Array&&e.length>1){let s={optionsArr:e,labelName:Oa.i18n("text_label_queryMode"),optionsClickCb:this.queryModeltOnchange},r=new ja(s).getElement();t.appendChild(r),i=r.children[1].children[0],r.children[1].classList.add("dataservice-select");let n=r.children[1];n.classList.add("dataservice-select"),n.classList.add("querymodel-select")}else{let t=Ka.a.DomUtil.create("span","",o);t.innerHTML=Oa.i18n("text_label_queryMode"),i=Ka.a.DomUtil.create("div","component-servicequery__querymode-selectname",o);let s=Ka.a.DomUtil.create("span","",i);e instanceof Array?s.innerHTML=e[0]:s.innerHTML=e,i.title=s.innerHTML,this.queryModeltOnchange(i)}return i.id="queryModelSelectName",i}.bind(this),this.queryModeltOnchange=q.bind(this),this.creatQueryModeSelect(i,l);let h=Ka.a.DomUtil.create("div","component-analysis__container component-textarea--dataservice__container",n),u=Ka.a.DomUtil.create("span","textarea-name",h);u.innerHTML=Oa.i18n("text_label_IDArrayOfFeatures");let c=Ka.a.DomUtil.create("div","component-textarea component-textarea--dataservice",h);c.id="getfeaturesIdArr";let d=Ka.a.DomUtil.create("div","scrollarea",c),p=Ka.a.DomUtil.create("div","component-scrollarea-content",d);p.setAttribute("tabindex","1");let f=Ka.a.DomUtil.create("textarea","component-textarea__content",p);f.value="[1,2,3]",f.id="getValueTextArea";let m=Ka.a.DomUtil.create("div","component-servicequery__maxfeatures-container hidden",n),y={spanName:Oa.i18n("text_label_maxFeatures"),value:"1000"},g=this._creatInputBox(y,m).children[1];g.classList.add("max-features-input");let v=Ka.a.DomUtil.create("div","component-servicequery__distance-container hidden",n),S={spanName:Oa.i18n("text_label_bufferDistance"),value:"10"},b=this._creatInputBox(S,v).children[1],_=Ka.a.DomUtil.create("div","component-analysis__container component-textarea--dataservice__container hidden",n),x=Ka.a.DomUtil.create("span","textarea-name",_),C=Ka.a.DomUtil.create("div","",_),T=Ka.a.DomUtil.create("div","component-servicequery__rangeicon-container",C);x.innerHTML=Oa.i18n("text_label_queryRange1");let M=Ka.a.DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-polygon-layer bounds",T),w=Ka.a.DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-line-layer hidden",T),E=Ka.a.DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-point-layer hidden",T),A=Ka.a.DomUtil.create("div","component-textarea component-textarea--rangequery",C);A.id="getfeaturesIdArr";let L=Ka.a.DomUtil.create("div","",A),P=Ka.a.DomUtil.create("div","component-scrollarea-content",L);P.setAttribute("tabindex","1");let N=Ka.a.DomUtil.create("textarea","component-textarea__content component-textarea--rangequery__content",P);N.value='{"leftBottom":{"x":-5,"y":-5},"rightTop":{"x":5,"y":5}}';let O=Ka.a.DomUtil.create("div","component-servicequery__spatialquerymode-container hidden",n),I={optionsArr:["CONTAIN","CROSS","DISJOINT","IDENTITY","INTERSECT","NONE","OVERLAP","TOUCH","WITHIN"],labelName:Oa.i18n("text_label_spatialQueryMode")},F=Ka.a.DomUtil.create("div","component-analysis__selecttool",O),R=new ja(I).getElement();R.children[1].classList.add("dataservice-select"),F.appendChild(R);let D=R.children[1].children[0];D.id="spatialQueryModeSelectName",R.children[1].children[2].classList.add("component-servicequery__spatialquerymode__selectcontent");let k=Ka.a.DomUtil.create("div","component-analysis__container__analysisbtn",n),B=Ka.a.DomUtil.create("div","component-analysis__analysisbtn",k),U=Ka.a.DomUtil.create("button","component-analysis__analysisbtn--analysis",B);U.innerHTML=Oa.i18n("btn_query");let G=Ka.a.DomUtil.create("div","component-analysis__analysisbtn--analysing-container hidden",B),j=Ka.a.DomUtil.create("div","component-analysis__analysisbtn--analysising component-servicequery__querybtn--querying",G);Ka.a.DomUtil.create("div","component-analysis__svg-container",j).innerHTML='<svg class="component-analysis__svg-rotate" width="16px" height="16px" version="1.1" xmlns="http://www.w3.org/2000/svg">\n <path id="ring" fill="#FFF" transform="translate(8,8)" d="M 0 0 v -8 A 8 8 0 1 1 -8.00 0 z"></path>\n <circle cx="8" cy="8" r="6" fill="#38ADF5"></circle>\n <rect class="svg-top" x="8" y="0" rx="2" ry="2" width="2" height="2" style="fill: rgb(255, 255, 255); stroke-width: 0;"></rect>\n <rect class="svg-left" x="0" y="8" rx="2" ry="2" width="2" height="2" style="fill: rgb(255, 255, 255); stroke-width: 0;"></rect>\n </svg>',Ka.a.DomUtil.create("span","",j).innerHTML=Oa.i18n("btn_querying");let z=Ka.a.DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",B);z.innerHTML=Oa.i18n("btn_emptyTheRresultLayer"),q(i[0]);let V,H,J=this;function q(e){let t;switch(t=e.title?e.title:e,m.classList.add("hidden"),_.classList.add("hidden"),v.classList.add("hidden"),w.classList.add("hidden"),E.classList.add("hidden"),M.classList.remove("bounds"),O.classList.add("hidden"),u.innerHTML=Oa.i18n("text_label_featureFilter"),f.value="SMID<10","BUFFER"!==t&&"SPATIAL"!==t||(_.classList.remove("hidden"),x.innerHTML=Oa.i18n("text_label_geometricObject"),N.value='{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[84.90234375,40.25390625]}}',w.classList.remove("hidden"),E.classList.remove("hidden")),t){case"ID":u.innerHTML=Oa.i18n("text_label_IDArrayOfFeatures"),f.value="[1,2,3]";break;case"SQL":m.classList.remove("hidden");break;case"BOUNDS":_.classList.remove("hidden"),x.innerHTML=Oa.i18n("text_label_queryRange"),N.value='{"leftBottom":{"x":-5,"y":-5},"rightTop":{"x":5,"y":5}}',M.classList.add("bounds");break;case"BUFFER":v.classList.remove("hidden");break;case"SPATIAL":O.classList.remove("hidden")}}return U.onclick=(()=>{this.messageBox.closeView(),G.style.display="block",U.style.display="none";let e=function(){let e,t=J.dataSetNames,i=document.getElementById("queryModelSelectName").title,s=f.value;if("ID"===i){let i=f.value,s=i.substring(1,i.length-1).split(",");e=new as({IDs:s,datasetNames:t})}else if("SQL"===i){let i=g.value;e=new ls({queryParameter:{attributeFilter:s},datasetNames:t,maxFeatures:i})}else if("BOUNDS"===i){if(!V){let e=JSON.parse(N.value);V=Ka.a.bounds([e.leftBottom.x,e.leftBottom.y],[e.rightTop.x,e.rightTop.y])}e=new $i({attributeFilter:s,datasetNames:t,bounds:V})}else if("BUFFER"===i){let i=b.value,r=JSON.parse(N.value),n=H||r;e=new is({attributeFilter:s,datasetNames:t,bufferDistance:i,geometry:n})}else if("SPATIAL"===i){let i=D.title,r=JSON.parse(N.value),n=H||r;e=new rs({attributeFilter:s,datasetNames:t,spatialQueryMode:i,geometry:n})}return e}();this.viewModel.on("getfeaturessucceeded",e=>{G.style.display="none",U.style.display="block",0===e.result.features.length&&this.messageBox.showView(Oa.i18n("msg_dataReturnedIsEmpty"),"success"),this._event.fire("getfeaturessucceeded",{result:e.result})}),this.viewModel.on("getfeaturesfailed",e=>{G.style.display="none",U.style.display="block",this.messageBox.showView(e.error.errorMsg,"failure"),this._event.fire("getfeaturesfailed",{error:e.error})}),this.viewModel.getFeatures(e,this.map)}),M.onclick=(e=>{let t=document.getElementById("queryModelSelectName").title;H&&H.remove(),"BOUNDS"===t?this.map.pm.enableDraw("Rectangle"):this.map.pm.enableDraw("Poly"),e.stopPropagation(),e.preventDefault()}),w.onclick=(e=>{H&&H.remove(),this.map.pm.enableDraw("Line"),e.stopPropagation(),e.preventDefault()}),E.onclick=(e=>{H&&H.remove(),this.map.pm.enableDraw("Marker"),e.stopPropagation(),e.preventDefault()}),this.map.on("pm:create",e=>{if("Rectangle"===e.shape){let t=(H=e.layer).getBounds();V=Ka.a.bounds([t._southWest.lng,t._southWest.lat],[t._northEast.lng,t._northEast.lat]);let i={leftBottom:{x:t._southWest.lng,y:t._southWest.lat},rightTop:{x:t._northEast.lng,y:t._northEast.lat}};N.value=JSON.stringify(i)}"Marker"===e.shape&&(H=e.layer,N.value=JSON.stringify(e.layer.toGeoJSON()),this.map.pm.disableDraw("Marker")),"Line"===e.shape&&(H=e.layer,N.value=JSON.stringify(e.layer.toGeoJSON())),"Polygon"===e.shape&&(H=e.layer,N.value=JSON.stringify(e.layer.toGeoJSON()))}),z.onclick=(()=>{this.viewModel.clearLayers()}),this._preventMapEvent(e,this.map),e},_creatInputBox(e,t){let i=Ka.a.DomUtil.create("div","",t);return Ka.a.DomUtil.create("span","",i).innerHTML=e.spanName,Ka.a.DomUtil.create("input","",i).value=e.value,i}}),mp=function(e,t,i){return new fp(e,t,i)};Ka.a.supermap.components.dataServiceQuery=mp},function(e,t,i){"use strict";i.r(t);i(26),i(32),i(37),i(42),i(54),i(55),i(56),i(57),i(58),i(59),i(60),i(61),i(62),i(63),i(64),i(65),i(66),i(67),i(68),i(69)},function(e,t){},,,,,,function(e,t){},,,,,function(e,t){},,,,,function(e,t){},,,,,,,,,,,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){}]); |