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.
8 lines
2.5 KiB
8 lines
2.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("../../chunks/tslib.es6 ../../geometry ../../core/arrayUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ./DirectionsFeature ./FeatureSet ../../geometry/SpatialReference ../../geometry/Extent ../../geometry/Polyline".split(" "),function(b,a,n,d,y,z,p,q,r,t,u,v,m){function w(c,f){if(0===c.length)return new m({spatialReference:f});const g=[];for(const h of c)for(const k of h.paths)g.push(...k); |
|
const e=[];g.forEach((h,k)=>{0!==k&&h[0]===g[k-1][0]&&h[1]===g[k-1][1]||e.push(h)});const {hasM:l,hasZ:x}=c[0];return new m({hasM:l,hasZ:x,paths:[e],spatialReference:f})}a=class extends t{constructor(c){super(c);this.extent=null;this.features=[];this.geometryType="polyline";this.totalTime=this.totalLength=this.totalDriveTime=this.routeName=this.routeId=null}readFeatures(c,f){if(!c)return[];const g=(f=f.summary.envelope.spatialReference??f.spatialReference)&&u.fromJSON(f);return c.map(e=>{e=r.fromJSON(e); |
|
null!=e.geometry&&(e.geometry.spatialReference=g);if(null!=e.events)for(const l of e.events)null!=l.geometry&&(l.geometry.spatialReference=g);return e})}get mergedGeometry(){if(!this.features)return null;const c=this.features.map(({geometry:f})=>f);return w(c,this.extent.spatialReference)}get strings(){return this.features.flatMap(({strings:c})=>c).filter(n.isSome)}};b.__decorate([d.property({type:v,json:{read:{source:"summary.envelope"}}})],a.prototype,"extent",void 0);b.__decorate([d.property({nonNullable:!0})], |
|
a.prototype,"features",void 0);b.__decorate([p.reader("features")],a.prototype,"readFeatures",null);b.__decorate([d.property()],a.prototype,"geometryType",void 0);b.__decorate([d.property({readOnly:!0})],a.prototype,"mergedGeometry",null);b.__decorate([d.property()],a.prototype,"routeId",void 0);b.__decorate([d.property()],a.prototype,"routeName",void 0);b.__decorate([d.property({value:null,readOnly:!0})],a.prototype,"strings",null);b.__decorate([d.property({json:{read:{source:"summary.totalDriveTime"}}})], |
|
a.prototype,"totalDriveTime",void 0);b.__decorate([d.property({json:{read:{source:"summary.totalLength"}}})],a.prototype,"totalLength",void 0);b.__decorate([d.property({json:{read:{source:"summary.totalTime"}}})],a.prototype,"totalTime",void 0);return a=b.__decorate([q.subclass("esri.rest.support.DirectionsFeatureSet")],a)}); |