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.
 
 

12 lines
4.4 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(["exports","../../core/has","../../core/Error","../HeightModelInfo","../../layers/support/arcgisLayerUrl"],function(g,w,f,h,t){function u(a,b,c){if(!k(a)||!k(b))return d.Unsupported;if(null==a||null==b)return d.Ok;if(!c&&a.heightUnit!==b.heightUnit)return d.Units;if(a.heightModel!==b.heightModel)return d.HeightModel;switch(a.heightModel){case "gravity-related-height":return d.Ok;case "ellipsoidal":return a.vertCRS===b.vertCRS?d.Ok:d.CRS;default:return d.Unsupported}}function k(a){return null==
a||null!=a.heightModel&&null!=a.heightUnit}function m(a){if("integrated-mesh-3dtiles"===a.type)return null;const b=a.url?t.parse(a.url):void 0;return(null!=a.spatialReference?.vcsWkid||null==b||"ImageServer"!==b.serverType)&&"heightModelInfo"in a&&a.heightModelInfo?a.heightModelInfo:n(a)?h.deriveUnitFromSR(v,a.spatialReference):null}function p(a){if("unknown"===a.type||!("capabilities"in a))return!1;switch(a.type){case "catalog":case "catalog-footprint":case "csv":case "feature":case "geojson":case "subtype-group":case "ogc-feature":case "oriented-imagery":case "wfs":case "knowledge-graph-sublayer":return!0;
case "imagery":case "map-image":case "map-notes":case "tile":case "vector-tile":case "scene":case "elevation":case null:return!1;default:return!1}}function n(a){return p(a)?!!(a.capabilities&&a.capabilities.data&&a.capabilities.data.supportsZ):q(a)}function q(a){switch(a.type){case "building-scene":case "elevation":case "integrated-mesh":case "integrated-mesh-3dtiles":case "point-cloud":case "scene":case "voxel":return!0}return!1}var d;(function(a){a[a.Ok=0]="Ok";a[a.Units=1]="Units";a[a.HeightModel=
2]="HeightModel";a[a.CRS=3]="CRS";a[a.Unsupported=4]="Unsupported"})(d||={});const v=new h({heightModel:"gravity-related-height"});g.deriveHeightModelInfoFromLayer=m;g.rejectLayerError=function(a,b,c){const e=m(a),r=u(e,b,c);if(e){const l=h.deriveUnitFromSR(e,a.spatialReference).heightUnit;if(!c&&l!==e.heightUnit)return b=new f("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${l})`,{horizontalUnit:l}),new f("layerview:unsupported-height-model-info",
"The vertical coordinate system of the layer is not supported",{heightModelInfo:e,error:b})}if(!("heightModelInfo"in a&&null!=a.heightModelInfo||null!=a.spatialReference)&&n(a)||r===d.Unsupported)return new f("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:e});switch(r){case d.Units:return a=e?.heightUnit||"unknown",c=b?.heightUnit||"unknown",a=new f("layerview:incompatible-height-unit",`The vertical units of the layer (${a}) must match the vertical units of the scene (${c})`,
{layerUnit:a,sceneUnit:c}),new f("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:e,sceneHeightModelInfo:b,error:a});case d.HeightModel:return a=e?.heightModel||"unknown",c=b?.heightModel||"unknown",a=new f("layerview:incompatible-height-model",`The height model of the layer (${a}) must match the height model of the scene (${c})`,{layerHeightModel:a,sceneHeightModel:c}),new f("layerview:incompatible-height-model-info",
"The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:e,sceneHeightModelInfo:b,error:a});case d.CRS:return a=e?.vertCRS||"unknown",c=b?.vertCRS||"unknown",a=new f("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${a}) must match the vertical datum of the scene (${c})`,{layerDatum:a,sceneDatum:c}),new f("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:e,
sceneHeightModelInfo:b,error:a})}return null};g.supportsHeightModelInfo=function(a){return null!=a.layers||q(a)||p(a)||"heightModelInfo"in a};g.validateWebSceneError=function(a,b){if(!a)return null;if(!k(a))return new f("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:a});const c=a.heightUnit;a=h.deriveUnitFromSR(a,b).heightUnit;return c!==a?new f("webscene:incompatible-height-unit",`The vertical units of the scene (${c}) must match the horizontal units of the scene (${a})`,
{verticalUnit:c,horizontalUnit:a}):null};Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});