@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 5.04 kB
JavaScript
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7464],{73179(e,t,i){i.d(t,{b:()=>l,h:()=>d});var o=i(4718),r=i(53966),s=i(84952),n=i(60694),a=i(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:i}=e??{},s=(0,o.o8)(a.OZ),l=s.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,o,r){(0,n.LS)(this,e,i,t,r)}),{...s,set:function(e){if(null==e)return void this._set("url",e);const i=(0,n.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:r.A.getLogger(this)});this._set("url",i.url),null!=i.layerId&&this._set("layerId",i.layerId)}}}function d(e,t){const{separator:i}=t??{},o=(0,s.An)(e.url);return null!=o&&(null!=e.dynamicDataSource?o.path=(0,s.fj)(o.path,"dynamicLayer"):null!=e.layerId&&(o.path=(0,s.fj)(o.path,i??"",e.layerId.toString()))),o}},74660(e,t,i){i.r(t),i.d(t,{default:()=>T});var o=i(5482),r=i(69540),s=i(49186),n=i(53966),a=i(25728),l=i(74887),d=i(36708),p=i(91429),y=i(87024),h=i(4146),c=i(52136),u=i(18768),g=i(69208),f=i(16131),m=i(8303),v=i(25036),w=i(58947),S=i(10873),M=i(50805),_=i(58325),I=i(24212),C=i(97159),b=i(36005);let L=class extends((0,w.w6)((0,u.b)((0,f.q)((0,m.A)((0,v.j)((0,a.M)((0,g.d)((0,c.p)((0,r.OU)(h.A)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this.path=null,this.definitionExpression=null}initialize(){this.addHandles((0,d.on)(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,d.OH))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,i){this._modificationsSource={url:(0,C.f)(e,i),context:i}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(e){(0,l.QP)(e)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await _.A.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new s.A("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new s.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new s.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(e){const t="Integrated mesh layers";(0,I.XF)(n.A.getLogger(this),(0,I.B)(t,"absolute-height",e)),(0,I.XF)(n.A.getLogger(this),(0,I.tW)(t,e))}};(0,o.Cg)([(0,p.MZ)({type:String,readOnly:!0})],L.prototype,"geometryType",void 0),(0,o.Cg)([(0,p.MZ)({type:["show","hide"]})],L.prototype,"listMode",void 0),(0,o.Cg)([(0,p.MZ)({type:["IntegratedMeshLayer"]})],L.prototype,"operationalLayerType",void 0),(0,o.Cg)([(0,p.MZ)({json:{read:!1},readOnly:!0})],L.prototype,"type",void 0),(0,o.Cg)([(0,p.MZ)({type:M.W4,readOnly:!0,clonable:!1})],L.prototype,"nodePages",void 0),(0,o.Cg)([(0,p.MZ)({type:[M.uV],readOnly:!0,clonable:!1})],L.prototype,"materialDefinitions",void 0),(0,o.Cg)([(0,p.MZ)({type:[M.Ot],readOnly:!0,clonable:!1})],L.prototype,"textureSetDefinitions",void 0),(0,o.Cg)([(0,p.MZ)({type:[M.L0],readOnly:!0,clonable:!1})],L.prototype,"geometryDefinitions",void 0),(0,o.Cg)([(0,p.MZ)({readOnly:!0})],L.prototype,"serviceUpdateTimeStamp",void 0),(0,o.Cg)([(0,p.MZ)({type:_.A,clonable:e=>e?.clone()??e}),(0,y.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],L.prototype,"modifications",void 0),(0,o.Cg)([(0,b.w)(["web-scene","portal-item"],"modifications")],L.prototype,"readModifications",null),(0,o.Cg)([(0,p.MZ)(S.Yj)],L.prototype,"elevationInfo",null),(0,o.Cg)([(0,p.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],L.prototype,"path",void 0),L=(0,o.Cg)([(0,p.$K)("esri.layers.IntegratedMeshLayer")],L);const T=L}}]);