/*! * * iclient-mapboxgl.(https://iclient.supermap.io) * Copyright© 2000 - 2021 SuperMap Software Co.Ltd * license: Apache-2.0 * version: v10.1.1 * */(()=>{var e={693:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){o.prototype.append=function(e,t){e=a(e),t=n(t);var s=this.map[e];s||(s=[],this.map[e]=s),s.push(t)},o.prototype.delete=function(e){delete this.map[a(e)]},o.prototype.get=function(e){var t=this.map[a(e)];return t?t[0]:null},o.prototype.getAll=function(e){return this.map[a(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(a(e))},o.prototype.set=function(e,t){this.map[a(e)]=[n(t)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(s){this.map[s].forEach(function(r){e.call(t,r,s,this)},this)},this)};var s={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},r=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this)},c.call(p.prototype),c.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var i=[301,302,303,307,308];m.redirect=function(e,t){if(-1===i.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},t.Headers=o,t.Request=p,t.Response=m,t.fetch=function(e,t){return new Promise(function(r,i){var a;a=p.prototype.isPrototypeOf(e)&&!t?e:new p(e,t);var n=new XMLHttpRequest;var l=!1;function h(){if(4===n.readyState){var e=1223===n.status?204:n.status;if(e<100||e>599){if(l)return;return l=!0,void i(new TypeError("Network request failed"))}var t={status:e,statusText:n.statusText,headers:function(e){var t=new o;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var s=e.trim().split(":"),r=s.shift().trim(),i=s.join(":").trim();t.append(r,i)}),t}(n),url:"responseURL"in n?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):void 0},s="response"in n?n.response:n.responseText;l||(l=!0,r(new m(s,t)))}}n.onreadystatechange=h,n.onload=h,n.onerror=function(){l||(l=!0,i(new TypeError("Network request failed")))},n.open(a.method,a.url,!0);try{"include"===a.credentials&&("withCredentials"in n?n.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 n&&s.blob&&(n.responseType="blob"),a.headers.forEach(function(e,t){n.setRequestHeader(t,e)}),n.send(void 0===a._bodyInit?null:a._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function a(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 n(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,s){e.onload=function(){t(e.result)},e.onerror=function(){s(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(s.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(s.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!s.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},s.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,s,r,i,a,n,o=l(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,s=new FileReader,r=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",i=/charset\=[0-9a-zA-Z\-\_]*;?/,a=e.type.match(i)||r.match(i),n=[e],a&&n.push(a[0].replace(/^charset\=/,"").replace(/;$/,"")),s.readAsText.apply(s,n),h(s);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)},s.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(e,t){var s,i,a=(t=t||{}).body;if(p.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,a||(a=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=(s=t.method||this.method||"GET",i=s.toUpperCase(),r.indexOf(i)>-1?i:s),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a,t)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var s=e.split("="),r=s.shift().replace(/\+/g," "),i=s.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function m(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)},144:function(e,t){var s,r,i;r=[t,e],void 0===(i="function"==typeof(s=function(e,t){"use strict";var s={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function r(e){try{delete window[e]}catch(t){window[e]=void 0}}function i(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],a=e,n=t.timeout||s.timeout,o=t.jsonpCallback||s.jsonpCallback,l=void 0;return new Promise(function(s,h){var u=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),c=o+"_"+u;window[u]=function(e){s({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),i(c),r(u)},a+=-1===a.indexOf("?")?"?":"&";var p=document.createElement("script");p.setAttribute("src",""+a+o+"="+u),t.charset&&p.setAttribute("charset",t.charset),p.id=c,document.getElementsByTagName("head")[0].appendChild(p),l=setTimeout(function(){h(new Error("JSONP request to "+e+" timed out")),r(u),i(c),window[u]=function(){r(u)}},n),p.onerror=function(){h(new Error("JSONP request to "+e+" failed")),r(u),i(c),l&&clearTimeout(l)}})}})?s.apply(t,r):s)||(e.exports=i)},52:(e,t,s)=>{var r=9007199254740991,i="[object Arguments]",a="[object Function]",n="[object GeneratorFunction]",o="[object Map]",l="[object Set]",h=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,c="object"==typeof s.g&&s.g&&s.g.Object===Object&&s.g,p="object"==typeof self&&self&&self.Object===Object&&self,d=c||p||Function("return this")();function m(e,t){return function(e,t){for(var s=-1,r=e?e.length:0,i=Array(r);++s-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!z(e)}function z(e){var t=W(e)?x.call(e):"";return t==a||t==n}function W(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var V=function(e){return function(t){var s,r,i,a=G(t);return a==o?(s=t,r=-1,i=Array(s.size),s.forEach(function(e,t){i[++r]=[t,e]}),i):a==l?function(e){var t=-1,s=Array(e.size);return e.forEach(function(e){s[++t]=[e,e]}),s}(t):m(t,e(t))}}(function(e){return J(e)?R(e):k(e)});e.exports=V},107:function(e,t,s){!function(){"use strict";function e(e){var t=this.constructor;return this.then(function(s){return t.resolve(e()).then(function(){return s})},function(s){return t.resolve(e()).then(function(){return t.reject(s)})})}var t=setTimeout;function r(e){return Boolean(e&&void 0!==e.length)}function i(){}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=[],u(e,this)}function n(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,a._immediateFn(function(){var s=1===e._state?t.onFulfilled:t.onRejected;if(null!==s){var r;try{r=s(e._value)}catch(e){return void l(t.promise,e)}o(t.promise,r)}else(1===e._state?o:l)(t.promise,e._value)})):e._deferreds.push(t)}function o(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 s=t.then;if(t instanceof a)return e._state=3,e._value=t,void h(e);if("function"==typeof s)return void u((r=s,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,h(e)}catch(t){l(e,t)}var r,i}function l(e,t){e._state=2,e._value=t,h(e)}function h(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,s=e._deferreds.length;t{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t}),s.d=((e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}),s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),(()=>{"use strict"; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms 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 e=window.SuperMap=window.SuperMap||{};e.Components=window.SuperMap.Components||{}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms 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 t=e.DataFormat={GEOJSON:"GEOJSON",ISERVER:"ISERVER"},r=e.ServerType={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},i=e.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",GEOCOMPOUND:"GEOCOMPOUND"},a=e.QueryOption={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},n=(e.JoinType={INNERJOIN:"INNERJOIN",LEFTJOIN:"LEFTJOIN"},e.SpatialQueryMode={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"}),o=(e.SpatialRelationType={CONTAIN:"CONTAIN",INTERSECT:"INTERSECT",WITHIN:"WITHIN"},e.MeasureMode={DISTANCE:"DISTANCE",AREA:"AREA"}),l=e.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"},h=e.BufferRadiusUnit={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},u=(e.EngineType={IMAGEPLUGINS:"IMAGEPLUGINS",OGC:"OGC",ORACLEPLUS:"ORACLEPLUS",SDBPLUS:"SDBPLUS",SQLPLUS:"SQLPLUS",UDB:"UDB"},e.ThemeGraphTextFormat={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"}),c=e.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"},p=e.GraphAxesTextDisplayMode={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},d=e.GraduatedMode={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},m=e.RangeMode={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"},y=(e.ThemeType={DOTDENSITY:"DOTDENSITY",GRADUATEDSYMBOL:"GRADUATEDSYMBOL",GRAPH:"GRAPH",LABEL:"LABEL",RANGE:"RANGE",UNIQUE:"UNIQUE"},e.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"}),f=e.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"},g=(e.FillGradientMode={NONE:"NONE",LINEAR:"LINEAR",RADIAL:"RADIAL",CONICAL:"CONICAL",SQUARE:"SQUARE"},e.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"}),v=e.LabelBackShape={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},S=e.LabelOverLengthMode={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},b=(e.DirectionType={EAST:"EAST",NONE:"NONE",NORTH:"NORTH",SOURTH:"SOURTH",WEST:"WEST"},e.SideType={LEFT:"LEFT",MIDDLE:"MIDDLE",NONE:"NONE",RIGHT:"RIGHT"},e.SupplyCenterType={FIXEDCENTER:"FIXEDCENTER",NULL:"NULL",OPTIONALCENTER:"OPTIONALCENTER"},e.TurnType={AHEAD:"AHEAD",BACK:"BACK",END:"END",LEFT:"LEFT",NONE:"NONE",RIGHT:"RIGHT"},e.BufferEndType={FLAT:"FLAT",ROUND:"ROUND"}),x=e.OverlayOperationType={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},C=e.OutputType={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"},_=e.SmoothMethod={BSPLINE:"BSPLINE",POLISH:"POLISH"},T=e.SurfaceAnalystMethod={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},E=e.DataReturnMode={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},A=e.EditType={ADD:"add",UPDATE:"update",DELETE:"delete"},w=e.TransferTactic={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},L=e.TransferPreference={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},P=(e.GridType={CROSS:"CROSS",GRID:"GRID",POINT:"POINT"},e.ColorSpaceType={CMYK:"CMYK",RGB:"RGB"},e.LayerType={UGC:"UGC",WMS:"WMS",WFS:"WFS",CUSTOM:"CUSTOM"},e.UGCLayerType={THEME:"THEME",VECTOR:"VECTOR",GRID:"GRID",IMAGE:"IMAGE"},e.StatisticMode={AVERAGE:"AVERAGE",MAX:"MAX",MIN:"MIN",STDDEVIATION:"STDDEVIATION",SUM:"SUM",VARIANCE:"VARIANCE"},e.PixelFormat={BIT16:"BIT16",BIT32:"BIT32",BIT64:"BIT64",SINGLE:"SINGLE",DOUBLE:"DOUBLE",UBIT1:"UBIT1",UBIT4:"UBIT4",UBIT8:"UBIT8",UBIT24:"UBIT24",UBIT32:"UBIT32"},e.SearchMode={KDTREE_FIXED_COUNT:"KDTREE_FIXED_COUNT",KDTREE_FIXED_RADIUS:"KDTREE_FIXED_RADIUS",NONE:"NONE",QUADTREE:"QUADTREE"},e.InterpolationAlgorithmType={KRIGING:"KRIGING",SimpleKriging:"SimpleKriging",UniversalKriging:"UniversalKriging"},e.VariogramMode={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"}),O=e.Exponent={EXP1:"EXP1",EXP2:"EXP2"},N=e.ClientType={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},M=(e.ChartType={BAR:"Bar",BAR3D:"Bar3D",CIRCLE:"Circle",PIE:"Pie",POINT:"Point",LINE:"Line",RING:"Ring"},e.ClipAnalystMode={CLIP:"clip",INTERSECT:"intersect"}),I=e.AnalystAreaUnit={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},F=e.AnalystSizeUnit={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},R=e.StatisticAnalystMode={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},D=e.SummaryType={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},k=e.TopologyValidatorRule={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"},B=e.AggregationType={GEOHASH_GRID:"geohash_grid",FILTER:"filter"},G=e.AggregationQueryBuilderType={GEO_BOUNDING_BOX:"geo_bounding_box"},U=(e.GetFeatureMode={BOUNDS:"BOUNDS",BUFFER:"BUFFER",ID:"ID",SPATIAL:"SPATIAL",SQL:"SQL"},e.RasterFunctionType={NDVI:"NDVI",HILLSHADE:"HILLSHADE"});e.ResourceType={MAP:"MAP",SERVICE:"SERVICE",SCENE:"SCENE",DATA:"DATA",INSIGHTS_WORKSPACE:"INSIGHTS_WORKSPACE",MAP_DASHBOARD:"MAP_DASHBOARD"},e.OrderBy={UPDATETIME:"UPDATETIME",HEATLEVEL:"HEATLEVEL",RELEVANCE:"RELEVANCE"},e.OrderType={ASC:"ASC",DESC:"DESC"},e.SearchType={PUBLIC:"PUBLIC",MY_RES:"MY_RES",MYGROUP_RES:"MYGROUP_RES",MYDEPARTMENT_RES:"MYDEPARTMENT_RES",SHARETOME_RES:"SHARETOME_RES"},e.AggregationTypes={TAG:"TAG",TYPE:"TYPE"},e.PermissionType={SEARCH:"SEARCH",READ:"READ",READWRITE:"READWRITE",DELETE:"DELETE",DOWNLOAD:"DOWNLOAD"},e.EntityType={DEPARTMENT:"DEPARTMENT",GROUP:"GROUP",IPORTALGROUP:"IPORTALGROUP",ROLE:"ROLE",USER:"USER"},e.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"},e.WebExportFormatType={PNG:"PNG",PDF:"PDF"},e.WebScaleOrientationType={HORIZONTALLABELSBELOW:"HORIZONTALLABELSBELOW",HORIZONTALLABELSABOVE:"HORIZONTALLABELSABOVE",VERTICALLABELSLEFT:"VERTICALLABELSLEFT",VERTICALLABELSRIGHT:"VERTICALLABELSRIGHT"},e.WebScaleType={LINE:"LINE",BAR:"BAR",BAR_SUB:"BAR_SUB"},e.WebScaleUnit={METER:"METER",FOOT:"FOOT",DEGREES:"DEGREES"}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class H{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 H(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}}e.Size=H; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class j{constructor(t,s,r){this.x=t?parseFloat(t):0,this.y=s?parseFloat(s):0,this.mode=r,this.CLASS_NAME="SuperMap.Pixel",e.Pixel.Mode={LeftTop:"lefttop",RightTop:"righttop",RightBottom:"rightbottom",LeftBottom:"leftbottom"}}toString(){return"x="+this.x+",y="+this.y}clone(){return new j(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 j(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}}e.Pixel=j, /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ e.inherit=function(t,s){var r,i,a,n=function(){};for(n.prototype=s.prototype,t.prototype=new n,r=2,i=arguments.length;r0&&(s=parseFloat(e.toPrecision(t))),s},format:function(t,s,r,i){s=void 0!==s?s:0,r=void 0!==r?r:e.Number.thousandsSeparator,i=void 0!==i?i:e.Number.decimalSeparator,null!=s&&(t=parseFloat(t.toFixed(s)));var a=t.toString().split(".");1===a.length&&null==s&&(s=0);var n,o=a[0];if(r)for(var l=/(-?[0-9]+)([0-9]{3})/;l.test(o);)o=o.replace(l,"$1"+r+"$2");if(0==s)n=o;else{var h=a.length>1?a[1]:"0";null!=s&&(h+=new Array(s-h.length+1).join("0")),n=o+i+h}return n}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return z.limitSigDigs(this,e)});var W=e.Function={bind:function(e,t){var s=Array.prototype.slice.apply(arguments,[2]);return function(){var r=s.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,r)}},bindAsEventListener:function(e,t){return function(s){return e.call(t,s||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},V=(e.Array={filter:function(e,t,s){var r=[];if(Array.prototype.filter)r=e.filter(t,s);else{var i=e.length;if("function"!=typeof t)throw new TypeError;for(var a=0;a=0;s--)e[s]===t&&e.splice(s,1);return e},e.Util.indexOf=function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var s=0,r=e.length;s=0&&parseFloat(o)<1?(e.style.filter="alpha(opacity="+100*o+")",e.style.opacity=o):1===parseFloat(o)&&(e.style.filter="",e.style.opacity="")},e.Util.applyDefaults=function(e,t){e=e||{};var s="function"==typeof window.Event&&t instanceof window.Event;for(var r in t)(void 0===e[r]||!s&&t.hasOwnProperty&&t.hasOwnProperty(r)&&!e.hasOwnProperty(r))&&(e[r]=t[r]);return!s&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},e.Util.getParameterString=function(e){var t=[];for(var s in e){var r,i=e[s];if(null!=i&&"function"!=typeof i)r=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(s)+"="+r)}return t.join("&")},e.Util.urlAppend=function(e,t){var s=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var r=(e+" ").split(/[?&]/);s+=" "===r.pop()?t:r.length?"&"+t:"?"+t}return s},e.Util.urlPathAppend=function(e,t){let s=e;if(!t)return s;0===t.indexOf("/")&&(t=t.substring(1));const r=e.split("?");return r[0].indexOf("/",r[0].length-1)<0&&(r[0]+="/"),s=`${r[0]}${t}${r.length>1?`?${r[1]}`:""}`},e.Util.DEFAULT_PRECISION=14,e.Util.toFloat=function(t,s){return null==s&&(s=e.Util.DEFAULT_PRECISION),"number"!=typeof t&&(t=parseFloat(t)),0===s?t:parseFloat(t.toPrecision(s))},e.Util.rad=function(e){return e*Math.PI/180},e.Util.getParameters=function(t){t=null===t||void 0===t?window.location.href:t;var s="";if(e.String.contains(t,"?")){var r=t.indexOf("?")+1,i=e.String.contains(t,"#")?t.indexOf("#"):t.length;s=t.substring(r,i)}for(var a={},n=s.split(/[&;]/),o=0,l=n.length;o1?1/e:e},e.Util.getResolutionFromScale=function(t,s){var r;t&&(null==s&&(s="degrees"),r=1/(e.Util.normalizeScale(t)*e.INCHES_PER_UNIT[s]*e.DOTS_PER_INCH));return r},e.Util.getScaleFromResolution=function(t,s){return null==s&&(s="degrees"),t*e.INCHES_PER_UNIT[s]*e.DOTS_PER_INCH},e.IS_GECKO=function(){var e=navigator.userAgent.toLowerCase();return-1===e.indexOf("webkit")&&-1!==e.indexOf("gecko")}(),e.Browser=function(){var e,t="",s="",r="pc",i=navigator.userAgent.toLowerCase();return i.indexOf("msie")>-1||i.indexOf("trident")>-1&&i.indexOf("rv")>-1?(t="msie",e=i.match(/msie ([\d.]+)/)||i.match(/rv:([\d.]+)/)):i.indexOf("chrome")>-1?(t="chrome",e=i.match(/chrome\/([\d.]+)/)):i.indexOf("firefox")>-1?(t="firefox",e=i.match(/firefox\/([\d.]+)/)):i.indexOf("opera")>-1?(t="opera",e=i.match(/version\/([\d.]+)/)):i.indexOf("safari")>-1&&(t="safari",e=i.match(/version\/([\d.]+)/)),s=e?e[1]:"",i.indexOf("ipad")>-1||i.indexOf("ipod")>-1||i.indexOf("iphone")>-1?r="apple":i.indexOf("android")>-1&&(s=(e=i.match(/version\/([\d.]+)/))?e[1]:"",r="android"),{name:t,version:s,device:r}}(),e.Util.getBrowser=function(){return e.Browser},e.Util.isSupportCanvas=function(){var t=!0,s=e.Util.getBrowser();return document.createElement("canvas").getContext?("firefox"===s.name&&parseFloat(s.version)<5&&(t=!1),"safari"===s.name&&parseFloat(s.version)<4&&(t=!1),"opera"===s.name&&parseFloat(s.version)<10&&(t=!1),"msie"===s.name&&parseFloat(s.version)<9&&(t=!1)):t=!1,t}(),e.Util.supportCanvas=function(){return e.Util.isSupportCanvas},e.INCHES_PER_UNIT.degree=e.INCHES_PER_UNIT.dd,e.INCHES_PER_UNIT.meter=e.INCHES_PER_UNIT.m,e.INCHES_PER_UNIT.foot=e.INCHES_PER_UNIT.ft,e.INCHES_PER_UNIT.inch=e.INCHES_PER_UNIT.inches,e.INCHES_PER_UNIT.mile=e.INCHES_PER_UNIT.mi,e.INCHES_PER_UNIT.kilometer=e.INCHES_PER_UNIT.km,e.INCHES_PER_UNIT.yard=e.INCHES_PER_UNIT.yd,e.Util.isInTheSameDomain=function(e){if(!e)return!0;var t=e.indexOf("//"),s=document.location.toString(),r=s.indexOf("//");if(-1===t)return!0;var i,a=i=e.substring(0,t),n=s.substring(r+2);r=n.indexOf("/");var o=n.indexOf(":"),l=n.substring(0,r),h=document.location.protocol;if(-1!==o||(l+=":"+("http:"===h.toLowerCase()?80:443)),h.toLowerCase()!==a.toLowerCase())return!1;var u=(a=e.substring(t+2)).indexOf(":");t=a.indexOf("/");var c,p=a.substring(0,t);return-1!==u?c=a.substring(0,u):(c=a.substring(0,t),p+=":"+("http:"===i.toLowerCase()?80:443)),c===document.domain&&p===l},e.Util.calculateDpi=function(e,t,s,r,i){if(e&&t&&s){var a,n=e.getWidth(),o=e.getHeight(),l=t.w,h=t.h;if(i=i||6378137,"degree"===(r=r||"degrees").toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()){let e=n/l,t=o/h;a=254/(e>t?e:t)/s/(2*Math.PI*i/360)/1e4}else{a=254/(n/l)/s/1e4}return a}},e.Util.toJSON=function(t){var s=t;if(null==s)return null;switch(s.constructor){case String:return s=(s=(s=(s=(s=(s=(s='"'+s.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var r=[],i=0,a=s.length;i0?"{"+t.join(",")+"}":"{}"}return s.toString()}},e.Util.getResolutionFromScaleDpi=function(t,s,r,i){return i=i||6378137,r=r||"",t>0&&s>0?(t=e.Util.normalizeScale(t),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/s/t/(2*Math.PI*i/360)/1e4:254/s/t/1e4):-1},e.Util.getScaleFromResolutionDpi=function(e,t,s,r){return r=r||6378137,s=s||"",e>0&&t>0?"degree"===s.toLowerCase()||"degrees"===s.toLowerCase()||"dd"===s.toLowerCase()?254/t/e/(2*Math.PI*r/360)/1e4:254/t/e/1e4:-1},e.Util.transformResult=function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},e.Util.copyAttributes=function(e,t){if(e=e||{},t)for(var s in t){var r=t[s];void 0!==r&&"CLASS_NAME"!==s&&"function"!=typeof r&&(e[s]=r)}return e},e.Util.copyAttributesWithClip=function(e,t,s){if(e=e||{},t)for(var r in t){var i=!1;if(s&&s.length)for(var a=0,n=s.length;a=0&&n<=1&&a<=1&&n>=0?new e.Geometry.Point(t.x+a*(s.x-t.x),t.y+a*(s.y-t.y)):"No Intersection";else if(0==l&&0==h){var c=Math.max(t.y,s.y),p=Math.min(t.y,s.y),d=Math.max(t.x,s.x),m=Math.min(t.x,s.x);o=(r.y>=p&&r.y<=c||i.y>=p&&i.y<=c)&&r.x>=m&&r.x<=d||i.x>=m&&i.x<=d?"Coincident":"Parallel"}else o="Parallel";return o},e.Util.getTextBounds=function(e,t,s){document.body.appendChild(s),s.style.width="auto",s.style.height="auto",e.fontSize&&(s.style.fontSize=e.fontSize),e.fontFamily&&(s.style.fontFamily=e.fontFamily),e.fontWeight&&(s.style.fontWeight=e.fontWeight),s.style.position="relative",s.style.visibility="hidden",s.style.display="inline-block",s.innerHTML=t;var r=s.clientWidth,i=s.clientHeight;return document.body.removeChild(s),{textWidth:r,textHeight:i}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class q{constructor(e,t){V.isArray(e)&&(t=e[1],e=e[0]),this.lon=e?V.toFloat(e):0,this.lat=t?V.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 q(this.lon,this.lat)}add(e,t){if(null==e||null==t)throw new TypeError("LonLat.add cannot receive null values");return new q(this.lon+V.toFloat(e),this.lat+V.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.lone.right;)t.lon-=e.getWidth()}return t}destroy(){this.lon=null,this.lat=null}static fromString(e){var t=e.split(",");return new q(t[0],t[1])}static fromArray(e){var t=V.isArray(e),s=t&&e[0],r=t&&e[1];return new q(s,r)}} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Y{constructor(e,t,s,r){V.isArray(e)&&(r=e[3],s=e[2],t=e[1],e=e[0]),this.left=null!=e?V.toFloat(e):this.left,this.bottom=null!=t?V.toFloat(t):this.bottom,this.right=null!=s?V.toFloat(s):this.right,this.top=null!=r?V.toFloat(r):this.top,this.centerLonLat=null,this.CLASS_NAME="SuperMap.Bounds"}clone(){return new Y(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 s=Math.pow(10,e),r=Math.round(this.left*s)/s,i=Math.round(this.bottom*s)/s,a=Math.round(this.right*s)/s,n=Math.round(this.top*s)/s;return!0===t?i+","+r+","+n+","+a:r+","+i+","+a+","+n}getWidth(){return this.right-this.left}getHeight(){return this.top-this.bottom}getSize(){return new H(this.getWidth(),this.getHeight())}getCenterPixel(){return new j((this.left+this.right)/2,(this.bottom+this.top)/2)}getCenterLonLat(){return this.centerLonLat||(this.centerLonLat=new q((this.left+this.right)/2,(this.bottom+this.top)/2)),this.centerLonLat}scale(e,t){var s,r;e=e||1,null==t&&(t=this.getCenterLonLat()),"SuperMap.LonLat"===t.CLASS_NAME?(s=t.lon,r=t.lat):(s=t.x,r=t.y);var i=(this.left-s)*e+s,a=(this.bottom-r)*e+r,n=(this.right-s)*e+s,o=(this.top-r)*e+r;return new Y(i,a,n,o)}add(e,t){if(null==e||null==t)throw new TypeError("Bounds.add cannot receive null values");return new Y(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 Y(e.lon,e.lat,e.lon,e.lat);break;case"SuperMap.Geometry.Point":t=new Y(e.x,e.y,e.x,e.y);break;case"SuperMap.Bounds":t=e}t&&(this.centerLonLat=null,(null==this.left||t.leftthis.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 s=this.contains(e.lon,e.lat,t.inclusive),r=t.worldBounds;if(r&&!s){var i=r.getWidth(),a=(r.left+r.right)/2,n=Math.round((e.lon-a)/i);s=this.containsLonLat({lon:e.lon-n*i,lat:e.lat},{inclusive:t.inclusive})}return s}containsPixel(e,t){return this.contains(e.x,e.y,t)}contains(e,t,s){if(null==s&&(s=!0),null==e||null==t)return!1;return s?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&ethis.bottom&&t=s.bottom&&e.bottom<=s.top||s.bottom>=e.bottom&&s.bottom<=e.top,n=e.top>=s.bottom&&e.top<=s.top||s.top>e.bottom&&s.top=s.left&&e.left<=s.right||s.left>=e.left&&s.left<=e.right,l=e.right>=s.left&&e.right<=s.right||s.right>=e.left&&s.right<=e.right;r=(a||n)&&(o||l)}if(t.worldBounds&&!r){var h=t.worldBounds,u=h.getWidth(),c=!h.containsBounds(s),p=!h.containsBounds(e);c&&!p?(e=e.add(-u,0),r=s.intersectsBounds(e,{inclusive:t.inclusive})):p&&!c&&(s=s.add(-u,0),r=e.intersectsBounds(s,{inclusive:t.inclusive}))}return r}containsBounds(e,t,s){null==t&&(t=!1),null==s&&(s=!0);var r=this.contains(e.left,e.bottom,s),i=this.contains(e.right,e.bottom,s),a=this.contains(e.left,e.top,s),n=this.contains(e.right,e.top,s);return t?r||i||a||n:r&&i&&a&&n}determineQuadrant(e){var t="",s=this.getCenterLonLat();return t+=e.lat=e.right&&i.right>e.right;)i=i.add(-a,0);var n=i.left+s;ne.left&&i.right-r>e.right&&(i=i.add(-a,0))}return i}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 s=e.split(",");return Y.fromArray(s,t)}static fromArray(e,t){return!0===t?new Y(e[1],e[0],e[3],e[2]):new Y(e[0],e[1],e[2],e[3])}static fromSize(e){return new Y(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"}}e.Bounds=Y; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class X{constructor(){this.CLASS_NAME="SuperMap.Geometry",this.id=V.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 X}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}}e.Geometry=X; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Q extends X{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 Q,t=0,s=this.components.length;t-1)){if(null!=t&&t=0;--s)t=this.removeComponent(e[s])||t;return t}removeComponent(e){return V.removeItem(this.components,e),this.clearBounds(),!0}getArea(){for(var e=0,t=0,s=this.components.length;t2;return t&&super.removeComponent.apply(this,arguments),t}getSortedSegments(){for(var e,t,s=this.components.length-1,r=new Array(s),i=0;i=1?1:g)<=-1?-1:g,u=180*Math.acos(g)/Math.PI,n=(u=i.x==s.x?t.x>s.x&&r.x>s.x||t.xp*t.x+d&&r.y>p*r.x+d||t.ys.y?r.xs.x&&(o=!1):i.xp*r.x+d&&(o=!1):i.x>s.x?r.y>s.y&&(o=!1):r.y=0?180*Math.atan(v)/Math.PI:Math.abs(180*Math.atan(v)/Math.PI)+90,b=Math.abs(t.y);s.y==b&&b==i.y&&s.x=0?v>=0?h+=l:h=180-(h-90)+l:h=v>0?h-180+l:90-h+l:x>=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 _=t.x+a*Math.cos(h),T=t.y+a*Math.sin(h);c.push(new $(_,T))}c.push(i)}return c}static createLineEPS(e){var t=[],s=e.length;if(s<2)return e;for(var r=0;r1&&(s=parseFloat(s)*h),r.labelAlign&&"cm"!==r.labelAlign)switch(r.labelAlign){case"lt":l.x+=t/2,l.y+=s/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=s/2;break;case"ct":l.y+=s/2;break;case"cb":l.y-=s/2;break;case"rt":l.x-=t/2,l.y+=s/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=s/2}return this.bsInfo.h=s,this.bsInfo.w=t,i=l.x-parseFloat(t)/2,a=l.y+parseFloat(s)/2,o=l.x+parseFloat(t)/2,n=l.y-parseFloat(s)/2,new Y(i,a,o,n)}getLabelPxBoundsByText(e,t){var s,r,i,a,n=this.getLabelPxSize(t),o=V.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":o.x+=n.w/2,o.y+=n.h/2;break;case"lm":o.x+=n.w/2;break;case"lb":o.x+=n.w/2,o.y-=n.h/2;break;case"ct":o.y+=n.h/2;break;case"cb":o.y-=n.h/2;break;case"rt":o.x-=n.w/2,o.y+=n.h/2;break;case"rm":o.x-=n.w/2;break;case"rb":o.x-=n.w/2,o.y-=n.h/2}return this.bsInfo.h=n.h,this.bsInfo.w=n.w,s=o.x-n.w/2,r=o.y+n.h/2,a=t.fontStyle&&"italic"===t.fontStyle?o.x+n.w/2+parseInt(parseFloat(t.fontSize)/2):o.x+n.w/2,i=o.y-n.h/2,new Y(s,r,a,i)}getLabelPxSize(e){var t,s,r,i,a=parseFloat(e.strokeWidth);t=e.label||this.text,s=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var n=t.split("\n"),o=n.length;i=o>1?s*o+o+a+.2*s:s+a+.2*s+1,r=0,this.labelWTmp&&r255?s++:r++;return t.cnC=s,t.enC=r,t.textC=e.length,t}}e.Geometry.GeoText=te; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends ee{constructor(e){super(e),this.componentTypes=["SuperMap.Geometry.Point"],this.CLASS_NAME="SuperMap.Geometry.LinearRing",this.geometryType="LinearRing"}addComponent(e,t){var s=!1,r=this.components.pop();null==t&&e.equals(r)||(s=super.addComponent.apply(this,arguments));var i=this.components[0];return super.addComponent.apply(this,[i]),s}removeComponent(e){var t=this.components&&this.components.length>3;if(t){this.components.pop(),super.removeComponent.apply(this,arguments);var s=this.components[0];super.addComponent.apply(this,[s])}return t}getArea(){var e=0;if(this.components&&this.components.length>2){for(var t=0,s=0,r=this.components.length;s0){e+=Math.abs(this.components[0].getArea());for(var t=1,s=this.components.length;t1},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(t,s){for(var r=e.Event.element(t);r.parentNode&&(!r.tagName||r.tagName.toUpperCase()!=s.toUpperCase());)r=r.parentNode;return r},observe:function(e,t,s,r){var i=V.getElement(e);if(r=r||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||i.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!i._eventCacheID){var a="eventCacheID_";i.id&&(a=i.id+"_"+a),i._eventCacheID=V.createUniqueID(a)}var n=i._eventCacheID;this.observers[n]||(this.observers[n]=[]),this.observers[n].push({element:i,name:t,observer:s,useCapture:r}),i.addEventListener?"mousewheel"===t?i.addEventListener(t,s,{useCapture:r,passive:!1}):i.addEventListener(t,s,r):i.attachEvent&&i.attachEvent("on"+t,s)},stopObservingElement:function(t){var s=V.getElement(t)._eventCacheID;this._removeElementObservers(e.Event.observers[s])},_removeElementObservers:function(t){if(t)for(var s=t.length-1;s>=0;s--){var r=t[s],i=new Array(r.element,r.name,r.observer,r.useCapture);e.Event.stopObserving.apply(this,i)}},stopObserving:function(t,s,r,i){i=i||!1;var a=V.getElement(t),n=a._eventCacheID;"keypress"===s&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.detachEvent)&&(s="keydown");var o=!1,l=e.Event.observers[n];if(l)for(var h=0;!o&&h0&&s.push(","),s.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,s.push(this.writeNewline(),this.writeIndent(),"]"),s.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,s){var r=t[s];return r||(r=s.charCodeAt(),"\\u00"+Math.floor(r/16).toString(16)+(r%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 s;if(this.nativeJSON)try{s=JSON.parse(e,t)}catch(e){}return this.keepData&&(this.data=s),s}write(e,t){this.pretty=!!t;var s=null,r=typeof e;if(this.serialize[r])try{s=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[r].apply(this,[e])}catch(e){}return s}writeIndent(){var e=[];if(this.pretty)for(var t=0;t0){e+='"points":[';for(var s=0,r=this.components.length;s0))return null;for(var a=0,n=0,o=[];a0){if(1===s)return new $(t[0].x,t[0].y);var r=[];for(let e=0;e0){if(1===s){let s=[];for(let r=0;r0){if(1===o){for(e=0,s=[];e=0;t--)if(p[e]=-1,h[t].containsBounds(h[e])){u[e]=-1*u[t],u[e]<0&&(p[e]=t);break}for(let e=0;e0?i.push(l[e]):(i[p[e]].components=i[p[e]].components.concat(l[e].components),i.push(""))}else{i=new Array;for(let e=0;e0&&i.length>0&&(i[i.length-1].components=i[i.length-1].components.concat(n),n=[]),i.push(l[e])),e==r-1){var d=i.length;if(d)i[d-1].components=i[d-1].components.concat(n);else for(let e=0,t=n.length;e=0;t--)if(m[e]=-1,c[t].containsBounds(c[e])){p[e]=-1*p[t],p[e]<0&&(m[e]=t);break}for(let e=0;e0?a.push(u[e]):(a[m[e]].components=a[m[e]].components.concat(u[e].components),a.push(""))}else{a=new Array;for(let e=0;e0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(l),l=[]),a.push(u[e])),e==r-1){var y=a.length;if(y)a[y-1].components=a[y-1].components.concat(l);else for(let e=0,t=l.length;ee[a]){var n=e[a];e[a]=e[i],e[i]=n;var o=t[a];if(t[a]=t[i],t[i]=o,s&&s.length>0){var l=s[a];s[a]=s[i],s[i]=l}if(r&&r.length>0){var h=r[a];r[a]=r[i],r[i]=h}}}}e.ServerGeometry=ve; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends de{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 $(e[0],e[1])},multipoint:function(e){for(var t=[],s=null,r=0,i=e.length;rthis._toiSevrerFeature(e)):this._toiSevrerFeature(r)}toGeoJSON(e){var t={type:null};if(V.isArray(e)){t.type="FeatureCollection";var s=e.length;t.features=new Array(s);for(var r=0;r-1||(t[r]=e[r]);return t}}e.Format.GeoJSON=Se;e.Format.WKT= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 pe{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=[],s=0,r=e.components.length;s0&&i.push(","),s=t[a].geometry,i.push(this.extractGeometry(s));return r&&i.push(")"),i.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 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){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 he(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.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(){}}e.TimeControlBase=be;e.TimeFlowControl= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 be{constructor(e,t){super(t);var s=this;s.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),s=this,r=function(){},i=function(){return s.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),s.update=s.update.bind(s),s.oldTime=s.currentTime,s.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)}}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms 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(107),s(693);var xe=s(144),Ce=s.n(xe); /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms 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 _e=window.fetch;e.setCORS=function(t){e.CORS=t};var Te=e.isCORS=function(){return void 0!=e.CORS?e.CORS:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},Ee=(e.setRequestTimeout=function(t){return e.RequestTimeout=t},e.getRequestTimeout=function(){return e.RequestTimeout||45e3}),Ae=e.FetchRequest={commit:function(e,t,s,r){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,s,r);case"POST":return this.post(t,s,r);case"PUT":return this.put(t,s,r);case"DELETE":return this.delete(t,s,r);default:return this.get(t,s,r)}},supportDirectRequest:function(e,t){return!!V.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:Te()||t.proxy)},get:function(t,s,r){r=r||{};if(t=V.urlAppend(t,this._getParameterString(s||{})),t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){var i={url:t=t.replace(".json",".jsonp"),data:s};return e.Util.RequestJSONPPromise.GET(i)}return this.urlIsLong(t)?this._postSimulatie("GET",t.substring(0,t.indexOf("?")-1),s,r):this._fetch(t,s,r,"GET")},delete:function(t,s,r){r=r||{};if(t=V.urlAppend(t,this._getParameterString(s||{})),t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var i={url:t+="&_method=DELETE",data:s};return e.Util.RequestJSONPPromise.DELETE(i)}return this.urlIsLong(t)?this._postSimulatie("DELETE",t.substring(0,t.indexOf("?")-1),s,r):this._fetch(t,s,r,"DELETE")},post:function(t,s,r){if(r=r||{},!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var i={url:t+="&_method=POST",data:s};return e.Util.RequestJSONPPromise.POST(i)}return this._fetch(this._processUrl(t,r),s,r,"POST")},put:function(t,s,r){if(r=r||{},t=this._processUrl(t,r),!this.supportDirectRequest(t,r)){t=t.replace(".json",".jsonp");var i={url:t+="&_method=PUT",data:s};return e.Util.RequestJSONPPromise.PUT(i)}return this._fetch(t,s,r,"PUT")},urlIsLong:function(e){for(var t=0,s=null,r=0,i=e.length;r-1?"&":"?")+"_method="+e,"string"!=typeof s&&(s=JSON.stringify(s)),this.post(t,s,r)},_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 s=e.split("?");2===s.length&&(e=s[0]+".json?"+s[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,s,r){return(s=s||{}).headers=s.headers||{},s.headers["Content-Type"]||(s.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),s.timeout?this._timeout(s.timeout,_e(e,{method:r,headers:s.headers,body:"PUT"===r||"POST"===r?t:void 0,credentials:this._getWithCredentials(s),mode:"cors",timeout:Ee()}).then(function(e){return e})):_e(e,{method:r,body:"PUT"===r||"POST"===r?t:void 0,headers:s.headers,credentials:this._getWithCredentials(s),mode:"cors",timeout:Ee()}).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||{},Ce()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(s,r){setTimeout(function(){r(new Error("timeout"))},e),t.then(s,r)})},_getParameterString:function(e){var t=[];for(var s in e){var r,i=e[s];if(null!=i&&"function"!=typeof i)r=Array.isArray(i)||"[object Object]"===i.toString()?encodeURIComponent(JSON.stringify(i)):encodeURIComponent(i),t.push(encodeURIComponent(s)+"="+r)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};e.Util.RequestJSONPPromise={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(t){for(var s in t){this.queryKeys.push(s),"string"!=typeof t[s]&&(t[s]=e.Util.toJSON(t[s]));var r=encodeURIComponent(t[s]);this.queryValues.push(r)}},issue:function(e){for(var t=this,s=t.getUid(),r=e.url,i=[],a=new Promise(function(e){t.supermap_callbacks[s]=function(r){delete t.supermap_callbacks[s],e(r)}}),n=r,o=0,l=t.queryKeys?t.queryKeys.length:0,h=0;h=t.limitLength){if(0==o)return!1;i.push(n),n=r,o=0,h--}else if(n.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-n.length-t.queryKeys[h].length-2;n.indexOf("?")>-1?n+="&":n+="?";var p=u.substring(0,c);"%"===p.substring(c-1,c)?(c-=1,p=u.substring(0,c)):"%"===p.substring(c-2,c-1)&&(c-=2,p=u.substring(0,c)),n+=t.queryKeys[h]+"="+p,u=u.substring(c),p.length>0&&(i.push(n),n=r,o=0)}else o++,n.indexOf("?")>-1?n+="&":n+="?",n+=t.queryKeys[h]+"="+t.queryValues[h];return i.push(n),t.send(i,"SuperMap.Util.RequestJSONPPromise.supermap_callbacks["+s+"]",e&&e.proxy),a},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,s){var r=e.length;if(r>0)for(var i=(new Date).getTime(),a=0;a-1?n+="&":n+="?",n+="sectionCount="+r,n+="§ionIndex="+a,n+="&jsonpUserID="+i,s&&(n=decodeURIComponent(n),n=s+encodeURIComponent(n)),Ce()(n,{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 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{static generateToken(e,t){var s=this.servers[e];if(s)return Ae.post(s.tokenServiceUrl,JSON.stringify(t.toJSON())).then(function(e){return e.text()})}static registerServers(e){this.servers=this.servers||{},V.isArray(e)||(e=[e]);for(var t=0;t-1&&"?"===r?t+=s.getUrlParameters():t.indexOf("?")>-1&&"?"!==r?t+="&"+s.getUrlParameters():t+="?"+s.getUrlParameters()}return t}getCredential(){var e,t=we.getToken(this.serviceUrl);return(e=t?new oe(t,"token"):null)||(e=(t=this.getKey())?new oe(t,"key"):null),e}getKey(){}}e.iPortalServiceBase=Oe; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){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=[],V.extend(this,e)}}e.iPortalQueryParam=Ne; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){e=e||{},this.content=[],this.total=0,this.currentPage=1,this.pageSize=12,this.aggregations=null,V.extend(this,e)}}e.iPortalQueryResult=Me; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends Oe{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={},V.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 s={authorizeSetting:this.sourceJSON.authorizeSetting,metadata:this.sourceJSON.metadata,tags:this.sourceJSON.tags,thumbnail:this.sourceJSON.thumbnail,tokenRefreshUrl:this.sourceJSON.tokenRefreshUrl};t=JSON.stringify(s)}return this.request("PUT",this.resourceUrl,t,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})}}e.iPortalResource=Ie; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){e=e||{},this.ids=[],this.entities=[],this.resourceType="",V.extend(this,e)}}e.iPortalShareParam=Fe;e.iPortal= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Oe{constructor(e,t){super(e,t),this.iportalUrl=e,t=t||{},this.withCredentials=t.withCredentials||!1}load(){return Ae.get(this.iportalUrl+"/web")}queryResources(e){if(!(e instanceof Ne))return new Promise(function(e){e("queryParams is not instanceof iPortalQueryParam !")});var t=this,s=this.iportalUrl+"/gateway/catalog/resource/search.json";return e.t=(new Date).getTime(),this.request("GET",s,e).then(function(e){var s=[];e.content.forEach(function(e){s.push(new Ie(t.iportalUrl,e))});let r=new Me;return r.content=s,r.total=e.total,r.currentPage=e.currentPage,r.pageSize=e.pageSize,r.aggregations=e.aggregations,r})}updateResourcesShareSetting(e){if(!(e instanceof Fe))return new Promise(function(e){e("shareParams is not instanceof iPortalShareParam !")});var t=e.resourceType.replace("_","").toLowerCase()+"s";"datas"===t&&(t="mycontent/"+t);var s={ids:e.ids,entities:e.entities},r=this.iportalUrl+"/web/"+t+"/sharesetting.json";return this.request("PUT",r,JSON.stringify(s)).then(function(e){return e})}};e.iPortalShareEntity= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(e){e=e||{},this.permissionType="",this.entityType="",this.entityName="GUEST",this.entityId=null,V.extend(this,e)}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){e=e||{},this.rootUrl="",this.tags=[],this.entities=[],V.extend(this,e)}}e.iPortalAddResourceParam=Re; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){e=e||{},this.type="",this.tags=[],this.entities=[],this.metadata={},this.addedMapNames=[],this.addedSceneNames=[],V.extend(this,e)}}e.iPortalRegisterServiceParam=De; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){e=e||{},this.fileName="",this.type="",this.tags=[],this.dataMetaInfo={},V.extend(this,e)}}e.iPortalAddDataParam=ke; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){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={},V.extend(this,e)}}e.iPortalDataMetaInfoParam=Be; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){e=e||{},this.type="",this.url="",this.connectionInfo={},V.extend(this,e)}}e.iPortalDataStoreInfoParam=Ge; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){e=e||{},this.dataBase="",this.server="",V.extend(this,e)}}e.iPortalDataConnectionInfoParam=Ue;e.iPortalUser= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Oe{constructor(e){super(e),this.iportalUrl=e}deleteResources(e){var t=e.resourceType.replace("_","").toLowerCase(),s=this.iportalUrl+"/web/"+t+"s.json?ids="+encodeURI(JSON.stringify(e.ids));return"data"===t?(s=this.iportalUrl+"/web/mycontent/datas/delete.json",this.request("POST",s,JSON.stringify(e.ids))):this.request("DELETE",s)}addMap(e){if(!(e instanceof Re))return this.getErrMsgPromise("addMapParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},s=this.iportalUrl+"/web/maps/batchaddmaps.json";return this.request("POST",s,JSON.stringify(t)).then(function(e){return e})}addScene(e){if(!(e instanceof Re))return this.getErrMsgPromise("addSceneParams is not instanceof IPortalAddResourceParam !");let t={rootUrl:e.rootUrl,tags:e.tags,authorizeSetting:e.entities},s=this.iportalUrl+"/web/scenes/batchaddscenes.json";return this.request("POST",s,JSON.stringify(t)).then(function(e){return e})}registerService(e){if(!(e instanceof De))return 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},s=this.iportalUrl+"/web/services.json";return this.request("POST",s,JSON.stringify(t)).then(e=>e)}getErrMsgPromise(e){return new Promise(t=>{t(e)})}uploadDataRequest(e,t){var s=this.iportalUrl+"/web/mycontent/datas/"+e+"/upload.json";return this.request("POST",s,t)}addData(e,t){if(!(e instanceof ke))return this.getErrMsgPromise("params is not instanceof iPortalAddDataParam !");var s,r=this.iportalUrl+"/web/mycontent/datas.json",i={fileName:e.fileName,tags:e.tags,type:e.type},a=e.type.toLowerCase();if("excel"===a||"csv"===a){if(!(e.dataMetaInfo instanceof Be))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");s={xField:e.dataMetaInfo.xField,yField:e.dataMetaInfo.yField},"csv"===a&&(s.fileEncoding=e.dataMetaInfo.fileEncoding),i.coordType="WGS84",i.dataMetaInfo=s}else if("hdfs"===a||"hbase"===a){if(!(e.dataMetaInfo instanceof Be))return this.getErrMsgPromise("params.dataMetaInfo is not instanceof iPortalDataMetaInfoParam !");if(!(e.dataMetaInfo.dataStoreInfo instanceof Ge))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo is not instanceof iPortalDataStoreInfoParam !");var n={type:e.dataMetaInfo.dataStoreInfo.type};switch(a){case"hdfs":n.url=e.dataMetaInfo.dataStoreInfo.url,s={url:e.dataMetaInfo.url,dataStoreInfo:n};break;case"hbase":if(!(e.dataMetaInfo.dataStoreInfo.connectionInfo instanceof Ue))return this.getErrMsgPromise("params.dataMetaInfo.dataStoreInfo.connectionInfo is not instanceof iPortalDataConnectionInfoParam !");n.connectionInfo={dataBase:e.dataMetaInfo.dataStoreInfo.connectionInfo.dataBase,server:e.dataMetaInfo.dataStoreInfo.connectionInfo.server,engineType:"HBASE"},n.datastoreType="SPATIAL",s={dataStoreInfo:n}}i.dataMetaInfo=s}return this.request("POST",r,JSON.stringify(i)).then(e=>"hdfs"===a||"hbase"===a?e:e.childID?this.uploadDataRequest(e.childID,t):e.customResult)}publishOrUnpublish(e,t){if(!e.dataId||!e.serviceType)return this.getErrMsgPromise("option.dataID and option.serviceType are Required!");var s=e.dataId,r=e.dataServiceId,i=e.serviceType,a=this.iportalUrl+"/web/mycontent/datas/"+s+"/publishstatus.json?serviceType="+i;return r&&(a+="&dataServiceId="+r),this.request("PUT",a,JSON.stringify(t)).then(e=>t?(r||(r=e.customResult),r):e)}getDataPublishedStatus(e,t){var s=this.iportalUrl+"/web/mycontent/datas/"+e+"/publishstatus.json?dataServiceId="+t+"&forPublish=true";return this.request("GET",s)}unPublishDataService(e){return this.publishOrUnpublish(e,!1)}publishDataService(e){return this.publishOrUnpublish(e,!0)}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){let s=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,V.isArray(e)?(s.urls=e,s.length=e.length,s.totalTimes=s.length,1===s.length?s.url=e[0]:(s.index=parseInt(Math.random()*s.length),s.url=e[s.index])):(s.totalTimes=1,s.url=e),V.isArray(e)&&!s.isServiceSupportPolling()&&(s.url=e[0],s.totalTimes=1),s.serverType=s.serverType||r.ISERVER,t=t||{},this.crossOrigin=t.crossOrigin,this.headers=t.headers,V.extend(this,t),s.isInTheSameDomain=V.isInTheSameDomain(s.url),s.events=new he(s,null,s.EVENT_TYPES,!0),s.eventListeners instanceof Object&&s.events.on(s.eventListeners),this.CLASS_NAME="SuperMap.CommonServiceBase"}destroy(){let e=this;V.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 s=this.getCredential(e.url);s&&(e.url=V.urlAppend(e.url,s.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,s,i=e;switch(this.serverType){case r.IPORTAL:(t=(s=we.getToken(i))?new oe(s,"token"):null)||(t=(s=we.getKey(i))?new oe(s,"key"):null);break;case r.ONLINE:t=(s=we.getKey(i))?new oe(s,"key"):null;break;default:t=(s=we.getToken(i))?new oe(s,"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,s=/^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(s,s.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=V.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.timese.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=V.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}serviceProcessFailed(e){let t=(e=V.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}_commit(e){"POST"!==e.method&&"PUT"!==e.method||(e.params&&(e.url=V.urlAppend(e.url,V.getParameterString(e.params||{}))),e.params=e.data),Ae.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 s=t;("string"==typeof t&&(s=(new de).read(t)),(!s||s.error||s.code>=300&&304!==s.code)&&(s=s&&s.error?{error:s.error}:{error:s}),s.error)?(e.scope?W.bind(e.failure,e.scope):e.failure)(s):(s.succeed=void 0==s.succeed||s.succeed,(e.scope?W.bind(e.success,e.scope):e.success)(s))}).catch(function(t){(e.scope?W.bind(e.failure,e.scope):e.failure)(t)})}}e.CommonServiceBase=He; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{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,V.extend(this,e)}destroy(){this.address=null,this.fromIndex=null,this.toIndex=null,this.filters=null,this.prjCoordSys=null,this.maxReturn=null}}e.GeoCodingParameter=je; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{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,V.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}}e.GeoDecodingParameter=Je; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends He{constructor(e,t){super(e,t),this.options=t||{},this.CLASS_NAME="SuperMap.AddressMatchService"}destroy(){super.destroy()}code(e,t){t instanceof je&&this.processAsync(e,t)}decode(e,t){t instanceof Je&&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)}}e.AddressMatchService=ze; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){this.name=null,this.queryType=null,this.CLASS_NAME="SuperMap.AggQueryBuilderParameter",V.extend(this,e)}destroy(){this.name=null,this.queryType=null}}e.AggQueryBuilderParameter=We; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){this.aggName=null,this.aggType=null,this.aggFieldName=null,this.subAgg=null,this.CLASS_NAME="SuperMap.AggregationParameter",V.extend(this,e)}destroy(){var e=this;e.aggName=null,e.aggFieldName=null,e.aggType=null,e.subAgg&&(e.subAgg=null)}}e.AggregationParameter=Ve; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class qe{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,V.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 s={};for(var r in e){if("dataset"!==r)"latitude"===r||"timeMode"===r||"dayStart"===r||("dayEnd"===r||"hourStart"===r||"hourEnd"===r)||("transmittance"===r||"hourInterval"===r||"dayInterval"===r)?s[r]=e[r]:t[r]=e[r]}t.parameter=s}}e.AreaSolarRadiationParameters=qe; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class Ye extends He{constructor(e,s){super(e,s),this.format=t.GEOJSON,this.CLASS_NAME="SuperMap.SpatialAnalystBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var s,r=this;if((e=V.transformResult(e))&&r.format===t.GEOJSON&&"function"==typeof r.toGeoJSONResult)if(V.isArray(e)){for(var i=0;i0)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}}e.MappingParameters=ot; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){if(this.datasetName="",this.bounds="",this.distance="",this.distanceField="",this.distanceUnit=F.METER,this.dissolveField="",this.output=null,this.mappingParameters=null,!e)return this;V.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 nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},"bounds"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.BuffersAnalystJobsParameter=lt; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{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;Ae.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,s,r){var i=this,a=null;t&&t instanceof s&&(a=new Object,s.toObject(t,a));let n=Object.assign({"Content-Type":"application/x-www-form-urlencoded"},i.headers||{});var o={proxy:i.proxy,headers:n,withCredentials:i.withCredentials,crossOrigin:i.crossOrigin,isInTheSameDomain:i.isInTheSameDomain};Ae.post(i._processUrl(e),JSON.stringify(a),o).then(function(e){return e.json()}).then(function(e){e.succeed?i.serviceProcessCompleted(e,r):i.serviceProcessFailed(e)}).catch(function(e){i.serviceProcessFailed({error:e})})}serviceProcessCompleted(e,t){e=V.transformResult(e),t=t||1e3;var s=this;if(e)var r=setInterval(function(){Ae.get(s._processUrl(e.newResourceLocation),{_t:(new Date).getTime()}).then(function(e){return e.json()}).then(function(e){s.events.triggerEvent("processRunning",{id:e.id,state:e.state}),"LOST"!==e.state.runState&&"KILLED"!==e.state.runState&&"FAILED"!==e.state.runState||(clearInterval(r),s.events.triggerEvent("processFailed",{error:e.state.errorMsg,state:e.state.runState})),"FINISHED"===e.state.runState&&e.setting.serviceInfo&&(clearInterval(r),s.events.triggerEvent("processCompleted",{result:e}))}).catch(function(e){clearInterval(r),s.events.triggerEvent("processFailed",{error:e})})},t)}serviceProcessFailed(e){super.serviceProcessFailed(e)}_processUrl(e){return we.getToken(e)&&(e=V.urlAppend(e,"token="+we.getToken(e))),e}}e.ProcessingServiceBase=ht; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/buffers"),this.CLASS_NAME="SuperMap.BuffersAnalystJobsService"}destroy(){super.destroy()}getBuffersJobs(){super.getJobs(this.url)}getBuffersJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addBuffersJob(e,t){super.addJob(this.url,e,lt,t)}}e.BuffersAnalystJobsService=ut; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=!1,V.extend(this,e),this.CLASS_NAME="SuperMap.BurstPipelineAnalystParameters"}destroy(){this.sourceNodeIDs=null,this.edgeID=null,this.nodeID=null,this.isUncertainDirectionValid=null}}e.BurstPipelineAnalystParameters=ct; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends He{constructor(e,s){super(e,s),this.format=t.GEOJSON,this.CLASS_NAME="SuperMap.NetworkAnalystServiceBase"}destroy(){super.destroy(),this.format=null}serviceProcessCompleted(e){var s;(e=V.transformResult(e))&&this.format===t.GEOJSON&&"function"==typeof this.toGeoJSONResult&&(s=this.toGeoJSONResult(e)),s||(s=e),this.events.triggerEvent("processCompleted",{result:s})}toGeoJSONResult(e){return null}}e.NetworkAnalystServiceBase=pt; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.BurstPipelineAnalystService"}destroy(){super.destroy()}processAsync(e){if(!(e instanceof ct))return null;var t,s=this;if(s.url=V.urlPathAppend(s.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,s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}e.BurstPipelineAnalystService=dt; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.ChartFeatureInfoSpecsService"}destroy(){super.destroy(),V.reset(this)}processAsync(){var e=this;e.isTempLayers||V.urlPathAppend(e.url,"chartFeatureInfoSpecs"),e.request({method:"GET",params:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}e.ChartFeatureInfoSpecsService=mt; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){this.isQueryPoint=null,this.isQueryLine=null,this.isQueryRegion=null,this.attributeFilter=null,this.chartFeatureInfoSpecCode=null,V.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)+"}"}}e.ChartQueryFilterParameter=yt; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){this.queryMode=null,this.bounds=null,this.chartLayerNames=null,this.chartQueryFilterParameters=null,this.returnContent=!0,this.startRecord=0,this.expectCount=null,V.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=[],s=this.chartLayerNames.length,r=0;r0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(s+=","),s+=t[e];return s+="]"}}e.ComputeWeightMatrixService=_t; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{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,V.extend(this,t),this.CLASS_NAME="SuperMap.DataFlowService"}initBroadcast(){var e=this;return this.broadcastWebSocket=this._connect(V.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(V.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(){He.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 V.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 s=JSON.parse(e.data);e.featureResult=s,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=we.getToken(e);return t&&(e=V.urlAppend(e,"token="+t)),e}}e.DataFlowService=Tt; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.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,V.extend(this,e);var t=this.bounds;t&&(this.bounds=new Y(t.leftBottom.x,t.leftBottom.y,t.rightTop.x,t.rightTop.y)),this.CLASS_NAME="SuperMap.DatasetInfo"}destroy(){V.reset(this)}toServerJSONObject(){var e={};return(e=V.copyAttributes(e,this)).bounds&&e.bounds.toServerJSONObject&&(e.bounds=e.bounds.toServerJSONObject()),e}}e.DatasetInfo=Et; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.operation=x.UNION,e&&V.extend(this,e),this.CLASS_NAME="SuperMap.OverlayAnalystParameters"}destroy(){this.operation=null}}e.OverlayAnalystParameters=At; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends At{constructor(e){super(e),this.operateDataset=null,this.operateDatasetFields=[],this.operateDatasetFilter=new st,this.operateRegions=[],this.sourceDataset=null,this.sourceDatasetFields=[],this.sourceDatasetFilter=new st,this.tolerance=0,this.resultSetting=new $e,V.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,s=e.operateRegions,r=s.length;t0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.facilityPathList)return e;var t=new Se;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}}e.FindClosestFacilitiesService=$t; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.expectedSupplyCenterCount=null,this.isFromCenter=!1,this.supplyCenters=null,this.turnWeightField=null,this.weightName=null,V.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,s=e.supplyCenters,r=s.length;t0&&(t+=","),t+=V.toJSON(e[r]);return t+="]"}toGeoJSONResult(e){if(!e)return null;var t=new Se;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}e.FindLocationService=ts; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.centers=null,this.hasLeastTotalCost=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new xt,V.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)}}e.FindMTSPPathsParameters=ss; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindMTSPPathsService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ss){var t,s=this,r=s.getJson(e.isAnalyzeById,e.centers),i=s.getJson(e.isAnalyzeById,e.nodes);s.url=V.urlPathAppend(s.url,"mtsppath"),t={centers:r,nodes:i,parameter:V.toJSON(e.parameter),hasLeastTotalCost:e.hasLeastTotalCost},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.pathList)return null;var t=new Se;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}}e.FindMTSPPathsService=rs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){this.isAnalyzeById=!1,this.hasLeastEdgeCount=null,this.nodes=null,this.parameter=new xt,V.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)}}e.FindPathParameters=is; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof is){var t,s=this;s.url=V.urlPathAppend(s.url,"path"),t={hasLeastEdgeCount:e.hasLeastEdgeCount,parameter:V.toJSON(e.parameter),nodes:s.getJson(e.isAnalyzeById,e.nodes)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new Se;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}}e.FindPathService=as; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){this.isAnalyzeById=!1,this.isCenterMutuallyExclusive=!1,this.centers=null,this.isFromCenter=!1,this.weights=null,this.parameter=new xt,V.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)}}e.FindServiceAreasParameters=ns; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindServiceAreasService"}destroy(){super.destroy()}processAsync(e){if(e instanceof ns){var t,s=this;s.url=V.urlPathAppend(s.url,"servicearea"),t={isFromCenter:e.isFromCenter,isCenterMutuallyExclusive:e.isCenterMutuallyExclusive,parameter:V.toJSON(e.parameter),centers:s.getJson(e.isAnalyzeById,e.centers),weights:s.getJson(!0,e.weights)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJson(e,t){var s="[",r=t?t.length:0;if(!1===e)for(let e=0;e0&&(s+=","),s+='{"x":'+t[e].x+',"y":'+t[e].y+"}";else if(!0===e)for(let e=0;e0&&(s+=","),s+=t[e];return s+="]"}toGeoJSONResult(e){if(!e||!e.serviceAreaList)return e;var t=new Se;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}}e.FindServiceAreasService=os; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.endNodeAssigned=!1,this.isAnalyzeById=!1,this.nodes=null,this.parameter=new xt,V.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)}}e.FindTSPPathsParameters=ls; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.FindTSPPathsService"}destroy(){super.destroy()}processAsync(t){if(t instanceof ls){var s,r=this;r.url=V.urlPathAppend(r.url,"tsppath"),s={parameter:e.Util.toJSON(t.parameter),endNodeAssigned:t.endNodeAssigned,nodes:r.getNodesJson(t)},r.request({method:"GET",params:s,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}getNodesJson(e){var t,s,r,i,a="";if(!1===e.isAnalyzeById){for(t="[",s=0,r=(i=e.nodes).length;s0&&(t+=","),t+='{"x":'+i[s].x+',"y":'+i[s].y+"}";a+=t+="]"}else if(!0===e.isAnalyzeById){let t="[",s=e.nodes,r=s.length;for(let e=0;e0&&(t+=","),t+=s[e];a+=t+="]"}return a}toGeoJSONResult(e){if(!e||!e.tspPathList)return null;var t=new Se;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}}e.FindTSPPathsService=hs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{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&&V.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)}}e.GenerateSpatialDataParameters=us; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GenerateSpatialDataService"}destroy(){super.destroy()}processAsync(e){if(e instanceof us){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="datasets/"+e.routeTable+"/linearreferencing/generatespatialdata";return this.url=V.urlPathAppend(this.url,t),this.url=V.urlAppend(this.url,"returnContent=true"),V.toJSON(e)}}e.GenerateSpatialDataService=cs;e.GeoBoundingBoxQueryBuilderParameter= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 We{constructor(e){super(e),this.bounds=null,this.queryType=G.GEO_BOUNDING_BOX,this.CLASS_NAME="SuperMap.GeoBoundingBoxQueryBuilderParameter",V.extend(this,e)}destroy(){super.destroy(),this.bounds=null,this.queryType=null}};e.GeoHashGridAggParameter= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Ve{constructor(e){super(e),this.precision=5,this.aggType=B.GEOHASH_GRID,V.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),V.toJson(t)}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 At{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&&V.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 s in e)if("sourceGeometry"===s)t.sourceGeometry=ve.fromGeometry(e.sourceGeometry);else if("sourceGeometries"===s){for(var r=[],i=0;i=0;e--)this.points[e].destroy();this.points=null}}static toObject(e,t){for(var s in e)"clipRegion"===s?t.clipRegion=ve.fromGeometry(e.clipRegion):t[s]=e[s]}}e.GeometryThiessenAnalystParameters=ms;class ys extends He{constructor(e,t){(t=t||{}).EVENT_TYPES=["processCompleted","processFailed","processRunning"],super(e,t),this.CLASS_NAME="SuperMap.GeoprocessingService",this.headers={},this.crossOrigin=!0}getTools(){this._get(`${this.url}/list`)}getTool(e){this._get(`${this.url}/${e}`)}execute(e,t,s){const r={parameter:t=t||null,environment:s=s||null};this._get(`${this.url}/${e}/execute`,r)}submitJob(e,t,s){const r={parameter:t=t||null,environments:s=s||null};this.request({url:`${this.url}/${e}/jobs`,headers:{"Content-type":"application/json"},method:"POST",data:JSON.stringify(r),scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}waitForJobCompletion(e,t,s){const r=this,i=setInterval(function(){r._get(`${r.url}/${t}/jobs/${e}`,null,function(e){const t=e.state.runState;switch(s.statusCallback&&s.statusCallback(t),t){case"FINISHED":clearInterval(i),r.events.triggerEvent("processCompleted",{result:e});break;case"FAILED":case"CANCELED":clearInterval(i),r.events.triggerEvent("processFailed",{result:e})}})},s.interval)}getJobInfo(e,t){this._get(`${this.url}/${e}/jobs/${t}`)}cancelJob(e,t){this._get(`${this.url}/${e}/jobs/${t}/cancel`)}getJobs(e){let t=`${this.url}/jobs`;e&&(t=`${this.url}/${e}/jobs`),this._get(t)}getResults(e,t,s){let r=`${this.url}/${e}/jobs/${t}/results`;s&&(r=`${r}/${s}`),this._get(r)}_get(e,t,s,r){this.request({url:e,method:"GET",params:t,headers:{"Content-type":"application/json"},scope:this,success:s||this.serviceProcessCompleted,failure:r||this.serviceProcessFailed})}}e.GeoprocessingService=ys; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.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&&V.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}}e.GeoRelationAnalystParameters=fs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GeoRelationAnalystService"}destroy(){super.destroy()}processAsync(t){if(t instanceof fs){var s=this;s.url=V.urlPathAppend(s.url,"datasets/"+t.dataset+"/georelation");var r=e.Util.toJSON(t);s.url=V.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.GeoRelationAnalystService=gs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.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,V.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)}}e.GetFeaturesParametersBase=vs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 vs{constructor(e){super(e),this.getFeatureMode=Ss.getFeatureMode.BOUNDS,this.bounds=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=n.CONTAIN,V.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,s,r;return s={leftBottom:{x:e.bounds.left,y:e.bounds.bottom},rightTop:{x:e.bounds.right,y:e.bounds.top}},r={datasetNames:e.datasetNames,getFeatureMode:Ss.getFeatureMode.BOUNDS,bounds:s,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new st).name=e.datasetNames,t.fields=e.fields,r.queryParameter=t),e.attributeFilter&&(r.attributeFilter=e.attributeFilter,r.getFeatureMode=Ss.getFeatureMode.BOUNDS_ATTRIBUTEFILTER),e.maxFeatures&&!isNaN(e.maxFeatures)&&(r.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(r.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(r.targetPrj=e.targetPrj),V.toJSON(r)}}Ss.getFeatureMode={BOUNDS:"BOUNDS",BOUNDS_ATTRIBUTEFILTER:"BOUNDS_ATTRIBUTEFILTER"},e.GetFeaturesByBoundsParameters=Ss; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{constructor(e,s){super(e,s),s=s||{},this.returnContent=!0,this.fromIndex=0,this.toIndex=19,this.maxFeatures=null,this.format=t.GEOJSON,V.extend(this,s),this.url=V.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,s=this,r=!0;s.returnContent=e.returnContent,s.fromIndex=e.fromIndex,s.toIndex=e.toIndex,s.maxFeatures=e.maxFeatures,s.returnContent&&(s.url=V.urlAppend(s.url,"returnContent="+s.returnContent),r=!1),null!=s.fromIndex&&null!=s.toIndex&&!isNaN(s.fromIndex)&&!isNaN(s.toIndex)&&s.fromIndex>=0&&s.toIndex>=0&&!r&&(s.url=V.urlAppend(s.url,`fromIndex=${s.fromIndex}&toIndex=${s.toIndex}`)),e.returnCountOnly&&(s.url=V.urlAppend(s.url,"&returnCountOnly="+e.returnContent)),t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}serviceProcessCompleted(e){if(e=V.transformResult(e),this.format===t.GEOJSON&&e.features){var s=new Se;e.features=s.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}e.GetFeaturesServiceBase=bs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 bs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){return Ss.toJsonParameters(e)}}e.GetFeaturesByBoundsService=xs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends vs{constructor(e){super(e),this.bufferDistance=null,this.attributeFilter=null,this.geometry=null,this.fields=null,V.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,s,r;return r=ve.fromGeometry(e.geometry),s={datasetNames:e.datasetNames,getFeatureMode:"BUFFER",bufferDistance:e.bufferDistance,geometry:r},e.fields&&((t=new st).name=e.datasetNames,t.fields=e.fields,s.queryParameter=t),e.attributeFilter&&(s.attributeFilter=e.attributeFilter,s.getFeatureMode="BUFFER_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(s.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(s.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(s.targetPrj=e.targetPrj),V.toJSON(s)}}e.GetFeaturesByBufferParameters=Cs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends bs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByBufferService"}destroy(){super.destroy()}getJsonParameters(t){if(t instanceof Cs)return e.GetFeaturesByBufferParameters.toJsonParameters(t)}}e.GetFeaturesByBufferService=_s; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 vs{constructor(e){super(e),this.getFeatureMode="SPATIAL",this.geometry=null,this.fields=null,this.attributeFilter=null,this.spatialQueryMode=n.CONTAIN,V.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,s,r;return s=ve.fromGeometry(e.geometry),r={datasetNames:e.datasetNames,getFeatureMode:"SPATIAL",geometry:s,spatialQueryMode:e.spatialQueryMode},e.fields&&((t=new st).name=e.datasetNames,t.fields=e.fields,r.queryParameter=t),e.attributeFilter&&(r.attributeFilter=e.attributeFilter,r.getFeatureMode="SPATIAL_ATTRIBUTEFILTER"),e.maxFeatures&&!isNaN(e.maxFeatures)&&(r.maxFeatures=e.maxFeatures),e.targetEpsgCode&&(r.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(r.targetPrj=e.targetPrj),V.toJSON(r)}}e.GetFeaturesByGeometryParameters=Ts; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 bs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){return Ts.toJsonParameters(e)}}e.GetFeaturesByGeometryService=Es; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 vs{constructor(e){super(e),this.getFeatureMode="ID",this.IDs=null,this.fields=null,V.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,s;return t={datasetNames:e.datasetNames,getFeatureMode:"ID",ids:e.IDs},e.fields&&((s=new st).name=e.datasetNames,s.fields=e.fields,t.queryParameter=s),e.targetEpsgCode&&(t.targetEpsgCode=e.targetEpsgCode),!e.targetEpsgCode&&e.targetPrj&&(t.targetPrj=e.targetPrj),V.toJSON(t)}}e.GetFeaturesByIDsParameters=As; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 bs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesByIDsService"}destroy(){super.destroy()}getJsonParameters(e){return As.toJsonParameters(e)}}e.GetFeaturesByIDsService=ws; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 vs{constructor(e){super(e),this.getFeatureMode="SQL",this.queryParameter=null,V.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),V.toJSON(t)}}e.GetFeaturesBySQLParameters=Ls; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 bs{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.GetFeaturesBySQLService"}destroy(){super.destroy()}getJsonParameters(e){return Ls.toJsonParameters(e)}}e.GetFeaturesBySQLService=Ps; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{constructor(e,t){super(e,t),this.datasource=null,this.dataset=null,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.GetFieldsService"}destroy(){super.destroy();this.datasource=null,this.dataset=null}processAsync(){var e=this;e.url=V.urlPathAppend(e.url,`datasources/${e.datasource}/datasets/${e.dataset}/fields`),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}e.GetFieldsService=Os; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null,V.extend(this,e),this.CLASS_NAME="SuperMap.GetGridCellInfosParameters"}destroy(){this.datasetName=null,this.dataSourceName=null,this.X=null,this.Y=null}}e.GetGridCellInfosParameters=Ns; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{constructor(e,t){super(e,t),this.datasetName=null,this.dataSourceName=null,this.datasetType=null,this.X=null,this.Y=null,t&&V.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 Ns){V.extend(this,e);var t=this;t.url=V.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=V.transformResult(e),this.datasetType=e.datasetInfo.type,this.queryGridInfos()}queryGridInfos(){var e=this;e.url=V.urlPathAppend(e.url,"GRID"==e.datasetType?"gridValue":"imageValue"),null!=e.X&&null!=e.Y&&(e.url=V.urlAppend(e.url,`x=${e.X}&y=${e.Y}`)),e.queryRequest(e.serviceProcessCompleted,e.serviceProcessFailed)}getDatasetInfoFailed(e){this.serviceProcessFailed(e)}}e.GetGridCellInfosService=Ms;e.ThemeMemoryData= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(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),s=0;s0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e,t){if(!e)return this;this.memoryData=null,this.type=e,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.Theme"}destroy(){this.memoryData&&(this.memoryData.destroy(),this.memoryData=null),this.type=null}toServerJSONObject(){}}e.Theme=Is; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.align=f.BASELINECENTER,this.backColor=new me(255,255,255),this.foreColor=new me(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&&V.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 Fs(e);return V.copy(t,e),t.backColor=me.fromJson(e.backColor),t.foreColor=me.fromJson(e.foreColor),t}}e.ServerTextStyle=Fs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){this.caption=null,this.end=0,this.start=0,this.visible=!0,this.style=new Fs,e&&V.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 Rs;return V.copy(t,e),t}}}e.ThemeLabelItem=Rs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){this.caption=null,this.style=new ye,this.unique=null,this.visible=!0,e&&V.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=V.copyAttributes(e,this)).style&&e.style.toServerJSONObject&&(e.style=e.style.toServerJSONObject()),e}static fromObj(e){var t=new Ds;return V.copy(t,e),t.style=ye.fromJson(e.style),t}}e.ThemeUniqueItem=Ds; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){this.flowEnabled=!1,this.leaderLineDisplayed=!1,this.leaderLineStyle=new ye,e&&V.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 ks;return V.copy(t,e),t.leaderLineStyle=ye.fromJson(e.leaderLineStyle),t}}}e.ThemeFlow=ks; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.offsetFixed=!1,this.offsetX="0.0",this.offsetY="0.0",e&&V.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 Bs;return V.copy(t,e),t}}}e.ThemeOffset=Bs; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.defaultStyle=null,this.separator=null,this.separatorEnabled=!1,this.splitIndexes=null,this.styles=new Fs,e&&V.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,s=e.styles,r=s.length;t0)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=V.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],s=e.items.length,r=0;r0)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 er;V.copy(t,e);var s=e.items,r=s?s.length:0;t.items=[];for(var i=0;i0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(s,t),this.events.triggerEvent("processCompleted",{result:e[0]})}handleLayers(e,t){var s;if(e)for(var r=0;r0)this.handleLayers(t[r].subLayers.layers.length,t[r].subLayers.layers);else switch(t[r].ugcLayerType){case"THEME":(s=new ir).fromJson(t[r]),t[r]=s;break;case"GRID":(s=new ar).fromJson(t[r]),t[r]=s;break;case"IMAGE":(s=new nr).fromJson(t[r]),t[r]=s;break;case"VECTOR":(s=new or).fromJson(t[r]),t[r]=s}}}}e.GetLayersInfoService=lr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.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,V.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 s in e)if("inputPoints"===s&&"geometry"===e.InterpolationAnalystType){for(var r=[],i=0;i=200&&e.code<300||0==e.code||304===e.code,s=e.code&&t;!e.code||s?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}}e.MapService=vr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){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,V.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 s in e)if("dataset"!==s&&(t[s]=e[s]),"extractRegion"===s&&e[s]){for(var r=e[s].components[0].components,i={},a=[],n=r.length,o=0;o(e.fieldNames=i[r].fieldCaptions,e)),this.format===t.GEOJSON&&(i[r].features=s.toGeoJSON(i[r].features)));this.events.triggerEvent("processCompleted",{result:e})}getQueryParameters(e){return new gt({customParams:e.customParams,expectCount:e.expectCount,networkType:e.networkType,queryOption:e.queryOption,queryParams:e.queryParams,startRecord:e.startRecord,prjCoordSys:e.prjCoordSys,holdTime:e.holdTime})}}e.QueryService=wr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 wr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByBoundsService"}destroy(){super.destroy()}getJsonParameters(e){if(!(e instanceof Ar))return null;var t,s="",r=e.bounds;return t=this.getQueryParameters(e),s+="'queryMode':'BoundsQuery','queryParameters':",s+=V.toJSON(t),s="{"+(s+=",'bounds': {'rightTop':{'y':"+r.top+",'x':"+r.right+"},'leftBottom':{'y':"+r.bottom+",'x':"+r.left+"}}")+"}"}}e.QueryByBoundsService=Lr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 gt{constructor(e){e&&(super(e),this.distance=0,this.geometry=null,this.isNearest=null,this.returnContent=!0,V.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)}}e.QueryByDistanceParameters=Pr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends wr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByDistanceService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Pr){var t="",s=this.getQueryParameters(e),r=ve.fromGeometry(e.geometry);return t+=e.isNearest?"'queryMode':'FindNearest','queryParameters':":"'queryMode':'DistanceQuery','queryParameters':",t+=V.toJSON(s),t="{"+(t+=",'geometry':"+V.toJSON(r)+",'distance':"+e.distance)+"}"}}}e.QueryByDistanceService=Or; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 gt{constructor(e){e&&(super(e),this.returnContent=!0,this.geometry=null,this.spatialQueryMode=n.INTERSECT,V.extend(this,e),this.CLASS_NAME="SuperMap.QueryByGeometryParameters")}destroy(){super.destroy();this.returnContent=null,this.geometry=null,this.spatialQueryMode=null}}e.QueryByGeometryParameters=Nr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 wr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryByGeometryService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Nr){var t,s="",r=e.geometry,i=ve.fromGeometry(r);return t=this.getQueryParameters(e),s+="'queryMode':'SpatialQuery','queryParameters':",s="{"+(s+=V.toJSON(t)+",'geometry':"+V.toJSON(i)+",'spatialQueryMode':"+V.toJSON(e.spatialQueryMode))+"}"}}}e.QueryByGeometryService=Mr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 gt{constructor(e){e&&(super(e),this.returnContent=!0,V.extend(this,e),this.CLASS_NAME="SuperMap.QueryBySQLParameters")}destroy(){super.destroy();this.returnContent=null}}e.QueryBySQLParameters=Ir; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 wr{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.QueryBySQLService"}destroy(){super.destroy()}getJsonParameters(e){if(e instanceof Ir){var t,s="";return t=this.getQueryParameters(e),s+="'queryMode':'SqlQuery','queryParameters':",s="{"+(s+=V.toJSON(t))+"}"}}}e.QueryBySQLService=Fr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){if(!e)return this;this.sourceRoute=null,this.point=null,this.tolerance=null,this.isIgnoreGap=!1,V.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)}}e.RouteCalculateMeasureParameters=Rr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.RouteCalculateMeasureService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Rr){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){return this.url=V.urlPathAppend(this.url,"geometry/calculatemeasure"),this.url=V.urlAppend(this.url,"returnContent=true"),V.toJSON(e)}}e.RouteCalculateMeasureService=Dr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){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,s={};if(t&&t instanceof X&&t.components){s.type=t.type,s.parts=t.parts;for(var r=[],i=0,a=t.components.length;i0&&(s+='"subLayers":'+e.toJSON()),s+=',"visible":true,',s+='"name":"'+this.getMapName(this.mapUrl)+'"',s+="}]",t.request({method:"PUT",data:s,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}createTempLayerComplete(e){(e=V.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 s=t.lastIndexOf("/");return t.substring(s+1,t.length)}serviceProcessCompleted(e){null!=(e=V.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}e.SetLayerStatusService=Jr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){e&&(this.datasetName="",this.datasetQuery="",this.geometryQuery="",this.mode=n.CONTAIN,this.output=null,this.mappingParameters=null,V.extend(this,e),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsParameter")}destroy(){this.datasetName=null,this.datasetQuery=null,this.geometryQuery=null,this.mode=null,this.output instanceof nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.SingleObjectQueryJobsParameter=zr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/query"),this.CLASS_NAME="SuperMap.SingleObjectQueryJobsService"}destroy(){super.destroy()}getQueryJobs(){super.getJobs(this.url)}getQueryJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addQueryJob(e,t){super.addJob(this.url,e,zr,t)}}e.SingleObjectQueryJobsService=Wr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){e=e||{},this.keyWord=null,this.returnPosition=!1,V.extend(this,e),this.CLASS_NAME="SuperMap.StopQueryParameters"}destroy(){V.reset(this)}}e.StopQueryParameters=Vr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{constructor(e,t){super(e,t),t=t||{},V.extend(this,t),this.CLASS_NAME="SuperMap.StopQueryService"}destroy(){super.destroy(),V.reset(this)}processAsync(e){if(e instanceof Vr){var t=this;t.url=V.urlPathAppend(t.url,"stops/keyword/"+e.keyWord),t.request({method:"GET",params:{returnPosition:e.returnPosition},scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}e.StopQueryService=qr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){e&&(this.datasetName="",this.groupField="",this.attributeField="",this.statisticModes="",this.output=null,this.mappingParameters=null,V.extend(this,e),this.CLASS_NAME="SuperMap.SummaryAttributesJobsParameter")}destroy(){this.datasetName=null,this.groupField=null,this.attributeField=null,this.statisticModes=null,this.output instanceof nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.SummaryAttributesJobsParameter=Yr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/summaryattributes"),this.CLASS_NAME="SuperMap.SummaryAttributesJobsService"}destroy(){super.destroy()}getSummaryAttributesJobs(){super.getJobs(this.url)}getSummaryAttributesJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addSummaryAttributesJob(e,t){super.addJob(this.url,e,Yr,t)}}e.SummaryAttributesJobsService=Xr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){e&&(this.datasetName="",this.regionDataset="",this.query="",this.resolution=100,this.meshType=0,this.statisticModes=R.AVERAGE,this.fields="",this.type=D.SUMMARYMESH,this.output=null,this.mappingParameters=null,V.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 nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s?"output"!==s?("SUMMARYMESH"===e.type&&"regionDataset"!==s||"SUMMARYREGION"===e.type&&!r(["meshType","resolution","query"],s))&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s]);function r(e,t){for(var s=e.length;s--;)if(e[s]===t)return!0;return!1}}}e.SummaryMeshJobParameter=Qr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/aggregatepoints"),this.CLASS_NAME="SuperMap.SummaryMeshJobsService"}destroy(){super.destroy()}getSummaryMeshJobs(){super.getJobs(this.url)}getSummaryMeshJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addSummaryMeshJob(e,t){super.addJob(this.url,e,Qr,t)}}e.SummaryMeshJobsService=Kr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){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=F.METER,this.type=D.SUMMARYMESH,this.output=null,this.mappingParameters=null,V.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 nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"type"!==s&&"type"!==s?"output"!==s?("SUMMARYREGION"===e.type||"SUMMARYMESH"===e.type&&"regionDataset"!==s)&&(t.analyst=t.analyst||{},"query"===s&&e[s]?t.analyst[s]=e[s].toBBOX():t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):t.type=e[s]:(t.input=t.input||{},t.input[s]=e[s])}}e.SummaryRegionJobParameter=Zr; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/summaryregion"),this.CLASS_NAME="SuperMap.SummaryRegionJobsService"}destroy(){super.destroy()}getSummaryRegionJobs(){super.getJobs(this.url)}getSummaryRegionJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addSummaryRegionJob(e,t){super.addJob(this.url,e,Zr,t)}}e.SummaryRegionJobsService=$r; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){this.maxWeight=null,this.nodeID=null,this.resourceValue=null,this.type=null,e&&V.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 ei({maxWeight:e.maxWeight,nodeID:e.nodeID,resourceValue:e.resourceValue,type:e.type})}}e.SupplyCenter=ei; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.SurfaceAnalystService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Pt){var t,s=this;t=s.getJsonParameters(e),s.request({method:"POST",data:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}getJsonParameters(e){var t="",s={},r=this;if(e instanceof Ot)r.url=V.urlPathAppend(r.url,"datasets/"+e.dataset+"/"+e.surfaceAnalystMethod.toLowerCase()),Ot.toObject(e,s),t=V.toJSON(s);else{if(!(e instanceof ds))return;r.url=V.urlPathAppend(r.url,"geometry/"+e.surfaceAnalystMethod.toLowerCase()),t=V.toJSON(e)}return r.url=V.urlAppend(r.url,"returnContent=true"),t}}e.SurfaceAnalystService=ti; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){e&&(this.dataset=null,this.zFactor=1,this.averageCurvatureName=null,this.profileCurvatureName="",this.planCurvatureName="",this.deleteExistResultDataset=!1,V.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 s in e)"dataset"!==s&&(t[s]=e[s])}}e.TerrainCurvatureCalculationParameters=si; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Ye{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TerrainCurvatureCalculationService"}destroy(){super.destroy()}processAsync(t){var s=this,r={};t instanceof si&&(s.url=V.urlPathAppend(s.url,"datasets/"+t.dataset+"/terraincalculation/curvature")),si.toObject(t,r);var i=e.Util.toJSON(r);s.url=V.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:i,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}e.TerrainCurvatureCalculationService=ri; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.caption=null,this.color=new me,this.end=0,this.start=0,this.visible=!0,e&&V.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=V.copyAttributes(e,this)).color&&e.color.toServerJSONObject&&(e.color=e.color.toServerJSONObject()),e}static fromObj(e){if(e){var t=new ii;return V.copy(t,e),t.color=me.fromJson(e.color),t}}}e.ThemeGridRangeItem=ii; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends Is{constructor(e){super("GRIDRANGE",e),this.items=null,this.rangeMode=m.EQUALINTERVAL,this.rangeParameter=0,this.colorGradientType=y.YELLOW_RED,this.reverseColor=!1,e&&V.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 ai;V.copy(t,e);var s=e.items,r=s?s.length:0;t.items=[];for(var i=0;i0)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=V.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],s=e.items.length,r=0;r0&&(1===i.length?s+="'displayFilter':\""+i[0]+'",':s+="'displayFilter':\""+i[n]+'",'),(a=e.displayOrderBy)&&a.length>0&&(1===a.length?s+="'displayOrderBy':'"+a[0]+"',":s+="'displayOrderBy':'"+a[n]+"',"),(t=e.fieldValuesDisplayFilter)&&(s+="'fieldValuesDisplayFilter':"+V.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[n]&&(s+="'joinItems':["+V.toJSON(e.joinItems[n])+"],"),e.datasetNames&&e.dataSourceNames){var l=e.datasetNames[n]?n:e.datasetNames.length-1,h=e.dataSourceNames[n]?n:e.dataSourceNames.length-1;s+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[h]+"'}},"}else s+="},"}e.themes&&e.themes.length>0&&(s=s.substring(0,s.length-1)),s+="]},";var u=this.url.split("/");return s+="'name': '"+u[u.length-2]+"'}]"}}e.ThemeService=ui; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Ye{constructor(e,t){super(e,t),this.mode=null,t&&V.extend(this,t),this.CLASS_NAME="SuperMap.ThiessenAnalystService"}destroy(){super.destroy(),this.mode=null}processAsync(e){var t={},s=this;e instanceof Mt?(s.mode="datasets",s.url=V.urlPathAppend(s.url,"datasets/"+e.dataset+"/thiessenpolygon"),Mt.toObject(e,t)):e instanceof ms&&(s.mode="geometry",s.url=V.urlPathAppend(s.url,"geometry/thiessenpolygon"),ms.toObject(e,t));var r=V.toJSON(t);s.url=V.urlAppend(s.url,"returnContent=true"),s.request({method:"POST",data:r,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}e.ThiessenAnalystService=ci; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Ye{constructor(e,t){super(e,t),t&&V.extend(this,t),this.CLASS_NAME="SuperMap.GeometryBatchAnalystService"}processAsync(e){var t=this;t.url=V.urlPathAppend(t.url,"geometry/batchanalyst"),t.url=V.urlAppend(t.url,"returnContent=true&ignoreAnalystParam=true");var s=t._processParams(e),r=V.toJSON(s);t.request({method:"POST",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}_processParams(e){var t=this;if(V.isArray(e)){var s=[];return e.map(function(e){return s.push(t._toJSON(e)),e}),s}}_toJSON(e){var t={};if("buffer"===e.analystName)t.analystName="buffer",t.param={},it.toObject(e.param,t.param);else if("overlay"===e.analystName)t.analystName="overlay",t.param={},ps.toObject(e.param,t.param);else if("interpolationDensity"===e.analystName)t.analystName="interpolationDensity",t.param={},hr.toObject(e.param,t.param);else if("interpolationidw"===e.analystName)t.analystName="interpolationidw",t.param={},hr.toObject(e.param,t.param);else if("interpolationRBF"===e.analystName)t.analystName="interpolationRBF",t.param={},hr.toObject(e.param,t.param);else if("interpolationKriging"===e.analystName)t.analystName="interpolationKriging",t.param={},hr.toObject(e.param,t.param);else{if("thiessenpolygon"!==e.analystName)return e;t.analystName="thiessenpolygon",t.param={},ms.toObject(e.param,t.param)}return t}destroy(){super.destroy()}}e.GeometryBatchAnalystService=pi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TilesetsService"}destroy(){super.destroy()}processAsync(){if(this.url){var e=this;e.url=V.urlPathAppend(e.url,"tilesets"),e.request({method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}e.TilesetsService=di; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){e&&(this.datasetName="",this.datasetTopology="",this.tolerance="",this.rule=k.REGIONNOOVERLAP,this.output=null,this.mappingParameters=null,V.extend(this,e),this.CLASS_NAME="SuperMap.TopologyValidatorJobsParameter")}destroy(){this.datasetName=null,this.datasetTopology=null,this.tolerance=null,this.rule=null,this.output instanceof nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.TopologyValidatorJobsParameter=mi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/topologyvalidator"),this.CLASS_NAME="SuperMap.TopologyValidatorJobsService"}destroy(){super.destroy()}getTopologyValidatorJobs(){super.getJobs(this.url)}getTopologyValidatorJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addTopologyValidatorJob(e,t){super.addJob(this.url,e,mi,t)}}e.TopologyValidatorJobsService=yi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){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,V.extend(this,e),this.CLASS_NAME="SuperMap.TransferLine"}destroy(){V.reset(this)}static fromJson(e){if(e)return new fi({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})}}e.TransferLine=fi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){e=e||{},this.transferLines=null,this.points=null,V.extend(this,e),this.CLASS_NAME="SuperMap.TransferPathParameters"}destroy(){V.reset(this)}static toJson(e){if(e)return V.toJSON(e)}}e.TransferPathParameters=gi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferPathService"}destroy(){super.destroy()}processAsync(e){if(e instanceof gi){var t,s=this;s.url=V.urlPathAppend(s.url,"path"),t={points:V.toJSON(e.points),transferLines:V.toJSON(e.transferLines)},s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.TransferPathService=vi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){e=e||{},this.solutionCount=6,this.transferPreference=L.NONE,this.transferTactic=w.LESS_TIME,this.walkingRatio=null,this.points=!1,this.evadeLines=null,this.evadeStops=null,this.priorLines=null,this.priorStops=null,this.travelTime=null,V.extend(this,e),this.CLASS_NAME="SuperMap.TransferSolutionParameters"}destroy(){V.reset(this)}static toJson(e){if(e)return V.toJSON(e)}}e.TransferSolutionParameters=Si; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.TransferSolutionService"}destroy(){super.destroy()}processAsync(e){if(e instanceof Si){var t,s=this;s.url=V.urlPathAppend(s.url,"solutions"),t={points:V.toJSON(e.points),walkingRatio:e.walkingRatio,transferTactic:e.transferTactic,solutionCount:e.solutionCount,transferPreference:e.transferPreference},e.evadeLines&&(t.evadeLines=V.toJSON(e.evadeLines)),e.evadeStops&&(t.evadeStops=V.toJSON(e.evadeStops)),e.priorLines&&(t.priorLines=V.toJSON(e.priorLines)),e.priorStops&&(t.priorStops=V.toJSON(e.priorStops)),e.travelTime&&(t.travelTime=e.travelTime),s.request({method:"GET",params:t,scope:s,success:s.serviceProcessCompleted,failure:s.serviceProcessFailed})}}}e.TransferSolutionService=bi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){e&&(this.edgeId="",this.fromNodeId="",this.toNodeId="",this.weightField="",this.edgeWeight="",V.extend(this,e),this.CLASS_NAME="SuperMap.UpdateEdgeWeightParameters")}destroy(){this.edgeId=null,this.fromNodeId=null,this.toNodeId=null,this.weightField=null,this.edgeWeight=null}}e.UpdateEdgeWeightParameters=xi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateEdgeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof xi){var t=this,s=t.parse(e);t.url=V.urlPathAppend(t.url,s);var r=e.edgeWeight?e.edgeWeight:null;t.request({method:"PUT",scope:t,data:r,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var s in e)if(""!==e[s]&&"edgeWeight"!==e[s])switch(s){case"edgeId":t+="/edgeweight/"+e[s];break;case"fromNodeId":t+="/fromnode/"+e[s];break;case"toNodeId":t+="/tonode/"+e[s];break;case"weightField":t+="/weightfield/"+e[s]}return t}}}e.UpdateEdgeWeightService=Ci; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){e&&(this.nodeId="",this.fromEdgeId="",this.toEdgeId="",this.weightField="",this.turnNodeWeight="",V.extend(this,e),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightParameters")}destroy(){this.nodeId=null,this.fromEdgeId=null,this.toEdgeId=null,this.weightField=null,this.turnNodeWeight=null}}e.UpdateTurnNodeWeightParameters=_i; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 pt{constructor(e,t){super(e,t),this.CLASS_NAME="SuperMap.UpdateTurnNodeWeightService"}destroy(){super.destroy()}processAsync(e){if(e instanceof _i){var t=this,s=t.parse(e);t.url=V.urlPathAppend(t.url,s);var r=e.turnNodeWeight?e.turnNodeWeight:null;t.request({method:"PUT",scope:t,data:r,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}parse(e){if(e){var t="";for(var s in e)if(""!==e[s]&&"turnNodeWeight"!==e[s])switch(s){case"nodeId":t+="/turnnodeweight/"+e[s];break;case"fromEdgeId":t+="/fromedge/"+e[s];break;case"toEdgeId":t+="/toedge/"+e[s];break;case"weightField":t+="/weightfield/"+e[s]}return t}}}e.UpdateTurnNodeWeightService=Ti; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){e=e||{},this.datasetName="",this.datasetVectorClip="",this.geometryClip="",this.mode=M.CLIP,this.output=null,this.mappingParameters=null,V.extend(this,e),this.CLASS_NAME="SuperMap.VectorClipJobsParameter"}destroy(){this.datasetName=null,this.datasetVectorClip=null,this.geometryClip=null,this.mode=null,this.output instanceof nt&&(this.output.destroy(),this.output=null),this.mappingParameters instanceof ot&&(this.mappingParameters.destroy(),this.mappingParameters=null)}static toObject(e,t){for(var s in e)"datasetName"!==s?"output"!==s?(t.analyst=t.analyst||{},t.analyst[s]=e[s],"mappingParameters"===s&&(t.analyst[s]=t.analyst[s]||{},t.analyst.mappingParameters=e[s])):(t.output=t.output||{},t.output=e[s]):(t.input=t.input||{},t.input[s]=e[s])}}e.VectorClipJobsParameter=Ei; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends ht{constructor(e,t){super(e,t),this.url=V.urlPathAppend(this.url,"spatialanalyst/vectorclip"),this.CLASS_NAME="SuperMap.VectorClipJobsService"}destroy(){super.destroy()}getVectorClipJobs(){super.getJobs(this.url)}getVectorClipJob(e){super.getJobs(V.urlPathAppend(this.url,e))}addVectorClipJob(e,t){super.addJob(this.url,e,Ei,t)}}e.VectorClipJobsService=Ai; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){e=e||{},this.type=null,V.extend(this,e),this.CLASS_NAME="SuperMap.RasterFunctionParameter"}destroy(){this.type=null}}e.RasterFunctionParameter=wi;e.NDVIParameter= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 wi{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=U.NDVI,V.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}}};e.HillshadeParameter= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 wi{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.zFactor=1,this.type=U.HILLSHADE,V.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 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){this.name=null,this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobCustomItems",V.extend(this,e)}destroy(){this.name=null,this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={name:this.name};return this.title&&(e.title=this.title),this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),V.toJSON(e)}}e.WebPrintingJobCustomItems=Li; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){this.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobImage",V.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl&&(e.picAsUrl=this.picAsUrl),this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),V.toJSON(e)}}e.WebPrintingJobImage=Pi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){this.name=null,this.layerType=null,this.url=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayers",V.extend(this,e)}destroy(){this.name=null,this.layerType=null,this.url=null}}e.WebPrintingJobLayers=Oi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers=null,this.customItems=null,this.CLASS_NAME="SuperMap.WebPrintingJobLegendOptions",V.extend(this,e)}destroy(){this.title=null,this.picAsUrl=null,this.picAsBase64=null,this.layers instanceof Oi&&(this.layers.destroy(),this.layers=null),this.customItems instanceof Li&&(this.customItems.destroy(),this.customItems=null)}toJSON(){var e={title:this.title||""};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64?e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,""):this.customItems&&(e.customItems=this.customItems),V.toJSON(e)}}e.WebPrintingJobLegendOptions=Ni; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){this.center=null,this.scale=null,this.layerNames=null,this.image=null,this.layers=null,this.CLASS_NAME="SuperMap.WebPrintingJobLittleMapOptions",V.extend(this,e)}destroy(){this.center=null,this.scale=null,this.layerNames=null,this.image instanceof Pi&&(this.image.destroy(),this.image=null),this.layers instanceof Oi&&(this.layers.destroy(),this.layers=null)}toJSON(){var e={scale:this.scale,center:this.center};return this.layerNames?e.layerNames=this.layerNames:this.layers&&(e.layers=this.layers),this.image&&(e.image=this.image),V.toJSON(e)}}e.WebPrintingJobLittleMapOptions=Mi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.picAsUrl=null,this.picAsBase64=null,this.CLASS_NAME="SuperMap.WebPrintingJobNorthArrowOptions",V.extend(this,e)}destroy(){this.picAsUrl=null,this.picAsBase64=null}toJSON(){var e={};return this.picAsUrl?e.picAsUrl=this.picAsUrl:this.picAsBase64&&(e.picAsBase64=this.picAsBase64.replace(/^data:.+;base64,/,"")),V.toJSON(e)}}e.WebPrintingJobNorthArrowOptions=Ii; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null,this.CLASS_NAME="SuperMap.WebPrintingJobScaleBarOptions",V.extend(this,e)}destroy(){this.scaleText=null,this.orientation=null,this.type=null,this.intervals=null,this.unit=null}toJSON(){var e={scaleText:this.scaleText||"",type:this.type||"BAR",intervals:this.intervals||"",unit:this.unit||"METER"};return this.orientation&&(e.orientation=this.orientation),V.toJSON(e)}}e.WebPrintingJobScaleBarOptions=Fi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.type=null,this.url=null,this.token=null,this.value=null,this.CLASS_NAME="SuperMap.WebPrintingJobContent",V.extend(this,e)}destroy(){this.type="WEBMAP",this.url=null,this.token=null,this.value=null}toJSON(){var e={type:this.type};return this.token&&(e.token=this.token),this.url?e.url=this.url:this.value&&(e.value=this.value),V.toJSON(e)}}e.WebPrintingJobContent=Ri; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions=null,this.northArrowOptions=null,this.littleMapOptions=null,this.legendOptions=null,this.CLASS_NAME="SuperMap.WebPrintingJobLayoutOptions",V.extend(this,e)}destroy(){this.templateName=null,this.title=null,this.subTitle=null,this.author=null,this.copyright=null,this.scaleBarOptions instanceof Fi&&(this.scaleBarOptions.destroy(),this.scaleBarOptions=null),this.northArrowOptions instanceof Ii&&(this.northArrowOptions.destroy(),this.northArrowOptions=null),this.littleMapOptions instanceof Mi&&(this.littleMapOptions.destroy(),this.littleMapOptions=null),this.legendOptions instanceof Ni&&(this.legendOptions.destroy(),this.legendOptions=null)}toJSON(){var e={templateName:this.templateName,title:this.title,subTitle:this.subTitle,author:this.author,copyright:this.copyright};return this.scaleBarOptions&&(e.scaleBarOptions=this.scaleBarOptions),this.northArrowOptions&&(e.northArrowOptions=this.northArrowOptions),this.littleMapOptions&&(e.littleMapOptions=this.littleMapOptions),this.legendOptions&&(e.legendOptions=this.legendOptions),V.toJSON(e)}}e.WebPrintingJobLayoutOptions=Di; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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.format=null,this.dpi=96,this.scale=null,this.rotation=null,this.center=null,this.CLASS_NAME="SuperMap.WebPrintingJobExportOptions",V.extend(this,e)}destroy(){this.format=null,this.dpi=null,this.scale=null,this.rotation=null,this.center=null,this.outputSize=null}toJSON(){var e={format:this.format||"PDF",dpi:this.dpi,scale:this.scale,center:this.center};return this.rotation&&(e.rotation=this.rotation),this.outputSize&&(e.outputSize=this.outputSize),V.toJSON(e)}}e.WebPrintingJobExportOptions=ki;e.WebPrintingJobParameters= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(e){e&&(this.content=null,this.layoutOptions=null,this.exportOptions=null,V.extend(this,e),this.CLASS_NAME="SuperMap.WebPrintingJobParameters")}destroy(){this.content instanceof Ri&&(this.content.destroy(),this.content=null),this.layoutOptions instanceof Di&&(this.layoutOptions.destroy(),this.layoutOptions=null),this.exportOptions instanceof ki&&(this.exportOptions.destroy(),this.exportOptions=null)}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 He{constructor(e,t){super(e,t),t&&V.extend(this,t),this.CLASS_NAME="SuperMap.WebPrintingService",this.url}destroy(){super.destroy()}createWebPrintingJob(e){if(e){e.layoutOptions&&e.layoutOptions.legendOptions&&(!e.layoutOptions.legendOptions.title&&(e.layoutOptions.legendOptions.title=""),e.layoutOptions.legendOptions.picAsBase64=e.layoutOptions.legendOptions.picAsBase64&&e.layoutOptions.legendOptions.picAsBase64.replace(/^data:.+;base64,/,""),e.layoutOptions.legendOptions.customItems&&e.layoutOptions.legendOptions.customItems.hasOwnProperty("picAsBase64")&&(e.layoutOptions.legendOptions.customItems.picAsBase64=e.layoutOptions.legendOptions.customItems.picAsBase64.replace(/^data:.+;base64,/,"")));var t=this;t.request({url:t._processUrl("jobs"),method:"POST",data:V.toJSON(e),scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}getPrintingJob(e){var t=this,s=t._processUrl(`jobs/${e}`);t.request({url:s,method:"GET",scope:t,success:function(e){t.rollingProcess(e,s)},failure:t.serviceProcessFailed})}getPrintingJobResult(e){var t=this;t.request({url:t._processUrl(`jobs/${e}/result`),method:"GET",scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}getLayoutTemplates(){var e=this;e.request({url:e._processUrl("layouts"),method:"GET",scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}rollingProcess(e,t){var s=this;if(e)var r=setInterval(function(){s.request({url:t,method:"GET",scope:s,success:function(e){switch(e.status){case"FINISHED":clearInterval(r),s.serviceProcessCompleted(e);break;case"ERROR":clearInterval(r),s.serviceProcessFailed(e);break;case"RUNNING":s.events.triggerEvent("processRunning",e)}},failure:s.serviceProcessFailed})},1e3)}_processUrl(e){return e?V.urlPathAppend(this.url,e):this.url}}e.WebPrintingService=Bi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ e.ServiceStatus={DOES_NOT_INVOLVE:"DOES_NOT_INVOLVE",PUBLISH_FAILED:"PUBLISH_FAILED",PUBLISHED:"PUBLISHED",PUBLISHING:"PUBLISHING",UNPUBLISHED:"UNPUBLISHED",UNPUBLISHED_FAILED:"UNPUBLISHED_FAILED"},e.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"},e.DataItemOrderBy={FILENAME:"FILENAME",ID:"ID",LASTMODIFIEDTIME:"LASTMODIFIEDTIME",NICKNAME:"NICKNAME",SERVICESTATUS:"SERVICESTATUS",SIZE:"SIZE",STATUS:"STATUS",TYPE:"TYPE",UPDATETIME:"UPDATETIME",USERNAME:"USERNAME"},e.FilterField={LINKPAGE:"LINKPAGE",MAPTITLE:"MAPTITLE",NICKNAME:"NICKNAME",RESTITLE:"RESTITLE",USERNAME:"USERNAME"}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e){e=e||{},V.extend(this,e),this.serverType=r.ONLINE,this.CLASS_NAME="SuperMap.OnlineServiceBase"}request(e,t,s,r={}){return t=this.createCredentialUrl(t),r.crossOrigin=this.options.crossOrigin,r.headers=this.options.headers,Ae.commit(e,t,s,r).then(function(e){return e.json()})}createCredentialUrl(e){var t=e,s=this.getCredential();if(s){var r="key="+s,i=t.substring(t.length-1,t.length);t.indexOf("?")>-1&&"?"===i?t+=r:t.indexOf("?")>-1&&"?"!==i?t+="&"+r:t+="?"+r}return t}getCredential(){}}e.OnlineServiceBase=Gi; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends Gi{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,V.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){V.extend(e,t)})}}getPublishedServices(){return this.dataItemServices}getAuthorizeSetting(){return this.authorizeSetting}}e.OnlineData=Ui;e.Online= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(){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 Ae.get(this.rootUrl).then(function(e){return e})}login(){we.loginOnline(this.rootUrl,!0)}queryDatas(e){var t=this,s=t.mDatasUrl;return e&&(e=e.toJSON()),Ae.get(s,e).then(function(e){if(e&&e.content&&!(e.content.length<1)){for(var s=[],r=e.content,i=r.length,a=0;at.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),s})}_distance(e,t,s,r){return Math.sqrt((e-s)*(e-s)+(t-r)*(t-r))}_getMeterPerMapUnit(e){let t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(){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 s=e;if(e instanceof Array){s=[];for(var r=0,i=e.length;ra&&(a=e+o+100,r.width=a,s=!0),t+l>n&&(n=t+l+100,r.height=n,s=!0),e<-o&&(a+=o=100*Math.ceil(-e/100),r.width=a,s=!0),t<-l&&(n+=l=100*Math.ceil(-t/100),r.height=n,s=!0),s&&i.translate(o,l)}getPixelOffset(){return{x:this._offsetX,y:this._offsetY}}indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var s=0,r=e.length;s1)for(var i=0,a=r-1;i1?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 s=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=s[0],e[2]=s[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=[],s=0;return e.replace(/[\d.]+/g,function(e){s<3?e|=0:e=+e,t[s++]=e}),t}convert(e,t){if(!this.isCalculableColor(e))return e;var s=this.getData(e),r=s[3];return void 0===r&&(r=1),e.indexOf("hsb")>-1?s=this._HSV_2_RGB(s):e.indexOf("hsl")>-1&&(s=this._HSL_2_RGB(s)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?s=this._RGB_2_HSB(s):t.indexOf("hsl")>-1&&(s=this._RGB_2_HSL(s)),s[3]=r,this.toColor(s,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,s=(240&e)<<4,r=15&e;e="#"+((1<<24)+(t<<4)+t+(s<<4)+s+(r<<4)+r).toString(16).slice(1)}return e}lift(e,t){if(!this.isCalculableColor(e))return e;var s=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var r=this.getData(e),i=0;i<3;i++)r[i]=1===s?r[i]*(1-t)|0:(255-r[i])*t+r[i]|0;return"rgb("+r.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,s){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===s&&(s=.5);for(var r=2*(s=1-this.adjust(s,[0,1]))-1,i=this.getData(this.toRGBA(e)),a=this.getData(this.toRGBA(t)),n=i[3]-a[3],o=((r*n==-1?r:(r+n)/(1+r*n))+1)/2,l=1-o,h=[],u=0;u<3;u++)h[u]=i[u]*o+a[u]*l;var c=i[3]*s+a[3]*(1-s);return c=Math.max(0,Math.min(1,c)),1===i[3]&&1===a[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,s,r=(e=this.normalize(e)).match(this.colorRegExp);if(null===r)throw new Error("The color format error");var i,a=[];if(r[2])i=[(t=r[2].replace("#","").split(""))[0]+t[1],t[2]+t[3],t[4]+t[5]],a=this.map(i,function(e){return zi.prototype.adjust.call(this,parseInt(e,16),[0,255])});else if(r[4]){var n=r[4].split(",");s=n[3],i=n.slice(0,3),a=this.map(i,function(e){return e=Math.floor(e.indexOf("%")>0?2.55*parseInt(e,0):e),zi.prototype.adjust.call(this,e,[0,255])}),void 0!==s&&a.push(this.adjust(parseFloat(s),[0,1]))}else if(r[5]||r[6]){var o=(r[5]||r[6]).split(","),l=parseInt(o[0],0)/360,h=o[1],u=o[2];s=o[3],(a=this.map([h,u],function(e){return zi.prototype.adjust.call(this,parseFloat(e)/100,[0,1])})).unshift(l),void 0!==s&&a.push(this.adjust(parseFloat(s),[0,1]))}return a}alpha(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var s=this.getData(this.toRGBA(e));return s[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(s,"rgba")}map(e,t){if("function"!=typeof t)throw new TypeError;for(var s=e?e.length:0,r=0;r=t[1]&&(e=t[1]),e}isCalculableColor(e){return e instanceof Array||"string"==typeof e}_HSV_2_RGB(e){var t,s,r,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,s=255*n,r=255*n;else{var o=6*i;6===o&&(o=0);var l=0|o,h=n*(1-a),u=n*(1-a*(o-l)),c=n*(1-a*(1-(o-l))),p=0,d=0,m=0;0===l?(p=n,d=c,m=h):1===l?(p=u,d=n,m=h):2===l?(p=h,d=n,m=c):3===l?(p=h,d=u,m=n):4===l?(p=c,d=h,m=n):(p=n,d=h,m=u),t=255*p,s=255*d,r=255*m}return[t,s,r]}_HSL_2_RGB(e){var t,s,r,i=e[0],a=e[1],n=e[2];if(0===a)t=255*n,s=255*n,r=255*n;else{var o,l=2*n-(o=n<.5?n*(1+a):n+a-a*n);t=255*this._HUE_2_RGB(l,o,i+1/3),s=255*this._HUE_2_RGB(l,o,i),r=255*this._HUE_2_RGB(l,o,i-1/3)}return[t,s,r]}_HUE_2_RGB(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),6*s<1?e+6*(t-e)*s:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}_RGB_2_HSB(e){var t,s,r=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(r,i,a),o=Math.max(r,i,a),l=o-n,h=o;if(0===l)t=0,s=0;else{s=l/o;var u=((o-r)/6+l/2)/l,c=((o-i)/6+l/2)/l,p=((o-a)/6+l/2)/l;r===o?t=p-c:i===o?t=1/3+u-p:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,s*=100,h*=100]}_RGB_2_HSL(e){var t,s,r=e[0]/255,i=e[1]/255,a=e[2]/255,n=Math.min(r,i,a),o=Math.max(r,i,a),l=o-n,h=(o+n)/2;if(0===l)t=0,s=0;else{s=h<.5?l/(o+n):l/(2-o-n);var u=((o-r)/6+l/2)/l,c=((o-i)/6+l/2)/l,p=((o-a)/6+l/2)/l;r===o?t=p-c:i===o?t=1/3+u-p:a===o&&(t=2/3+c-u),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,s*=100,h*=100]}}var Wi=new zi;class Vi{static createCanvas(e,t){var s=document.createElement("canvas");return s.height=e,s.width=t,s.getContext("2d")}static getLinearGradient(e,t,s,r,i){this._ctx||(this._ctx=this.getContext());for(var a=this._ctx.createLinearGradient(e,t,s,r),n=i.length,o=1/(n-1),l=0,h=0;h=t)if("RANGE"===s)for(i=0;i=0&&this.getSqrtInterval(e,s)}if("logarithm"===t){return this.getMin(e)>0&&this.getGeometricProgression(e,s)}}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)}}e.ArrayStatistic=qi;var Yi=function(e){var t;if(e===l.METER)t=1;else if(e===l.DEGREE)t=2*Math.PI*6378137/360;else if(e===l.KILOMETER)t=.001;else if(e===l.INCH)t=1/.025399999918;else{if(e!==l.FOOT)return t;t=.3048}return t};function Xi(e,t=!0,s=!0,r=[-180,180]){var i=r[1],a=r[0],n=i-a;return e===i&&t?e:e===a&&s?e:0===((e-a)%n+n)%n&&t?i:((e-a)%n+n)%n+a}function Qi(e){const t=parseInt(e);let s=parseInt(60*(e-t)),r=parseInt(60*(60*(e-t)-s));return`${t}°${s=0===parseInt(s/10)?`0${s}`:s}'${r=0===parseInt(r/10)?`0${r}`:r}`} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms 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 Ki=s(52),Zi=s.n(Ki); /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{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(t){var s,r,i,a,n,o,l,h,u,c=this;function p(){a=l[i],n=r,h=r}function d(){l[i]=a,h=r=n}function m(){r>h&&(l[i]=l[i].slice(r-h),h=r)}function y(e){var t,a,n,o;if(e instanceof Function)return e.call(u.parsers);if("string"==typeof e)t=s.charAt(r)===e?e:null,a=1,m();else{if(m(),!(t=e.exec(l[i])))return null;a=t[0].length}if(t){var c=r+=a;for(o=r+l[i].length-a;r=0&&"\n"!==r.charAt(n);n--)e.column++;return new Error([e.filename,e.line,e.column,e.message].join(";"))}return this.env=t=t||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},u={parse:function(a){var n,u=null;if(r=i=h=o=0,l=[],s=a.replace(/\r\n/g,"\n"),t.filename&&(c.env.inputs[t.filename]=s),l=function(e){for(var t,r,i,a,n=0,o=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,h=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,c=0,p=e[0],d=0;d0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),u)throw f(u);var p=function(e,t){var s=e.specificity,r=t.specificity;return s[0]!=r[0]?r[0]-s[0]:s[1]!=r[1]?r[1]-s[1]:s[2]!=r[2]?r[2]-s[2]:r[3]-s[3]};return(n=new e.CartoCSS.Tree.Ruleset([],y(this.parsers.primary))).root=!0,n.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+f(t).message:e.errors.message=f(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(p),t},n},parsers:{primary:function(){for(var e,t=[];(e=y(this.rule)||y(this.ruleset)||y(this.comment))||y(/^[\s\n]+/)||(e=y(this.invalid));)e&&t.push(e);return t},invalid:function(){var t=y(/^[^;\n]*[;\n]/);if(t)return new e.CartoCSS.Tree.Invalid(t,n)},comment:function(){var t;if("/"===s.charAt(r))return"/"===s.charAt(r+1)?new e.CartoCSS.Tree.Comment(y(/^\/\/.*/),!0):(t=y(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new e.CartoCSS.Tree.Comment(t):void 0},entities:{quoted:function(){if('"'===s.charAt(r)||"'"===s.charAt(r)){var t=y(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return t?new e.CartoCSS.Tree.Quoted(t[1]||t[2]):void 0}},field:function(){if(y("[")){var t=y(/(^[^\]]+)/);if(y("]"))return t?new e.CartoCSS.Tree.Field(t[1]):void 0}},comparison:function(){var e=y(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var t=y(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(t)return new e.CartoCSS.Tree.Keyword(t)},call:function(){var t,s;if(t=/^([\w\-]+|%)\(/.exec(l[i])){if("url"===(t=t[1]))return null;r+=t.length;if(y("("),s=y(this.entities.arguments),y(")"))return t?new e.CartoCSS.Tree.Call(t,s,r):void 0}},arguments:function(){for(var e,t=[];e=y(this.expression);){t.push(e);if(!y(","))break}return t},literal:function(){return y(this.entities.dimension)||y(this.entities.keywordcolor)||y(this.entities.hexcolor)||y(this.entities.quoted)},url:function(){var t;if("u"===s.charAt(r)&&y(/^url\(/)){t=y(this.entities.quoted)||y(this.entities.variable)||y(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return y(")")?new e.CartoCSS.Tree.URL(void 0!==t.value||t instanceof e.CartoCSS.Tree.Variable?t:new e.CartoCSS.Tree.Quoted(t)):new e.CartoCSS.Tree.Invalid(t,n,"Missing closing ) in URL.")}},variable:function(){var i,a=r;if("@"===s.charAt(r)&&(i=y(/^@[\w-]+/)))return new e.CartoCSS.Tree.Variable(i,a,t.filename)},hexcolor:function(){var t;if("#"===s.charAt(r)&&(t=y(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.CartoCSS.Tree.Color(t[1])},keywordcolor:function(){var t=l[i].match(/^[a-z]+/);if(t&&t[0]in e.CartoCSS.Tree.Reference.data.colors)return new e.CartoCSS.Tree.Color(e.CartoCSS.Tree.Reference.data.colors[y(/^[a-z]+/)])},dimension:function(){var t=s.charCodeAt(r);if(!(t>57||t<45||47===t)){var i=y(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return i?new e.CartoCSS.Tree.Dimension(i[1],i[2],n):void 0}}},variable:function(){var e;if("@"===s.charAt(r)&&(e=y(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=y(this.entities.call)||y(this.entities.literal),t=y(this.entities.field)||y(this.entities.variable),s=y(this.entities.url)||y(this.entities.keyword);return e||t||s},end:function(){var e;return y(";")||("string"==typeof(e="}")?s.charAt(r)===e:!!e.test(l[i]))},element:function(){var t=y(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(t)return new e.CartoCSS.Tree.Element(t)},attachment:function(){var e=y(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var t,i,a,o,l,h=[],u=new e.CartoCSS.Tree.Filterset,c=[],p=0,d=0;(a=y(this.element))||(l=y(this.zoom))||(o=y(this.filter))||(t=y(this.attachment));){if(p++,a)h.push(a);else if(l)c.push(l),d++;else if(o){var m=u.add(o);if(m)throw f({message:m,index:r-1});d++}else{if(i)throw f({message:"Encountered second attachment name.",index:r-1});i=t}var g=s.charAt(r);if("{"===g||"}"===g||";"===g||","===g)break}if(p)return new e.CartoCSS.Tree.Selector(u,c,h,i,d,n)},filter:function(){p();var s,r,i;if(y("[")&&(s=y(/^[a-zA-Z0-9\-_]+/)||y(this.entities.quoted)||y(this.entities.variable)||y(this.entities.keyword)||y(this.entities.field))&&(s instanceof e.CartoCSS.Tree.Quoted&&(s=new e.CartoCSS.Tree.Field(s.toString())),(r=y(this.entities.comparison))&&(i=y(this.entities.quoted)||y(this.entities.variable)||y(this.entities.dimension)||y(this.entities.keyword)||y(this.entities.field)))){if(!y("]"))throw f({message:"Missing closing ] of filter.",index:n-1});return s.is||(s=new e.CartoCSS.Tree.Field(s)),new e.CartoCSS.Tree.Filter(s,r,i,n,t.filename)}},zoom:function(){p();var t,s;if(y(/^\[\s*zoom/g)&&(t=y(this.entities.comparison))&&(s=y(this.entities.variable)||y(this.entities.dimension))&&y("]"))return new e.CartoCSS.Tree.Zoom(t,s,n);d()},block:function(){var e;if(y("{")&&(e=y(this.primary))&&y("}"))return e},ruleset:function(){var t,s,r=[];for(p();t=y(this.selector);){for(r.push(t);y(this.comment););if(!y(","))break;for(;y(this.comment););}if(t)for(;y(this.comment););if(r.length>0&&(s=y(this.block))){if(1===r.length&&r[0].elements.length&&"Map"===r[0].elements[0].value){var i=new e.CartoCSS.Tree.Ruleset(r,s);return i.isMap=!0,i}return new e.CartoCSS.Tree.Ruleset(r,s)}d()},rule:function(){var i,a,l=s.charAt(r);if(p(),"."!==l&&"#"!==l&&(i=y(this.variable)||y(this.property))){if((a=y(this.value))&&y(this.end))return new e.CartoCSS.Tree.Rule(i,a,n,t.filename);o=r,d()}},font:function(){for(var t,s=[],r=[];t=y(this.entity);)r.push(t);if(s.push(new e.CartoCSS.Tree.Expression(r)),y(","))for(;(t=y(this.expression))&&(s.push(t),y(",")););return new e.CartoCSS.Tree.Value(s)},value:function(){for(var t,s=[];(t=y(this.expression))&&(s.push(t),y(",")););return s.length>1?new e.CartoCSS.Tree.Value(s.map(function(e){return e.value[0]})):1===s.length?new e.CartoCSS.Tree.Value(s):void 0},sub:function(){var e;if(y("(")&&(e=y(this.expression))&&y(")"))return e},multiplication:function(){var t,s,r,i;if(t=y(this.operand)){for(;(r=y("/")||y("*")||y("%"))&&(s=y(this.operand));)i=new e.CartoCSS.Tree.Operation(r,[i||t,s],n);return i||t}},addition:function(){var t,i,a,o;if(t=y(this.multiplication)){for(;(a=y(/^[-+]\s+/)||" "!=s.charAt(r-1)&&(y("+")||y("-")))&&(i=y(this.multiplication));)o=new e.CartoCSS.Tree.Operation(a,[o||t,i],n);return o||t}},operand:function(){return y(this.sub)||y(this.entity)},expression:function(){for(var t,s=[];t=y(this.addition)||y(this.entity);)s.push(t);if(s.length>0)return new e.CartoCSS.Tree.Expression(s)},property:function(){var e=y(/^(([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 s={},r=[];this._toShaders(s,r,t);for(var i=[],a={},n=0,o=t.length;n=0){if(!t.featureFilter){var a=i+r.length,n=s.indexOf(")",a+1),o="featureId&&(featureId"+s.substring(a,n)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!o}})}return{property:d,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+s+";} return _value; ")}}return{property:d,getValue:Function("attributes","zoom","var _value = null;"+s+"; return _value; ")}}(u[d],c);Object.defineProperty(c,"attachment",{configurable:!0,enumerable:!1,value:h}),Object.defineProperty(c,"elements",{configurable:!0,enumerable:!1,value:l.elements}),i.push(c),a[r[n]]=!0}Object.defineProperty(c,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return i}}return null}_toShaders(t,s,r){for(let i=0,a=r.length;i= 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"]}},$i.mapnik_reference={version:{latest:e._mapnik_reference_latest,"2.1.1":e._mapnik_reference_latest}},e.CartoCSS=$i,e.CartoCSS.Tree={},e.CartoCSS.Tree.operate=function(e,t,s){switch(e){case"+":return t+s;case"-":return t-s;case"*":return t*s;case"%":return t%s;case"/":return t/s}},e.CartoCSS.Tree.functions={rgb:function(e,t,s){return this.rgba(e,t,s,1)},rgba:function(t,s,r,i){var a=this,n=[t,s,r].map(function(e){return a.number(e)});return i=a.number(i),n.some(isNaN)||isNaN(i)?null:new e.CartoCSS.Tree.Color(n,i)},stop:function(e){var t,s;return arguments.length>1&&(t=arguments[1]),arguments.length>2&&(s=arguments[2]),{is:"tag",val:e,color:t,mode:s,toString:r=>'\n\t"}},hsl:function(e,t,s){return this.hsla(e,t,s,1)},hsla:function(e,t,s,r){if([e=this.number(e)%360/360,t=this.number(t),s=this.number(s),r=this.number(r)].some(isNaN))return null;var i=s<=.5?s*(t+1):s+t-s*t,a=2*s-i;return this.rgba(255*n(e+1/3),255*n(e),255*n(e-1/3),r);function n(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?a+(i-a)*e*6:2*e<1?i:3*e<2?a+(i-a)*(2/3-e)*6:a}},hue:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(t.toHSL().h)):null},saturation:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(100*t.toHSL().s),"%"):null},lightness:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(Math.round(100*t.toHSL().l),"%"):null},alpha:function(t){return"toHSL"in t?new e.CartoCSS.Tree.Dimension(t.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.s+=t.value/100,s.s=this.clamp(s.s),this.hsla_simple(s)},desaturate:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.s-=t.value/100,s.s=this.clamp(s.s),this.hsla_simple(s)},lighten:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.l+=t.value/100,s.l=this.clamp(s.l),this.hsla_simple(s)},darken:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.l-=t.value/100,s.l=this.clamp(s.l),this.hsla_simple(s)},fadein:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.a+=t.value/100,s.a=this.clamp(s.a),this.hsla_simple(s)},fadeout:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL();return s.a-=t.value/100,s.a=this.clamp(s.a),this.hsla_simple(s)},spin:function(e,t){if(!("toHSL"in e))return null;var s=e.toHSL(),r=(s.h+t.value)%360;return s.h=r<0?360+r:r,this.hsla_simple(s)},replace:function(e,t,s){return"field"===e.is?e.toString+".replace("+t.toString()+", "+s.toString()+")":e.replace(t,s)},mix:function(t,s,r){var i=r.value/100,a=2*i-1,n=t.toHSL().a-s.toHSL().a,o=((a*n==-1?a:(a+n)/(1+a*n))+1)/2,l=1-o,h=[t.rgb[0]*o+s.rgb[0]*l,t.rgb[1]*o+s.rgb[1]*l,t.rgb[2]*o+s.rgb[2]*l],u=t.alpha*i+s.alpha*(1-i);return new e.CartoCSS.Tree.Color(h,u)},greyscale:function(t){return this.desaturate(t,new e.CartoCSS.Tree.Dimension(100))},"%":function(t){for(var s=Array.prototype.slice.call(arguments,1),r=t.value,i=0;i.5?h/(2-n-o):h/(n+o),n){case s:e=(r-i)/h+(r=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 e.CartoCSS.Tree.Color([this.value,this.value,this.value])}round(){return this.value=Math.round(this.value),this}toString(){return this.value.toString()}operate(t,s,r){return"%"===this.unit&&"%"!==r.unit?(t.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===r.unit?"*"===s||"/"===s||"%"===s?(t.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new e.CartoCSS.Tree.Dimension(e.CartoCSS.Tree.operate(s,this.value,this.value*r.value*.01),this.unit):new e.CartoCSS.Tree.Dimension(e.CartoCSS.Tree.operate(s,this.value,r.value),this.unit||r.unit)}},e.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}},e.CartoCSS.Tree.Expression=class{constructor(e){this.is="expression",this.value=e}ev(t){return this.value.length>1?new e.CartoCSS.Tree.Expression(this.value.map(function(e){return e.ev(t)})):this.value[0].ev(t)}toString(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}},e.CartoCSS.Tree.Field=class{constructor(e){this.is="field",this.value=e||""}toString(){return'["'+this.value.toUpperCase()+'"]'}ev(){return this}},e.CartoCSS.Tree.Filter=class{constructor(e,t,s,r,i){this.ops={"<":[" < ","numeric"],">":[" > ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" <= ","numeric"],">=":[" >= ","numeric"],"=~":[".match(","string",")"]},this.key=e,this.op=t,this.val=s,this.index=r,this.filename=i,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+"]"}},e.CartoCSS.Tree.Filterset=class{constructor(){this.filters={}}toJS(e){function t(e){var t=e.op;"="===t&&(t="==");var s=e.val;void 0!==e._val&&(s=e._val.toString(!0)),e.key&&"scale"===e.key.value?s=+s:"string"!=typeof s&&"object"!=typeof s||(s="'"+s+"'");var r="attributes";return r+"&&"+r+e.key+"&&"+r+e.key+" "+t+s}var s=[];for(var r in this.filters)s.push(t(this.filters[r]));return s.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 t=new e.CartoCSS.Tree.Filterset;for(var s in this.filters)t.filters[s]=this.filters[s];return t}cloneWith(t){var s=[];for(var r in t.filters){var i=this.addable(t.filters[r]);if(!1===i)return!1;!0===i&&s.push(t.filters[r])}if(!s.length)return null;var a=new e.CartoCSS.Tree.Filterset;for(r in this.filters)a.filters[r]=this.filters[r];for(;r=s.shift();)a.add(r);return a}addable(e){var t=e.key.toString(),s=e.val.toString();switch(s.match(/^[0-9]+(\.[0-9]*)?_match/)&&(s=parseFloat(s)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==s&&null:void 0===this.filters[t+"!="+s]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val"]&&this.filters[t+">"].val>=s?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val":return t+"="in this.filters?!(this.filters[t+"="].val<=s)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=s)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val"]&&this.filters[t+">"].val>=s?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=s)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=s)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=s)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].vals)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=s)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>s)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=s?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=s)||null))}}conflict(e){var t=e.key.toString(),s=e.val.toString();return isNaN(parseFloat(s))||(s=parseFloat(s)),("="===e.op&&void 0!==this.filters[t+"="]&&s!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&s==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&s===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}add(e,t){var s,r=e.key.toString(),i=e.op,a=this.conflict(e);if(a)return a;if("="===i){for(var n in this.filters)this.filters[n].key===r&&delete this.filters[n];this.filters[r+"="]=e}else if("!="===i)this.filters[r+"!="+e.val]=e;else if("=~"===i)this.filters[r+"=~"+e.val]=e;else if(">"===i){for(var o in this.filters)this.filters[o].key===r&&this.filters[o].val<=e.val&&delete this.filters[o];this.filters[r+">"]=e}else if(">="===i){for(var l in this.filters)s=+this.filters[l].val.toString(),this.filters[l].key===r&&s",this.filters[r+">"]=e):this.filters[r+">="]=e}else if("<"===i){for(var h in this.filters)s=+this.filters[h].val.toString(),this.filters[h].key===r&&s>=e.val&&delete this.filters[h];this.filters[r+"<"]=e}else if("<="===i){for(var u in this.filters)s=+this.filters[u].val.toString(),this.filters[u].key===r&&s>e.val&&delete this.filters[u];void 0!==this.filters[r+"!="+e.val]?(delete this.filters[r+"!="+e.val],e.op="<",this.filters[r+"<"]=e):this.filters[r+"<="]=e}}},e.CartoCSS.Tree.Fontset=class{constructor(e,t){this.fonts=t,this.name="fontset-"+e.effects.length}},e.CartoCSS.Tree.Invalid=class{constructor(e,t,s){this.is="invalid",this.chunk=e,this.index=t,this.type="syntax",this.message=s||"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"}}},e.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}},e.CartoCSS.Tree.Literal=class{constructor(e){this.value=e||"",this.is="field"}toString(){return this.value}ev(){return this}},e.CartoCSS.Tree.Operation=class{constructor(e,t,s){this.is="operation",this.op=e.trim(),this.operands=t,this.index=s}ev(t){var s,r=this.operands[0].ev(t),i=this.operands[1].ev(t);return"undefined"===r.is||"undefined"===i.is?{is:"undefined",value:"undefined"}:(r instanceof e.CartoCSS.Tree.Dimension&&i instanceof e.CartoCSS.Tree.Color&&("*"===this.op||"+"===this.op?(s=i,i=r,r=s):t.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),r instanceof e.CartoCSS.Tree.Quoted&&i instanceof e.CartoCSS.Tree.Quoted&&"+"!==this.op?(t.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r instanceof e.CartoCSS.Tree.Field||i instanceof e.CartoCSS.Tree.Field||r instanceof e.CartoCSS.Tree.Literal||i instanceof e.CartoCSS.Tree.Literal?"color"===r.is||"color"===i.is?(t.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new e.CartoCSS.Tree.Literal(r.ev(t).toString(!0)+this.op+i.ev(t).toString(!0)):void 0===r.operate?(t.error({message:"Cannot do math with type "+r.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r.operate(t,this.op,i))}},e.CartoCSS.Tree.Quoted=class{constructor(e){this.is="string",this.value=e||""}toString(e){var t=this.value.replace(/&/g,"&"),s=t.replace(/\'/g,"\\'").replace(/\"/g,""").replace(//g,">");return!0===e?"'"+s+"'":t}ev(){return this}operate(t,s,r){return new e.CartoCSS.Tree.Quoted(e.CartoCSS.Tree.operate(s,this.toString(),r.toString(this.contains_field)))}},e.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 s in e.symbolizers)for(var r in e.symbolizers[s])e.symbolizers[s][r].hasOwnProperty("css")&&(t[e.symbolizers[s][r].css]=[e.symbolizers[s][r],s,r]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var s in e.symbolizers)for(var r in e.symbolizers[s])if("functions"===e.symbolizers[s][r].type)for(var i=0;i1?Array.prototype.push.apply(r,i.find(new e.CartoCSS.Tree.Selector(null,null,t.elements.slice(1)),s)):r.push(i);break}}),this._lookups[i]=r)}evZooms(t){for(var s=0;se.CartoCSS.Tree.Zoom.maxZoom||s<0)&&t.error({message:"Only zoom levels between 0 and "+e.CartoCSS.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+s,this;case">":this.zoom="zoom && zoom > "+s;break;case">=":this.zoom="zoom && zoom >= "+s;break;case"<":this.zoom="zoom && zoom < "+s;break;case"<=":this.zoom="zoom && zoom <= "+s;break;default:return this}return this}toString(){for(var t="",s=0;s<=e.CartoCSS.Tree.Zoom.maxZoom;s++)t+=this.zoom&1<3&&(t=Array.prototype.slice.call(t,1));for(var r=this._handlers[e],i=r.length,a=0;a4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var r=t[t.length-1],i=this._handlers[e],a=i.length,n=0;n-this.EPSILON&&ethis.EPSILON||e<-this.EPSILON}cubicAt(e,t,s,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*s)}cubicDerivativeAt(e,t,s,r,i){var a=1-i;return 3*(((t-e)*a+2*(s-t)*i)*a+(r-s)*i*i)}cubicRootAt(e,t,s,r,i,a){var n=r+3*(t-s)-e,o=3*(s-2*t+e),l=3*(t-e),h=e-i,u=o*o-3*n*l,c=o*l-9*n*h,p=l*l-3*o*h,d=0;if(this.isAroundZero(u)&&this.isAroundZero(c))if(this.isAroundZero(o))a[0]=0;else{let e=-l/o;e>=0&&e<=1&&(a[d++]=e)}else{var m=c*c-4*u*p;if(this.isAroundZero(m)){var y=c/u;let e=-o/n+y,t=-y/2;e>=0&&e<=1&&(a[d++]=e),t>=0&&t<=1&&(a[d++]=t)}else if(m>0){let e=Math.sqrt(m),t=u*o+1.5*n*(-c+e),s=u*o+1.5*n*(-c-e),r=(-o-((t=t<0?-Math.pow(-t,this.ONE_THIRD):Math.pow(t,this.ONE_THIRD))+(s=s<0?-Math.pow(-s,this.ONE_THIRD):Math.pow(s,this.ONE_THIRD))))/(3*n);r>=0&&r<=1&&(a[d++]=r)}else{var f=(2*u*o-3*n*c)/(2*Math.sqrt(u*u*u)),g=Math.acos(f)/3,v=Math.sqrt(u),S=Math.cos(g);let e=(-o-2*v*S)/(3*n),t=(-o+v*(S+this.THREE_SQRT*Math.sin(g)))/(3*n),s=(-o+v*(S-this.THREE_SQRT*Math.sin(g)))/(3*n);e>=0&&e<=1&&(a[d++]=e),t>=0&&t<=1&&(a[d++]=t),s>=0&&s<=1&&(a[d++]=s)}}return d}cubicExtrema(e,t,s,r,i){var a=6*s-12*t+6*e,n=9*t+3*r-3*e-9*s,o=3*t-3*e,l=0;if(this.isAroundZero(n)){if(this.isNotAroundZero(a)){let e=-o/a;e>=0&&e<=1&&(i[l++]=e)}}else{var h=a*a-4*n*o;if(this.isAroundZero(h))i[0]=-a/(2*n);else if(h>0){let e=Math.sqrt(h),t=(-a+e)/(2*n),s=(-a-e)/(2*n);t>=0&&t<=1&&(i[l++]=t),s>=0&&s<=1&&(i[l++]=s)}}return l}cubicSubdivide(e,t,s,r,i,a){var n=(t-e)*i+e,o=(s-t)*i+t,l=(r-s)*i+s,h=(o-n)*i+n,u=(l-o)*i+o,c=(u-h)*i+h;a[0]=e,a[1]=n,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=r}cubicProjectPoint(e,t,s,r,i,a,n,o,l,h,u){var c,p=this.vector.create(),d=this.vector.create(),m=this.vector.create(),y=.005,f=1/0;p[0]=l,p[1]=h;for(let l=0;l<1;l+=.05){d[0]=this.cubicAt(e,s,i,n,l),d[1]=this.cubicAt(t,r,a,o,l);let h=this.vector.distSquare(p,d);h=0&&u=0&&h<=1&&(i[l++]=h)}}else{var u=n*n-4*a*o;if(this.isAroundZero(u)){let e=-n/(2*a);e>=0&&e<=1&&(i[l++]=e)}else if(u>0){let e=Math.sqrt(u),t=(-n+e)/(2*a),s=(-n-e)/(2*a);t>=0&&t<=1&&(i[l++]=t),s>=0&&s<=1&&(i[l++]=s)}}return l}quadraticExtremum(e,t,s){var r=e+s-2*t;return 0===r?.5:(e-t)/r}quadraticProjectPoint(e,t,s,r,i,a,n,o,l){var h,u=this.vector.create(),c=this.vector.create(),p=this.vector.create(),d=.005,m=1/0;u[0]=n,u[1]=o;for(let n=0;n<1;n+=.05){c[0]=this.quadraticAt(e,s,i,n),c[1]=this.quadraticAt(t,r,a,n);let o=this.vector.distSquare(u,c);o=0&&la-2?a-1:p+1][0]+i[0],e[p>a-2?a-1:p+1][1]+i[1]],u=[e[p>a-3?a-1:p+2][0]+i[0],e[p>a-3?a-1:p+2][1]+i[1]]);let y=d*d,f=d*y;n.push([h(r[0],m[0],o[0],u[0],d,y,f),h(r[1],m[1],o[1],u[1],d,y,f)])}return n;function h(e,t,s,r,i,a,n){var o=.5*(s-e),l=.5*(r-t);return(2*(t-s)+o+l)*n+(-3*(t-s)-2*o-l)*a+o*i+t}}static SUtil_dashedLineTo(e,t,s,r,i,a,n){var o=[5,5];if(a="number"!=typeof a?5:a,e.setLineDash)return o[0]=a,o[1]=a,n&&n instanceof Array?e.setLineDash(n):e.setLineDash(o),e.moveTo(t,s),void e.lineTo(r,i);var l=r-t,h=i-s,u=Math.floor(Math.sqrt(l*l+h*h)/a);l/=u,h/=u;for(var c=!0,p=0;p0){for(var i=this.isInsidePolygon(t.pointList,u,c),a=e.holePolygonPointLists,n=!1,o=0,l=a.length;ot+o&&n>r+o||ne+o&&a>s+o||at+c&&u>r+c&&u>a+c&&u>o+c||ue+c&&h>s+c&&h>i+c&&h>n+c||ht+h&&l>r+h&&l>a+h||le+h&&o>s+h&&o>i+h||os||c+u=h)return!0;if(a){var p=r;r=this.normalizeRadian(i),i=this.normalizeRadian(p)}else r=this.normalizeRadian(r),i=this.normalizeRadian(i);r>i&&(i+=h);var d=Math.atan2(l,o);return d<0&&(d+=h),d>=r&&d<=i||d+h>=r&&d+h<=i}isInsideBrokenLine(e,t,s,r){for(var i=Math.max(t,10),a=0,n=e.length-1;as*s}isInsideRect(e,t,s,r,i,a){return i>=e&&i<=e+s&&a>=t&&a<=t+r}isInsideCircle(e,t,s,r,i){return(r-e)*(r-e)+(i-t)*(i-t)t&&a>r||ai?rt&&h>r&&h>a&&h>o||h1&&this.swapExtrema(),m=u.cubicAt(t,r,a,o,p[0]),g>1&&(y=u.cubicAt(t,r,a,o,p[1]))),2==g?St&&o>r&&o>a||o=0&&c<=1){var p=0,d=l.quadraticAt(t,r,a,c);for(let r=0;rn||(h[r]n?0:as||o<-s)return 0;let u=Math.sqrt(s*s-o*o);if(l[0]=-u,l[1]=u,Math.abs(r-i)>=h){r=0,i=h;var c=a?1:-1;return n>=l[0]+e&&n<=l[1]+e?c:0}if(a){let e=r;r=this.normalizeRadian(i),i=this.normalizeRadian(e)}else r=this.normalizeRadian(r),i=this.normalizeRadian(i);r>i&&(i+=h);var p=0;for(let t=0;t<2;t++){var d=l[t];if(d+e>n){let e=Math.atan2(o,d),t=a?1:-1;e<0&&(e=h+e),(e>=r&&e<=i||e+h>=r&&e+h<=i)&&(e>Math.PI/2&&e<1.5*Math.PI&&(t=-t),p+=t)}}return p}isInsidePath(e,t,s,r,i){for(var a=0,n=0,o=0,l=0,h=0,u=!0,c=!0,p="stroke"===(s=s||"fill")||"both"===s,d="fill"===s||"both"===s,m=0;m0&&(d&&(a+=this.windingLine(n,o,l,h,r,i)),0!==a))return!0;l=f[f.length-2],h=f[f.length-1],u=!1,c&&"A"!==y.command&&(c=!1,n=l,o=h)}switch(y.command){case"M":n=f[0],o=f[1];break;case"L":if(p&&this.isInsideLine(n,o,f[0],f[1],t,r,i))return!0;d&&(a+=this.windingLine(n,o,f[0],f[1],r,i)),n=f[0],o=f[1];break;case"C":if(p&&this.isInsideCubicStroke(n,o,f[0],f[1],f[2],f[3],f[4],f[5],t,r,i))return!0;d&&(a+=this.windingCubic(n,o,f[0],f[1],f[2],f[3],f[4],f[5],r,i)),n=f[4],o=f[5];break;case"Q":if(p&&this.isInsideQuadraticStroke(n,o,f[0],f[1],f[2],f[3],t,r,i))return!0;d&&(a+=this.windingQuadratic(n,o,f[0],f[1],f[2],f[3],r,i)),n=f[2],o=f[3];break;case"A":var g=f[0],v=f[1],S=f[2],b=f[3],x=f[4],C=f[5],_=Math.cos(x)*S+g,T=Math.sin(x)*b+v;c?(c=!1,l=_,h=T):a+=this.windingLine(n,o,_,T);var E=(r-g)*b/S+g;if(p&&this.isInsideArcStroke(g,v,b,x,x+C,1-f[7],t,E,i))return!0;d&&(a+=this.windingArc(g,v,b,x,x+C,1-f[7],E,i)),n=Math.cos(x+C)*S+g,o=Math.sin(x+C)*b+v;break;case"z":if(p&&this.isInsideLine(n,o,l,h,t,r,i))return!0;u=!0}}return d&&(a+=this.windingLine(n,o,l,h,r,i)),0!==a}getTextWidth(e,t){var s=e+":"+t;if(this._textWidthCache[s])return this._textWidthCache[s];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var r=0,i=0,a=(e=(e+"").split("\n")).length;ithis.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),r}getTextHeight(e,t){var s=e+":"+t;if(this._textHeightCache[s])return this._textHeightCache[s];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var r=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[s]=r,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),r}},da.Util_color=new zi,da.Util_computeBoundingBox=new /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(){3===arguments.length&&this.computeBoundingBox(arguments),this.CLASS_NAME="SuperMap.LevelRenderer.Tool.ComputeBoundingBox"}computeBoundingBox(e,t,s){if(0!==e.length){for(var r=e[0][0],i=e[0][0],a=e[0][1],n=e[0][1],o=1;oi&&(i=l[0]),l[1]n&&(n=l[1])}t[0]=r,t[1]=a,s[0]=i,s[1]=n}}cubeBezier(e,t,s,r,i,a){var n=new ca,o=[];n.cubicExtrema(e[0],t[0],s[0],r[0],o);for(let i=0;ii&&!a?i+=2*Math.PI:rr&&(c[0]=Math.cos(d)*s+e,c[1]=Math.sin(d)*s+t,l.min(n,c,n),l.max(o,c,o))}},da.Util_curve=new ca,da.Util_env=new /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Env";var e,t,s,r,i,a,n,o,l,h,u,c,p,d,m,y,f,g,v,S,b,x=this;return e=navigator.userAgent,t=x.os={},s=x.browser={},r=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),a=e.match(/(iPad).*OS\s([\d_]+)/),n=e.match(/(iPod)(.*OS\s([\d_]+))?/),o=!a&&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._]+)/),p=e.match(/(BlackBerry).*Version\/([\d.]+)/),d=e.match(/(BB10).*Version\/([\d.]+)/),m=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),y=e.match(/PlayBook/),f=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),g=e.match(/Firefox\/([\d.]+)/),v=e.match(/MSIE ([\d.]+)/),S=r&&e.match(/Mobile\//)&&!f,b=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!f,(s.webkit=!!r)&&(s.version=r[1]),i&&(t.android=!0,t.version=i[2]),o&&!n&&(t.ios=t.iphone=!0,t.version=o[2].replace(/_/g,".")),a&&(t.ios=t.ipad=!0,t.version=a[2].replace(/_/g,".")),n&&(t.ios=t.ipod=!0,t.version=n[3]?n[3].replace(/_/g,"."):null),l&&(t.webos=!0,t.version=l[2]),h&&(t.touchpad=!0),p&&(t.blackberry=!0,t.version=p[2]),d&&(t.bb10=!0,t.version=d[2]),m&&(t.rimtabletos=!0,t.version=m[2]),y&&(s.playbook=!0),u&&(t.kindle=!0,t.version=u[1]),c&&(s.silk=!0,s.version=c[1]),!c&&t.android&&e.match(/Kindle Fire/)&&(s.silk=!0),f&&(s.chrome=!0,s.version=f[1]),g&&(s.firefox=!0,s.version=g[1]),v&&(s.ie=!0,s.version=v[1]),S&&(e.match(/Safari/)||t.ios)&&(s.safari=!0),b&&(s.webview=!0),v&&(s.ie=!0,s.version=v[1]),t.tablet=!!(a||y||i&&!e.match(/Mobile/)||g&&e.match(/Tablet/)||v&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(i||o||l||p||d||f&&e.match(/Android/)||f&&e.match(/CriOS\/([\d.]+)/)||g&&e.match(/Mobile/)||v&&e.match(/Touch/))),{browser:s,os:t,canvasSupported:!!document.createElement("canvas").getContext}}destory(){return!0}},da.Util_event=new /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(){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}},da.Util_http=new /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(){this.CLASS_NAME="SuperMap.LevelRenderer.Tool.Http"}get(e,t,s){if("object"==typeof e){var r=e;e=r.url,t=r.onsuccess,s=r.onerror}var i=window.XMLHttpRequest?new XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP");i.open("GET",e,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status>=200&&i.status<300||304===i.status?t&&t(i.responseText):s&&s(),i.onreadystatechange=new Function,i=null)},i.send(null)}},da.Util_log=new /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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!==pa.debugMode)if(1==pa.debugMode)for(let e in arguments)throw new Error(arguments[e]);else if(pa.debugMode>1)for(let e in arguments)console.log(arguments[e])}}destory(){return!0}},da.Util_math=new /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(){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}},da.Util_matrix=new /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(){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,s){return e[0]=t[0]*s[0]+t[2]*s[1],e[1]=t[1]*s[0]+t[3]*s[1],e[2]=t[0]*s[2]+t[2]*s[3],e[3]=t[1]*s[2]+t[3]*s[3],e[4]=t[0]*s[4]+t[2]*s[5]+t[4],e[5]=t[1]*s[4]+t[3]*s[5]+t[5],e}translate(e,t,s){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+s[0],e[5]=t[5]+s[1],e}rotate(e,t,s){var r=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5],h=Math.sin(s),u=Math.cos(s);return e[0]=r*u+n*h,e[1]=-r*h+n*u,e[2]=i*u+o*h,e[3]=-i*h+u*o,e[4]=u*a+h*l,e[5]=u*l-h*a,e}scale(e,t,s){var r=s[0],i=s[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}invert(e,t){var s=t[0],r=t[2],i=t[4],a=t[1],n=t[3],o=t[5],l=s*n-a*r;return l?(l=1/l,e[0]=n*l,e[1]=-a*l,e[2]=-r*l,e[3]=s*l,e[4]=(r*o-n*i)*l,e[5]=(a*i-s*o)*l,e):null}mulVector(e,t,s){var r=t[0],i=t[2],a=t[4],n=t[1],o=t[3],l=t[5];return e[0]=s[0]*r+s[1]*i+a,e[1]=s[0]*n+s[1]*o+l,e}},da.Util=new Ji,da.Util_vector=new ua; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(){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=da.Util_vector.create(),function(t){this.transform||(this.transform=da.Util_matrix.create());var s=this.transform;function r(e){return e>-5e-5&&e<5e-5}da.Util_vector.sub(e,t,this.position),r(e[0])&&r(e[1])||(da.Util_vector.normalize(e,e),s[2]=e[0]*this.scale[1],s[3]=e[1]*this.scale[1],s[0]=e[1]*this.scale[0],s[1]=-e[0]*this.scale[0],s[4]=this.position[0],s[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||da.Util_matrix.create();if(da.Util_matrix.identity(t),this.needLocalTransform){if(s(this.scale[0])||s(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;let r=s(e[0])||s(e[1]);r&&da.Util_matrix.translate(t,t,e),da.Util_matrix.scale(t,t,this.scale),r&&(e[0]=-e[0],e[1]=-e[1],da.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 r=s(e[0])||s(e[1]);r&&da.Util_matrix.translate(t,t,e),da.Util_matrix.rotate(t,t,this.rotation[0]),r&&(e[0]=-e[0],e[1]=-e[1],da.Util_matrix.translate(t,t,e))}}else 0!==this.rotation&&da.Util_matrix.rotate(t,t,this.rotation);(s(this.position[0])||s(this.position[1]))&&da.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?da.Util_matrix.mul(this.transform,this.parent.transform,this.transform):da.Util_matrix.copy(this.transform,this.parent.transform))}function s(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],s=this.position,r=this.scale,i=this.rotation;n(t-1)&&(t=Math.sqrt(t));var a=e[2]*e[2]+e[3]*e[3];n(a-1)&&(a=Math.sqrt(a)),s[0]=e[4],s[1]=e[5],r[0]=t,r[1]=a,r[2]=r[3]=0,i[0]=Math.atan2(-e[1]/a,e[0]/t),i[1]=i[2]=0}function n(e){return e>5e-5||e<-5e-5}}} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(e.mixin(ha,ma)){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,V.extend(this,e),this.id=this.id||V.createUniqueID("smShape_"),this.CLASS_NAME="SuperMap.LevelRenderer.Shape",this.getTansform=(t=[],function(e,s){var r=[e,s];return this.needTransform&&this.transform&&(da.Util_matrix.invert(t,this.transform),da.Util_matrix.mulVector(r,t,[e,s,1]),e==r[0]&&s==r[1]&&this.updateNeedTransform()),r})}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 s=this.beforeBrush(e,t);switch(e.beginPath(),this.buildPath(e,s),s.brushType){case"both":this.setCtxGlobalAlpha(e,"fill",s),e.fill(),s.lineWidth>0&&(this.setCtxGlobalAlpha(e,"stroke",s),e.stroke()),this.setCtxGlobalAlpha(e,"reset",s);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",s),s.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",s);break;default:this.setCtxGlobalAlpha(e,"fill",s),e.fill(),this.setCtxGlobalAlpha(e,"reset",s)}this.drawText(e,s,this.style),this.afterBrush(e)}beforeBrush(e,t){var s=this.style;return this.brushTypeOnly&&(s.brushType=this.brushTypeOnly),t&&(s=this.getHighlightStyle(s,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(s.strokeColor=s.strokeColor||s.color),e.save(),this.doClip(e),this.setContext(e,s),this.setTransform(e),s}afterBrush(e){e.restore()}setContext(e,t){for(var s=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],r=0,i=s.length;r=r.x&&e<=r.x+r.width&&t>=r.y&&t<=r.y+r.height&&da.Util_area.isInside(this,this.style,e,t)}drawText(e,t,s){if(void 0!==t.text&&!1!==t.text){var r=t.textColor||t.color||t.strokeColor;e.fillStyle=r;var i,a,n,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=(s||t).__rect||this.getRect(s||t);switch(h){case"inside":n=c.x+c.width/2,o=c.y+c.height/2,i="center",a="middle","stroke"!=t.brushType&&r==t.color&&(e.fillStyle="#fff");break;case"left":n=c.x-l,o=c.y+c.height/2,i="end",a="middle";break;case"right":n=c.x+c.width+l,o=c.y+c.height/2,i="start",a="middle";break;case"top":n=c.x+c.width/2,o=c.y-l,i="center",a="bottom";break;case"bottom":n=c.x+c.width/2,o=c.y+c.height+l,i="center",a="top"}}break;case"start":case"end":var p=0,d=0,m=0,y=0;if(void 0!==t.pointList){var f=t.pointList;if(f.length<2)return;var g=f.length;switch(h){case"start":p=f[0][0]+u[0],d=f[1][0]+u[0],m=f[0][1]+u[1],y=f[1][1]+u[1];break;case"end":p=f[g-2][0]+u[0],d=f[g-1][0]+u[0],m=f[g-2][1]+u[1],y=f[g-1][1]+u[1]}}else p=t.xStart+u[0]||0,d=t.xEnd+u[0]||0,m=t.yStart+u[1]||0,y=t.yEnd+u[1]||0;switch(h){case"start":i=pr&&(r=l[0]),l[1]i&&(i=l[1]))}return e.__rect={x:t,y:s,width:r-t,height:i-s},e.__rect}getRectNoRotation(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=this.refOriginalPosition,r=da.Util_area.getTextHeight("ZH",e.textFont),i=da.Util_area.getTextWidth(e.text,e.textFont),a=da.Util_area.getTextHeight(e.text,e.textFont),n=e.x+s[0];"end"==e.textAlign||"right"==e.textAlign?n-=i:"center"==e.textAlign&&(n-=i/2),t="top"==e.textBaseline?e.y+s[1]:"bottom"==e.textBaseline?e.y+s[1]-a:e.y+s[1]-a/2;var o,l=!1;if(e.maxWidth){var h=parseInt(e.maxWidth);h-1&&(i+=!0===l?r/3*(i/o):r/3));return{x:n,y:t,width:i,height:a}}getTextBackground(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var r=this.getRectNoRotation(e),i=e.x+s[0],a=e.y+s[1],n=[];if(e.textRotation&&0!==e.textRotation){let t=e.textRotation,s=this.getRotatedLocation(r.x,r.y,i,a,t),o=this.getRotatedLocation(r.x+r.width,r.y,i,a,t),l=this.getRotatedLocation(r.x+r.width,r.y+r.height,i,a,t),h=this.getRotatedLocation(r.x,r.y+r.height,i,a,t);n.push(s),n.push(o),n.push(l),n.push(h)}else{let e=[r.x,r.y],t=[r.x+r.width,r.y],s=[r.x+r.width,r.y+r.height],i=[r.x,r.y+r.height];n.push(e),n.push(t),n.push(s),n.push(i)}return e.__textBackground=n,e.__textBackground}getRotatedLocation(e,t,s,r,i){var a,n,o=new Array;return t=-t,r=-r,i=-i,a=(e-s)*Math.cos(i/180*Math.PI)-(t-r)*Math.sin(i/180*Math.PI)+s,n=(e-s)*Math.sin(i/180*Math.PI)+(t-r)*Math.cos(i/180*Math.PI)+r,o[0]=a,o[1]=-n,o}} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 ya{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 s=this.refOriginalPosition,r=t.x+s[0],i=t.y+s[1];return e.moveTo(r+t.r,i),e.arc(r,i,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,s=this.refOriginalPosition,r=e.x+s[0],i=e.y+s[1],a=e.r;return t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(r-a-t/2),y:Math.round(i-a-t/2),width:2*a+t,height:2*a+t},e.__rect}} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 ya{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 s=this.style;t&&(s=this.getHighlightStyle(s,this.highlightStyle||{})),e.save(),this.setContext(e,s),this.setTransform(e);var r=!1;"fill"!=s.brushType&&"both"!=s.brushType&&void 0!==s.brushType||(e.beginPath(),"dashed"==s.lineType||"dotted"==s.lineType||"dot"==s.lineType||"dash"==s.lineType||"dashdot"==s.lineType||"longdash"==s.lineType||"longdashdot"==s.lineType?this.buildPath(e,{lineType:"solid",lineWidth:s.lineWidth,pointList:s.pointList}):(this.buildPath(e,s),r=!0),e.closePath(),this.setCtxGlobalAlpha(e,"fill",s),e.fill(),this.setCtxGlobalAlpha(e,"reset",s)),s.lineWidth>0&&("stroke"==s.brushType||"both"==s.brushType)&&(r||(e.beginPath(),this.buildPath(e,s)),this.setCtxGlobalAlpha(e,"stroke",s),e.stroke(),this.setCtxGlobalAlpha(e,"reset",s)),this.drawText(e,s,this.style);var i=V.cloneObject(s);if(i.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var a=this.holePolygonPointLists,n=a.length,o=0;o0&&("stroke"==i.brushType||"both"==i.brushType)?(r||(e.beginPath(),this.buildPath(e,i)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",i),e.stroke(),this.setCtxGlobalAlpha(e,"reset",i)):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 s=this.refOriginalPosition,r=t.pointList;if(!(r.length<2))if(t.smooth&&"spline"!==t.smooth){var i,a,n,o=da.SUtil_smoothBezier(r,t.smooth,!0,t.smoothConstraint,s);e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(var l=r.length,h=0;ha&&(a=l[h][0]+s[0]),l[h][1]+s[1]o&&(o=l[h][1]+s[1]);return r="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(i-r/2),y:Math.round(n-r/2),width:a-i+r,height:o-n+r},e.__rect}} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends ya{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 s=this.refOriginalPosition,r=t.pointList;if(!(r.length<2)){var i=Math.min(t.pointList.length,Math.round(t.pointListLength||t.pointList.length));if(t.smooth&&"spline"!==t.smooth){var a,n,o,l=da.SUtil_smoothBezier(r,t.smooth,!1,t.smoothConstraint,s);e.moveTo(r[0][0]+s[0],r[0][1]+s[1]);for(let t=0;tu&&(s*=u/(n=s+r),r*=u/n),i+a>u&&(i*=u/(n=i+a),a*=u/n),r+i>c&&(r*=c/(n=r+i),i*=c/n),s+a>c&&(s*=c/(n=s+a),a*=c/n),e.moveTo(l+s,h),e.lineTo(l+u-r,h),0!==r&&e.quadraticCurveTo(l+u,h,l+u,h+r),e.lineTo(l+u,h+c-i),0!==i&&e.quadraticCurveTo(l+u,h+c,l+u-i,h+c),e.lineTo(l+a,h+c),0!==a&&e.quadraticCurveTo(l,h+c,l,h+c-a),e.lineTo(l,h+s),0!==s&&e.quadraticCurveTo(l,h,l+s,h)}buildPath(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var s=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+s[0],t.y+s[1]),e.lineTo(t.x+s[0]+t.width,t.y+s[1]),e.lineTo(t.x+s[0]+t.width,t.y+s[1]+t.height),e.lineTo(t.x+s[0],t.y+s[1]+t.height),e.lineTo(t.x+s[0],t.y+s[1])),e.closePath()}getRect(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,s=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+s[0]-t/2),y:Math.round(e.y+s[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends ya{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 s=this.refOriginalPosition,r=t.x+s[0],i=t.y+s[1],a=t.r0||0,n=t.r,o=t.startAngle,l=t.endAngle,h=t.clockWise||!1;o=da.Util_math.degreeToRadian(o),l=da.Util_math.degreeToRadian(l),h||(o=-o,l=-l);var u=da.Util_math.cos(o),c=da.Util_math.sin(o);e.moveTo(u*a+r,c*a+i),e.lineTo(u*n+r,c*n+i),e.arc(r,i,n,o,l,!h),e.lineTo(da.Util_math.cos(l)*a+r,da.Util_math.sin(l)*a+i),0!==a&&e.arc(r,i,a,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,s=da.Util_vector.create(),r=da.Util_vector.create(),i=da.Util_vector.create(),a=da.Util_vector.create(),n=e.x+t[0],o=e.y+t[1],l=e.r0||0,h=e.r,u=da.Util_math.degreeToRadian(e.startAngle),c=da.Util_math.degreeToRadian(e.endAngle),p=e.clockWise;return p||(u=-u,c=-c),l>1?da.Util_computeBoundingBox.arc(n,o,l,u,c,!p,s,i):(s[0]=i[0]=n,s[1]=i[1]=o),da.Util_computeBoundingBox.arc(n,o,h,u,c,!p,r,a),da.Util_vector.min(s,s,r),da.Util_vector.max(i,i,a),e.__rect={x:s[0],y:s[1],width:i[0]-s[0],height:i[1]-s[1]},e.__rect}} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){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 ta){let e=new Object;e.x=t.x,e.y=t.y,e.r=t.r,e=V.copyAttributesWithClip(e,t.style,["x","y"]);let s=new fa;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","style","highlightStyle"]),s}if(t instanceof sa){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=V.copyAttributesWithClip(e,t.style,["pointList"]);let s=new ba;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["pointList","style","highlightStyle"]),s}if(t instanceof ra){if(!t.pointList)return null;let e=new Object;e.pointList=t.pointList,e=V.copyAttributesWithClip(e,t.style,["pointList"]);let s=new Sa;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["pointList","style","highlightStyle"]),s}if(t instanceof ia){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=V.copyAttributesWithClip(e,t.style,["x","y","width","height"]);let s=new Ca;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","width","height","style","highlightStyle"]),s}if(t instanceof aa){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=V.copyAttributesWithClip(e,t.style,["x","y","r","startAngle","endAngle","r0","endAngle"]);let s=new _a;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","r","startAngle","endAngle","r0","endAngle","style","highlightStyle"]),s}if(t instanceof na){let e=new Object;e.x=t.x,e.y=t.y,e.text=t.text,e=V.copyAttributesWithClip(e,t.style,["x","y","text"]);let s=new ga;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","text","style","highlightStyle"]),s}if(t instanceof oa){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=V.copyAttributesWithClip(e,t.style,["x","y","image","width","height","sx","sy","sWidth","sHeight"]);let s=new xa;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","image","width","height","style","highlightStyle"]),s}if(t instanceof la){let e=new Object;e.x=t.x,e.r=t.r,e.y=t.y,e=V.copyAttributesWithClip(e,t.style,["x","y","r"]);let s=new va;return s.style=Ta.transformStyle(e),s.highlightStyle=Ta.transformStyle(t.highlightStyle),V.copyAttributesWithClip(s,t,["x","y","r","style","highlightStyle","lineWidth","text","textPosition"]),s}return null}static transformStyle(e){var t={},s=["normal","normal","normal","12","arial,sans-serif"],r=[!0,!1];for(var i in e)switch(i){case"fill":r[0]=e[i];break;case"fillColor":t.color=e[i];break;case"stroke":r[1]=e[i];break;case"strokeWidth":t.lineWidth=e[i];break;case"strokeLinecap":t.lineCap=e[i];break;case"strokeLineJoin":t.lineJoin=e[i];break;case"strokeDashstyle":t.lineType=e[i];break;case"pointRadius":t.r=e[i];break;case"label":t.text=e[i];break;case"labelRect":t.labelRect=e[i];break;case"fontColor":t.textColor=e[i];break;case"fontStyle":s[0]=e[i];break;case"fontVariant":s[1]=e[i];break;case"fontWeight":s[2]=e[i];break;case"fontSize":var a="";e[i]&&e[i].toString().indexOf("px")<0&&(a="px"),s[3]=e[i]+a;break;case"fontFamily":s[4]=e[i];break;case"fontOpacity":t.opacity=e[i];break;case"labelPosition":t.textPosition=e[i];break;case"labelAlign":t.textAlign=e[i];break;case"labelBaseline":t.textBaseline=e[i];break;case"labelRotation":t.textRotation=e[i];break;default:t[i]=e[i]}return t.textFont=s.join(" "),!0===r[0]&&!1===r[1]?t.brushType="fill":!1===r[0]&&!0===r[1]?t.brushType="stroke":!0===r[0]&&!0===r[1]?t.brushType="both":t.brushType="fill",null==t.lineWidth&&(t.lineWidth=1),t}static Background(e,t,s){var r=s||{},i=new ia(t[0],t[3],Math.abs(t[2]-t[0]),Math.abs(t[3]-t[1]));return i.style={fillColor:"#f3f3f3"},r.backgroundStyle&&V.copyAttributesWithClip(i.style,r.backgroundStyle),r.backgroundRadius&&(i.style.radius=r.backgroundRadius),i.clickable=!1,i.hoverable=!1,e.createShape(i)}static GraphAxis(e,t,s,r){var i=t,a=s||{},n=[],o=[],l=!!a.useXReferenceLine&&a.useXReferenceLine,h=a.axisYTick&&!isNaN(a.axisYTick)?a.axisYTick:0,u=[],c=[];if(0==h){if(c.push([i[0],i[3]-5]),c.push([i[0],i[1]]),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){let e=parseInt(a.axis3DParameter),t=[i[0]-e,i[1]+e];a.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([i[0],i[1]])}c.push([i[2]+5,i[1]])}else{var p=Math.abs(i[1]-i[3])/h,d=i[3];c.push([i[0],d-5]);for(var m=0;m=15){let e=parseInt(a.axis3DParameter),t=[i[0]-e,i[1]+e];a.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([i[0],i[1]])}c.push([i[2]+5,i[1]])}if(a.axisUseArrow){var f=[[i[2]+5,i[1]+4],[i[2]+13,i[1]],[i[2]+5,i[1]-4]],g=[[i[0]-4,i[3]-5],[i[0],i[3]-13],[i[0]+4,i[3]-5]],v=new ra(f);v.style={fillColor:"#008acd"},V.copyAttributesWithClip(v.style,a.axisStyle),o.push(e.createShape(v));var S=new ra(g);if(S.style={fillColor:"#008acd"},V.copyAttributesWithClip(S.style,a.axisStyle),o.push(e.createShape(S)),a.axis3DParameter&&!isNaN(a.axis3DParameter)&&a.axis3DParameter>=15){var b=new ra(u);b.style={fillColor:"#008acd"},V.copyAttributesWithClip(b.style,a.axisStyle),o.push(e.createShape(b))}}var x=new sa(c);x.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},a.axisStyle&&V.copyAttributesWithClip(x.style,a.axisStyle),x.clickable=!1,x.hoverable=!1;var C=[e.createShape(x)],_=[];if(a.axisYLabels&&a.axisYLabels.length&&a.axisYLabels.length>0){var T=a.axisYLabels;let t=T.length;var E=[0,0];if(a.axisYLabelsOffset&&a.axisYLabelsOffset.length&&(E=a.axisYLabelsOffset),1==t){let t=new na(i[0]-5+E[0],i[3]+E[1],T[0]);t.style={labelAlign:"right"},a.axisYLabelsStyle&&V.copyAttributesWithClip(t.style,a.axisYLabelsStyle),t.clickable=!1,t.hoverable=!1,_.push(e.createShape(t))}else for(var A=i[3],w=Math.abs(i[1]-i[3])/(t-1),L=0;L0){let t=a.axisXLabels,s=t.length,n=[0,0];if(a.axisXLabelsOffset&&a.axisXLabelsOffset.length&&(n=a.axisXLabelsOffset),r&&r.xPositions&&r.xPositions.length&&r.xPositions.length==s){let o=r.xPositions;for(let r=0;r=0&&s[i]&&V.copyAttributesWithClip(n,s[i]),r&&r.length&&void 0!==a)for(var o=r,l=o.length,h=parseFloat(a),u=0;u=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]-n[0],this.DVBOrigonPoint[1]-n[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 s=this.width,r=this.height,i=this.location;return this.chartBounds=new Y(i[0]-s/2,i[1]+r/2,i[0]+s/2,i[1]-r/2),this.resetLinearGradient(),i}resetLinearGradient(){}shapesConvertToRelativeCoordinate(){for(var e=this.shapes,t=this.location,s=0,r=e.length;s=0?r.push(parseFloat(i[n].toString()).toFixed(s)):r.push(parseFloat(i[n].toString()))}catch(e){throw new Error("not a number")}return r.length===t.length&&r},e.Feature.Theme.Graph=Aa;e.Feature.Theme.Bar= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Aa{constructor(e,t,s,r,i){super(e,t,s,r,i),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 s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=this.dataViewBox,i=this.dataValues;if(!(i.length<1)){for(let e=0,t=i.length;es[1])return;var a=this.calculateXShapeInfo();if(a){var n=a.xPositions,o=a.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(Ta.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(Ta.GraphAxis(this.shapeFactory,r,t,a)));for(var l=0;l=t.length&&(s%=t.length);var l=t[s][0],h=t[s][1],u=(new zi).getLinearGradient(n,0,o,0,[[0,l],[1,h]]);i.style.color=u}}}};e.Feature.Theme.Bar3D= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Aa{constructor(e,t,s,r,i){super(e,t,s,r,i),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 s=this.dataViewBox,r=this.dataValues;if(!(r.length<1)){for(let e=0,s=r.length;et[1])return;var i=this.calculateXShapeInfo();if(i){var a=i.xPositions,n=i.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(Ta.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(Ta.GraphAxis(this.shapeFactory,s,e,i)));var o=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10;for(let i=0;i=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]-i[0],this.DVBOrigonPoint[1]-i[1]],!0)}}e.Feature.Theme.RankSymbol=wa;e.Feature.Theme.Circle= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 wa{constructor(e,t,s,r,i){super(e,t,s,r,i),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,s=Ea.getDataValues(this.data,this.fields,t);this.dataValues=s||[];var r=this.dataValues;e.maxR||(e.maxR=100),e.minR||(e.minR=0);var i=this.DVBCodomain;i&&i[1]-i[0]>0?this.DVBUnitValue=e.maxR/(i[1]-i[0]):this.DVBUnitValue=e.maxR;var a=this.DVBUnitValue,n=r[0]*a+e.minR;if(this.width=2*n,this.height=2*n,this.initBaseParameter()&&(!i||!(r[0]i[1]))){var o=this.DVBCenterPoint,l=new la(o[0],o[1],n);l.style=Ta.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=Ta.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:n,value:r[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}};e.Feature.Theme.Line= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Aa{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),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,s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=this.DVBUnitValue,i=this.dataValues;if(!(i.length<1)){var a=this.calculateXShapeInfo();if(a){var n,o,l=a.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(Ta.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(Ta.GraphAxis(this.shapeFactory,t,e,a));for(var h=[],u=[],c=0,p=i.length;cs[1])return null;n=l[c],o=t[1]-(i[c]-s[0])/r;var d=new ta(n,o);d.style=Ta.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,c,i[c]),d.highlightStyle=Ta.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(d.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(d.clickable=e.pointClickAble),d.refDataID=this.data.id,d.dataInfo={field:this.fields[c],value:i[c]},u.push(this.shapeFactory.createShape(d));var m=[n,o];h.push(m)}var y=new sa(h);y.style=Ta.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),y.clickable=!1,y.hoverable=!1;var f=this.shapeFactory.createShape(y);this.shapes.push(f),this.shapes=this.shapes.concat(u),this.shapesConvertToRelativeCoordinate()}}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=this.DVBWidth,n=0;if(s.xShapeBlank&&s.xShapeBlank.length&&2==s.xShapeBlank.length){var o=a-((e=s.xShapeBlank)[0]+e[1]);if(o<=r)return null;n=o/(r-1)}else e=[n=a/(r+1),n,n];for(var l=0,h=0;hr[1])return;var i=0;for(let e=0;e=360&&(l=359.9999999);var d=new aa(n[0],n[1],u,o,l);if(void 0===e.sectorStyleByFields){var m=c%t.length;d.style=Ta.ShapeStyleTool(null,e.sectorStyle,t,null,m)}else d.style=Ta.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,c,s[c]);d.highlightStyle=Ta.ShapeStyleTool(null,e.sectorHoverStyle),void 0!==e.sectorHoverAble&&(d.hoverable=e.sectorHoverAble),void 0!==e.sectorClickAble&&(d.clickable=e.sectorClickAble),d.refDataID=this.data.id,d.dataInfo={field:this.fields[c],value:s[c]},this.shapes.push(this.shapeFactory.createShape(d)),o=l}this.shapesConvertToRelativeCoordinate()}}}};e.Feature.Theme.Point= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Aa{constructor(e,t,s,r,i,a){super(e,t,s,r,i,a),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,s=this.DVBCodomain;this.DVBUnitValue=(s[1]-s[0])/this.DVBHeight;var r=this.DVBUnitValue,i=this.dataValues,a=this.calculateXShapeInfo();if(a){var n,o,l=a.xPositions;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(Ta.Background(this.shapeFactory,this.chartBox,e)),this.shapes=this.shapes.concat(Ta.GraphAxis(this.shapeFactory,t,e,a));for(var h=0,u=i.length;hs[1])return null;n=l[h],o=t[1]-(i[h]-s[0])/r;var c=new ta(n,o);c.style=Ta.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,h,i[h]),c.highlightStyle=Ta.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:i[h]},this.shapes.push(this.shapeFactory.createShape(c))}this.shapesConvertToRelativeCoordinate()}}}calculateXShapeInfo(){var e,t=this.dataViewBox,s=this.setting,r=this.dataValues.length;if(r<1)return null;var i=[],a=this.DVBWidth,n=0;if(s.xShapeBlank&&s.xShapeBlank.length&&2==s.xShapeBlank.length){var o=a-((e=s.xShapeBlank)[0]+e[1]);if(o<=r)return null;n=o/(r-1)}else e=[n=a/(r+1),n,n];for(var l=0,h=0;hr[1])return;var i=0;for(let e=0;e=0&&t.innerRingRadius0){var h=a[a.length-1];if(Math.abs(h[0]-r[0])<=n&&Math.abs(h[1]-r[1])<=n)continue}a.push(r)}if(a.length<2)return null;var u=new Object;(u=V.copyAttributesWithClip(u,this.style,["pointList"])).pointList=a;var c=new ba({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&&V.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}multiPointToTF(e){for(var t=e.components,s=[],r=[],i=this.location,a=[],n=this.nodesClipPixel,o=0;o0){var h=a[a.length-1];if(Math.abs(h[0]-r[0])<=n&&Math.abs(h[1]-r[1])<=n)continue}a.push(r);var u=new Object;u.r=6,(u=V.copyAttributesWithClip(u,this.style)).x=r[0],u.y=r[1];var c=new fa({style:u,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(c.highlightStyle=this.highlightStyle),c.refOriginalPosition=i,c.refDataID=this.data.id,c.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&V.copyAttributesWithClip(c,this.shapeOptions),this.shapes.push(c)}}multiLineStringToTF(e){for(var t=e.components,s=0;s0){var p=a[a.length-1];if(Math.abs(p[0]-r[0])<=l&&Math.abs(p[1]-r[1])<=l)continue}a.push(r)}}else{n=[];for(var d=0;d0){var m=n[n.length-1];if(Math.abs(m[0]-r[0])<=l&&Math.abs(m[1]-r[1])<=l)continue}n.push(r)}}n.length<2||o.push(n)}if(!(a.length<2)){var y={};(y=V.copyAttributesWithClip(y,this.style,["pointList"])).pointList=a;var f=new Sa({style:y,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(f.highlightStyle=this.highlightStyle),f.refOriginalPosition=this.location,f.refDataID=this.data.id,f.isHoverByRefDataID=this.isMultiHover,o.length>0&&(f.holePolygonPointLists=o),this.shapeOptions&&V.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}}rectangleToTF(e){var t=this.location,s=new q(e.x,e.y),r=this.layer.map.getResolution(),i=this.getLocalXY(s),a=new Object;a.r=6,(a=V.copyAttributesWithClip(a,this.style)).x=i[0]-t[0],a.y=i[1]-t[1]-2*e.width/r,a.width=e.width/r,a.height=e.height/r;var n=new Ca({style:a,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(n.highlightStyle=this.highlightStyle),n.refOriginalPosition=t,n.refDataID=this.data.id,n.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&V.copyAttributesWithClip(n,this.shapeOptions),this.shapes.push(n)}geoTextToTF(e){var t=this.location,s=this.getLocalXY(e),r=new Object;r.r=6,(r=V.copyAttributesWithClip(r,this.style,["x","y","text"])).x=s[0]-t[0],r.y=s[1]-t[1],r.text=e.text;var i=new ga({style:r,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(i.highlightStyle=this.highlightStyle),i.refOriginalPosition=t,i.refDataID=this.data.id,i.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&V.copyAttributesWithClip(i,this.shapeOptions),this.shapes.push(i)}updateAndAddShapes(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,s=0,r=this.shapes.length;s0}addRoot(e){e instanceof Pa&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}delRoot(e){if(void 0===e){for(var t=0;t=0&&(this.delFromMap(i.id),this._roots.splice(a,1),i instanceof Pa&&i.delChildrenFromStorage(this))}}addToMap(e){return e instanceof Pa&&(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 Pa&&(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 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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{constructor(e,t){this.root=e,this.storage=t,this._domRoot=null,this._layers={},this._zlevelList=[],this._layerConfig={},this._bgDom=null,this.shapeToImage=null,Na.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 s=document.createElement("div");this._domRoot=s,s.style.position="relative",s.style.overflow="hidden",s.style.width=this._width+"px",s.style.height=this._height+"px",this.root.appendChild(s),this.shapeToImage=this._createShapeToImageProcessor(),this._bgDom=Na.createDom(V.createUniqueID("SuperMap.Theme_background_"),"div",this),s.appendChild(this._bgDom),this._bgDom.onselectstart=a,this._bgDom.style["-webkit-user-select"]="none",this._bgDom.style["user-select"]="none",this._bgDom.style["-webkit-touch-callout"]="none";var r=new Ma(V.createUniqueID("_highLightLayer_"),this);this._layers.hover=r,s.appendChild(r.dom),r.initContext(),r.dom.onselectstart=a,r.dom.style["-webkit-user-select"]="none",r.dom.style["user-select"]="none",r.dom.style["-webkit-touch-callout"]="none";var i=this;function a(){return!1}this.updatePainter=function(e,t){i.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 s=this.storage.getShapeList(!0);return this._paintList(s,t),"function"==typeof e&&e(),this}_paintList(e,t){var s,r,i;for(var a in void 0===t&&(t=!1),this._updateLayerStatus(e),this._layers)"hover"!==a&&(this._layers[a].unusedCount++,this._layers[a].updateTransform());for(var n=[],o=0,l=e.length;o0&&e>this._zlevelList[0]){for(i=0;ie);i++);r=this._layers[this._zlevelList[i]]}this._zlevelList.splice(i+1,0,e),t=new Ma(V.createUniqueID("_levelLayer_"+e),this);var a=r?r.dom:this._bgDom;a.nextSibling?a.parentNode.insertBefore(t.dom,a.nextSibling):a.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new Ji).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}getLayers(){return this._layers}_updateLayerStatus(e){var t=this._layers,s={};for(let e in t)"hover"!==e&&(s[e]=t[e].elCount,t[e].elCount=0);for(let s=0;s0?1.1:1/1.1,s=this.painter.getLayers(),r=!1;for(var i in s)if("hover"!==i){var a=s[i],n=a.position;if(a.zoomable){a.__zoom=a.__zoom||1;var o=a.__zoom;o*=t,t=(o=Math.max(Math.min(a.maxZoom,o),a.minZoom))/a.__zoom,a.__zoom=o,n[0]-=(this._mouseX-n[0])*(t-1),n[1]-=(this._mouseY-n[1])*(t-1),a.scale[0]*=t,a.scale[1]*=t,a.dirty=!0,r=!0}}r&&this.painter.refresh(),this._dispatchAgency(this._lastHover,pa.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=da.Util_event.getX(e),this._mouseY=da.Util_event.getY(e);var t=this._mouseX-this._lastX,s=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 r="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,s),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var i=this.painter.getLayers(),a=!1;for(var n in i)if("hover"!==n){var o=i[n];o.panable&&(r="move",o.position[0]+=t,o.position[1]+=s,a=!0,o.dirty=!0)}a&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?r="move":this._hasfound&&this._lastHover.clickable&&(r="pointer"),this.root.style.cursor=r,this._dispatchAgency(this._lastHover,pa.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(pa.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,pa.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,pa.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&&da.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment=0;i--){var a=s[i];if(void 0!==a.zlevel&&(e=this.painter.getLayer(a.zlevel,e),r[0]=this._mouseX,r[1]=this._mouseY,e.needTransform&&(da.Util_matrix.invert(t,e.transform),da.Util_vector.applyTransform(r,r,t))),this._findHover(a,r[0],r[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 s=0;!this._lastHover&&s=0&&this._clips.splice(t,1)}_update(){var e=(new Date).getTime(),t=e-this._time,s=this._clips,r=s.length,i=[],a=[];for(let t=0;t=0&&!(y[S]<=n);S--);S=Math.min(S,h-2)}else{for(S=E;Sn);S++);S=Math.min(S-1,h-2)}E=S,A=n;var o=y[S+1]-y[S];if(0!==o){if(b=(n-y[S])/o,a)if(C=f[S],x=f[0===S?S:S-1],_=f[S>h-2?h-1:S+1],T=f[S>h-3?h-1:S+2],c)Da._catmullRomInterpolateArray(x,C,_,T,b,b*b,b*b*b,r(e,l),d);else{let t;t=p?Da.rgba2String(w):Da._catmullRomInterpolate(x,C,_,T,b,b*b,b*b*b),s(e,l,t)}else if(c)Da._interpolateArray(f[S],f[S+1],b,r(e,l),d);else{let t;p?(Da._interpolateArray(f[S],f[S+1],b,w,1),t=Da.rgba2String(w)):t=Da._interpolateNumber(f[S],f[S+1],b),s(e,l,t)}for(S=0;S0){let e=a.SheetNames[0],s=Xa().utils.sheet_to_csv(a.Sheets[e]);t&&t.call(r,s)}}catch(e){s&&s.call(r,e)}},i.onerror=function(e){s&&s.call(r,e)},this.rABF&&i.readAsArrayBuffer(e.file)},processDataToGeoJson(e,t,s,r,i){let a=null;if("EXCEL"===e||"CSV"===e)a=this.processExcelDataToGeoJson(t),s&&s.call(i,a);else if("JSON"===e||"GEOJSON"===e){let e=t;"string"==typeof e&&(e=JSON.parse(e)),"ISERVER"===e.type?a=e.data.recordsets[0].features:"FeatureCollection"===e.type?a=e:r&&r.call(i,qa.i18n("msg_dataInWrongGeoJSONFormat")),s&&s.call(i,a)}else r&&r.call(i,qa.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson(e){let t=this.string2Csv(e),s=t.colTitles,r=-1,i=-1;for(let e=0,t=s.length;ee.json()).then(r=>{if(!1!==r.succeed)if(r.dataItemServices&&r.dataItemServices.length>0){let i;r.dataItemServices.forEach(r=>{if("RESTDATA"===r.serviceType&&"PUBLISHED"===r.serviceStatus)i=r;else{if("RESTMAP"!==r.serviceType||"PUBLISHED"!==r.serviceStatus)return void s.getDatafromContent(e,t);i=r}}),i&&s.getDatafromRest(i.serviceType,i.address,t)}else s.getDatafromContent(e,t);else s._fireFailedEvent(r)}).catch(e=>{console.log(e),s._fireFailedEvent(e)})}getDatafromContent(e,t){let s={result:{}},r=this;e+="/content.json?pageSize=9999999¤tPage=1",Ae.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(qa.i18n("msg_jsonResolveFiled"));let t=this._formatGeoJSON(e.content);s.result.features={type:e.content.type,features:t}}else if("EXCEL"===e.type||"CSV"===e.type){let t=this._excelData2Feature(e.content);s.result.features={type:"FeatureCollection",features:t}}t(s,"content")}}else r._fireFailedEvent(e)},this).catch(e=>{console.log(e),r._fireFailedEvent(e)})}getDatafromRest(e,t,s){let r=this,i=this.datasets.withCredentials;if("RESTDATA"===e){let e,a,n=`${t}/data/datasources`;Ae.get(n,null,{withCredentials:i}).then(e=>e.json()).then(o=>{e=o.datasourceNames[0],n=`${t}/data/datasources/${e}/datasets`,Ae.get(n,null,{withCredentials:i}).then(e=>e.json()).then(i=>(a=i.datasetNames[0],r.getDatafromRestData(`${t}/data`,[e+":"+a],s),[e+":"+a])).catch(function(e){r._fireFailedEvent(e)})}).catch(function(e){r._fireFailedEvent(e)})}else{let e,a,n,o=`${t}/maps`;Ae.get(o,null,{withCredentials:i}).then(e=>e.json()).then(l=>{e=l[0].name,n=l[0].path,o=o=`${t}/maps/${e}/layers`,Ae.get(o,null,{withCredentials:i}).then(e=>e.json()).then(e=>(a=e[0].subLayers.layers[0].caption,r.getDatafromRestMap(a,n,s),a)).catch(function(e){r._fireFailedEvent(e)})}).catch(function(e){r._fireFailedEvent(e)})}}getDatafromRestData(e,t,s){let r=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,e=>{s(e,"RESTDATA")},e=>{console.log(e),r._fireFailedEvent(e)})}getDatafromRestMap(e,t,s){let r=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,e=>{s(e,"RESTMAP")},e=>{console.log(e),r._fireFailedEvent(e)})}_getFeatureBySQL(e,t,s,r,i){let a,n,o,l={name:t.join().replace(":","@")};Object.assign(l,s),a=new st(l),o=new Ls({queryParameter:a,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(n=new Ps(e,{eventListeners:{processCompleted:e=>{r&&r(e)},processFailed:e=>{i&&i(e)}}})).processAsync(o)}_queryFeatureBySQL(e,t,s,r,i,n,o,l,h,u){var c,p,d={name:t};Object.assign(d,s),c=new st(d),r&&(c.fields=r);var m={queryParams:[c]};u&&(m.queryOption=a.ATTRIBUTE),l&&(m.startRecord=l),h&&(m.expectCount=h),i&&(m.prjCoordSys={epsgCode:i}),p=new Ir(m),this._queryBySQL(e,p,e=>{"processCompleted"===e.type?n(e):o(e)})}_queryBySQL(e,t,s,r){new Fr(e,{eventListeners:{scope:this,processCompleted:s,processFailed:s},format:this._processFormat(r)}).processAsync(t)}_processFormat(e){return e||t.GEOJSON}_formatGeoJSON(e){let t=e.features;return t.forEach((e,t)=>{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,s=-1,r=-1;for(let e=0,i=t.length;e0&&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 Ka(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,s=t.indexOf("rest");if(s>0){let r=t.indexOf("/",s+5),i=t.substring(s+5,r),a=t.substring(0,s+4)+"/data";if("maps"===i){let i=t.indexOf("/",r+1),n=t.substring(r+1,i);a=t.substring(0,s+4)+"/maps/"+n,e.result.dataUrl=a,this._getLayerFeatures(e)}else"data"===i&&(e.result.dataUrl=a,this._getDataFeatures(e))}}_getDataInfoSuccess(e,t){let s=this;"RESTMAP"===t?s._getChartDatasFromLayer(e):s._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,s={};if(t.length){let e=t[0],r=[],i=[];for(let t in e.properties)r.push(t),i.push(this._getDataType(e.properties[t]));s={features:t,fieldCaptions:r,fieldTypes:i,fieldValues:[]};for(let e in i){let r=[];for(let i in t){let a=t[i],n=s.fieldCaptions[e],o=a.properties[n];r.push(o)}s.fieldValues.push(r)}this.createChart(s)}}}_getChartDatasFromLayer(e){if(e.result.recordsets){let t=e.result.recordsets[0],s=t.features.features;this.features=t.features;let r={};if(s.length){r={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]};for(let e in r.fieldCaptions){let t=[];for(let i in s){let a=s[i],n=r.fieldCaptions[e],o=a.properties[n];t.push(o)}r.fieldValues.push(t)}this.createChart(r)}}}_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,s){this.updateChart=s,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 s=this.grid,r=this._createChartSeries(this.calculatedData,e),i=[];for(let e in this.calculatedData.XData)i.push({value:this.calculatedData.XData[e].fieldsData});let a={type:"category",name:this.xField[0].name||"X",data:i,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},n={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&&(s=t.grid),t.tooltip&&(o=t.tooltip),t.backgroundColor&&(l=t.backgroundColor)),{backgroundColor:l,grid:s,series:r,xAxis:a,yAxis:n,tooltip:o}}}_createChartDatas(e){let t=0,s=[],r=e.fieldCaptions,i=this;r.forEach(function(e,s){i.xField[0]&&e===i.xField[0].field&&(t=s)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(i.yFieldName=i.yFieldName+","),i.yFieldName=i.yFieldName+e.name,r.forEach(function(t,r){t===e.field&&s.push(r)})});let a=this._getAttrData(e,t),n=[];if(s.length>0)s.forEach(function(t){let s=[];for(let r in e.fieldValues[t])s.push({value:e.fieldValues[t][r]});n.push(s)});else{let e=[],t=[],s=a.length;for(let r=0;r{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 s=this;this.viewModel.updateData(e,t,function(e){s._updateChart(e),s.addChart&&s.addChart()})}_createChart(e){this.echart=Va().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))}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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){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}}e.Components.TemplateBase=$a;e.Components.CommonContainer= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 $a{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 s=document.createElement("div");s.setAttribute("class","component-title");const r=document.createElement("div");r.innerHTML=e,s.appendChild(r),t.appendChild(s);const i=document.createElement("div");return i.setAttribute("class","component-content"),t.appendChild(i),this.content=i,this.rootContainer=t,t}getContentElement(){return this.content}appendContent(e){this.content.appendChild(e)}};e.Components.Select= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 $a{constructor(e){super(e),this._initView(e)}_initView(e){let t=this._createElement("div","component-selecttool");e.labelName&&(this._createElement("label","component-selecttool__lable--describe",t).innerHTML=e.labelName);let s=this._createElement("div","component-selecttool--chart",t);s.setAttribute("tabindex","1");let r=this._createElement("div","component-selecttool__name",s);r.title=e.optionsArr[0],r.innerHTML=e.optionsArr[0];let i=this._createElement("div","component-selecttool__trianglebtn--chart",s),a=this._createElement("div","component-triangle-down-img",i),n=this._createElement("div","component-selecttool__content",s),o=this._createElement("div","component-selecttool__content--chart",n),l=this._createElement("div","component-selecttool__scrollarea__content",o);l.setAttribute("tabindex","1"),this.createOptions(l,e.optionsArr),this.optionClickEvent(l,r,e.optionsClickCb),this._selectClickEvent(s,n,a),this.rootContainer=t}createOptions(e,t){for(let s in t){let r=this._createElement("div","component-selecttool__option",e);r.title=t[s],r.innerHTML=t[s]}}_selectClickEvent(e,t,s){e.onclick=function(e){"block"===t.style.display?(t.style.display="none",s.className="component-triangle-down-img"):(t.style.display="block",s.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",s.className="component-triangle-down-img"}}_createElement(e,t,s){let r=document.createElement(e||"div");return t&&(r.className=t),s&&s.appendChild(r),r}optionClickEvent(e,t,s){for(let r=0;r0;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{for(let e=0;e0;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 s=document.createElement("div"),r=document.createElement("div");r.setAttribute("class","component-citytabpag__py-key"),r.innerHTML=e,s.appendChild(r);const i=document.createElement("div");i.setAttribute("class","component-citytabpag__content");for(let e=0;e0&&this.appendTabs(e),this.rootContainer=t}setTabs(e){this.removeAllTabs(),this.appendTabs(e)}appendTabs(e){for(let t=0;t0;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=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;t1;e--)this.link.removeChild(this.link.children[e])}_createLink(e){for(let t=0;t<4;t++){const s=document.createElement("li");s.setAttribute("class","disable");const r=document.createElement("span");s.appendChild(r),0===t?(r.id="first",r.setAttribute("class","supermapol-icons-first")):1===t?(r.id="prev",r.setAttribute("class","supermapol-icons-prev")):2===t?(r.id="next",r.setAttribute("class","supermapol-icons-next")):3===t&&(r.id="last",r.setAttribute("class","supermapol-icons-last")),e.appendChild(s)}}_changePageEvent(e){const t=e.target;if("disable"===t.parentElement.classList[0])return;let s;if(t.id)s=t.id;else{if(!Number(t.innerHTML))return;s=Number(t.innerHTML)}this._prePageNum(s),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-3)for(let e=this.pageNumberLis.length-5;e0&&(this.currentPageNumberLis=t)}};e.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!"};e.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:"获取数据失败!"};const sn=mapboxgl;var rn=s.n(sn);!function(){rn().Map.prototype.overlayLayersManager={},void 0===rn().Map.prototype.addLayerBak&&(rn().Map.prototype.addLayerBak=rn().Map.prototype.addLayer,rn().Map.prototype.addLayer=function(e,t){return e.source||"custom"===e.type||"background"===e.type?(this.addLayerBak(e,t),this):this.overlayLayersManager[e.id]||this.style._layers[e.id]?void this.fire("error",{error:new Error("A layer with this id already exists.")}):(function(e,t){e.onAdd&&e.onAdd(t)}(e,this),this.overlayLayersManager[e.id]=e,this)}),rn().Map.prototype.getLayer=function(e){return this.overlayLayersManager[e]?this.overlayLayersManager[e]:this.style.getLayer(e)},rn().Map.prototype.moveLayer=function(e,t){return this.overlayLayersManager[e]?(function(e,t){var s=document.getElementById(e);if(t){var r=document.getElementById(t);r||rn().Evented.prototype.fire("error",{error:new Error(`Layer with id "${t}" does not exist on this document.`)})}s&&r?r.parentNode.insertBefore(s,r):s.parentNode.appendChild(s)}(e,t),this):this.style._layers[e]?(this.style.moveLayer(e,t),this._update(!0),this):void 0},rn().Map.prototype.removeLayer=function(e){return this.overlayLayersManager[e]?((t=this.overlayLayersManager[e]).removeFromMap&&t.removeFromMap(),delete this.overlayLayersManager[e],this):(this.style.removeLayer(e),this._update(!0),this);var t},rn().Map.prototype.setLayoutProperty=function(e,t,s){return this.overlayLayersManager[e]?("visibility"===t&&(s="visible"===s,r=this.overlayLayersManager[e],i=s,r.setVisibility&&r.setVisibility(i),this.style.fire("data",{dataType:"style"})),this):(this.style.setLayoutProperty(e,t,s),this._update(!0),this);var r,i},rn().Map.prototype.updateTransform=function(e,t,s,r,i,a,n){this.transform.units=e;var o=this.mercatorZfromAltitude;rn().MercatorCoordinate.fromLngLat=function(e,r){r=r||0;const i=rn().LngLat.convert(e);return new(rn().MercatorCoordinate)((i.lng-t)/a,(s-i.lat)/n,o(r,i.lat))},rn().MercatorCoordinate.prototype.toLngLat=function(){return new(rn().LngLat)(this.x*a+t,s-this.y*n)},this.customConvertPoint=window.URL.createObjectURL(new Blob(["customConvertPoint = {projectX:function(x){return (x - "+r+") / "+a+" + 0.5},projectY:function(y){y = 0.5 - ((y - "+i+") / "+n+");return y < 0 ? 0 : y > 1 ? 1 : y;},toY:function(y){return (0.5-y)*"+n+"+"+i+";}}"],{type:"text/javascript"}))}}(); /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ rn().supermap=rn().supermap||{}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms 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="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=";rn().supermap.LogoControl= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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(e){this.imageUrl=null,this.link=null,this.width=null,this.height=null,this.alt="SuperMap iClient",this._extend(this,e)}onAdd(e){this._map=e,this._container=document.createElement("div"),this._container.className="mapboxgl-ctrl iclient-logo",this._container.style.marginTop=0,this._container.style.marginBottom=0,this._container.style.marginLeft=0,this._container.style.marginRight=0;var t=an;this.imageUrl&&(t=this.imageUrl);var s=this.alt,r="94px",i="29px",a="width:"+r+";height:"+i+";";this.imageUrl&&(a="width:"+(r=this.width)+";height:"+(i=this.height)+";",r&&i||(a=""));var n=this.link||"https://iclient.supermap.io";return this._container.innerHTML=""+s+"",this._createStyleSheet(),this._container}_createStyleSheet(){var e=document.createElement("style");e.type="text/css",e.innerHTML=".iclient-logo{margin:0 !important;}.iclient-logo a{border: none;display: block;height:31px;}.iclient-logo img{border: none;white-space: nowrap}",document.getElementsByTagName("head")[0].appendChild(e)}_extend(e){for(var t=0;t1&&(e=new $(t[0],t[1])),new ce(e,this.attributes)}}rn().supermap.ThemeFeature=on; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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,t){var s=t||{};this.name=e,this.id=s.id?s.id:V.createUniqueID("themeLayer_"),this.opacity=s.opacity?s.opacity:1,this.visibility=!0,this.loadWhileAnimating=void 0===s.loadWhileAnimating||s.loadWhileAnimating,this.map=s.map?s.map:null,this.features=[],this.TFEvents=[],this.map&&this.map.addLayer(this)}onAdd(e){this.map=e,this._createCanvasContainer(),this.addTFEvents(),this.map.on("resize",this.resizeEvent.bind(this)),this.map.on("zoomstart",this.zoomStartEvent.bind(this)),this.map.on("zoomend",this.zoomEndEvent.bind(this)),this.map.on("rotatestart",this.rotateStartEvent.bind(this)),this.map.on("rotate",this.rotateEvent.bind(this)),this.map.on("rotateend",this.rotateEndEvent.bind(this)),this.map.on("dragend",this.dragEndEvent.bind(this)),this.map.on("movestart",this.moveStartEvent.bind(this)),this.map.on("move",this.moveEvent.bind(this)),this.map.on("moveend",this.moveEndEvent.bind(this)),this.map.on("remove",this.removeFromMap.bind(this)),this.refresh()}refresh(){0!==this.features.length&&this.map&&this.redrawThematicFeatures(this.map.getBounds())}_createCanvasContainer(){this.movingOffset=[0,0],this.mapContainer=this.map.getCanvasContainer(),this.div=document.createElement("div"),this.div.id=this.id,this.div.style.position="absolute";var e=this.map.getCanvasContainer(),t=this.map.getCanvas();this.mapContainer.style.perspective=this.map.transform.cameraToCenterDistance+"px",this.div.style.width=t.style.width,this.div.style.height=t.style.height,this.div.className="themeLayer",this.div.width=parseInt(t.width),this.div.height=parseInt(t.height),e.appendChild(this.div),this.setOpacity(this.opacity),this.levelRenderer=new Ga,this.renderer=this.levelRenderer.init(this.div),this.renderer.clear()}destroyFeatures(e){if(void 0==e&&(e=this.features),e){this.removeFeatures(e);for(var t=e.length-1;t>=0;t--)e[t].destroy()}}setVisibility(e){e!==this.visibility&&(this.visibility=e,this.display(e),this.redrawThematicFeatures(this.map.getBounds()))}display(e){this.div.style.display=e?"block":"none"}setOpacity(e){if(e!==this.opacity){this.opacity=e;var t=this.div;V.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&rn().Evented.prototype.fire("changelayer",{layer:this,property:"opacity"})}}addFeatures(e){}removeFeatures(e){if(e&&0!==e.length){if(e===this.features)return this.removeAllFeatures();V.isArray(e)||(e=[e]);for(var t=[],s=e.length-1;s>=0;s--){var r=e[s],i=V.indexOf(this.features,r);-1!==i?this.features.splice(i,1):t.push(r)}for(var a=[],n=0,o=this.features.length;n=s.left&&n.x<=s.right&&n.y>=s.top&&n.y<=s.bottom){r=!0;break}}return r}clearCache(){this.cache={},this.charts=[]}removeFeatures(e){this.clearCache(),super.removeFeatures(e)}removeAllFeatures(){this.clearCache(),super.removeAllFeatures()}redraw(){return this.clearCache(),!!this.renderer&&(this.redrawThematicFeatures(this.map.getBounds()),!0)}clear(){this.renderer&&(this.renderer.clearAll(),this.renderer.refresh()),this.removeAllFeatures(),this.clearCache()}}rn().supermap.GraphThemeLayer=hn; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 extends ln{constructor(e,t){super(e,t),this.name=null,this.style=null,this.highlightStyle=null,this.nodesClipPixel=2,this.isHoverAble=!1,this.isMultiHover=!1,this.isClickAble=!0,this.isAllowFeatureStyle=!1,V.extend(this,t),this.cache=t.cache||{},this.cacheFields=t.cacheFields||[],this.maxCacheCount=t.maxCacheCount||0,this.isCustomSetMaxCacheCount=void 0!==t.isCustomSetMaxCacheCount&&t.isCustomSetMaxCacheCount}addFeatures(e){rn().Evented.prototype.fire("beforefeaturesadded",{features:e}),this.features=this.toiClientFeature(e),this.isCustomSetMaxCacheCount||(this.maxCacheCount=5*this.features.length),this.renderer&&this.redrawThematicFeatures(this.map.getBounds())}removeFeatures(e){this.clearCache(),ln.prototype.removeFeatures.apply(this,arguments)}removeAllFeatures(){this.clearCache(),ln.prototype.removeAllFeatures.apply(this,arguments)}redrawThematicFeatures(e){this.clearCache();var t=this.renderer.getHoverOne(),s=null;t&&t.refDataID&&(s=t.refDataID),this.renderer.clearAll();for(var r=this.features,i=this.cache,a=this.cacheFields,n=this.map.getZoom(),o=this.maxCacheCount,l=0,h=r.length;lo){var p=a[0];a.splice(0,1),delete i[p]}}}if(this.renderer.render(),s&&this.isHoverAble&&this.isMultiHover){var d=this.getShapesByFeatureID(s);this.renderer.updateHoverShapes(d)}}createThematicFeature(e){var t=V.copyAttributesWithClip(this.style);e.style&&!0===this.isAllowFeatureStyle&&(t=V.copyAttributesWithClip(e.style));var s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new La(e,this,Ta.transformStyle(t),s),i=0;i0&&0==this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),s=0,r=t.length;s=0&&m.x<=c.x&&m.y>=0&&m.y<=c.y){if(s.style.minZoomLevel>-1&&h<=s.style.minZoomLevel)continue;if(s.style.maxZoomLevel>-1&&h>s.style.maxZoomLevel)continue;var y=null;s.isStyleChange?(s.isStyleChange=null,y=this.calculateLabelBounds(s,m)):y=s.geometry.bsInfo.w&&s.geometry.bsInfo.h?this.calculateLabelBounds2(s,m):this.calculateLabelBounds(s,m);var f=new Y(0,c.y,c.x,0),g=y.length;if(this.isAvoid){var v=this.getAvoidInfo(f,y);if(v){if("left"===v.aspectW){s.style.labelXOffset+=v.offsetX;for(let e=0;e=i[l].start&&n=i[l].start&&no&&(o=s,l="top")}if(t.y>e.bottom){let s=Math.abs(t.y-e.bottom);s>o&&(o=s,l="bottom")}if(t.xn&&(n=s,h="left")}if(t.x>e.right){let s=Math.abs(t.x-e.right);s>n&&(n=s,h="right")}}}}isQuadrilateralOverLap(e,t){var s=e.length,r=t.length;if(5!==s||5!==r)return null;var i=!1;for(let r=0;rs.options.maxZoom)){var n=t.getBounds(),o=n.getEast()-n.getWest(),l=n.getNorth()-n.getSouth(),h=o/this.canvasLayer.canvas.width,u=l/this.canvasLayer.canvas.height,c=Yi("DEGREE")*h,p=t.getCenter(),d=t.project(p),m={transferCoordinate:function(e){if(t.transform.rotationMatrix||"2d"===s.context){var r=t.project(new(rn().LngLat)(e[0],e[1]));return[r.x,r.y]}var i=[(e[0]-p.lng)/h,(p.lat-e[1])/u];return[i[0]+d.x,i[1]+d.y]}};void 0!==e&&(m.filter=function(t){var s=r.trails||10;return e&&t.time>e-s&&t.time",n="
"+(t._createLegendElement.call(t)||"")+"
";this._container.innerHTML=a+n}return t._appendLegendCSSStyle(),this._container},s.prototype.onRemove=function(){this._container.parentNode.removeChild(this._container),this._map=void 0},new s}_createLegendElement(){}_addLayer(){var e=this.getLayerStyleOptions(),t=this.id?this.id:"theme3DLayer",s=this.sourceId=t+"Source";this.map.getSource(s)?(this.map.removeSource(s),this.map.addSource(s,{type:"geojson",data:this.data})):this.map.addSource(s,{type:"geojson",data:this.data}),this.map.addLayer({id:t,type:"fill-extrusion",source:s,paint:e}),this.map.moveLayer(t)}_addHighLightLayer(){if(this.map){var e=this.map;e.addLayer({id:this._highlightLayerId,type:"fill-extrusion",source:this.sourceId,paint:this.getHighlightStyleOptions(),filter:["in","$id",""]}),this._selectFeatureId=null,e.on("mousemove",this.id,this._onMouseMove.bind(this)),e.on("mouseout",this.id,this._onMouseMove.bind(this))}}_onMouseMove(e){var t=this,s=this.map,r=s.queryRenderedFeatures(e.point,{layers:[t.id]});if(t.highlight&&t.highlight.callback&&t.highlight.callback(r,e),!r||r.length<1)return t._clearHighlight.call(t),void(t._selectFeatureId=null);var i=r[0].id;t._selectFeatureId!==i&&(t._selectFeatureId=i,s.setFilter(t._highlightLayerId,["==","$id",t._selectFeatureId]))}_clearHighlight(){this.map&&this.map.setFilter(this._highlightLayerId,["in","$id",""])}_appendLegendCSSStyle(){var e=document.createElement("style");e.type="text/css";e.innerHTML="\n .legend {\n display: inline-block;\n border-radius: 2px;\n -moz-border-radius: 2px;\n -webkit-border-radius: 2px;\n font-size: 12px;\n color: rgba(0, 0, 0, 0.8);\n background-color: rgb(255, 255, 255);\n }\n .legend-light {\n color: rgba(0, 0, 0, 0.8);\n background-color: rgb(255, 255, 255);\n box-shadow: 0px 0px 6px #bbbbbb;\n -moz-box-shadow: 0px 6px 10px #bbbbbb;\n -webkit-box-shadow: 0px 0px 6px #bbbbbb;\n }\n .legend-dark {\n color: rgba(255, 255, 255, 0.8);\n background-color: rgb(64, 64, 64);\n }\n .legend .legend-title {\n min-height: 14px;\n max-width: 500px;\n padding:6px 10px;\n }\n .legend-light .legend-title {\n color: rgba(0, 0, 0, 0.8);\n }\n .legend-dark .legend-title {\n color: rgba(255, 255, 255, 0.8);\n }\n .legend-content{\n padding:6px 10px;\n }\n "+this._legendCSSStyle(),document.getElementsByTagName("head")[0].appendChild(e)}_legendCSSStyle(){return"\n .legend ul {\n padding: 0;\n margin: 0 16px;\n height: 100%;\n display: block;\n list-style: none;\n }\n\n .legend li {\n vertical-align: middle;\n }\n\n .legend li span:first-child {\n vertical-align: middle;\n }\n\n .legend li span:last-child {\n line-height: 28px;\n max-width: 200px;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n -ms-text-overflow: ellipsis;\n }\n\n .legend-vertical li {\n height: 28px;\n }\n\n .legend-vertical li span:first-child {\n display: inline-block;\n width: 60px;\n height: 100%;\n }\n\n .legend-vertical li span:last-child {\n display: inline-block;\n margin-left: 16px;\n height: 100%;\n }\n\n .legend-horizontal li {\n height: 56px;\n float: left;\n }\n\n .legend-horizontal li span:first-child {\n display: block;\n width: 100%;\n height: 50%;\n }\n\n .legend-horizontal li span:last-child {\n display: block;\n vertical-align: middle;\n width: 60px;\n height: 50%;\n text-align: center;\n }\n "}_extend(e){for(var t=0;t";for(e=0;e "+i:i+"-"+this._getWrapperText(this.colorStops[e+1][0]),s+="
  • "+i+"
  • "}return s+=""}_getWrapperText(e){var t=e*(null==this.legendRatio?1:parseFloat(this.legendRatio)),s=parseFloat(t);return s%1e6<=1e6?s.toString():parseInt(s/1e3)+"k"}};rn().supermap.RangeThemeLayer= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 un{constructor(e,t){super(e,t),this.style=t.style,this.isHoverAble=t.isHoverAble,this.highlightStyle=t.highlightStyle,this.themeField=t.themeField,this.styleGroups=t.styleGroups}createThematicFeature(e){var t=this.getStyleByData(e),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new La(e,this,Ta.transformStyle(t),s),i=0;i0&&s.attributes){var r=this.themeField,i=s.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(r===l){n=!0,o=i[l];break}if(n)for(var h=0,u=a.length;h=a[h].start&&o"+r+""}return e+=""}};rn().supermap.UniqueThemeLayer= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 un{constructor(e,t){super(e,t),this.themeField=t.themeField,this.style=t.style,this.styleGroups=t.styleGroups,this.isHoverAble=t.isHoverAble,this.highlightStyle=t.highlightStyle}createThematicFeature(e){var t=this.getStyleByData(e),s={};s.nodesClipPixel=this.nodesClipPixel,s.isHoverAble=this.isHoverAble,s.isMultiHover=this.isMultiHover,s.isClickAble=this.isClickAble,s.highlightStyle=Ta.transformStyle(this.highlightStyle);for(var r=new La(e,this,Ta.transformStyle(t),s),i=0;i0&&s.attributes){var r=this.themeField,i=s.attributes,a=this.styleGroups,n=!1,o=null;for(var l in i)if(r===l){n=!0,o=i[l];break}if(n)for(var h=0,u=a.length;h=0;t--){let s=e[t],r=V.indexOf(this.graphics,s);-1!==r&&this.graphics.splice(r,1)}this.update()}update(){if("Awaiting state"!==this.layer.lifecycle){this.layer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0});let e=this.getState();this.layer.setState(e)}}clear(){this.removeGraphics(),this.deckGL.finalize()}remove(){this.map.off("render",this._moveEvent.bind(this)),this.map.off("resize",this._resizeEvent.bind(this)),this.map.getCanvasContainer().removeChild(this.canvas)}removeFromMap(){this.remove(),this.clear()}moveTo(e,t){var s=document.getElementById(this.id);if(t=void 0===t||t){var r=document.getElementById(e);s&&r&&r.parentNode.insertBefore(s,r)}else{var i=document.getElementById(e);if(s){if(i.nextSibling)return void i.parentNode.insertBefore(s,i.nextSibling);i.parentNode.appendChild(s)}}}setVisibility(e){this.canvas&&e!==this.visibility&&(this.visibility=e,this.canvas.style.display=e?"block":"none")}getState(){let e=this.map,t=parseInt(this.canvas.style.width),s=parseInt(this.canvas.style.height),r=e.getCenter(),i={longitude:r.lng,latitude:r.lat,zoom:e.getZoom(),maxZoom:e.getMaxZoom(),pitch:e.getPitch(),bearing:e.getBearing()},a={};for(let e in i)a[e]=i[e];return a.width=t,a.height=s,a.data=this.graphics,a.color=this.color,a.radius=this.radius,a.opacity=this.opacity,a.highlightColor=this.highlightColor,a.radiusScale=this.radiusScale,a.radiusMinPixels=this.radiusMinPixels,a.radiusMaxPixels=this.radiusMaxPixels,a.strokeWidth=this.strokeWidth,a.outline=this.outline,e.getCRS&&e.getCRS()!==rn().CRS.EPSG3857&&(a.coordinateSystem=this.coordinateSystem,a.isGeographicCoordinateSystem=this.isGeographicCoordinateSystem),a}draw(){let e=this.getState(),t={};for(let s in e)t[s]=e[s];t.layers=[this.layer],t.canvas=this.canvas,this.deckGL.setProps(t)}_moveEvent(){this.draw()}_resizeEvent(){let e=this.canvas,t=this.map;e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,this.draw()}_initContainer(){this.canvas=this._createCanvas(),this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas)}_createCanvas(){let e=document.createElement("canvas");this.id&&(e.id=this.id),e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.cursor="";let t=this.map;return e.width=parseInt(t.getCanvas().style.width),e.height=parseInt(t.getCanvas().style.height),e.style.width=t.getCanvas().style.width,e.style.height=t.getCanvas().style.height,e}};const fn=function(){try{return THREE}catch(e){return{}}}(); /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ function gn(e,t,s){if(e===s||e===t)return e;let r=s-t;return((e-t)%r+r)%r+t}function vn(e){return e*Math.PI/180}var Sn={matrix:[1,-1,0,0],projection:{R:6378137,minZoom:0,maxZoom:22,nativeMaxZoom:19,RAD:Math.PI/180,METERS_PER_DEGREE:6378137*Math.PI/180,MAX_LATITUDE:85.0511287798,project:function(e){const t=this.RAD,s=this.METERS_PER_DEGREE,r=this.MAX_LATITUDE;let i,a=e instanceof Array?{lng:e[0],lat:e[1]}:{lng:e.lng,lat:e.lat},n=a.lng,o=Math.max(Math.min(r,a.lat),-r);return{x:n*s,y:(i=0===o?0:Math.log(Math.tan((90+o)*t/2))/t)*s}},unproject:function(e){const t=e.x,s=e.y,r=this.RAD,i=this.METERS_PER_DEGREE;let a;return 0===s?a=0:(a=s/i,a=(2*Math.atan(Math.exp(a*r))-Math.PI/2)/r),{lng:gn(t/i,-180,180),lat:gn(a,-this.MAX_LATITUDE,this.MAX_LATITUDE)}},locate:function(e,t,s){if(!e)return null;if(t=t||0,s=s||0,!t&&!s)return e;let r=e.lng;if(0!==t){let s=Math.abs(t),i=vn(e.lng);r=gn(180*(i+=2*Math.sqrt(Math.pow(Math.sin(s/(2*this.R)),2)/Math.pow(Math.cos(i),2))*(s>0?1:-1))/Math.PI,-180,180)}let i=e.lat;if(0!==s){let t=Math.abs(s),r=vn(e.lat);i=gn(180*(r+=2*Math.sin(t/(2*this.R))*(t>0?1:-1))/Math.PI,-90,90)}return{lng:r,lat:i}},getResolution:function(e){if(!this.resolutions){for(var t=[],s=12756274*Math.PI,r=0;r<=this.maxZoom;r++)t[r]=s/(256*Math.pow(2,r));this.resolutions=t}let i=0|e,a=this.resolutions.length;i=i<0?0:i>a-1?a-1:i;const n=this.resolutions[i];if((0|e)!==e&&i!==a-1){return n+(this.resolutions[i+1]-n)*(e-i)}return n}},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},lngLatToPoint:function(e,t){var s=this.project(e);return this.transform(s,this.projection.getResolution(t))},locate:function(e,t,s){return this.projection.locate(e,t,s)},transform:function(e,t){return{x:this.matrix[0]*(e.x-this.matrix[2])/t,y:this.matrix[1]*(e.y-this.matrix[3])/t}}};rn().supermap.Transform=Sn; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms 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 bn=Sn.projection,{Color:xn,Scene:Cn,WebGLRenderer:_n,CanvasRenderer:Tn,PerspectiveCamera:En}=fn,An=Math.PI/180,wn=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,Ln=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame;class Pn{constructor(e,t,s){this._layer=e,this.renderer=t||"gl",this.options=s}setMap(e){this.map=e}render(){this._layer&&(this.prepare(),this._layer.fire("initialized"),this._layer&&this._layer.draw(this.context,this.scene,this.camera),this._layer.fire("draw"),this.renderScene())}update(){this.remove(),this.render()}renderScene(){this.locationCamera(),this.animationFrame=this.renderFrame(function(){this.animationFrame=null,this.context&&this.context.render(this.scene,this.camera)}.bind(this))}renderFrame(e){return wn(function(){e&&"function"==typeof e&&e()})}resize(){this._resetElementSize(this.container),this._resetElementSize(this.canvas);let e=this.canvas.width,t=this.canvas.height,s=this.getMapSize();this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.context.setSize(s.width,s.height),this.renderScene()}prepare(){if(!this.map)return new Error("map object is necessary");this.canvas?this.clear(this.context):(this._initContainer(),this._initThreeRenderer(),this._layer.fire("rendererinitialized"))}getMapSize(){let e=this.map.getContainer();return{width:e.clientWidth,height:e.clientHeight}}cancelFrame(){null!=this.animationFrame&&Ln(this.animationFrame)}remove(){null!=this.animationFrame&&Ln(this.animationFrame),this.container.removeChild(this.canvas),this.container.parentNode.removeChild(this.container),this.context=null,this.canvas=null,this.container=null}clear(e){e&&e.clear&&e.clear(),e&&e.clearRect&&e.clearRect(0,0,e.canvas.width,e.canvas.height)}getScale(e){let t=this.map,s=null==e?t.getZoom():e,r=bn.getResolution(bn.nativeMaxZoom);return bn.getResolution(s)/r}getCanvasContainer(){return this.container}getCanvas(){return this.canvas}locationCamera(){let e=this.map,t=this.getMapSize(),s=e.transform.zoomScale(bn.nativeMaxZoom-e.getZoom()-1),r=Math.tan(e.transform.fov/2*An),i=this.camera,a=e.getPitch()*An,n=-s*t.height/2/r;i.position.z=n*Math.cos(a);let o=Sn.lngLatToPoint(e.getCenter(),bn.nativeMaxZoom),l=Math.sin(a)*n,h=e.getBearing()*An;i.position.x=o.x+l*Math.sin(h),i.position.y=o.y-l*Math.cos(h),i.up.set(Math.sin(h),-Math.cos(h),0),i.lookAt(new fn.Vector3(o.x,o.y,0)),i.updateProjectionMatrix()}_initContainer(){var e=this._createCanvas(),t=this.container=document.createElement("div");this._layer._layerId&&(t.id=this._layer._layerId),t.className="threejs-wrapper",t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.overflow="hidden",this._resetElementSize(t),t.appendChild(e),this.map.getCanvasContainer().appendChild(t)}_createCanvas(){if(this.canvas)return;const e=this.canvas=document.createElement("canvas");return e.className="threejs-overlay",e.style.outline="none",this._resetElementSize(e),e}_resetElementSize(e){if(!e)return;const t=this.getMapSize(),s=window.devicePixelRatio?window.devicePixelRatio:1,r=s*t.width,i=s*t.height;e.width=r,e.height=i,e.style.width=t.width+"px",e.style.height=t.height+"px"}_initThreeRenderer(){let e,t=this.map,s=this.getMapSize();"gl"===(this.renderer||"gl")?((e=new _n({canvas:this.canvas,alpha:!0,antialias:!0,preserveDrawingBuffer:!0},this.options)).autoClear=!0,e.clear()):e=new Tn(V.extend({canvas:this.canvas,alpha:!0},this.options)),e.setClearColor(new xn(1,1,1),0),e.canvas=this.canvas,this.context=e;let r=t.transform.fov,i=Math.tan(r/2*An),a=this.getScale(bn.minZoom)/this.getScale(bn.nativeMaxZoom)*s.height/2/i;this.camera=new En(r,s.width/s.height,1,a),this.scene=new Cn,this.scene.add(this.camera)}} /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms 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{Vector3:On,Shape:Nn,Mesh:Mn,BufferGeometry:In,ExtrudeGeometry:Fn}=fn;rn().supermap.ThreeLayer=class extends rn().Evented{constructor(e,t,s){super(),this._layerId=e,this.options=s;let r=s&&s.threeOptions;this.renderer=new Pn(this,t,r)}toThreeShape(e){if(!e)return null;let t=this.getCoordinatesCenter(e),s=this.lngLatToPosition(t),r=e.map(e=>this.lngLatToPosition({lng:e[0],lat:e[1]}).sub(s));return new Nn(r)}toThreeMesh(e,t,s,r){if(!e)return null;let i=e;r&&(i=this.removeDuplicatedCoordinates(e));let a=this.distanceToThreeVector3(t,t).x,n=this.toThreeShape(i),o=new Fn(n,{amount:a,bevelEnabled:!0}),l=(new In).fromGeometry(o),h=new Mn(l,s),u=this.lngLatToPosition(this.getCoordinatesCenter(i));return h.position.set(u.x,u.y,-a),h}addObject(e,t){t&&e&&this.setPosition(e,t),this.renderer&&this.renderer.scene.add(e)}getScene(){return this.renderer.scene}getCamera(){return this.renderer.camera}getThreeRenderer(){return this.renderer.context}clearMesh(){let e=this.renderer.scene;if(!e)return this;for(let t=e.children.length-1;t>=0;t--)e.children[t]instanceof fn.Mesh&&e.remove(e.children[t]);return this}clearAll(e){let t=this.renderer.scene;if(!t)return this;for(let s=t.children.length-1;s>=0;s--)!e&&t.children[s]instanceof fn.Camera||t.remove(t.children[s]);return this}setPosition(e,t){if(!e||!t)return this;var s=this.lngLatToPosition(t);return e.position.set(s.x,s.y,s.z),this}lngLatToPosition(e){let t=Sn.projection.nativeMaxZoom,s=Sn.lngLatToPoint(e,t);return new On(s.x,s.y,-0)}distanceToThreeVector3(e,t,s){let r=this._map,i=s||r.getCenter(),a=Sn.projection.nativeMaxZoom,n=Sn.locate(i,e,t),o=Sn.lngLatToPoint(i,a),l=Sn.lngLatToPoint(n,a),h=Math.abs(l.x-o.x)*Math.sign(e),u=Math.abs(l.y-o.y)*Math.sign(t);return new On(h,u,0)}removeDuplicatedCoordinates(e){function t(e,t){return e[0]===t[0]&&e[1]===t[1]}let s=[].concat(e);for(let e=s.length-1;e>=1;e--)t(s[e],s[e-1])&&s.splice(e,1);return t(s[0],s[s.length-1])&&s.splice(s.length-1,1),s}getCoordinatesCenter(e){let t=0,s=0,r=0,i=0,a=e.length;for(;i0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)}convertFastToPixelPoints(e){var t,s,r,i,a,n,o,l=[],h=e.getEast()-e.getWest(),u=e.getNorth()-e.getSouth(),c=this.map.getCanvas();i=h/c.width>u/c.height?h/c.width:u/c.height,this.useRadius=this.useGeoUnit?parseInt(this.radius/i):this.radius;for(var p=0;p0&&this.maxWidth>0))return!1;var s=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var r=0;r=this.options.minZoom&&t<=this.options.maxZoom,this.map.getLayer(this.sourceId)&&this.map.setLayoutProperty(this.sourceId,"visibility",this.visible?"visible":"none"),this._drawLabel()}setMinZoom(e){this.options.minZoom=e,this.setVisibility()}setMaxZoom(e){this.options.maxZoom=e,this.setVisibility()}setShowLabel(e){this.options.showLabel=e,this._drawLabel()}setExtent(e){this.options.extent=this._getDefaultExtent(e,this.map),this.features=this._getGraticuleFeatures(),this._updateGraticuleLayer(),this._drawLabel()}setStrokeStyle(e){if(!this.map||!this.map.getLayer(this.sourceId))return;this.options.strokeStyle=e;const{layout:t,paint:s}=this._transformStrokeStyle(e);for(let e in t)this.map.setLayoutProperty(this.sourceId,e,t[e]);for(let e in s)this.map.setPaintProperty(this.sourceId,e,s[e])}setLngLabelStyle(e){this.options.lngLabelStyle=e,this._drawLabel()}setLatLabelStyle(e){this.options.latLabelStyle=e,this._drawLabel()}setIntervals(e){this.options.interval=e,this._calcInterval(),this.features=this._getGraticuleFeatures(),this._updateGraticuleLayer(),this._drawLabel()}_bindEvent(){this.map.on("move",this.resetEvent),this.map.on("moveend",this.resetEvent),this.map.on("styledata",this.styleDataEevent),this.map.on("resize",this.resizeEvent),this.map.on("zoomend",this.zoomendEvent)}_unbindEvent(){this.map.off("move",this.resetEvent),this.map.off("moveend",this.resetEvent),this.map.off("styledata",this.styleDataEevent),this.map.off("resize",this.resizeEvent),this.map.off("zoomend",this.zoomendEvent)}_initialize(e=this.map,t=this.options){(t=t||{}).strokeStyle={...Dn,...t.strokeStyle||{}},t.lngLabelStyle={...Rn,...t.lngLabelStyle||{}},t.latLabelStyle={...Rn,...t.latLabelStyle||{}},this.options={...kn,...t,extent:this._getDefaultExtent(t.extent,e),wrapX:"boolean"==typeof t.wrapX?t.wrapX:e.getRenderWorldCopies()},this.oldExtent=this.options.extent,this._calcInterval(),this.isRotate=!1,this.visible=!0,this.features=this._getGraticuleFeatures()}_createCanvas(){if(!this.canvas){this.canvas=document.createElement("canvas"),this.canvas.id=this.canvasId,this.canvas.style.position="absolute",this.canvas.style.top="0px",this.canvas.style.left="0px";var e=("undefined"==typeof window?{}:window).devicePixelRatio||1;this.canvas.width=parseInt(this.map.getCanvas().style.width)*e,this.canvas.height=parseInt(this.map.getCanvas().style.height)*e,this.canvas.style.width=this.map.getCanvas().style.width,this.canvas.style.height=this.map.getCanvas().style.height,this.canvas.globalAlpha=this.options.opacity,this.mapContainer=this.map.getCanvasContainer(),this.mapContainer.appendChild(this.canvas)}}_drawCanvas(){this.canvas||this._createCanvas(),this.setVisibility(),this._reset()}_resizeCallback(){this.mapContainer&&this.mapContainer.removeChild(this.canvas),this.canvas=null,this._drawCanvas()}_reset(){this._updateRotate(),this._updateExtent(),this._calcInterval(),this._drawLabel()}_setLayerTop(e=this.map){if(!e)return;const t=e.getStyle&&e.getStyle().layers;t&&t.length&&t.findIndex(e=>e.id===this.sourceId)!==t.length-1&&e.getLayer(this.sourceId)&&(e.removeLayer(this.sourceId),this._addGraticuleLayer())}_getDefaultExtent(e,t=this.map){const s=t.getCRS&&t.getCRS()||{};let{extent:r}=s;if(r||(r=[-180,-85.05119,180,85.05119]),!e||0===e.length)return r;const{_sw:i,_ne:a}=rn().LngLatBounds.convert(e);return e=[i.lng,i.lat,a.lng,a.lat],e=[Math.max(r[0],e[0]),Math.max(r[1],e[1]),Math.min(r[2],e[2]),Math.min(r[3],e[3])]}_updateRotate(){const e=this.map.getBearing();this.isRotate=e>-180&&e<=-90||e>=90&&e<180}_updateExtent(){if(this.options.wrapX&&!this.oldExtent){const{_ne:e,_sw:t}=this.map.getBounds();this.options.extent=[t.lng,t.lat,e.lng,e.lat]}}_calcInterval(e=this.options.interval){"function"==typeof e?(e=e(this.map),this._currLngInterval=e,this._currLatInterval=e):(this._currLngInterval=e,this._currLatInterval=e)}_formatLat(e){return this.options.latFormatTickLabel?this.options.latLabelFormatter(e):e<0?Qi(-1*e)+"S":e>0?Qi(e)+"N":""+Qi(e)}_formatLng(e){return this.options.lngLabelFormatter?this.options.lngLabelFormatter(e):(e=Xi(e))>0&&e<=180?Qi(e)+"E":e<0&&e>=-180?Qi(-1*e)+"W":""+Qi(e)}_parsePxToInt(e){e.length>2&&"p"===e.charAt(e.length-2)&&(e=e.substr(0,e.length-2));try{return parseInt(e,10)}catch(e){console.log(e)}return 0}_drawLabel(e=this.visible){const t=this.canvas,s=t.getContext("2d");if(e&&this.options.showLabel){if(this.map){this._currLngInterval&&this._currLatInterval||this._calcInterval(),s.clearRect(0,0,t.width,t.height);const{lngLabelStyle:e,latLabelStyle:r}=this.options,{lngPoints:i,latPonits:a}=this._getGridiculePoints();i.forEach(t=>{this._drawLng(s,t[0],t[1],t[2],e)}),a.forEach(e=>{this._drawLat(s,e[0],e[1],e[2],r)})}}else s.clearRect(0,0,t.width,t.height)}_drawLat(e,t,s,r,i){e=this._setLabelStyle(e,i);const a=this.canvas.width;let n=12;try{const t=e.font.split(" ")[0];n=this._parsePxToInt(t)}catch(e){console.log(e)}if(!r){const e=t;t=s,s=this.map.project([e,t])}const o=this._formatLat(t),l=e.measureText(o).width;e.strokeText(o,(r?a:s.x)-l,(r?s:s.y)+n/2),e.fillText(o,(r?a:s.x)-l,(r?s:s.y)+n/2)}_drawLng(e,t,s,r,i){e=this._setLabelStyle(e,i);const a=this.canvas.height;if(!r){const e=s;s=this.map.project([t,e])}const n=this._formatLng(t),o=e.measureText(n).width;e.strokeText(n,(r?s:s.x)-o/2,r?a:s.y),e.fillText(n,(r?s:s.x)-o/2,r?a:s.y)}_getLatPoints(e=[-180,180],t,s,r=this.features){if(!r)return;if(this.options.wrapX&&-180===e[0]&&180===e[1])return[];let i=[];return r.forEach(r=>{const a=r.geometry.coordinates[0][1];if(r.geometry.coordinates[1][1]===a){let r="number"==typeof s?s:e[1];this.isRotate&&(r="number"==typeof t?t:e[0]),this.options.wrapX&&(i=i.concat(this._getWrapPoints(r,a,[r,r]))),i.push([r,a])}}),i}_getLngPoints(e=[-90,90],t,s,r=this.features){if(!r)return;let i="number"==typeof t?t:e[0];this.isRotate&&(i="number"==typeof s?s:e[1]);let a=[];return r.forEach(e=>{let t=e.geometry.coordinates[0][0];e.geometry.coordinates[1][0]===t&&(a.push([t,i]),this.options.wrapX&&(a=a.concat(this._getWrapPoints(t,i))))}),a}_getWrapPoints(e,t,s=this.oldExtent){const r=[],{_ne:i,_sw:a}=this.map.getBounds(),n=s.length>2?s[2]:s[1];for(;e>=a.lng;){const i=Xi(e,180===n,-180===s[0]);(!s||i>=s[0]&&i<=n)&&r.push([e,t]),e-=360}for(;e<=i.lng;){const i=Xi(e,180===n,-180===s[0]);(!s||i>=s[0]&&i<=n)&&r.push([e,t]),e+=360}return r}_getGridiculePoints(){const e=this._getEdgeLat(),t=this._getEdgeLng(),{latRange:s,lngRange:r,firstLat:i,firstLng:a,lastLat:n,lastLng:o}=this._getRange();return{latPonits:this._getUniquePoint(this._getLatPoints(r,a,o),e,1),lngPoints:this._getUniquePoint(this._getLngPoints(s,i,n),t,0)}}_getEdgeLat(e=this._currLatInterval,t=this.map){let s,r=[],i=[];const a=this.canvas.width,n=this.canvas.height,{extent:o}=this._getRange(),{_ne:l}=this.map.getBounds();if(this.options.wrapX&&Xi(l.lng)>o[2])return[];const h=this._countDecimals(e);for(let l=0;l<=n;l++){const n=t.unproject([a,l]),u=Xi(n.lng);(this.options.wrapX?u>=o[0]&&u<=o[2]:n.lng>=o[0]&&n.lng<=o[2])&&n.lat>=o[1]&&n.lat<=o[3]&&(r.push([n.lat,l]),i.push(n.lat),void 0===s&&n.lat.toFixed(h)%e==0&&(s=Number(n.lat.toFixed(h))))}const{first:u,last:c,coordinates:p,points:d}=this._getIntersectRange(s,i,r,e);s=Math.min(Math.max(u,-90),90);const m=Math.max(Math.min(Math.round(c),90),-90);return-90!==s||-90!==m?this._getClosestCoordinate(s,m,p,d,e):[]}_getEdgeLng(e=this._currLngInterval,t=this.map){let s,r=[],i=[];const a=this.canvas.width,n=this.canvas.height,o=this.options.extent,l=this._countDecimals(e),{_sw:h}=this.map.getBounds();if(this.options.wrapX&&Xi(h.lat)>o[3])return[];for(let h=0;h<=a;h++){const a=t.unproject([h,n]),u=Xi(a.lng);(this.options.wrapX?u>=o[0]&&u<=o[2]:a.lng>=o[0]&&a.lng<=o[2])&&a.lat>=o[1]&&a.lat<=o[3]&&(r.push([a.lng,h]),i.push(a.lng),void 0===s&&a.lng.toFixed(l)%e==0&&(s=Number(a.lng.toFixed(l))))}const{first:u,last:c,coordinates:p,points:d}=this._getIntersectRange(s,i,r,e);return s=u,this._getClosestCoordinate(s,c,p,d,e)}_getIntersectRange(e,t,s,r){let i=t[t.length-1];if(e>i){i=e,t.reverse(),s.reverse();const a=this._countDecimals(r);for(let s=0;s<=t.length;s++){const i=t[s];if(i.toFixed(a)%r==0){e=Number(i.toFixed(a));break}}}return{first:e,last:i,coordinates:t,points:s}}_getClosestCoordinate(e,t,s,r,i){let a=[],n=e;for(;n<=t;){const e=this._getClosestNumberIndex(n,s),t=r[e];a.push([Math.round(t[0]),t[1],!0]),n+=i,s=s.slice(e),r=r.slice(e)}return a}_getClosestNumberIndex(e,t){for(var s=0,r=Number.MAX_VALUE,i=0;it[0]===e[n][s]);o<=-1?r.push(e[n]):t&&t.x>=0&&t.x<=i&&t.y>=0&&t.y<=a&&(r[o]=e[n])}return r}_countDecimals(e){return Math.floor(e)!==e&&e.toString().split(".")[1].length||0}_addGraticuleLayer(e=this.features){if(!this.map.getSource(this.sourceId)){const t={type:"geojson",data:{type:"FeatureCollection",features:e}};this.map.addSource(this.sourceId,t)}this.map.getLayer(this.sourceId)||this.map.addLayer({id:this.sourceId,type:"line",source:this.sourceId,...this._transformStrokeStyle()})}_updateGraticuleLayer(e=this.features){if(this.map.getSource(this.sourceId)){const t={type:"FeatureCollection",features:e};this.map.getSource(this.sourceId).setData(t)}this._addGraticuleLayer()}_getGraticuleFeatures(){const e=this._currLngInterval||10,t=this._currLatInterval||10,s=[];let{latRange:r,lngRange:i,firstLat:a,firstLng:n,lastLat:o,lastLng:l}=this._getRange();this.options.wrapX&&!this.oldExtent&&(r=[-90,90],i=[-180,180],a=n=o=l=null),"number"==typeof n&&s.unshift(this._makeLineFeature(this._makeLineCoords(n,r,a,o))),"number"==typeof l&&s.unshift(this._makeLineFeature(this._makeLineCoords(l,r,a,o)));for(var h=i[0];h<=i[1];h+=e)s.unshift(this._makeLineFeature(this._makeLineCoords(h,r,a,o)));"number"==typeof a&&s.unshift(this._makeLineFeature(this._makeLineCoords(a,i,n,l,"lat"))),"number"==typeof o&&s.unshift(this._makeLineFeature(this._makeLineCoords(o,i,n,l,"lat")));for(var u=r[0];u<=r[1];u+=t)s.unshift(this._makeLineFeature(this._makeLineCoords(u,i,n,l,"lat")));return s}_getRange(e=this.options.extent&&[...this.options.extent]){e&&0!==e.length||(e=this._getDefaultExtent());const t={};if((e=e.map(e=>Number(e.toFixed(6))))[1]%this._currLatInterval!=0){t.firstLat=e[1];const s=Math.ceil(e[1]/this._currLatInterval);e[1]=s*this._currLatInterval}if(e[3]%this._currLatInterval!=0){t.lastLat=e[3];const s=Math.floor(e[3]/this._currLatInterval);e[3]=s*this._currLatInterval}if(e[0]%this._currLngInterval!=0){t.firstLng=e[0];const s=Math.ceil(e[0]/this._currLngInterval);e[0]=s*this._currLngInterval}if(e[2]%this._currLngInterval!=0){t.lastLng=e[2];const s=Math.floor(e[2]/this._currLngInterval);e[2]=s*this._currLngInterval}return{latRange:[e[1],e[3]],lngRange:[e[0],e[2]],extent:e,...t}}_makeLineCoords(e,t=[-90,90],s,r,i="lng"){e="lng"===i?this._lngFix(e):e,s="number"==typeof s?s:t[0],r="number"==typeof r?r:t[1];const a=Math.abs(s-r),n=[];for(var o=s;o<=r;o+=a)"lng"===i?n.push([e,o]):n.push([o,e]);return n}_makeLineFeature(e,t="LineString"){return{type:"Feature",geometry:{type:t,coordinates:e}}}_lngFix(e){return e>=180?180:e<=-180?-180:e}_transformStrokeStyle(e=this.options.strokeStyle){if(!e||"string"==typeof e)return{paint:{"line-color":e||"rgba(0,0,0,0.2)"}};const t={visibility:this.visible?"visible":"none","line-join":e.lineJoin||"round","line-cap":e.lineCap||"round"},s={"line-color":e.lineColor||"rgba(0,0,0,0.2)","line-width":e.lineWidth||1,"line-offset":e.lineDashOffset||0,"line-translate-anchor":"viewport"};return e.lineWidth&&("function"==typeof e.lineWidth?s["line-width"]=e.lineWidth(this.map):s["line-width"]=e.lineWidth),e.lindDasharray&&("function"==typeof e.lindDasharray?s["line-dasharray"]=e.lindDasharray(this.map):s["line-dasharray"]=e.lindDasharray),{layout:t,paint:s}}_setLabelStyle(e,t){return t.textColor&&(e.fillStyle=t.textColor),t.textSize&&(e.font=t.textSize+" "+(t.textFont||["Calibri","sans-serif"]).join(",")),t.textHaloColor&&(e.strokeStyle=t.textHaloColor,e.lineWidth=t.textHaloWidth||1),t.textAnchor&&(e.textBaseline=this._getTxetBaseline(t.textAnchor),e.textAligin=this._getTxetAlign(t.textAligin)),e}_getTxetBaseline(e){if(!e)return"bottom";const t=e.split("-");return t.includes("bottom")?"bottom":t.includes("top")?"top":t.includes("center")?"middle":void 0}_getTxetAlign(e){if(!e)return"center";const t=e.split("-");return t.includes("left")?"left":t.includes("right")?"right":t.includes("center")?"center":void 0}}; /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms 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 Bn={getPoint:function(e){if(e&&e instanceof Array)return new cn.DataSet([{geometry:{type:"Point",coordinates:e}}])},getPoints:function(e){if(e&&e instanceof Array){var t=[];return e.map(function(e){return t.push({geometry:{type:"Point",coordinates:e.geometry.coordinates}}),e}),new cn.DataSet(t)}},getCurveLines:function(e,t){if(e&&e instanceof Array&&t&&t instanceof Array){var s=[];return t.map(function(t){var r=t.geometry&&t.geometry.coordinates,i={lng:r[0],lat:r[1]},a={lng:e[0],lat:e[1]},n=cn.utilCurve.getPoints([a,i]);return s.push({geometry:{type:"LineString",coordinates:n}}),t}),new cn.DataSet(s)}},getCurveDynamicPoints:function(e,t){if(e&&e instanceof Array&&t&&t instanceof Array){var s=[];return t.map(function(t){for(var r=t.geometry&&t.geometry.coordinates,i={lng:r[0],lat:r[1]},a={lng:e[0],lat:e[1]},n=cn.utilCurve.getPoints([a,i]),o=0;o{s.currentStatisticResult[t]=null,s._fieldStatisticRequest(e.datasource,e.dataset,r,t)})}_fieldStatisticRequest(e,t,s,r){var i=this;new Kt(i.url,{eventListeners:{scope:i,processCompleted:i._processCompleted,processFailed:i._statisticsCallback},datasource:e,dataset:t,field:s,statisticMode:r,crossOrigin:i.options.crossOrigin,headers:i.options.headers}).processAsync()}_processCompleted(e){var t=this,s=!0,r=e.result;for(var i in this.currentStatisticResult&&null==t.currentStatisticResult[r.mode]&&(this.currentStatisticResult[r.mode]=r.result),t.currentStatisticResult)if(null==t.currentStatisticResult[i]){s=!1;break}s&&t._statisticsCallback({result:t.currentStatisticResult})}};rn().supermap.GridCellInfosService= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Un{constructor(e,t){super(e,t)}getGridCellInfos(e,t){if(!e)return null;var s=this;new Ms(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}}).processAsync(e)}};rn().supermap.GeoprocessingService=class extends Un{constructor(e,t){super(e,t),this.headers={},this.crossOrigin=!0,this.withCredentials=!0,this.proxy=!0}getTools(e){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:e,processFailed:e}}).getTools()}getTool(e,t){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getTool(e)}execute(e,t,s,r){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).execute(e,t,s)}submitJob(e,t,s,r){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).submitJob(e,t,s)}waitForJobCompletion(e,t,s,r){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).waitForJobCompletion(e,t,s)}getJobInfo(e,t,s){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).getJobInfo(e,t)}cancelJob(e,t,s){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:s,processFailed:s}}).cancelJob(e,t)}getJobs(e,t){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:t,processFailed:t}}).getJobs(e)}getResults(e,t,s,r){new ys(this.url,{proxy:this.options.proxy,withCredentials:this.options.withCredentials,crossOrigin:this.options.crossOrigin,headers:this.options.headers,serverType:this.options.serverType,eventListeners:{scope:this,processCompleted:r,processFailed:r}}).getResults(e,t,s)}};rn().supermap.LayerInfoService= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Un{constructor(e,t){super(e,t)}getLayersInfo(e){var t=this;new lr(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(e,t){if(e){var s=this,r=e.resourceID,i=e.tempLayerName,a=e.layerInfo;if(r&&i){var n=V.urlPathAppend(s.url,"tempLayersSet/"+r+"/"+i);new Ur(n,{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}}).processAsync(a)}}}setLayersInfo(e,t){if(e){var s=this,r=e.resourceID,i=!!e.isTempLayers&&e.isTempLayers,a=e.layersInfo;i&&!r||!a||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:{processCompleted:t,processFailed:t},resourceID:r,isTempLayers:i}).processAsync(a)}}setLayerStatus(e,t){if(e){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:{processCompleted:t,processFailed:t}}).processAsync(e)}}};rn().supermap.MapService= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Un{constructor(e,t){super(e,t)}getMapInfo(e){var t=this;new vr(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(e){var t=this;new di(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()}};rn().supermap.MeasureService= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Un{constructor(e,t){super(e,t)}measureDistance(e,t){this.measure(e,"DISTANCE",t)}measureArea(e,t){this.measure(e,"AREA",t)}measure(e,t,s){var r=this;new Cr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,crossOrigin:r.options.crossOrigin,headers:r.options.headers,serverType:r.options.serverType,measureMode:t,eventListeners:{scope:r,processCompleted:s,processFailed:s}}).processAsync(r._processParam(e))}_processParam(e){return!e||e.geometry instanceof X||(e.geometry=nn.toSuperMapGeometry(e.geometry)),e}};rn().supermap.NetworkAnalystService= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Un{constructor(e,t){super(e,t)}burstPipelineAnalyst(e,t){var s=this;new dt(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}}).processAsync(s._processParams(e))}computeWeightMatrix(e,t){var s=this;new _t(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}}).processAsync(s._processParams(e))}findClosestFacilities(e,t,s){var r=this;new $t(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}streamFacilityAnalyst(e,t,s){var r=this;new Jt(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}findLocation(e,t,s){var r=this;new ts(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}findPath(e,t,s){var r=this;new as(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}findTSPPaths(e,t,s){var r=this;new hs(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}findMTSPPaths(e,t,s){var r=this;new rs(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}findServiceAreas(e,t,s){var r=this;new os(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}updateEdgeWeight(e,t){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}}).processAsync(e)}updateTurnNodeWeight(e,t){var s=this;new Ti(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}}).processAsync(e)}_processParams(e){if(!e)return{};var t=this;if(e.centers&&nn.isArray(e.centers)&&e.centers.map(function(s,r){return e.centers[r]=t._toPointObject(s),e.centers[r]}),e.nodes&&nn.isArray(e.nodes)&&e.nodes.map(function(s,r){return e.nodes[r]=t._toPointObject(s),e.nodes[r]}),e.event&&(e.event=t._toPointObject(e.event)),e.facilities&&nn.isArray(e.facilities)&&e.facilities.map(function(s,r){return e.facilities[r]=t._toPointObject(s),e.facilities[r]}),e.parameter&&e.parameter.barrierPoints){var s=e.parameter.barrierPoints;nn.isArray(s)?s.map(function(s,r){return e.parameter[r]=t._toPointObject(s),e.parameter.barrierPoints[r]}):e.parameter.barrierPoints=[s instanceof rn().LngLat?{x:s.lng,y:s.lat}:s]}return e}_toPointObject(e){return nn.isArray(e)?{x:e[0],y:e[1]}:e instanceof rn().LngLat?{x:e.lng,y:e.lat}:e instanceof rn().Point?{x:e.x,y:e.y}:e}_processFormat(e){return e||t.GEOJSON}};rn().supermap.NetworkAnalyst3DService= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Un{constructor(e,t){super(e,t)}sinksFacilityAnalyst(e,t){var s=this;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}}).processAsync(e)}sourcesFacilityAnalyst(e,t){var s=this;new Ht(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}}).processAsync(e)}traceUpFacilityAnalyst(e,t){var s=this;new qt(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}}).processAsync(e)}traceDownFacilityAnalyst(e,t){var s=this;new Wt(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}}).processAsync(e)}upstreamFacilityAnalyst(e,t){var s=this;new Xt(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}}).processAsync(e)}};rn().supermap.ProcessingService= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Un{constructor(e,t){super(e,t),this.kernelDensityJobs={},this.summaryMeshJobs={},this.queryJobs={},this.summaryRegionJobs={},this.vectorClipJobs={},this.overlayGeoJobs={},this.buffersJobs={},this.topologyValidatorJobs={},this.summaryAttributesJobs={}}getKernelDensityJobs(e,t){var s=this,r=s._processFormat(t);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:e,processFailed:e},format:r}).getKernelDensityJobs()}getKernelDensityJob(e,t,s){var r=this,i=r._processFormat(s);new fr(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},format:i}).getKernelDensityJob(e)}addKernelDensityJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new fr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.kernelDensityJobs[e.id]=e.state}},format:n}).addKernelDensityJob(a,s)}getKernelDensityJobState(e){return this.kernelDensityJobs[e]}getSummaryMeshJobs(e,t){var s=this,r=s._processFormat(t);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:e,processFailed:e},format:r}).getSummaryMeshJobs()}getSummaryMeshJob(e,t,s){var r=this,i=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},format:i}).getSummaryMeshJob(e)}addSummaryMeshJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Kr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryMeshJobs[e.id]=e.state}},format:n}).addSummaryMeshJob(a,s)}getSummaryMeshJobState(e){return this.summaryMeshJobs[e]}getQueryJobs(e,t){var s=this,r=s._processFormat(t);new Wr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getQueryJobs()}getQueryJob(e,t,s){var r=this,i=r._processFormat(s);new Wr(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},format:i}).getQueryJob(e)}addQueryJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Wr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.queryJobs[e.id]=e.state}},format:n}).addQueryJob(a,s)}getQueryJobState(e){return this.queryJobs[e]}getSummaryRegionJobs(e,t){var s=this,r=s._processFormat(t);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:e,processFailed:e},format:r}).getSummaryRegionJobs()}getSummaryRegionJob(e,t,s){var r=this,i=r._processFormat(s);new $r(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},format:i}).getSummaryRegionJob(e)}addSummaryRegionJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new $r(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryRegionJobs[e.id]=e.state}},format:n}).addSummaryRegionJob(a,s)}getSummaryRegionJobState(e){return this.summaryRegionJobs[e]}getVectorClipJobs(e,t){var s=this,r=s._processFormat(t);new Ai(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:e,processFailed:e},format:r}).getVectorClipJobs()}getVectorClipJob(e,t,s){var r=this,i=r._processFormat(s);new Ai(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getVectorClipJob(e)}addVectorClipJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Ai(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.vectorClipJobs[e.id]=e.state}},format:n}).addVectorClipJob(a,s)}getVectorClipJobState(e){return this.vectorClipJobs[e]}getOverlayGeoJobs(e,t){var s=this,r=s._processFormat(t);new Er(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getOverlayGeoJobs()}getOverlayGeoJob(e,t,s){var r=this,i=r._processFormat(s);new Er(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getOverlayGeoJob(e)}addOverlayGeoJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Er(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.overlayGeoJobs[e.id]=e.state}},format:n}).addOverlayGeoJob(a,s)}getoverlayGeoJobState(e){return this.overlayGeoJobs[e]}getBuffersJobs(e,t){var s=this,r=s._processFormat(t);new ut(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getBuffersJobs()}getBuffersJob(e,t,s){var r=this,i=r._processFormat(s);new ut(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getBuffersJob(e)}addBuffersJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new ut(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.buffersJobs[e.id]=e.state}},format:n}).addBuffersJob(a,s)}getBuffersJobState(e){return this.buffersJobs[e]}getTopologyValidatorJobs(e,t){var s=this,r=s._processFormat(t);new yi(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getTopologyValidatorJobs()}getTopologyValidatorJob(e,t,s){var r=this,i=r._processFormat(s);new yi(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getTopologyValidatorJob(e)}addTopologyValidatorJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new yi(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.topologyValidatorJobs[e.id]=e.state}},format:n}).addTopologyValidatorJob(a,s)}getTopologyValidatorJobState(e){return this.topologyValidatorJobs[e]}getSummaryAttributesJobs(e,t){var s=this,r=s._processFormat(t);new Xr(s.url,{proxy:s.options.proxy,withCredentials:s.options.withCredentials,serverType:s.options.serverType,crossOrigin:s.options.crossOrigin,headers:s.options.headers,eventListeners:{scope:s,processCompleted:e,processFailed:e},format:r}).getSummaryAttributesJobs()}getSummaryAttributesJob(e,t,s){var r=this,i=r._processFormat(s);new Xr(r.url,{proxy:r.options.proxy,withCredentials:r.options.withCredentials,serverType:r.options.serverType,crossOrigin:r.options.crossOrigin,headers:r.options.headers,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:i}).getSummaryAttributesJob(e)}addSummaryAttributesJob(e,t,s,r){var i=this,a=i._processParams(e),n=i._processFormat(r);new Xr(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,serverType:i.options.serverType,crossOrigin:i.options.crossOrigin,headers:i.options.headers,eventListeners:{scope:i,processCompleted:t,processFailed:t,processRunning:function(e){i.summaryAttributesJobs[e.id]=e.state}},format:n}).addSummaryAttributesJob(a,s)}getSummaryAttributesJobState(e){return this.summaryAttributesJobs[e]}_processFormat(e){return e||t.GEOJSON}_processParams(e){return e?(e.bounds&&(e.bounds=nn.toSuperMapBounds(e.bounds)),e.query&&(e.query=nn.toSuperMapBounds(e.query)),e.geometryQuery&&(e.geometryQuery=nn.toProcessingParam(e.geometryQuery)),e.geometryClip&&(e.geometryClip=nn.toProcessingParam(e.geometryClip)),e):{}}};rn().supermap.QueryService= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Un{constructor(e,t){super(e,t)}queryByBounds(e,t,s){var r=this;new Lr(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryByDistance(e,t,s){var r=this;new Or(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryBySQL(e,t,s){var r=this;new Fr(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}queryByGeometry(e,t,s){var r=this;new Mr(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}_processParams(e){return e?(e.returnContent=null==e.returnContent||e.returnContent,e.queryParams&&!nn.isArray(e.queryParams)&&(e.queryParams=[e.queryParams]),e.bounds&&(e.bounds instanceof Array&&(e.bounds=new Y(e.bounds[0],e.bounds[1],e.bounds[2],e.bounds[3])),e.bounds instanceof rn().LngLatBounds&&(e.bounds=new Y(e.bounds.getSouthWest().lng,e.bounds.getSouthWest().lat,e.bounds.getNorthEast().lng,e.bounds.getNorthEast().lat))),e.geometry&&(e.geometry instanceof rn().LngLat&&(e.geometry=new $(e.geometry.lng,e.geometry.lat)),e.geometry instanceof rn().Point&&(e.geometry=new $(e.geometry.x,e.geometry.y)),e.geometry instanceof rn().LngLatBounds&&(e.geometry=nn.toSuperMapPolygon(e.geometry)),e.geometry instanceof X||(e.geometry=nn.toSuperMapGeometry(e.geometry))),e):{}}_processFormat(e){return e||t.GEOJSON}};rn().supermap.SpatialAnalystService= /* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of 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 Un{constructor(e,t){super(e,t)}getAreaSolarRadiationResult(e,t,s){var r=this;new Xe(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},format:r._processFormat(s)}).processAsync(e)}bufferAnalysis(e,t,s){var r=this;new at(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}densityAnalysis(e,t,s){var r=this;new Ft(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}generateSpatialData(e,t,s){var r=this;new cs(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},format:r._processFormat(s)}).processAsync(e)}geoRelationAnalysis(e,t,s){var r=this;new gs(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},format:r._processFormat(s)}).processAsync(e)}interpolationAnalysis(e,t,s){var r=this;new mr(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}mathExpressionAnalysis(e,t,s){var r=this;new br(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}overlayAnalysis(e,t,s){var r=this;new _r(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}routeCalculateMeasure(e,t,s){var r=this;new Dr(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}routeLocate(e,t,s){var r=this;new Br(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}surfaceAnalysis(e,t,s){var r=this;new ti(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}terrainCurvatureCalculate(e,t,s){var r=this;new ri(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},format:r._processFormat(s)}).processAsync(e)}thiessenAnalysis(e,t,s){var r=this;new ci(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},format:r._processFormat(s)}).processAsync(r._processParams(e))}geometrybatchAnalysis(e,t,s){for(var r=this,i=new pi(r.url,{serverType:r.options.serverType,eventListeners:{scope:r,processCompleted:t,processFailed:t},format:r._processFormat(s)}),a=[],n=0;n-1){let e=this.server.split(s);e.length>1&&(t=e[0]+s+this.server+"web/maps/"+this.mapId+"/map.json")}this._getMapInfo(t)}_createMap(e){let t=[],s=e.layers;s&&s.length>0&&s.forEach(e=>{e.labelStyle&&t.push(e.labelStyle.fontFamily)},this),t.push("'supermapol-icons'");let r,i=t.join(","),a=e.center,n=e.level||0,o=0;if(e.minScale&&e.maxScale)o=this._transformScaleToZoom(e.minScale,rn().CRS?rn().CRS.get(this.baseProjection):"EPSG:3857");else{const t=this._getResolution(rn().CRS?rn().CRS.get(this.baseProjection).getExtent():[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892])/this._getResolution(e.extent);o=+Math.log(t)/Math.LN2.toFixed(2)}n+=o,r=a?this._unproject([a.x,a.y]):new(rn().LngLat)(0,0),this.map=new(rn().Map)({container:this.target,center:r,zoom:n,style:{version:8,sources:{},layers:[]},crs:this.baseProjection,localIdeographFontFamily:i||""}),this.fire("mapinitialized")}_getMapInfo(e){let t=-1===e.indexOf(".json")?`${e}.json`:e;Ae.get(t,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(e=>{if(this.baseProjection=e.projection,this.mapParams={title:e.title,description:e.description},!(this.baseProjection in{"EPSG:4490":"EPSG:4490","EPSG:4214":"EPSG:4214","EPSG:4610":"EPSG:4610","EPSG:3857":"EPSG:3857","EPSG:4326":"EPSG:4326"}))throw Error(qa.i18n("msg_crsunsupport"));{this._createMap(e,this.mapSetting);let t=e.layers;this.map.on("load",()=>{this._addBaseMap(e),t&&0!==t.length?this._addLayers(t):this._sendMapToUser(0,0)})}}).catch(e=>{this.fire("getmapfailed",{error:e})})}_addBaseMap(e){this._createBaseLayer(e)}_createBaseLayer(e){let t=e.baseLayer||e,s=t.layerType;(s.indexOf("TIANDITU_VEC")>-1||s.indexOf("TIANDITU_IMG")>-1||s.indexOf("TIANDITU_TER")>-1)&&(s=s.substr(0,12));let r,i={CLOUD:"http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}",CLOUD_BLACK:"http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}",OSM:"http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",GOOGLE:"https://www.google.cn/maps/vt/pb=!1m4!1m3!1i{z}!2i{x}!3i{y}!2m3!1e0!2sm!3i380072576!3m8!2szh-CN!3scn!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0!5m1!1e0",GOOGLE_CN:"https://mt{0-3}.google.cn/vt/lyrs=m&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}",JAPAN_STD:"https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",JAPAN_PALE:"https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",JAPAN_RELIEF:"https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png",JAPAN_ORT:"https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg"};switch(s){case"TIANDITU_VEC":case"TIANDITU_IMG":case"TIANDITU_TER":this._createTiandituLayer(e);break;case"BING":this._createBingLayer(t.name);break;case"WMS":this._createWMSLayer(t);break;case"WMTS":this._createWMTSLayer(t);break;case"TILE":case"SUPERMAP_REST":this._createDynamicTiledLayer(t);break;case"CLOUD":case"CLOUD_BLACK":case"OSM":case"JAPAN_ORT":case"JAPAN_RELIEF":case"JAPAN_PALE":case"JAPAN_STD":case"GOOGLE_CN":case"GOOGLE":r=i[s],this._createXYZLayer(t,r);break;case"MAPBOXSTYLE":this._createMapboxStyle(t)}}_createMapboxStyle(e){let t,s=this,{dataSource:r={}}=e,{serverId:i,url:a}=r;t=void 0!==i?`${this.server}web/datas/${i}/download`:a,Ae.get(t,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(e=>e.json()).then(e=>{s._matchStyleObject(e),s.map.setStyle(e)})}_matchStyleObject(e){let{sprite:t,glyphs:s}=e;t&&"object"==typeof t&&(e.sprite=Object.values(t)[0]),s&&"object"==typeof s&&(e.glyphs=Object.values(s)[0])}_createTiandituLayer(e){let t=this._getTiandituUrl(e),s=e.baseLayer.layerType,r=Boolean(e.baseLayer.labelLayerVisible),i=t.labelUrl,a=t.tiandituUrl;this._addBaselayer(a,"tianditu-layers-"+s),r&&this._addBaselayer(i,"tianditu-label-layers-"+s)}_createWMTSLayer(e){let t=this._getWMTSUrl(e);this._filterWMTSIsMatched(e,(s,r)=>{s&&this._addBaselayer([t],"wmts-layers"+e.name,0,r)})}_filterWMTSIsMatched(e,t){let s=!1,r=22,i=e.url;Ae.get(i,null,{withCredentials:!1,withoutFormatSuffix:!0}).then(e=>e.text()).then(i=>{let a=jn()?jn():window.convert,n=JSON.parse(a.xml2json(i,{compact:!0,spaces:4})).Capabilities.Contents.TileMatrixSet;Array.isArray(n)||(n=[n]);for(let t=0;t-1)s=!0;else{if(!n[t].WellKnownScaleSet||"Custom"!==n[t].WellKnownScaleSet._text)throw Error(qa.i18n("msg_tilematrixsetunsupport"));{let e=[],i="EPSG:3857"===this.map.crs?Wn:Vn;for(let s=0,r=i.length;s{this.fire("getwmtsfailed",{error:e,map:this.map})})}_createBingLayer(e){this.addLayer(["https://dynamic.t0.tiles.ditu.live.com/comp/ch/{quadkey}?it=G,TW,L,LA&mkt=zh-cn&og=109&cstl=w4c&ur=CN&n=z"],"bing-layers-"+e)}_createXYZLayer(e,t){let s=[];if("OSM"===e.layerType){let e=t.match(/\w\-\w/g)[0],r=e[0],i=e[2],a="";for(let e=97;e<123;e++)a+=String.fromCharCode(e);let n=a.split(""),o=n.indexOf(r),l=n.indexOf(i),h=n.slice(o,l+1);for(let e=0;e{if(e.dataSource&&e.dataSource.serverId||"MARKER"===e.layerType){let a=e.dataSource?e.dataSource.serverId:e.serverId,n=`${this.server}web/datas/${a}/content.json?pageSize=9999999¤tPage=1`;a&&Ae.get(n,null,{withCredentials:this.withCredentials}).then(e=>e.json()).then(a=>{if(!1===a.succeed)return s++,this._sendMapToUser(s,r),void this.fire("getlayersfailed",{error:a.error,map:this.map});a.type&&("JSON"===a.type||"GEOJSON"===a.type?(a.content=JSON.parse(a.content.trim()),t=this._formatGeoJSON(a.content,e)):"EXCEL"!==a.type&&"CSV"!==a.type||(t=this._excelData2Feature(a.content,e)),this._addLayer(e,t,i),s++,this._sendMapToUser(s,r))}).catch(e=>{s++,this._sendMapToUser(s,r),this.fire("getlayersfailed",{error:e,map:this.map})})}else if("SUPERMAP_REST"===e.layerType||"TILE"===e.layerType||"WMS"===e.layerType||"WMTS"===e.layerType)this._createBaseLayer(e),s++,this._sendMapToUser(s,r);else if(e.dataSource&&"REST_DATA"===e.dataSource.type){let a=e.dataSource;this._getFeatureBySQL(a.url,[a.dataSourseName||e.name],a=>{t=this._parseGeoJsonData2Feature({allDatas:{features:a.result.features.features},fileCode:e.projection,featureProjection:this.baseProjection}),this._addLayer(e,t,i),s++,this._sendMapToUser(s,r)},e=>{s++,this._sendMapToUser(s,r),this.fire("getfeaturesfailed",{error:e})})}else e.dataSource&&"REST_MAP"===e.dataSource.type&&e.dataSource.url&&this._queryFeatureBySQL(e.dataSource.url,e.dataSource.layerName,"smid=1",null,null,t=>{let a=t&&t.result.recordsets,n=a&&a[0],o=n.fields;if(n&&o){let t=[];for(let e in o){let s=o[e];0===s.indexOf("Sm")&&"SmID"!==s||t.push(s)}this._getFeatures(t,e,t=>{this._addLayer(e,t,i),s++,this._sendMapToUser(s,r)},e=>{s++,this.fire("getfeaturesfailed",{error:e,map:this.map})})}},e=>{this.fire("getlayersfailed",{error:e,map:this.map})})},this)}_getFeatures(e,t,s,r){let i=t.dataSource,a=t.projection;this._queryFeatureBySQL(i.url,i.layerName,null,e,null,e=>{let t=e.result.recordsets[0].features.features,r=this._parseGeoJsonData2Feature({allDatas:{features:t},fileCode:a,featureProjection:this.baseProjection},"JSON");s(r)},e=>{r(e)})}_addLayer(e,t,s){let r=e.layerType;e.layerID=r+"-"+e.name+"-"+s,e.visible=e.visible?"visible":"none",t[0]&&"Polygon"===t[0].geometry.type&&(t=this._handleMultyPolygon(t)),e.style&&e.filterCondition&&"RANGE"!==r&&"UNIQUE"!==r&&(t=this._getFiterFeatures(e.filterCondition,t)),"VECTOR"===r?"POINT"===e.featureType?"SYMBOL_POINT"===e.style.type?this._createSymbolLayer(e,t):this._createGraphicLayer(e,t):this._createVectorLayer(e,t):"UNIQUE"===r?this._createUniqueLayer(e,t):"RANGE"===r?this._createRangeLayer(e,t):"HEAT"===r?this._createHeatLayer(e,t):"MARKER"===r&&this._createMarkerLayer(e,t),e.labelStyle&&e.labelStyle.labelField&&this._addLabelLayer(e,t)}_addLabelLayer(e,t){let s=e.labelStyle;this.map.addLayer({id:e.layerID+"label",type:"symbol",source:{type:"geojson",data:{type:"FeatureCollection",features:t}},paint:{"text-color":s.fill},layout:{"text-field":`{${s.labelField}}`,"text-size":parseFloat(s.fontSize)||12,"text-offset":s.offsetX?[s.offsetX/10||0,s.offsetY/10||0]:[0,-1.5],"text-font":["DIN Offc Pro Italic","Arial Unicode MS Regular"],visibility:e.visible}})}_createSymbolLayer(e,t){document.getElementById(`${this.target}`).classList.add("supermapol-icons-map");let s=e.style,r=e.style.unicode,i=String.fromCharCode(parseInt(r.replace(/^&#x/,""),16)),a=e.layerID;this.map.addSource(a+"-source",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:a,type:"symbol",source:a+"-source",paint:{"text-color":s.fillColor},layout:{"text-field":i,"text-font":["DIN Offc Pro Italic","Arial Unicode MS Regular"],visibility:e.visible}}),this.map.getSource(a+"-source").setData({type:"FeatureCollection",features:t})}_createGraphicLayer(e,t){let s=e.style,r={},i=e.layerID,a={type:"geojson",data:{type:"FeatureCollection",features:t}};if("IMAGE_POINT"===s.type){let t=s.imageInfo,r=t.img;r&&r.src||(t.url=this.server+t.url),this.map.loadImage(t.url||r.src,(t,r)=>{t&&console.log(t);let n=2*Number.parseFloat((s.radius/r.height).toFixed(2));this.map.addImage("imageIcon",r),this.map.addLayer({id:i,type:"symbol",source:a,layout:{"icon-image":"imageIcon","icon-size":n,visibility:e.visible}})})}else if("SVG_POINT"===s.type){let t=s.url;this.svgDiv||(this.svgDiv=document.createElement("div"),document.body.appendChild(this.svgDiv)),this._getCanvasFromSVG(t,this.svgDiv,t=>{let r=t.toDataURL("img/png");r&&this.map.loadImage(r,(r,n)=>{r&&console.log(r);let o=Number.parseFloat((s.radius/t.width).toFixed(2));this.map.addImage("imageIcon",n),this.map.addLayer({id:i,type:"symbol",source:a,layout:{"icon-image":"imageIcon","icon-size":o,visibility:e.visible}})},this)})}else r.style=this._transformStyleToMapBoxGl(s,e.featureType),r.layout={visibility:e.visible},this._addOverlayToMap("POINT",a,i,r)}_createUniqueLayer(e,t){let s=this._getUniqueStyleGroup(e,t);t=this._getFiterFeatures(e.filterCondition,t);let r=e.style,i={},a=e.themeSetting.themeField,n=e.featureType,o=["match",["get","index"]],l=e.layerID;t.forEach(e=>{s.forEach(t=>{t.value===e.properties[a]&&o.push(e.properties.index,t.color)})}),o.push("#ffffff"),i.style=this._transformStyleToMapBoxGl(r,n,o);let h=e.visible;i.layout={visibility:h};let u={type:"geojson",data:{type:"FeatureCollection",features:t}};this._addOverlayToMap(n,u,l,i),"POLYGON"===n&&r.strokeColor&&this._addStrokeLineForPoly(r,u,l+"-strokeLine",h)}_getUniqueStyleGroup(e,t){let s=e.featureType,r=e.style,i=e.themeSetting,a=i.themeField,n=i.colors,o=[],l=i.customSettings;for(let e in t){let s=t[e].properties[a],r=!1;for(let e in o)if(o[e]===s){r=!0;break}r||o.push(s)}let h=n||this.defaultParameters.colors;h=Vi.getGradientColors(h,o.length);let u=[];return o.forEach((e,t)=>{let i=h[t];e in l&&(i=l[e]),"LINE"===s?r.strokeColor=i:r.fillColor=i,u.push({color:i,value:e})},this),u}_getWMTSUrl(e){let t={service:"WMTS",request:"GetTile",version:"1.0.0",style:"default",layer:e.layer,tilematrixSet:e.tileMatrixSet,format:"image/png"},s=e.url;return s+=this._getParamString(t,s)+"&tilematrix={z}&tilerow={y}&tilecol={x}"}_createMarkerLayer(e,t){t&&t.forEach(t=>{let s=t.geometry.type.toUpperCase(),r=t.dv_v5_markerStyle;"POINT"===s&&r.text&&(s="TEXT");let i=this.setFeatureInfo(t);t.properties.useStyle=r,t.properties.featureInfo=i,"POINT"===s&&r.src&&-1===r.src.indexOf("http://")&&-1===r.src.indexOf("https://")&&(r.src=this.server+r.src);let a={type:"geojson",data:t},n=t.properties.index,o=s+"-"+n;if("POINT"===s&&r.src&&r.src.indexOf("svg")<=-1&&this.map.loadImage(r.src,(t,s)=>{t&&console.log(t),this.map.addImage(n+"",s),this.map.addLayer({id:o,type:"symbol",source:a,layout:{"icon-image":n+"","icon-size":r.scale,visibility:e.visible}})},this),"POINT"===s&&r.src&&r.src.indexOf("svg")>-1&&(this.svgDiv||(this.svgDiv=document.createElement("div"),document.body.appendChild(this.svgDiv)),this._getCanvasFromSVG(r.src,this.svgDiv,t=>{let s=t.toDataURL("img/png");s&&this.map.loadImage(s,(t,s)=>{t&&console.log(t),this.map.addImage(n+"",s),this.map.addLayer({id:o,type:"symbol",source:a,layout:{"icon-image":n+"","icon-size":r.scale,visibility:e.visible}})},this)})),!r.src){let t={layout:{}};"LINESTRING"===s&&r.lineCap&&(s="LINE",t.layout={"line-cap":r.lineCap});let i=e.visible;t.layout.visibility=i,t.style=this._transformStyleToMapBoxGl(r,s),this._addOverlayToMap(s,a,o,t),"POLYGON"===s&&r.strokeColor&&this._addStrokeLineForPoly(r,a,o+"-strokeLine",i)}},this)}setFeatureInfo(e){let t,s=e.dv_v5_markerInfo;if(!s||!s.dataViz_title)return s;t=s;let r=e.properties;for(let e in t)r[e]&&(t[e]=r[e],delete r[e]);return t}_createHeatLayer(e,t){let s=e.themeSetting,r={};r.gradient=s.colors.slice(),r.radius=parseInt(s.radius);let i=s.customSettings;for(let e in i)r.gradient[e]=i[e];s.weight&&this._changeWeight(t,s.weight);let a=["interpolate",["linear"],["heatmap-density"]],n=(1/r.gradient.length).toFixed(2);r.gradient.forEach((e,t)=>{a.push(t*n),0===t&&(e=nn.hexToRgba(e,0)),a.push(e)});let o={"heatmap-color":a,"heatmap-radius":s.radius+15,"heatmap-intensity":{base:1,stops:[[0,.8],[22,1]]}};if(t[0].weight&&t.length>=4){let e=[];t.forEach(t=>{e.push(t.weight)});let s=qi.getMax(e),r=qi.getMin(e);o["heatmap-weight"]=["interpolate",["linear"],["get","weight"],r,0,s,1]}this.map.addLayer({id:e.layerID,type:"heatmap",source:{type:"geojson",data:{type:"FeatureCollection",features:t}},paint:o})}_changeWeight(e,t){this.fieldMaxValue={},this._getMaxValue(e,t);let s=this.fieldMaxValue[t];e.forEach(e=>{let r=e.properties[t];e.weight=r/s})}_getMaxValue(e,t){let s,r=[],i=t;this.fieldMaxValue[i]||(e.forEach(e=>{(s=e.properties)&&parseFloat(s[i])&&r.push(parseFloat(s[i]))}),this.fieldMaxValue[i]=qi.getArrayStatistic(r,"Maximum"))}_createRangeLayer(e,t){let s=e.themeSetting.themeField,r=e.style,i=e.featureType,a=this._getRangeStyleGroup(e,t),n={type:"geojson",data:{type:"FeatureCollection",features:t=this._getFiterFeatures(e.filterCondition,t)}},o=["match",["get","index"]];t.forEach(e=>{let t=parseFloat(e.properties[s]);for(let s=0;s0&&r.push(i)}return r}_replaceFilterCharacter(e){return e=e.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=")}_getRangeStyleGroup(e,t){let s,r=e.featureType,i=e.style,a=[],n=e.themeSetting,o=n.customSettings,l=n.themeField,h=n.segmentCount;t.forEach(e=>{(s=e.properties||e.get("Properties"))?s[l]&&nn.isNumber(s[l])&&a.push(parseFloat(s[l])):e.get(l)&&nn.isNumber(e.get(l))&&e.get(l)&&a.push(parseFloat(e.get(l)))},this);let u=qi.getArraySegments(a,n.segmentMethod,h);if(u){let e=h;s&&u[0]===u[s.length-1]&&(e=1,u.length=2);for(let e in u){let t=u[e];t=0==e?Math.floor(100*t)/100:Math.ceil(100*t)/100+.1,u[e]=Number(t.toFixed(2))}let t=n.colors;for(let t=0;t{e.properties.index=t}),t}_excelData2Feature(e){let t=e.colTitles,s=-1,r=-1;for(let e=0,i=t.length;e1e-7;n++)t=1,a+=o=Math.PI/2-2*Math.atan(i*t)-a;return new(rn().LngLat)(e[0]*s/r,a*s)}_getParamString(e,t,s){var r=[];for(var i in e)r.push((s?i.toUpperCase():i)+"="+e[i]);return(t&&-1!==t.indexOf("?")?"&":"?")+r.join("&")}_isXField(e){var t=e.toLowerCase();return"x"===t||"smx"===t||"jd"===t||"经度"===t||"东经"===t||"longitude"===t||"lot"===t||"lon"===t||"lng"===t}_isYField(e){var t=e.toLowerCase();return"y"===t||"smy"===t||"wd"===t||"纬度"===t||"北纬"===t||"latitude"===t||"lat"===t}_transformStyleToMapBoxGl(e,t,s){let r={};"POINT"!==e.type&&"BASIC_POINT"!==e.type&&"POINT"!==t||"LINE"===t?"LINE"===t?r={strokeWidth:"line-width",strokeColor:"line-color",strokeOpacity:"line-opacity"}:"POLYGON"===t&&(r={fillColor:"fill-color",fillOpacity:"fill-opacity",strokeColor:"fill-outline-color"}):r={fillColor:"circle-color",strokeWidth:"circle-stroke-width",fillOpacity:"circle-opacity",radius:"circle-radius",strokeColor:"circle-stroke-color",strokeOpacity:"circle-stroke-opacity"};let i={};for(let t in e)r[t]&&(i[r[t]]=e[t]);return s&&(i["circle-color"]?i["circle-color"]=s:i["line-color"]?i["line-color"]=s:i["fill-color"]=s),e.lineDash&&"solid"!==e.lineDash&&"LINE"===t&&(i["line-dasharray"]=this._dashStyle(e)),i}_dashStyle(e){if(!e)return[];var t=e.strokeDashstyle||e.lineDash;switch(t){case"solid":return[];case"dot":return[1,4];case"dash":return[4,4];case"dashdot":return[4,4,1,4];case"longdash":return[8,4];case"longdashdot":return[8,4,1,4];default:return t?V.isArray(t)?t:(t=J.trim(t).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(","):[]}}_getCanvasFromSVG(e,t,s){let r=document.createElement("canvas");r.id="dataviz-canvas-"+nn.newGuid(8),r.style.display="none",t.appendChild(r),(window.canvg?window.canvg:zn())(r.id,e,{ignoreMouse:!0,ignoreAnimation:!0,renderCallback:()=>{r.width>300||r.height>300||s(r)},forceRedraw:()=>!1})}_addOverlayToMap(e,t,s,r){"circle"!==(e={POINT:"circle",LINE:"line",POLYGON:"fill"}[e])&&"line"!==e&&"fill"!==e||this.map.addLayer({id:s,type:e,source:t,paint:r.style,layout:r.layout||{}})}_addBaselayer(e,t,s=0,r=22,i){this.map.addLayer({id:t,type:"raster",source:{type:"raster",tiles:e,tileSize:256,rasterSource:i?"iserver":"",prjCoordSys:i?{epsgCode:this.baseProjection.split(":")[1]}:""},minzoom:s,maxzoom:r})}_addStrokeLineForPoly(e,t,s,r){let i={};i.style=this._transformStyleToMapBoxGl(e,"LINE"),i.layout={visibility:r},this._addOverlayToMap("LINE",t,s,i)}_parseGeoJsonData2Feature(e){let t=e.allDatas.features,s=[];for(let e=0,r=t.length;e 0"}),n=new Ls({queryParameter:i,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),(a=new Ps(e,{eventListeners:{processCompleted:e=>{s&&s(e)},processFailed:e=>{r&&r(e)}}})).processAsync(n)}_queryFeatureBySQL(e,t,s,r,i,n,o,l,h,u){var c,p;c=new st({name:t,attributeFilter:s}),r&&(c.fields=r);var d={queryParams:[c]};u&&(d.queryOption=a.ATTRIBUTE),l&&(d.startRecord=l),h&&(d.expectCount=h),i&&(d.prjCoordSys={epsgCode:i}),p=new Ir(d),new(rn().supermap.QueryService)(e).queryBySQL(p,e=>{"processCompleted"===e.type?n(e):o(e)})}_handleMultyPolygon(e){return e.forEach(e=>{if("Polygon"!==e.geometry.type)return;let t=e.geometry.coordinates;if(t.length>1){let s=[];t.forEach(e=>{s.push([e])}),e.geometry.coordinates=s,e.geometry.type="MultiPolygon"}}),e}_transformScaleToZoom(e,t){let s=295829515.2024169;"EPSG:3857"!==(t||this.map.getCRS()).epsgCode&&(s=295295895);const r=e.split(":")[1];return Math.min(24,+Math.log2(s/+r).toFixed(2))}_getResolution(e,t=512){return e.leftBottom&&e.rightTop?Math.max(e.rightTop.x-e.leftBottom.x,e.rightTop.y-e.leftBottom.y)/t:Math.max(e[2]-e[0],e[3]-e[1])/t}}})(),(()=>{"use strict"})()})();