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.
16 lines
7.1 KiB
16 lines
7.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 ../geometry ../PopupTemplate ../renderers/ClassBreaksRenderer ../renderers/DictionaryRenderer ../renderers/DotDensityRenderer ../renderers/HeatmapRenderer ../renderers/PieChartRenderer ../renderers/Renderer ../renderers/SimpleRenderer ../renderers/UniqueValueRenderer ../renderers/support/jsonUtils ../renderers/support/types ../core/MultiOriginJSONSupport ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../geometry/support/typeUtils ./Layer ./graphics/sources/OGCFeatureSource ./mixins/APIKeyMixin ./mixins/BlendLayer ./mixins/CustomParametersMixin ./mixins/FeatureEffectLayer ./mixins/FeatureReductionLayer ./mixins/OperationalLayer ./mixins/OrderedLayer ./mixins/PortalLayer ./mixins/RefreshableLayer ./mixins/ScaleRangeLayer ./mixins/TemporalLayer ./support/commonProperties ./support/FeatureType ./support/Field ./support/fieldProperties ./support/fieldUtils ./support/LabelClass ./support/labelingInfo ../rest/support/Query ../support/popupUtils ../geometry/Extent ../geometry/SpatialReference".split(" "), |
|
function(b,l,t,Q,R,S,T,U,V,W,X,Y,m,a,c,Z,aa,ba,u,n,v,w,x,y,z,A,B,C,D,E,F,G,H,g,I,J,K,k,L,M,p,N,O,P){l=K.defineFieldProperties();a=class extends x.APIKeyMixin(z.CustomParametersMixin(B.FeatureReductionLayer(A.FeatureEffectLayer(y.BlendLayer(D.OrderedLayer(H.TemporalLayer(G.ScaleRangeLayer(C.OperationalLayer(E.PortalLayer(F.RefreshableLayer(a.MultiOriginJSONMixin(v)))))))))))){constructor(d){super(d);this.geometryType=this.fullExtent=this.fieldsIndex=this.fields=this.elevationInfo=this.displayField= |
|
this.description=this.copyright=this.collectionId=this.capabilities=null;this.hasZ=void 0;this.labelingInfo=null;this.legendEnabled=this.labelsVisible=!0;this.objectIdField=this.maxRecordCount=null;this.operationalLayerType="OGCFeatureLayer";this.popupEnabled=!0;this.popupTemplate=null;this.screenSizePerspectiveEnabled=!0;this.source=new w.OGCFeatureSource({layer:this});this.title=this.spatialReference=null;this.type="ogc-feature";this.url=this.types=this.typeIdField=null}destroy(){this.source?.destroy()}load(d){this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]}, |
|
d).then(()=>this._fetchService(d)));return this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5E3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(d){k.fixRendererFields(d,this.fieldsIndex);this._set("renderer",d)}on(d,e){return super.on(d,e)}createPopupTemplate(d){return N.createPopupTemplate(this,d)}createQuery(){return new p}getField(d){return this.fieldsIndex.get(d)}getFieldDomain(d, |
|
e){let f,h=!1;const q=this.typeIdField&&e?.feature?.attributes?.[this.typeIdField];null!=q&&this.types&&(h=this.types.some(r=>r.id==q?(f=r.domains?.[d],"inherited"===f?.type&&(f=this._getLayerDomain(d)),!0):!1));h||f||(f=this._getLayerDomain(d));return f}queryFeatures(d,e){return this.load().then(()=>this.source.queryFeatures(p.from(d)||this.createQuery(),e)).then(f=>{f?.features?.forEach(h=>{h.layer=h.sourceLayer=this});return f})}serviceSupportsSpatialReference(d){return this.source?.serviceSupportsSpatialReference(d)?? |
|
!1}async _fetchService(d){await this.source.load(d);this.read(this.source.featureDefinition,{origin:"service"});k.fixRendererFields(this.renderer,this.fieldsIndex);k.fixTimeInfoFields(this.timeInfo,this.fieldsIndex)}_getLayerDomain(d){if(!this.fields)return null;for(const e of this.fields)if(e.name===d&&e.domain)return e.domain;return null}};b.__decorate([c.property({readOnly:!0,json:{origins:{service:{read:!0}}}})],a.prototype,"capabilities",void 0);b.__decorate([c.property({type:String,json:{write:!0}})], |
|
a.prototype,"collectionId",void 0);b.__decorate([c.property({type:String})],a.prototype,"copyright",void 0);b.__decorate([c.property({readOnly:!0})],a.prototype,"defaultPopupTemplate",null);b.__decorate([c.property({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],a.prototype,"description",void 0);b.__decorate([c.property({type:String})],a.prototype,"displayField",void 0);b.__decorate([c.property({type:Number})],a.prototype,"effectiveMaxRecordCount",null);b.__decorate([c.property(g.elevationInfo)], |
|
a.prototype,"elevationInfo",void 0);b.__decorate([c.property({type:[J],json:{origins:{service:{name:"layerDefinition.fields"}}}})],a.prototype,"fields",void 0);b.__decorate([c.property(l.fieldsIndex)],a.prototype,"fieldsIndex",void 0);b.__decorate([c.property({readOnly:!0,type:O,json:{origins:{service:{name:"layerDefinition.extent"}}}})],a.prototype,"fullExtent",void 0);b.__decorate([c.property({type:n.featureGeometryTypeKebabDictionary.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType", |
|
read:{reader:n.featureGeometryTypeKebabDictionary.read}}}}})],a.prototype,"geometryType",void 0);b.__decorate([c.property({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],a.prototype,"hasZ",void 0);b.__decorate([c.property({type:Boolean,readOnly:!0})],a.prototype,"isTable",null);b.__decorate([c.property({type:[L],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:M.reader},write:!0}}}})],a.prototype,"labelingInfo",void 0);b.__decorate([c.property(g.labelsVisible)], |
|
a.prototype,"labelsVisible",void 0);b.__decorate([c.property(g.legendEnabled)],a.prototype,"legendEnabled",void 0);b.__decorate([c.property({type:Number})],a.prototype,"maxRecordCount",void 0);b.__decorate([c.property({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],a.prototype,"objectIdField",void 0);b.__decorate([c.property({type:["OGCFeatureLayer"]})],a.prototype,"operationalLayerType",void 0);b.__decorate([c.property(g.popupEnabled)],a.prototype,"popupEnabled",void 0); |
|
b.__decorate([c.property({type:t,json:{name:"popupInfo",write:!0}})],a.prototype,"popupTemplate",void 0);b.__decorate([c.property({types:m.rendererTypes,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:m.webSceneRendererTypes,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],a.prototype,"renderer",null);b.__decorate([c.property(g.screenSizePerspectiveEnabled)],a.prototype,"screenSizePerspectiveEnabled", |
|
void 0);b.__decorate([c.property({readOnly:!0})],a.prototype,"source",void 0);b.__decorate([c.property({readOnly:!0,type:P,json:{origins:{service:{read:!0}}}})],a.prototype,"spatialReference",void 0);b.__decorate([c.property({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],a.prototype,"title",void 0);b.__decorate([c.property({readOnly:!0,json:{read:!1}})],a.prototype,"type",void 0);b.__decorate([c.property({type:String,readOnly:!0})], |
|
a.prototype,"typeIdField",void 0);b.__decorate([c.property({type:[I]})],a.prototype,"types",void 0);b.__decorate([c.property(g.url)],a.prototype,"url",void 0);return a=b.__decorate([u.subclass("esri.layers.OGCFeatureLayer")],a)}); |