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.
 
 

12 lines
4.5 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","../geometry","../core/workers/workers","./Point","./support/jsonUtils"],function(d,x,w,m,r){function f(a){return Array.isArray(a)?a[0]?.spatialReference:a?.spatialReference}function n(a){return a?Array.isArray(a)?a.map(n):a.toJSON?a.toJSON():a:a}function g(a){return Array.isArray(a)?a.map(b=>r.fromJSON(b)):r.fromJSON(a)}async function t(){u||=w.open("geometryEngineWorker",{strategy:"distributed"});return u}async function e(a,b){return(await t()).invoke("executeGEOperation",{operation:a,
parameters:n(b)})}async function v(a,b){const c=await t();return Promise.all(c.broadcast("executeGEOperation",{operation:a,parameters:n(b)}))}function p(a){return"xmin"in a?a.center:"x"in a?a:a.extent?.center}let u;class k extends Error{constructor(){super("Illegal Argument Exception")}}d.buffer=async function(a,b,c,h=!1){a=[f(a),a,b,c,h];a=await e("buffer",a);return g(a)};d.changeDefaultSpatialReferenceTolerance=async function(a,b){await v("changeDefaultSpatialReferenceTolerance",[a,b])};d.clearDefaultSpatialReferenceTolerance=
async function(a){await v("clearDefaultSpatialReferenceTolerance",[a])};d.clip=async function(a,b){a=await e("clip",[f(a),a,b]);return g(a)};d.contains=function(a,b){return e("contains",[f(a),a,b])};d.convexHull=async function(a,b=!1){a=await e("convexHull",[f(a),a,b]);return g(a)};d.crosses=function(a,b){return e("crosses",[f(a),a,b])};d.cut=async function(a,b){a=await e("cut",[f(a),a,b]);return g(a)};d.densify=async function(a,b,c){a=await e("densify",[f(a),a,b,c]);return g(a)};d.difference=async function(a,
b){a=await e("difference",[f(a),a,b]);return g(a)};d.disjoint=function(a,b){return e("disjoint",[f(a),a,b])};d.distance=function(a,b,c){return e("distance",[f(a),a,b,c])};d.equals=function(a,b){return e("equals",[f(a),a,b])};d.extendedSpatialReferenceInfo=function(a){return e("extendedSpatialReferenceInfo",[a])};d.flipHorizontal=async function(a,b){if(null==a)throw new k;const c=a.spatialReference;b=b??p(a);if(null==b)throw new k;a=a.constructor.fromJSON(await e("flipHorizontal",[c,a,b]));a.spatialReference=
c;return a};d.flipVertical=async function(a,b){if(null==a)throw new k;const c=a.spatialReference;b=b??p(a);if(null==b)throw new k;a=a.constructor.fromJSON(await e("flipVertical",[c,a,b]));a.spatialReference=c;return a};d.generalize=async function(a,b,c,h){a=await e("generalize",[f(a),a,b,c,h]);return g(a)};d.geodesicArea=function(a,b,c){return e("geodesicArea",[f(a),a,b,c])};d.geodesicBuffer=async function(a,b,c,h,l,q){a=[f(a),a,b,c,h,l,q];a=await e("geodesicBuffer",a);return g(a)};d.geodesicDensify=
async function(a,b,c,h=0){a=await e("geodesicDensify",[f(a),a,b,c,h]);return g(a)};d.geodesicLength=function(a,b,c){return e("geodesicLength",[f(a),a,b,c])};d.intersect=async function(a,b){a=await e("intersect",[f(a),a,b]);return g(a)};d.intersectLinesToPoints=async function(a,b){a=await e("intersectLinesToPoints",[f(a),a,b]);return g(a)};d.intersects=function(a,b){return e("intersects",[f(a),a,b])};d.isSimple=function(a){return e("isSimple",[f(a),a])};d.nearestCoordinate=async function(a,b,c=!0){a=
await e("nearestCoordinate",[f(a),a,b,c]);return{...a,coordinate:m.fromJSON(a.coordinate)}};d.nearestVertex=async function(a,b){a=await e("nearestVertex",[f(a),a,b]);return{...a,coordinate:m.fromJSON(a.coordinate)}};d.nearestVertices=async function(a,b,c,h){return(await e("nearestVertices",[f(a),a,b,c,h])).map(l=>({...l,coordinate:m.fromJSON(l.coordinate)}))};d.offset=async function(a,b,c,h,l,q){a=await e("offset",[f(a),a,b,c,h,l,q]);return g(a)};d.overlaps=function(a,b){return e("overlaps",[f(a),
a,b])};d.planarArea=function(a,b){return e("planarArea",[f(a),a,b])};d.planarLength=function(a,b){return e("planarLength",[f(a),a,b])};d.relate=function(a,b,c){return e("relate",[f(a),a,b,c])};d.rotate=async function(a,b,c){if(null==a)throw new k;const h=a.spatialReference;c=c??p(a);if(null==c)throw new k;a=a.constructor.fromJSON(await e("rotate",[h,a,b,c]));a.spatialReference=h;return a};d.simplify=async function(a){a=await e("simplify",[f(a),a]);return g(a)};d.symmetricDifference=async function(a,
b){a=await e("symmetricDifference",[f(a),a,b]);return g(a)};d.touches=function(a,b){return e("touches",[f(a),a,b])};d.union=async function(a,b=null){let c;Array.isArray(a)?c=a:(c=[],c.push(a),null!=b&&c.push(b));a=c;a=await e("union",[f(a),a]);return g(a)};d.within=function(a,b){return e("within",[f(a),a,b])};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});