Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

7 lines
2.1 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
define("../../chunks/tslib.es6 ../../core/Accessor ../../core/jsonMap ../../core/Logger ../../core/Warning ../../core/accessorSupport/decorators/property ../../core/has ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./ColorVariable ./OpacityVariable ./RotationVariable ./SizeVariable".split(" "),function(k,e,m,n,p,q,A,B,r,t,u,v,w){const x={color:t,size:w,opacity:u,rotation:v},y=new m.JSONMap({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"}),
z=/^\[([^\]]+)\]$/i;e=class extends e{constructor(){super(...arguments);this.sizeVariables=this.rotationVariables=this.opacityVariables=this.colorVariables=null}set visualVariables(a){this._resetVariables();a=a&&a.filter(c=>!!c);if(a?.length){for(var b of a)switch(b.type){case "color":this.colorVariables.push(b);break;case "opacity":this.opacityVariables.push(b);break;case "rotation":this.rotationVariables.push(b);break;case "size":this.sizeVariables.push(b)}this.sizeVariables.length&&this.sizeVariables.some(c=>
!!c.target)&&a.sort((c,f)=>{let g=null;return g=c.target===f.target?0:c.target?1:-1});for(b=0;b<a.length;b++)a[b].index=b}this._set("visualVariables",a)}readVariables(a,b,c){const {rotationExpression:f,rotationType:g}=b;if(b=f?.match(z)?.[1])a||=[],a.push({type:"rotationInfo",rotationType:g,field:b});if(a)return a.map(h=>{var d=y.read(h.type);const l=x[d];l||(n.getLogger(this).warn(`Unknown variable type: ${d}`),c?.messages&&c.messages.push(new p("visual-variable:unsupported",`visualVariable of type '${d}' is not supported`,
{definition:h,context:c})));d=new l;d.read(h,c);return d})}writeVariables(a,b){const c=[];for(const f of a)(a=f.toJSON(b))&&c.push(a);return c}_resetVariables(){this.colorVariables=[];this.opacityVariables=[];this.rotationVariables=[];this.sizeVariables=[]}};k.__decorate([q.property()],e.prototype,"visualVariables",null);return e=k.__decorate([r.subclass("esri.renderers.visualVariables.VisualVariableFactory")],e)});