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.
 
 

13 lines
5.0 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 ../core/Logger ../core/accessorSupport/decorators/property ../core/accessorSupport/decorators/cast ../core/RandomLCG ../core/has ../core/accessorSupport/decorators/reader ../core/accessorSupport/decorators/subclass ../core/accessorSupport/decorators/writer ../core/accessorSupport/ensureType ./Geometry ./SpatialReference ./support/pointUtils ./support/spatialReferenceUtils ./support/webMercatorUtils".split(" "),function(h,q,k,w,f,G,x,y,z,A,B,C,t,D,m){function v(a){return a&&
("esri.geometry.SpatialReference"===a.declaredClass||null!=a.wkid)}var r;const u=[0,0];f=r=class extends B{static copy(a,b){b._set("x",a._get("x"));b._set("y",a._get("y"));b._set("z",a._get("z"));b._set("m",a._get("m"));a=a._get("spatialReference");b._set("spatialReference",Object.isFrozen(a)?a:a.clone())}constructor(...a){super(...a);this.y=this.x=0;this.m=this.z=void 0;this.type="point"}normalizeCtorArgs(a,b,d,g,e){let c;if(Array.isArray(a))c=a,e=b,a=c[0],b=c[1],d=c[2],g=c[3];else if(a&&"object"===
typeof a){if(c=a,a=null!=c.x?c.x:c.longitude,b=null!=c.y?c.y:c.latitude,d=c.z,g=c.m,(e=c.spatialReference)&&"esri.geometry.SpatialReference"!==e.declaredClass&&(e=new C(e)),null!=c.longitude||null!=c.latitude)null==c.longitude?q.getLogger(this).warn(".longitude\x3d","Latitude was defined without longitude"):null==c.latitude?q.getLogger(this).warn(".latitude\x3d","Longitude was defined without latitude"):!c.declaredClass&&e?.isWebMercator&&(b=m.lngLatToXY(c.longitude,c.latitude,u),a=b[0],b=b[1])}else v(d)?
(e=d,d=null):v(g)&&(e=g,g=null);a={x:a,y:b};null==a.x&&null!=a.y?q.getLogger(this).warn(".y\x3d","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&q.getLogger(this).warn(".x\x3d","X coordinate was defined without a Y coordinate");null!=e&&(a.spatialReference=e);null!=d&&(a.z=d);null!=g&&(a.m=g);return a}get cache(){this.commitProperty("x");this.commitProperty("y");this.commitProperty("z");this.commitProperty("m");this.commitProperty("spatialReference");return{}}get hasM(){return void 0!==
this.m}set hasM(a){const b=void 0!==this._get("m");a!==b&&(this._set("m",a?0:void 0),this._set("hasM",a))}get hasZ(){return void 0!==this.z}set hasZ(a){const b=void 0!==this._get("z");a!==b&&(this._set("z",a?0:void 0),this._set("hasZ",a))}get latitude(){return t.getLatitude(this)}set latitude(a){const {spatialReference:b,x:d}=this;null!=a&&b&&(b.isWebMercator?this._set("y",m.lngLatToXY(d,a,u)[1]):b.isGeographic&&this._set("y",a),this._set("latitude",a))}get longitude(){return t.getLongitude(this)}set longitude(a){const {y:b,
spatialReference:d}=this;null!=a&&d&&(d.isWebMercator?this._set("x",m.lngLatToXY(a,b,u)[0]):d.isGeographic&&this._set("x",a),this._set("longitude",a))}writeX(a,b,d){b[d]=isNaN(a)?"NaN":a}readX(a){return"string"===typeof a?NaN:a}clone(){const a=new r;a.x=this.x;a.y=this.y;a.z=this.z;a.m=this.m;a.spatialReference=this.spatialReference;return a}copy(a){r.copy(a,this);return this}equals(a){if(null==a)return!1;const {x:b,y:d,z:g,m:e,spatialReference:c}=this,{z:E,m:F}=a;let {x:n,y:p,spatialReference:l}=
a;if(!c.equals(l))if(c.isWebMercator&&l.isWGS84)[n,p]=m.lngLatToXY(n,p),l=c;else if(c.isWGS84&&l.isWebMercator)[n,p]=m.xyToLngLat(n,p),l=c;else return!1;return b===n&&d===p&&g===E&&e===F&&c.wkid===l.wkid}offset(a,b,d){this.x+=a;this.y+=b;null!=d&&(this.z=(this.z??0)+d);return this}normalize(){if(!this.spatialReference)return this;var a=D.getInfo(this.spatialReference);if(!a)return this;let b=this.x;const [d,g]=a.valid;a=2*g;let e;b>g?(e=Math.ceil(Math.abs(b-g)/a),b-=e*a):b<d&&(e=Math.ceil(Math.abs(b-
d)/a),b+=e*a);this._set("x",b);return this}distance(a){return t.distance(this,a)}toArray(){const a=this.hasZ,b=this.hasM;return a&&b?[this.x,this.y,this.z,this.m]:a?[this.x,this.y,this.z]:b?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(a){return this.write({},a)}};h.__decorate([k.property({readOnly:!0})],f.prototype,"cache",null);h.__decorate([k.property({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],f.prototype,"hasM",null);h.__decorate([k.property({type:Boolean,json:{read:!1,
write:{enabled:!1,overridePolicy:null}}})],f.prototype,"hasZ",null);h.__decorate([k.property({type:Number})],f.prototype,"latitude",null);h.__decorate([k.property({type:Number})],f.prototype,"longitude",null);h.__decorate([k.property({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),w.cast(a=>isNaN(a)?a:A.ensureNumber(a))],f.prototype,"x",void 0);h.__decorate([z.writer("x")],f.prototype,"writeX",null);h.__decorate([x.reader("x")],f.prototype,"readX",null);h.__decorate([k.property({type:Number,
json:{write:!0}})],f.prototype,"y",void 0);h.__decorate([k.property({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],f.prototype,"z",void 0);h.__decorate([k.property({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],f.prototype,"m",void 0);f=r=h.__decorate([y.subclass("esri.geometry.Point")],f);f.prototype.toJSON.isDefaultToJSON=!0;return f});