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.
 
 

9 lines
2.9 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("exports ../../chunks/tslib.es6 ../../renderers/ClassBreaksRenderer ../../renderers/DictionaryRenderer ../../renderers/DotDensityRenderer ../../renderers/HeatmapRenderer ../../renderers/PieChartRenderer ../../renderers/Renderer ../../renderers/SimpleRenderer ../../renderers/UniqueValueRenderer ../../renderers/support/jsonUtils ../../core/Logger ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../support/AggregateField ../support/featureReductionUtils ../../renderers/visualVariables/SizeVariable ../../renderers/visualVariables/support/SizeStop ../../views/2d/layers/support/clusterUtils".split(" "),
function(l,m,y,z,A,B,C,D,q,E,F,G,n,r,H,I,t,u,v,w,g,p){l.FeatureReductionLayer=f=>{f=class extends f{constructor(...a){super(...a);this.addHandles(n.watch(()=>this.renderer,()=>{if(this.featureReduction){const b=this._normalizeFeatureReduction(this.featureReduction);this._set("featureReduction",b)}},n.sync))}set featureReduction(a){a=this._normalizeFeatureReduction(a);this._set("featureReduction",a)}set renderer(a){}_withClusterVariable(a,b,c){a=a.clone();"visualVariables"in a&&(a.visualVariables||
(a.visualVariables=[]),a.visualVariables.some(e=>"size"===e.type)||a.visualVariables.push(new w({field:"cluster_count",stops:[new g({value:1}),new g({useMinValue:!0,size:b}),new g({useMaxValue:!0,size:c})]})));return a}_normalizeFeatureReduction(a){if("cluster"!==a?.type)return a;const b=a.clone();var c=[new u({name:"cluster_count",isAutoGenerated:!0,statisticType:"count"})];const e=(b.fields??[]).filter(x=>!x.isAutoGenerated);var d=a.renderer&&!a.renderer.authoringInfo?.isAutoGenerated;const {clusterMinSize:h,
clusterMaxSize:k}=b;if(d)return b.fields=[...c,...e],c=this._withClusterVariable(b.renderer,h,k),b.effectiveFeatureRenderer=c,b.effectiveClusterRenderer=c,b;if(a.symbol){b.fields=[...c,...e];b.renderer=null;if(!this.renderer)return b.effectiveFeatureRenderer=null,b.effectiveClusterRenderer=null,b;d=p.createInferredClusterRenderer(c,this.renderer);d=this._withClusterVariable(d,h,k);a=new q({symbol:a.symbol,visualVariables:"visualVariables"in d&&d.visualVariables?d.visualVariables:[]});b.fields=[...c,
...e];b.effectiveFeatureRenderer=d;b.effectiveClusterRenderer=a;return b}if(!this.renderer)return a;a=p.createInferredClusterRenderer(c,this.renderer);b.fields=[...c,...e];b.renderer=a;c=this._withClusterVariable(a,h,k);b.effectiveFeatureRenderer=c;b.effectiveClusterRenderer=c;return b}};m.__decorate([r.property(v.featureReductionProperty)],f.prototype,"featureReduction",null);return f=m.__decorate([t.subclass("esri.layers.mixins.FeatureReductionLayer")],f)};Object.defineProperty(l,Symbol.toStringTag,
{value:"Module"})});