UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 4.4 kB
import{_ as e}from"../../chunks/tslib.es6.js";import{geometryTypes as t}from"../../geometry.js";import r from"../../TimeExtent.js";import{JSONMap as i}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{clone as s}from"../../core/lang.js";import{isSome as n}from"../../core/maybe.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import{ensureType as l}from"../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as u}from"../../core/accessorSupport/decorators/writer.js";import{fromJSON as c}from"../../geometry/support/jsonUtils.js";import d from"./TopFilter.js";import m from"../../geometry/SpatialReference.js";var y;const h=new i({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),j=new i({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let S=y=class extends o{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(s({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([p({type:Boolean,json:{write:!0}})],S.prototype,"cacheHint",void 0),e([p({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],S.prototype,"distance",void 0),e([p({types:t,json:{read:c,write:!0}})],S.prototype,"geometry",void 0),e([p({type:Number,json:{write:!0}})],S.prototype,"geometryPrecision",void 0),e([p({type:Number,json:{write:!0}})],S.prototype,"maxAllowableOffset",void 0),e([p({type:Number,json:{read:{source:"resultRecordCount"}}})],S.prototype,"num",void 0),e([p({json:{write:!0}})],S.prototype,"objectIds",void 0),e([p({type:[String],json:{write:!0}})],S.prototype,"orderByFields",void 0),e([p({type:[String],json:{write:!0}})],S.prototype,"outFields",void 0),e([p({type:m,json:{read:{source:"outSR"},write:{target:"outSR"}}})],S.prototype,"outSpatialReference",void 0),e([p({type:String,json:{write:!0}})],S.prototype,"resultType",void 0),e([p({json:{write:!0}})],S.prototype,"returnGeometry",void 0),e([p({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"returnM",void 0),e([p({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"returnZ",void 0),e([p({type:Number,json:{read:{source:"resultOffset"}}})],S.prototype,"start",void 0),e([u("start"),u("num")],S.prototype,"writeStart",null),e([p({type:String,json:{read:{source:"spatialRel",reader:h.read},write:{target:"spatialRel",writer:h.write}}})],S.prototype,"spatialRelationship",void 0),e([p({type:r,json:{write:!0}})],S.prototype,"timeExtent",void 0),e([p({type:d,json:{write:!0}})],S.prototype,"topFilter",void 0),e([p({type:String,json:{read:j.read,write:{writer:j.write,overridePolicy(e){return{enabled:n(e)&&n(this.distance)&&this.distance>0}}}}})],S.prototype,"units",void 0),e([p({type:String,json:{write:!0}})],S.prototype,"where",void 0),S=y=e([a("esri.rest.support.TopFeaturesQuery")],S),S.from=l(S);const v=S;export{v as default};