IntegratedMeshLayer.js 2.4 KB

12345678
  1. // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  2. // See https://js.arcgis.com/4.7/esri/copyright.txt for details.
  3. //>>built
  4. define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang ../core/Error ../core/promiseUtils ../core/accessorSupport/decorators ./Layer ./mixins/SceneService ../symbols/support/ElevationInfo".split(" "),function(h,q,k,d,l,e,f,c,m,n,p){return function(g){function b(a,b){a=g.call(this)||this;a.geometryType="mesh";a.operationalLayerType="IntegratedMeshLayer";a.type="integrated-mesh";a.profile="mesh-pyramids";a.elevationInfo=null;return a}k(b,g);b.prototype.normalizeCtorArgs=
  5. function(a,b){return"string"===typeof a?l.mixin({},{url:a},b):a};b.prototype.load=function(){var a=this,b=this.loadFromPortal({supportedTypes:["Scene Service"]}).always(function(){return a._fetchService()}).then(function(){return a._verifyRootNodeAndUpdateExtent()});this.addResolvingPromise(b);return this.when()};b.prototype.importLayerViewModule=function(a){switch(a.type){case "2d":return f.reject(new e("integrated-mesh-layer:view-not-supported","IntegratedMeshLayer is only supported in 3D"));case "3d":return f.create(function(a){return h(["../views/3d/layers/SceneLayerView3D"],
  6. a)})}};b.prototype._validateLayer=function(a){if(a.layerType&&"IntegratedMesh"!==a.layerType)throw new e("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:a.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new e("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(1<this.version.major)throw new e("layer:service-version-too-new",
  7. "Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});};d([c.shared("esri.layers.IntegratedMeshLayer")],b.prototype,"declaredClass",void 0);d([c.property({type:String,readOnly:!0})],b.prototype,"geometryType",void 0);d([c.property()],b.prototype,"operationalLayerType",void 0);d([c.property({json:{read:!1},readOnly:!0})],b.prototype,"type",void 0);d([c.property({type:p,json:{origins:{service:{read:{source:"elevationInfo"}}},read:{source:"layerDefinition.elevationInfo"},
  8. write:{target:"layerDefinition.elevationInfo"}}})],b.prototype,"elevationInfo",void 0);return b=d([c.subclass()],b)}(c.declared(m,n))});