@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 4.5 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{_ as e}from"../../chunks/tslib.es6.js";import{JSONMap as t}from"../../core/jsonMap.js";import r from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{ensureType as s}from"../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import l from"../../geometry/SpatialReference.js";import{fromJSON as a}from"../../geometry/support/jsonUtils.js";import{geometryTypes as u}from"../../geometry/support/typeUtils.js";import c from"./TopFilter.js";import{T as d}from"../../chunks/TimeExtent.js";var y;const m=new t({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),h=new t({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let j=class extends r{static{y=this}constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new y(i({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};e([o({type:Boolean,json:{write:!0}})],j.prototype,"cacheHint",void 0),e([o({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],j.prototype,"distance",void 0),e([o({types:u,json:{read:a,write:!0}})],j.prototype,"geometry",void 0),e([o({type:Number,json:{write:!0}})],j.prototype,"geometryPrecision",void 0),e([o({type:Number,json:{write:!0}})],j.prototype,"maxAllowableOffset",void 0),e([o({type:Number,json:{read:{source:"resultRecordCount"}}})],j.prototype,"num",void 0),e([o({json:{write:!0}})],j.prototype,"objectIds",void 0),e([o({type:[String],json:{write:!0}})],j.prototype,"orderByFields",void 0),e([o({type:[String],json:{write:!0}})],j.prototype,"outFields",void 0),e([o({type:l,json:{read:{source:"outSR"},write:{target:"outSR"}}})],j.prototype,"outSpatialReference",void 0),e([o({type:String,json:{write:!0}})],j.prototype,"resultType",void 0),e([o({json:{write:!0}})],j.prototype,"returnGeometry",void 0),e([o({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],j.prototype,"returnM",void 0),e([o({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],j.prototype,"returnZ",void 0),e([o({type:Number,json:{read:{source:"resultOffset"}}})],j.prototype,"start",void 0),e([p("start"),p("num")],j.prototype,"writeStart",null),e([o({type:String,json:{read:{source:"spatialRel",reader:m.read},write:{target:"spatialRel",writer:m.write}}})],j.prototype,"spatialRelationship",void 0),e([o({type:d,json:{write:!0}})],j.prototype,"timeExtent",void 0),e([o({type:c,json:{write:!0}})],j.prototype,"topFilter",void 0),e([o({type:String,json:{read:h.read,write:{writer:h.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance}}}}})],j.prototype,"units",void 0),e([o({type:String,json:{write:!0}})],j.prototype,"where",void 0),j=y=e([n("esri.rest.support.TopFeaturesQuery")],j),j.from=s(j);export{j as default};