MapNotesLayer.js 2.6 KB
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.6/esri/copyright.txt for details.
//>>built
define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Layer ./FeatureLayer ./mixins/OperationalLayer ./mixins/PortalLayer ../core/Collection".split(" "),function(p,q,g,c,b,h,e,k,l,m){return function(f){function a(){var d=f.call(this)||this;d.title=null;d.type="map-notes";return d}g(a,f);Object.defineProperty(a.prototype,"fullExtent",{get:function(){return this.featureCollections?this.featureCollections.reduce(function(d,
a){return d?d.union(a.fullExtent):a.fullExtent},null):null},enumerable:!0,configurable:!0});a.prototype.readFeatureCollectionsFromItem=function(a,n,b){return n.layers.map(function(a){return(new e).read(a,b)})};a.prototype.readFeatureCollectionsFromWebMap=function(a,b,c){return b.featureCollection.layers.map(function(a){return(new e).read(a,c)})};Object.defineProperty(a.prototype,"minScale",{get:function(){return this.featureCollections?this.featureCollections.reduce(function(a,b){return null==a?b.minScale:
Math.min(a,b.minScale)},null):0},set:function(a){this.featureCollections.forEach(function(b){b.minScale=a});this._set("minScale",a)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"maxScale",{get:function(){return this.featureCollections?this.featureCollections.reduce(function(a,b){return null==a?b.maxScale:Math.min(a,b.maxScale)},null):0},set:function(a){this.featureCollections.forEach(function(b){b.maxScale=a});this._set("maxScale",a)},enumerable:!0,configurable:!0});a.prototype.load=
function(){this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]}));return this.when()};c([b.shared({"2d":"../views/2d/layers/MapNotesLayerView2D"})],a.prototype,"viewModulePaths",void 0);c([b.property()],a.prototype,"title",void 0);c([b.property({dependsOn:["featureCollections"],readOnly:!0})],a.prototype,"fullExtent",null);c([b.property({type:m.ofType(e)})],a.prototype,"featureCollections",void 0);c([b.reader("portal-item","featureCollections",["layers"])],a.prototype,
"readFeatureCollectionsFromItem",null);c([b.reader("web-map","featureCollections",["featureCollection.layers"])],a.prototype,"readFeatureCollectionsFromWebMap",null);c([b.property({dependsOn:["featureCollections"]})],a.prototype,"minScale",null);c([b.property({dependsOn:["featureCollections"]})],a.prototype,"maxScale",null);c([b.property({readOnly:!0,json:{read:!1}})],a.prototype,"type",void 0);return a=c([b.subclass("esri.layers.MapNotesLayer")],a)}(b.declared(h,k,l))});