@arcgis/core 5.2.0-next.111 → 5.2.0-next.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Ground.d.ts +4 -5
- package/Ground.js +1 -1
- package/arcgisGlobal.d.ts +5 -0
- package/assets/components/assets/icon/alignBottom16.json +1 -0
- package/assets/components/assets/icon/alignBottom24.json +1 -0
- package/assets/components/assets/icon/alignBottom32.json +1 -0
- package/assets/components/assets/icon/alignCenterHorizontal16.json +1 -0
- package/assets/components/assets/icon/alignCenterHorizontal24.json +1 -0
- package/assets/components/assets/icon/alignCenterHorizontal32.json +1 -0
- package/assets/components/assets/icon/alignCenterVertical16.json +1 -0
- package/assets/components/assets/icon/alignCenterVertical24.json +1 -0
- package/assets/components/assets/icon/alignCenterVertical32.json +1 -0
- package/assets/components/assets/icon/alignLeft16.json +1 -0
- package/assets/components/assets/icon/alignLeft24.json +1 -0
- package/assets/components/assets/icon/alignLeft32.json +1 -0
- package/assets/components/assets/icon/alignRight16.json +1 -0
- package/assets/components/assets/icon/alignRight24.json +1 -0
- package/assets/components/assets/icon/alignRight32.json +1 -0
- package/assets/components/assets/icon/alignTop16.json +1 -0
- package/assets/components/assets/icon/alignTop24.json +1 -0
- package/assets/components/assets/icon/alignTop32.json +1 -0
- package/assets/components/assets/icon/columnGroup16.json +1 -0
- package/assets/components/assets/icon/columnGroup24.json +1 -0
- package/assets/components/assets/icon/columnGroup32.json +1 -0
- package/assets/components/assets/icon/columnRemove16.json +1 -0
- package/assets/components/assets/icon/columnRemove24.json +1 -0
- package/assets/components/assets/icon/columnRemove32.json +1 -0
- package/assets/components/assets/icon/columnUngroup16.json +1 -0
- package/assets/components/assets/icon/columnUngroup24.json +1 -0
- package/assets/components/assets/icon/columnUngroup32.json +1 -0
- package/assets/components/assets/icon/envelopeOpen16.json +1 -0
- package/assets/components/assets/icon/envelopeOpen24.json +1 -0
- package/assets/components/assets/icon/envelopeOpen32.json +1 -0
- package/assets/components/assets/icon/handDraw16.json +1 -0
- package/assets/components/assets/icon/handDraw24.json +1 -0
- package/assets/components/assets/icon/handDraw32.json +1 -0
- package/assets/components/assets/icon/monitorShare16.json +1 -0
- package/assets/components/assets/icon/monitorShare24.json +1 -0
- package/assets/components/assets/icon/monitorShare32.json +1 -0
- package/assets/components/assets/icon/pi16.json +1 -0
- package/assets/components/assets/icon/pi24.json +1 -0
- package/assets/components/assets/icon/pi32.json +1 -0
- package/assets/components/assets/icon/rowGroup16.json +1 -0
- package/assets/components/assets/icon/rowGroup24.json +1 -0
- package/assets/components/assets/icon/rowGroup32.json +1 -0
- package/assets/components/assets/icon/rowRemove16.json +1 -0
- package/assets/components/assets/icon/rowRemove24.json +1 -0
- package/assets/components/assets/icon/rowRemove32.json +1 -0
- package/assets/components/assets/icon/rowUngroup16.json +1 -0
- package/assets/components/assets/icon/rowUngroup24.json +1 -0
- package/assets/components/assets/icon/rowUngroup32.json +1 -0
- package/assets/components/assets/icon/sdCard16.json +1 -0
- package/assets/components/assets/icon/sdCard24.json +1 -0
- package/assets/components/assets/icon/sdCard32.json +1 -0
- package/assets/components/assets/icon/spaceAroundHorizontal16.json +1 -0
- package/assets/components/assets/icon/spaceAroundHorizontal24.json +1 -0
- package/assets/components/assets/icon/spaceAroundHorizontal32.json +1 -0
- package/assets/components/assets/icon/spaceAroundVertical16.json +1 -0
- package/assets/components/assets/icon/spaceAroundVertical24.json +1 -0
- package/assets/components/assets/icon/spaceAroundVertical32.json +1 -0
- package/assets/components/assets/icon/spaceBetweenHorizontal16.json +1 -0
- package/assets/components/assets/icon/spaceBetweenHorizontal24.json +1 -0
- package/assets/components/assets/icon/spaceBetweenHorizontal32.json +1 -0
- package/assets/components/assets/icon/spaceBetweenVertical16.json +1 -0
- package/assets/components/assets/icon/spaceBetweenVertical24.json +1 -0
- package/assets/components/assets/icon/spaceBetweenVertical32.json +1 -0
- package/assets/components/assets/icon/spacedEvenlyHorizontal16.json +1 -0
- package/assets/components/assets/icon/spacedEvenlyHorizontal24.json +1 -0
- package/assets/components/assets/icon/spacedEvenlyHorizontal32.json +1 -0
- package/assets/components/assets/icon/spacedEvenlyVertical16.json +1 -0
- package/assets/components/assets/icon/spacedEvenlyVertical24.json +1 -0
- package/assets/components/assets/icon/spacedEvenlyVertical32.json +1 -0
- package/assets/components/assets/icon/stretchHorizontal16.json +1 -0
- package/assets/components/assets/icon/stretchHorizontal24.json +1 -0
- package/assets/components/assets/icon/stretchHorizontal32.json +1 -0
- package/assets/components/assets/icon/stretchVertical16.json +1 -0
- package/assets/components/assets/icon/stretchVertical24.json +1 -0
- package/assets/components/assets/icon/stretchVertical32.json +1 -0
- package/assets/components/assets/icon/swatchPalette16.json +1 -0
- package/assets/components/assets/icon/swatchPalette24.json +1 -0
- package/assets/components/assets/icon/swatchPalette32.json +1 -0
- package/assets/components/assets/icon/thermometer16.json +1 -0
- package/assets/components/assets/icon/thermometer24.json +1 -0
- package/assets/components/assets/icon/thermometer32.json +1 -0
- package/assets/components/assets/icon/webCamera16.json +1 -0
- package/assets/components/assets/icon/webCamera24.json +1 -0
- package/assets/components/assets/icon/webCamera32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01ca17092545d72be7b6.js +1 -0
- package/assets/esri/core/workers/chunks/{f5a988bb850f7a7af143.js → 05b373a663cb5d4d722f.js} +1 -1
- package/assets/esri/core/workers/chunks/078ed48eb055dd213ee6.js +1 -0
- package/assets/esri/core/workers/chunks/{36f8caeb574dcd5c0ed5.js → 0b727d7bf3e36e146725.js} +1 -1
- package/assets/esri/core/workers/chunks/0c65862e3dd810015491.js +1 -0
- package/assets/esri/core/workers/chunks/0e3e58ba8e2d358121a5.js +1 -0
- package/assets/esri/core/workers/chunks/0edebc6c516f0b9dac7b.js +1 -0
- package/assets/esri/core/workers/chunks/1004e77593dfa506cd5d.js +1 -0
- package/assets/esri/core/workers/chunks/184942ea601237c8241a.js +1 -0
- package/assets/esri/core/workers/chunks/20de0ea9fa08a6545978.js +1 -0
- package/assets/esri/core/workers/chunks/214d63813d268afc265d.js +1 -0
- package/assets/esri/core/workers/chunks/21c0743b2f612e7e7de3.js +1 -0
- package/assets/esri/core/workers/chunks/22e85819e23202a8ba90.js +1 -0
- package/assets/esri/core/workers/chunks/{6e677505d257e0848075.js → 23f9ab77e4e263f82636.js} +1 -1
- package/assets/esri/core/workers/chunks/25cc6d7178a52f2f46b7.js +1 -0
- package/assets/esri/core/workers/chunks/28a04887ecaee5445d14.js +1 -0
- package/assets/esri/core/workers/chunks/{2fc5c1504691badc7792.js → 2ac2d0a7623dd060c144.js} +1 -1
- package/assets/esri/core/workers/chunks/2afce71e8b6ae86e0792.js +1 -0
- package/assets/esri/core/workers/chunks/{4c9df8ae9238454969b8.js → 2c21f4744e19b925a6ae.js} +1 -1
- package/assets/esri/core/workers/chunks/32fc7d1db4b311f6b880.js +1 -0
- package/assets/esri/core/workers/chunks/36792b8a85e88044cb49.js +1 -0
- package/assets/esri/core/workers/chunks/36a7e19f43517aa94577.js +1 -0
- package/assets/esri/core/workers/chunks/{6e6cdff4bbe1ff2f44ac.js → 3ab25279aaa30f035038.js} +1 -1
- package/assets/esri/core/workers/chunks/3acc1299c1382c3b034d.js +1 -0
- package/assets/esri/core/workers/chunks/{abcda435bc83ef4240f9.js → 3b499cfc89c8f87cdb20.js} +1 -1
- package/assets/esri/core/workers/chunks/{c2684fcde2923c9830e0.js → 42c4d0c1c08bf111e5a4.js} +1 -1
- package/assets/esri/core/workers/chunks/430802108b63194b7ddd.js +2 -0
- package/assets/esri/core/workers/chunks/445b0ca1b70730c9a2e6.js +1 -0
- package/assets/esri/core/workers/chunks/49c6dc487714f9cd55c7.js +1 -0
- package/assets/esri/core/workers/chunks/{70e0ead69a722fd964b8.js → 49e8ff5ed079a9e3be4b.js} +1 -1
- package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 4bf2cc4d092601ff2b86.js} +1 -1
- package/assets/esri/core/workers/chunks/{72be81c1394285b51ed3.js → 4bfd63f3cf9208eb839b.js} +225 -229
- package/assets/esri/core/workers/chunks/501df20cdd09384f6ee2.js +1 -0
- package/assets/esri/core/workers/chunks/510a190a6f0a60ae38c3.js +1 -0
- package/assets/esri/core/workers/chunks/{89a785f8b61263e2d592.js → 552c92b01a5f02a115c5.js} +1 -1
- package/assets/esri/core/workers/chunks/564fdf0d663b773806cc.js +1 -0
- package/assets/esri/core/workers/chunks/{d9270f4935eb0d044db3.js → 57328c206f1e699ac06f.js} +1 -1
- package/assets/esri/core/workers/chunks/{50951fb13013b11b8a24.js → 58e62c8ce1292f4d3b06.js} +1 -1
- package/assets/esri/core/workers/chunks/{434c5b54e89ace974cbd.js → 5965a947f68b707eaa6b.js} +2 -2
- package/assets/esri/core/workers/chunks/5aee7739afb5160d4ace.js +1 -0
- package/assets/esri/core/workers/chunks/5b9925f23d4b10a7087e.js +1 -0
- package/assets/esri/core/workers/chunks/5f79ba5639067f734791.js +1 -0
- package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 60c61f34733063730386.js} +1 -1
- package/assets/esri/core/workers/chunks/62b1f94f4fa978d4da48.js +1 -0
- package/assets/esri/core/workers/chunks/6b264006b96cbf93d8ed.js +1 -0
- package/assets/esri/core/workers/chunks/6b9d29ca568590358478.js +1 -0
- package/assets/esri/core/workers/chunks/6c25c929bcde7e3a2af1.js +1 -0
- package/assets/esri/core/workers/chunks/{7c5310e0104c22da0261.js → 6c7cb7974969e3167f2b.js} +1 -1
- package/assets/esri/core/workers/chunks/6c82cbcd504c711a7450.js +1 -0
- package/assets/esri/core/workers/chunks/{e98b785e8f4edc8bd3ff.js → 6eceeca33fac8e900d9d.js} +1 -1
- package/assets/esri/core/workers/chunks/7232fc11b23777b6be94.js +1 -0
- package/assets/esri/core/workers/chunks/726ca458b98bb4334431.js +1 -0
- package/assets/esri/core/workers/chunks/785206da3962ba23de16.js +1 -0
- package/assets/esri/core/workers/chunks/{1c70620f40be02f532b5.js → 7b169eabafcc03bfaee6.js} +1 -1
- package/assets/esri/core/workers/chunks/7bbc3d22383388d11345.js +1 -0
- package/assets/esri/core/workers/chunks/{082069f80eee0407b828.js → 7edf57e31ff07af9032b.js} +1 -1
- package/assets/esri/core/workers/chunks/7f2ac03efaa4a4898ba2.js +2 -0
- package/assets/esri/core/workers/chunks/83ed38468e316302b157.js +1 -0
- package/assets/esri/core/workers/chunks/85c876ee9e63d5732937.js +1 -0
- package/assets/esri/core/workers/chunks/8f0ecf4d06ec7b67d4ed.js +1 -0
- package/assets/esri/core/workers/chunks/8f1c5f5e70d4b33d021d.js +1 -0
- package/assets/esri/core/workers/chunks/{a1916bca1af5c65be4b0.js → 90ab3c47138875070a53.js} +1 -1
- package/assets/esri/core/workers/chunks/{10389c87d9c6a43363ce.js → 917dec9c004218c58950.js} +1 -1
- package/assets/esri/core/workers/chunks/91f451b98e0f696043df.js +1 -0
- package/assets/esri/core/workers/chunks/943d0026ca4d49eb3ac2.js +1 -0
- package/assets/esri/core/workers/chunks/982a396bd4fffa62e911.js +1 -0
- package/assets/esri/core/workers/chunks/98a5327fd96d9542b39f.js +1 -0
- package/assets/esri/core/workers/chunks/9b9a60f1e0c48aa701f0.js +1 -0
- package/assets/esri/core/workers/chunks/9d92e6f0beed9a8580fa.js +1 -0
- package/assets/esri/core/workers/chunks/9df379041e8860fe7f01.js +1 -0
- package/assets/esri/core/workers/chunks/{847781aefed049493444.js → 9f760dc4492a03e0504c.js} +1 -1
- package/assets/esri/core/workers/chunks/{013c9cc198736a72f7f2.js → 9fb46ccd4be4c3b61c31.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e8ceb4a4b28625236e3.js → a42505b978d54d36d3b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{bfbe6ff786435fe1e7cf.js → a86a4e550a92f770d6d5.js} +1 -1
- package/assets/esri/core/workers/chunks/{a34eee4c9d4c1c2b8c49.js → ab60f3bc18b5ea504f70.js} +1 -1
- package/assets/esri/core/workers/chunks/{18b9ec6ba7a6c0fa2ac6.js → b1880d9f5eafd50ce84b.js} +1 -1
- package/assets/esri/core/workers/chunks/{777fc163530448eea13e.js → b4222152efaf73b37b53.js} +1 -1
- package/assets/esri/core/workers/chunks/b6ca73c1384f07b30b74.js +1 -0
- package/assets/esri/core/workers/chunks/bb4cbf6b7c35e8c78cc7.js +1 -0
- package/assets/esri/core/workers/chunks/bb831d23422acfb00ae2.js +1 -0
- package/assets/esri/core/workers/chunks/bdcca906fdfb8e179abb.js +2 -0
- package/assets/esri/core/workers/chunks/c0855be20ffcd52c7026.js +1 -0
- package/assets/esri/core/workers/chunks/c5ceceb0683671f92efa.js +1 -0
- package/assets/esri/core/workers/chunks/c5e288d57bacb8451e2d.js +2 -0
- package/assets/esri/core/workers/chunks/{a0f742fd947104662d37.js → c6277236ec47586dca00.js} +1 -1
- package/assets/esri/core/workers/chunks/{3be33a129d3ae7dc4f06.js → caf38cf4d8542fb11c46.js} +1 -1
- package/assets/esri/core/workers/chunks/{10d33b4f248864225f85.js → cd0f5cd0fefe7f49e3d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{b92b7d6c1e693c97a3eb.js → d1f54b0079fb71a15612.js} +1 -1
- package/assets/esri/core/workers/chunks/{48a53bfeef11c32dadcc.js → d25fb32a233d2128afbe.js} +1 -1
- package/assets/esri/core/workers/chunks/d5e3f8e5b8d2576d3cb3.js +2 -0
- package/assets/esri/core/workers/chunks/d629708bf23da24ee523.js +1 -0
- package/assets/esri/core/workers/chunks/{21d4219844ae5654618b.js → d926bffc3ff9f87e9081.js} +1 -1
- package/assets/esri/core/workers/chunks/db141122060d8d9b38da.js +1 -0
- package/assets/esri/core/workers/chunks/dc1944a7601b518a9c48.js +1 -0
- package/assets/esri/core/workers/chunks/{573ee2e59d26bc75201e.js → dc8670f32bb0b93c1473.js} +1 -1
- package/assets/esri/core/workers/chunks/e1f2b07be33e33117313.js +1 -0
- package/assets/esri/core/workers/chunks/e52f30dfb7c82491a7f2.js +1 -0
- package/assets/esri/core/workers/chunks/e5906b28b981199fd489.js +1 -0
- package/assets/esri/core/workers/chunks/{b3293ee9f221423a6825.js → e611e452f04a9ce64cf8.js} +1 -1
- package/assets/esri/core/workers/chunks/e755075ac2e02e881fad.js +1 -0
- package/assets/esri/core/workers/chunks/{058d4c927486a361e633.js → ea9e770efc85594e4dd2.js} +1 -1
- package/assets/esri/core/workers/chunks/{0f20c458f873564faff2.js → ec4f887153c24ab83f2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{707b4ae689c4329cad3b.js → f40ceb5e03c699605302.js} +1 -1
- package/assets/esri/core/workers/chunks/{547a073c789fdfb78310.js → f42243c62dd0b6993816.js} +1 -1
- package/assets/esri/core/workers/chunks/{a49147203e55609630cc.js → f453dc4a075d2f900c7d.js} +1 -1
- package/assets/esri/core/workers/chunks/f465fb26541372fdc908.js +2 -0
- package/assets/esri/core/workers/chunks/f91cab9904020cf25d50.js +1 -0
- package/assets/esri/core/workers/chunks/f9b29d2ce1cd31c0fce1.js +1 -0
- package/assets/esri/core/workers/chunks/fdf5ceffec9d5185953d.js +1 -0
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +1 -0
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/environment/resources/milkyway-band.ktx2 +0 -0
- package/chunks/ChapmanAtmosphere.glsl.js +1 -1
- package/chunks/Component.glsl.js +57 -56
- package/chunks/DeepSky.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +19 -23
- package/chunks/FocusArea.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +13 -11
- package/chunks/GaussianSplatDepth.glsl.js +3 -3
- package/chunks/GlobalIllumination.glsl.js +1 -1
- package/chunks/Haze.glsl.js +1 -1
- package/chunks/Path.glsl.js +21 -24
- package/chunks/RealisticTree.glsl.js +42 -41
- package/chunks/RibbonLine.glsl.js +72 -61
- package/chunks/SimpleAtmosphere.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +25 -25
- package/chunks/Water.glsl.js +4 -4
- package/config.js +1 -1
- package/core/units.js +1 -1
- package/geometry/Extent.js +1 -1
- package/geometry/operators/affineTransformOperator.d.ts +9 -3
- package/geometry/operators/affineTransformOperator.js +1 -1
- package/geometry/operators/alphaShapeOperator.d.ts +14 -4
- package/geometry/operators/alphaShapeOperator.js +1 -1
- package/geometry/operators/areaOperator.d.ts +11 -3
- package/geometry/operators/areaOperator.js +1 -1
- package/geometry/operators/autoCompleteOperator.d.ts +6 -2
- package/geometry/operators/autoCompleteOperator.js +1 -1
- package/geometry/operators/boundaryOperator.d.ts +9 -3
- package/geometry/operators/boundaryOperator.js +1 -1
- package/geometry/operators/bufferOperator.d.ts +19 -5
- package/geometry/operators/bufferOperator.js +1 -1
- package/geometry/operators/centroidOperator.d.ts +6 -2
- package/geometry/operators/centroidOperator.js +1 -1
- package/geometry/operators/clipOperator.d.ts +9 -3
- package/geometry/operators/clipOperator.js +1 -1
- package/geometry/operators/containsOperator.d.ts +9 -3
- package/geometry/operators/containsOperator.js +1 -1
- package/geometry/operators/convexHullOperator.d.ts +17 -5
- package/geometry/operators/convexHullOperator.js +1 -1
- package/geometry/operators/crossesOperator.d.ts +9 -3
- package/geometry/operators/crossesOperator.js +1 -1
- package/geometry/operators/cutOperator.d.ts +6 -2
- package/geometry/operators/cutOperator.js +1 -1
- package/geometry/operators/densifyOperator.d.ts +14 -4
- package/geometry/operators/densifyOperator.js +1 -1
- package/geometry/operators/differenceOperator.d.ts +9 -3
- package/geometry/operators/differenceOperator.js +1 -1
- package/geometry/operators/disjointOperator.d.ts +9 -3
- package/geometry/operators/disjointOperator.js +1 -1
- package/geometry/operators/distanceOperator.d.ts +11 -3
- package/geometry/operators/distanceOperator.js +1 -1
- package/geometry/operators/equalsOperator.d.ts +9 -3
- package/geometry/operators/equalsOperator.js +1 -1
- package/geometry/operators/extendOperator.d.ts +11 -3
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/generalizeOperator.d.ts +14 -4
- package/geometry/operators/generalizeOperator.js +1 -1
- package/geometry/operators/geodesicBufferOperator.d.ts +25 -7
- package/geometry/operators/geodesicBufferOperator.js +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +28 -8
- package/geometry/operators/geodesicProximityOperator.js +1 -1
- package/geometry/operators/geodeticAreaOperator.d.ts +17 -5
- package/geometry/operators/geodeticAreaOperator.js +1 -1
- package/geometry/operators/geodeticDensifyOperator.d.ts +20 -6
- package/geometry/operators/geodeticDensifyOperator.js +1 -1
- package/geometry/operators/geodeticDistanceOperator.d.ts +17 -5
- package/geometry/operators/geodeticDistanceOperator.js +1 -1
- package/geometry/operators/geodeticLengthOperator.d.ts +17 -5
- package/geometry/operators/geodeticLengthOperator.js +1 -1
- package/geometry/operators/geodeticUtilsOperator.d.ts +17 -5
- package/geometry/operators/geodeticUtilsOperator.js +1 -1
- package/geometry/operators/graphicBufferOperator.d.ts +11 -3
- package/geometry/operators/graphicBufferOperator.js +1 -1
- package/geometry/operators/integrateOperator.d.ts +6 -2
- package/geometry/operators/integrateOperator.js +1 -1
- package/geometry/operators/intersectionOperator.d.ts +12 -4
- package/geometry/operators/intersectionOperator.js +1 -1
- package/geometry/operators/intersectsOperator.d.ts +9 -3
- package/geometry/operators/intersectsOperator.js +1 -1
- package/geometry/operators/isNearOperator.d.ts +11 -3
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/bufferOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/convexHullOperator.js +1 -1
- package/geometry/operators/json/crossesOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/json/generalizeOperator.js +1 -1
- package/geometry/operators/json/geodesicBufferOperator.js +1 -1
- package/geometry/operators/json/graphicBufferOperator.js +1 -1
- package/geometry/operators/json/intersectionOperator.js +1 -1
- package/geometry/operators/json/intersectsOperator.js +1 -1
- package/geometry/operators/json/lengthOperator.js +1 -1
- package/geometry/operators/json/offsetOperator.js +1 -1
- package/geometry/operators/json/overlapsOperator.js +1 -1
- package/geometry/operators/json/projectOperator.js +1 -1
- package/geometry/operators/json/simplifyOperator.js +1 -1
- package/geometry/operators/json/simplifyOperatorOGC.js +1 -1
- package/geometry/operators/json/touchesOperator.js +1 -1
- package/geometry/operators/json/unionOperator.js +1 -1
- package/geometry/operators/json/withinOperator.js +1 -1
- package/geometry/operators/labelPointOperator.d.ts +9 -3
- package/geometry/operators/labelPointOperator.js +1 -1
- package/geometry/operators/lengthOperator.d.ts +11 -3
- package/geometry/operators/lengthOperator.js +1 -1
- package/geometry/operators/linesToPolygonsOperator.d.ts +6 -2
- package/geometry/operators/linesToPolygonsOperator.js +1 -1
- package/geometry/operators/locateBetweenOperator.d.ts +6 -2
- package/geometry/operators/locateBetweenOperator.js +1 -1
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +14 -4
- package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +11 -3
- package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
- package/geometry/operators/offsetOperator.d.ts +14 -4
- package/geometry/operators/offsetOperator.js +1 -1
- package/geometry/operators/overlapsOperator.d.ts +9 -3
- package/geometry/operators/overlapsOperator.js +1 -1
- package/geometry/operators/polygonOverlayOperator.d.ts +11 -3
- package/geometry/operators/polygonOverlayOperator.js +1 -1
- package/geometry/operators/polygonSlicerOperator.d.ts +22 -6
- package/geometry/operators/polygonSlicerOperator.js +1 -1
- package/geometry/operators/projectOperator.d.ts +15 -5
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/proximityOperator.d.ts +22 -6
- package/geometry/operators/proximityOperator.js +1 -1
- package/geometry/operators/relateOperator.d.ts +12 -4
- package/geometry/operators/relateOperator.js +1 -1
- package/geometry/operators/reshapeOperator.d.ts +6 -2
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.d.ts +20 -6
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/operators/simplifyOGCOperator.d.ts +3 -1
- package/geometry/operators/simplifyOGCOperator.js +1 -1
- package/geometry/operators/simplifyOperator.d.ts +12 -4
- package/geometry/operators/simplifyOperator.js +1 -1
- package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
- package/geometry/operators/support/deprecatedOperator.js +2 -0
- package/geometry/operators/symmetricDifferenceOperator.d.ts +9 -3
- package/geometry/operators/symmetricDifferenceOperator.js +1 -1
- package/geometry/operators/touchesOperator.d.ts +9 -3
- package/geometry/operators/touchesOperator.js +1 -1
- package/geometry/operators/unionOperator.d.ts +9 -3
- package/geometry/operators/unionOperator.js +1 -1
- package/geometry/operators/withinOperator.d.ts +9 -3
- package/geometry/operators/withinOperator.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/list/BasemapItemCollection.d.ts +40 -14
- package/layers/list/BasemapItemCollection.js +1 -1
- package/layers/list/CatalogItemCollection.d.ts +29 -11
- package/layers/list/CatalogItemCollection.js +1 -1
- package/layers/list/Item.d.ts +66 -122
- package/layers/list/Item.js +1 -1
- package/layers/list/ItemPanel.d.ts +23 -34
- package/layers/list/LayerItemCollection.d.ts +33 -43
- package/layers/list/LayerItemCollection.js +1 -1
- package/layers/list/TableItem.d.ts +42 -53
- package/layers/list/TableItem.js +1 -1
- package/layers/list/TableItemCollection.d.ts +25 -55
- package/layers/list/TableItemCollection.js +1 -1
- package/layers/list/TableItemPanel.d.ts +25 -23
- package/layers/list/support/layerListUtils.js +1 -1
- package/layers/list/types.d.ts +158 -37
- package/layers/mixins/TiledImagery.d.ts +6 -0
- package/layers/mixins/TiledImagery.js +1 -1
- package/layers/raster/datasets/ImageServerRaster.js +1 -1
- package/layers/raster/datasets/RasterFactory.js +1 -1
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/FeatureFilter.d.ts +2 -1
- package/layers/support/FeatureFilter.js +1 -1
- package/layers/support/domainUtils.d.ts +2 -0
- package/layers/support/domainUtils.js +1 -1
- package/layers/support/fieldUtils.d.ts +10 -0
- package/layers/support/fieldUtils.js +1 -1
- package/package.json +6 -6
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +0 -1
- package/support/revision.js +1 -1
- package/symbols/LineStyleMarker3D.d.ts +3 -4
- package/symbols/LineSymbol3D.d.ts +19 -2
- package/symbols/LineSymbol3D.js +1 -1
- package/symbols/LineSymbol3DLayer.d.ts +22 -9
- package/symbols/Symbol3DLayer.d.ts +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/OverrideHelper.js +1 -1
- package/symbols/cim/Rasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/dashUtils.js +2 -0
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/fromCIMFontStyle.js +2 -0
- package/symbols/cim/richTextUtils.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/patterns/LinePattern3D.d.ts +10 -4
- package/symbols/patterns/LinePattern3D.js +1 -1
- package/symbols/patterns/LineTemplatePattern3D.d.ts +48 -0
- package/symbols/patterns/LineTemplatePattern3D.js +2 -0
- package/symbols/patterns/utils.js +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/decorGlyphRect.js +2 -0
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/MultiHighlightGradient.js +1 -1
- package/views/2d/engine/webgl/hashMosaic.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/clipping.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ShaderHighlight.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
- package/views/2d/input/MapViewInputManager.js +1 -1
- package/views/2d/input/handlers/KeyPan.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/AggregateStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/processor/bins/BinLevelState.js +1 -1
- package/views/2d/layers/features/processor/clusters/ClusterLevelState.js +1 -1
- package/views/2d/layers/features/processor/tracks/TrackLevelState.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
- package/views/2d/layers/support/FilterSchema.js +2 -0
- package/views/2d/layers/support/HighlightRegistry.js +2 -0
- package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
- package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
- package/views/2d/layers/support/util.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
- package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/navigation/Navigation3D.d.ts +16 -0
- package/views/3d/navigation/Navigation3D.js +2 -0
- package/views/3d/navigation/modes/DefaultNavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/DefaultNavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/GroundNavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/GroundNavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/NavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/NavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/NavigationMode3DUnion.d.ts +5 -0
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentDrawParameters.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/output/getEmissions.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +57 -58
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +5 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +7 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +5 -10
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +10 -48
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +16 -22
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +5 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/pbrGlobals.glsl.js +19 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/pbrShadingInfo.glsl.js +24 -0
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/AmbientIllumination.js +2 -0
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/BlurEmission.js +1 -1
- package/views/3d/webgl-engine/effects/snowcover/SnowCover.glsl.js +4 -4
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/VisualVariablePassParameters.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +23 -22
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechniqueConfiguration.js +1 -1
- package/views/MapView.d.ts +1 -0
- package/views/PopupView.js +1 -1
- package/views/SceneView.d.ts +1 -0
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/LayerList/LayerListViewModel.d.ts +1 -0
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList/ListItem.d.ts +4 -0
- package/widgets/LayerList/ListItemPanel.d.ts +3 -0
- package/widgets/OrientedImageryViewer/types.d.ts +2 -2
- package/widgets/OrientedImageryViewer.d.ts +20 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Search/LocatorSearchSource.d.ts +4 -3
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/forms/formUtils.d.ts +5 -0
- package/widgets/support/forms/formUtils.js +1 -1
- package/widgets/support/forms/types.d.ts +7 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/03601be8b0763f82e88f.js +0 -1
- package/assets/esri/core/workers/chunks/075eb62465edb9cbf907.js +0 -1
- package/assets/esri/core/workers/chunks/0bff8d589312be6588fe.js +0 -1
- package/assets/esri/core/workers/chunks/0de90b1ad8118457fd5a.js +0 -1
- package/assets/esri/core/workers/chunks/0e1a067ab243900d0371.js +0 -1
- package/assets/esri/core/workers/chunks/0ee6109e6578395a7900.js +0 -1
- package/assets/esri/core/workers/chunks/0ee7376c29e0fd8f676c.js +0 -1
- package/assets/esri/core/workers/chunks/0ff13f7a18b0123d253e.js +0 -1
- package/assets/esri/core/workers/chunks/1082bb0858585bd4fa21.js +0 -2
- package/assets/esri/core/workers/chunks/13551987fbeaae154df8.js +0 -1
- package/assets/esri/core/workers/chunks/19ac6f4664f97fb3821c.js +0 -1
- package/assets/esri/core/workers/chunks/1ec01fd6330d011c76d6.js +0 -1
- package/assets/esri/core/workers/chunks/262052dfaec3af8a58b9.js +0 -1
- package/assets/esri/core/workers/chunks/2c01477b69c38f691e19.js +0 -1
- package/assets/esri/core/workers/chunks/2e2349387a2b9903f13c.js +0 -2
- package/assets/esri/core/workers/chunks/307297e025eed110095f.js +0 -1
- package/assets/esri/core/workers/chunks/33422dca6f4bcaa0ea74.js +0 -1
- package/assets/esri/core/workers/chunks/33e583166ab3943ecf0e.js +0 -1
- package/assets/esri/core/workers/chunks/349e9f3d3e3267d02988.js +0 -1
- package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +0 -1
- package/assets/esri/core/workers/chunks/3daddcb106a7009c5a70.js +0 -1
- package/assets/esri/core/workers/chunks/3de6e54b6ed0feae1940.js +0 -1
- package/assets/esri/core/workers/chunks/3ffc852db1a820ed143b.js +0 -1
- package/assets/esri/core/workers/chunks/411bbdecba340df11d95.js +0 -2
- package/assets/esri/core/workers/chunks/4490dd8bae0dd2769d99.js +0 -1
- package/assets/esri/core/workers/chunks/476535cfb06ced74d611.js +0 -2
- package/assets/esri/core/workers/chunks/4c088c26d5d546c95c90.js +0 -1
- package/assets/esri/core/workers/chunks/54bb3678570ca032f051.js +0 -1
- package/assets/esri/core/workers/chunks/56163189fbe63aa11e94.js +0 -1
- package/assets/esri/core/workers/chunks/571cf99c3eab8e517542.js +0 -1
- package/assets/esri/core/workers/chunks/5830deda121e4c95d199.js +0 -1
- package/assets/esri/core/workers/chunks/58e4aecabca047f1d229.js +0 -1
- package/assets/esri/core/workers/chunks/5c8f423812a23c02c1fd.js +0 -1
- package/assets/esri/core/workers/chunks/5e56a004b4407b8066eb.js +0 -1
- package/assets/esri/core/workers/chunks/5eb726317b6602f1e206.js +0 -1
- package/assets/esri/core/workers/chunks/6010799e05d239073de0.js +0 -1
- package/assets/esri/core/workers/chunks/69921d068add041b5dcb.js +0 -1
- package/assets/esri/core/workers/chunks/6df29716f75696434807.js +0 -1
- package/assets/esri/core/workers/chunks/6e2075bd4832ff0db68c.js +0 -1
- package/assets/esri/core/workers/chunks/7608de0d942b4c16b2f6.js +0 -1
- package/assets/esri/core/workers/chunks/7737ab739eba6d81282d.js +0 -1
- package/assets/esri/core/workers/chunks/7d9468e38f3bf006f86e.js +0 -1
- package/assets/esri/core/workers/chunks/7efc51324cfc8e08c756.js +0 -1
- package/assets/esri/core/workers/chunks/84dc2afd89263a311b81.js +0 -1
- package/assets/esri/core/workers/chunks/852649460d664b0a1a1d.js +0 -1
- package/assets/esri/core/workers/chunks/a322afbb48898ce35851.js +0 -1
- package/assets/esri/core/workers/chunks/ab332bd411d6c7d4190c.js +0 -1
- package/assets/esri/core/workers/chunks/b7809ef3e1dabd921339.js +0 -1
- package/assets/esri/core/workers/chunks/b82b523b6837ed1f28d3.js +0 -2
- package/assets/esri/core/workers/chunks/bc9b96a539f28afcb8cb.js +0 -1
- package/assets/esri/core/workers/chunks/be69e2dda75b079362b2.js +0 -1
- package/assets/esri/core/workers/chunks/bf9eba555aebca2c132b.js +0 -1
- package/assets/esri/core/workers/chunks/c18de0f6cbeecee4ce34.js +0 -1
- package/assets/esri/core/workers/chunks/c7b762bae945f383c723.js +0 -1
- package/assets/esri/core/workers/chunks/c9df18e9ff7367a004b6.js +0 -1
- package/assets/esri/core/workers/chunks/d33d08cb6856cd2eb35e.js +0 -1
- package/assets/esri/core/workers/chunks/e688e6e816824b53a25e.js +0 -1
- package/assets/esri/core/workers/chunks/ea068c797e3e462f4518.js +0 -1
- package/assets/esri/core/workers/chunks/eaf1d38f09744b7e84f5.js +0 -1
- package/assets/esri/core/workers/chunks/ef24fd6c0322e5de9fdf.js +0 -2
- package/assets/esri/core/workers/chunks/f219ba010c480bb75684.js +0 -1
- package/assets/esri/core/workers/chunks/f5e8ccbd6b4c0a386903.js +0 -1
- package/assets/esri/core/workers/chunks/f60d5ce49c173d5381ec.js +0 -1
- package/assets/esri/core/workers/chunks/f834aa732c3f06525089.js +0 -1
- package/assets/esri/core/workers/chunks/f9e5740b05de24ba81be.js +0 -1
- package/assets/esri/core/workers/chunks/fae14e30fa7d81bf706e.js +0 -1
- package/assets/esri/core/workers/chunks/fb6f1b562ee0983c8c6e.js +0 -1
- package/assets/esri/core/workers/chunks/fc1658eae7b312502fab.js +0 -1
- package/assets/esri/core/workers/chunks/fc622f9e33e3b48113c8.js +0 -1
- package/views/2d/engine/webgl/Utils.js +0 -2
- package/views/2d/layers/support/HighlightCounter.js +0 -2
- /package/assets/esri/core/workers/chunks/{476535cfb06ced74d611.js.LICENSE.txt → 430802108b63194b7ddd.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b82b523b6837ed1f28d3.js.LICENSE.txt → 7f2ac03efaa4a4898ba2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ef24fd6c0322e5de9fdf.js.LICENSE.txt → bdcca906fdfb8e179abb.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{1082bb0858585bd4fa21.js.LICENSE.txt → c5e288d57bacb8451e2d.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{2e2349387a2b9903f13c.js.LICENSE.txt → d5e3f8e5b8d2576d3cb3.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{411bbdecba340df11d95.js.LICENSE.txt → f465fb26541372fdc908.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Error.js";import t from"../HeightModelInfo.js";import{parse as n}from"../../layers/support/arcgisLayerUrl.js";function i(n,i){if(!n)return null;if(!o(n))return new e("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:n});const a=n.heightUnit,r=t.deriveUnitFromSR(n,i).heightUnit;return a!==r?new e("webscene:incompatible-height-unit",`The vertical units of the scene (${a}) must match the horizontal units of the scene (${r})`,{verticalUnit:a,horizontalUnit:r}):null}function a(n,i,a){const o=
|
|
2
|
+
import e from"../../core/Error.js";import t from"../HeightModelInfo.js";import{parse as n}from"../../layers/support/arcgisLayerUrl.js";function i(n,i){if(!n)return null;if(!o(n))return new e("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:n});const a=n.heightUnit,r=t.deriveUnitFromSR(n,i).heightUnit;return a!==r?new e("webscene:incompatible-height-unit",`The vertical units of the scene (${a}) must match the horizontal units of the scene (${r})`,{verticalUnit:a,horizontalUnit:r}):null}function a(n,i,a){const o=l(n),c=i,h=r(o,c,a);if(o){const i=t.deriveUnitFromSR(o,n.spatialReference).heightUnit;if(!a&&i!==o.heightUnit){const t=new e("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${i})`,{horizontalUnit:i});return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o,error:t})}}if(!s(n)||4===h)return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o});switch(h){case 1:{const t=o?.heightUnit||"unknown",n=c?.heightUnit||"unknown",i=new e("layerview:incompatible-height-unit",`The vertical units of the layer (${t}) must match the vertical units of the scene (${n})`,{layerUnit:t,sceneUnit:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case 2:{const t=o?.heightModel||"unknown",n=c?.heightModel||"unknown",i=new e("layerview:incompatible-height-model",`The height model of the layer (${t}) must match the height model of the scene (${n})`,{layerHeightModel:t,sceneHeightModel:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case 3:{const t=o?.vertCRS||"unknown",n=c?.vertCRS||"unknown",i=new e("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${t}) must match the vertical datum of the scene (${n})`,{layerDatum:t,sceneDatum:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}}return null}function r(e,t,n){if(!o(e)||!o(t))return 4;if(null==e||null==t)return 0;if(!n&&e.heightUnit!==t.heightUnit)return 1;if(e.heightModel!==t.heightModel)return 2;switch(e.heightModel){case"gravity-related-height":return 0;case"ellipsoidal":return e.vertCRS===t.vertCRS?0:3;default:return 4}}function o(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function s(e){return"heightModelInfo"in e&&null!=e.heightModelInfo||null!=e.spatialReference||!g(e)}function c(e){const t=e.url?n(e.url):void 0,i=e.spatialReference?.vcsWkid;return!(null==i&&null!=t&&"ImageServer"===t.serverType)&&h(e)&&e.heightModelInfo?e.heightModelInfo:null}function l(e,n){if("integrated-mesh-3dtiles"===e.type||"gaussian-splat"===e.type)return null;const i=c(e);return i||(g(e)?t.deriveUnitFromSR(m,n??e.spatialReference):null)}function h(e){return"heightModelInfo"in e}function u(e){if("unknown"===e.type||!("capabilities"in e))return!1;switch(e.type){case"annotation-feature":case"catalog":case"catalog-footprint":case"csv":case"feature":case"dimension-feature":case"geojson":case"subtype-group":case"ogc-feature":case"oriented-imagery":case"wfs":case"knowledge-graph-sublayer":return!0;default:return!1}}function g(e){return u(e)?!!(e.capabilities&&e.capabilities.data&&e.capabilities.data.supportsZ):f(e)}function d(e){return null!=e.layers||f(e)||u(e)||h(e)}function f(e){switch(e.type){case"annotation-feature":case"building-scene":case"elevation":case"gaussian-splat":case"integrated-mesh":case"integrated-mesh-3dtiles":case"point-cloud":case"scene":case"voxel":return!0;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"catalog":case"catalog-footprint":case"catalog-dynamic-group":case"csv":case"dimension":case"dimension-feature":case"geojson":case"feature":case"subtype-group":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-image":case"map-notes":case"media":case"ogc-feature":case"open-street-map":case"oriented-imagery":case"parquet":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"video":case"viewshed":case"wcs":case"web-tile":case"wfs":case"wms":case"wmts":case null:return!1}return!1}const m=new t({heightModel:"gravity-related-height"});export{l as deriveHeightModelInfoFromLayer,c as getLayerHeightModelInfo,r as isCompatible,a as rejectLayerError,d as supportsHeightModelInfo,i as validateWebSceneError};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{extentContainsCoords2D as n,extentContainsPoint as t,ringsContainsCoords as e,extentContainsCoords3D as r}from"./contains.js";function o(n,e){return t(n,e)}function i(n,t){const e=n.hasZ&&t.hasZ;let r,o,i;if(n.xmin<=t.xmin){if(r=t.xmin,n.xmax<r)return!1}else if(r=n.xmin,t.xmax<r)return!1;if(n.ymin<=t.ymin){if(o=t.ymin,n.ymax<o)return!1}else if(o=n.ymin,t.ymax<o)return!1;if(e&&t.hasZ)if(n.zmin<=t.zmin){if(i=t.zmin,n.zmax<i)return!1}else if(i=n.zmin,t.zmax<i)return!1;return!0}function f(t,e){const{points:o,hasZ:i}=e,f=i?r:n;for(const n of o)if(f(t,n))return!0;return!1}const s=[0,0],c=[0,0],u=[0,0],a=[0,0],m=[s,c,u,a],l=[[u,s],[s,c],[c,a],[a,u]];function x(n,t){return h(n,t.rings)}function h(t,r){s[0]=t.xmin,s[1]=t.ymax,c[0]=t.xmax,c[1]=t.ymax,u[0]=t.xmin,u[1]=t.ymin,a[0]=t.xmax,a[1]=t.ymin;for(const n of m)if(e(r,n))return!0;for(const e of r){if(!e.length)continue;let r=e[0];if(n(t,r))return!0;for(let o=1;o<e.length;o++){const i=e[o];if(n(t,i)||g(r,i,l))return!0;r=i}}return!1}function y(t,e){s[0]=t.xmin,s[1]=t.ymax,c[0]=t.xmax,c[1]=t.ymax,u[0]=t.xmin,u[1]=t.ymin,a[0]=t.xmax,a[1]=t.ymin;const r=e.paths;for(const o of r){if(!r.length)continue;let e=o[0];if(n(t,e))return!0;for(let r=1;r<o.length;r++){const i=o[r];if(n(t,i)||g(e,i,l))return!0;e=i}}return!1}function g(n,t,e){for(let r=0;r<e.length;r++)if(p(n,t,e[r][0],e[r][1]))return!0;return!1}function p(n,t,e,r,o){const[i,f]=n,[s,c]=t,[u,a]=e,[m,l]=r,x=m-u,h=i-u,y=s-i,g=l-a,p=f-a,M=c-f,z=g*y-x*M;if(0===z)return!1;const G=(x*p-g*h)/z,b=(y*p-M*h)/z;return G>=0&&G<=1&&b>=0&&b<=1&&(o&&(o[0]=i+G*(s-i),o[1]=f+G*(c-f)),!0)}function M(n,t,e){for(const r of t){const t=r.length;for(let o=1;o<t;o++){const t=r[o-1],i=r[o];let f=(i[0]-t[0])*(i[0]-t[0])+(i[1]-t[1])*(i[1]-t[1]);if(0===f)continue;f=Math.sqrt(f);const s=((i[0]-t[0])*(n[1]-t[1])-(i[1]-t[1])*(n[0]-t[0]))/f;if(Math.abs(s)<e){const r=((i[0]-t[0])*(n[0]-t[0])+(i[1]-t[1])*(n[1]-t[1]))/f;if(r>-e&&r<f+e)return!0}}}return!1}function z(n){const t=1e-6,e=n[0],r=n[n.length-1];return Math.abs(e[0]-r[0])<=t&&Math.abs(e[1]-r[1])<=t}function G(n,t){let e=0;for(const r of t){const t=r.length;for(let o=1;o<t;o++){const t=r[o-1],i=r[o];
|
|
2
|
+
import{extentContainsCoords2D as n,extentContainsPoint as t,ringsContainsCoords as e,extentContainsCoords3D as r}from"./contains.js";function o(n,e){return t(n,e)}function i(n,t){const e=n.hasZ&&t.hasZ;let r,o,i;if(n.xmin<=t.xmin){if(r=t.xmin,n.xmax<r)return!1}else if(r=n.xmin,t.xmax<r)return!1;if(n.ymin<=t.ymin){if(o=t.ymin,n.ymax<o)return!1}else if(o=n.ymin,t.ymax<o)return!1;if(e&&t.hasZ)if(n.zmin<=t.zmin){if(i=t.zmin,n.zmax<i)return!1}else if(i=n.zmin,t.zmax<i)return!1;return!0}function f(t,e){const{points:o,hasZ:i}=e,f=i?r:n;for(const n of o)if(f(t,n))return!0;return!1}const s=[0,0],c=[0,0],u=[0,0],a=[0,0],m=[s,c,u,a],l=[[u,s],[s,c],[c,a],[a,u]];function x(n,t){return h(n,t.rings)}function h(t,r){s[0]=t.xmin,s[1]=t.ymax,c[0]=t.xmax,c[1]=t.ymax,u[0]=t.xmin,u[1]=t.ymin,a[0]=t.xmax,a[1]=t.ymin;for(const n of m)if(e(r,n))return!0;for(const e of r){if(!e.length)continue;let r=e[0];if(n(t,r))return!0;for(let o=1;o<e.length;o++){const i=e[o];if(n(t,i)||g(r,i,l))return!0;r=i}}return!1}function y(t,e){s[0]=t.xmin,s[1]=t.ymax,c[0]=t.xmax,c[1]=t.ymax,u[0]=t.xmin,u[1]=t.ymin,a[0]=t.xmax,a[1]=t.ymin;const r=e.paths;for(const o of r){if(!r.length)continue;let e=o[0];if(n(t,e))return!0;for(let r=1;r<o.length;r++){const i=o[r];if(n(t,i)||g(e,i,l))return!0;e=i}}return!1}function g(n,t,e){for(let r=0;r<e.length;r++)if(p(n,t,e[r][0],e[r][1]))return!0;return!1}function p(n,t,e,r,o){const[i,f]=n,[s,c]=t,[u,a]=e,[m,l]=r,x=m-u,h=i-u,y=s-i,g=l-a,p=f-a,M=c-f,z=g*y-x*M;if(0===z)return!1;const G=(x*p-g*h)/z,b=(y*p-M*h)/z;return G>=0&&G<=1&&b>=0&&b<=1&&(o&&(o[0]=i+G*(s-i),o[1]=f+G*(c-f)),!0)}function M(n,t,e){for(const r of t){const t=r.length;for(let o=1;o<t;o++){const t=r[o-1],i=r[o];let f=(i[0]-t[0])*(i[0]-t[0])+(i[1]-t[1])*(i[1]-t[1]);if(0===f)continue;f=Math.sqrt(f);const s=((i[0]-t[0])*(n[1]-t[1])-(i[1]-t[1])*(n[0]-t[0]))/f;if(Math.abs(s)<e){const r=((i[0]-t[0])*(n[0]-t[0])+(i[1]-t[1])*(n[1]-t[1]))/f;if(r>-e&&r<f+e)return!0}}}return!1}function z(n){const t=1e-6,e=n[0],r=n[n.length-1];return Math.abs(e[0]-r[0])<=t&&Math.abs(e[1]-r[1])<=t}function G(n,t,e){const[r,o]=n,[i,f]=t,[s,c]=e;if(f>o&&c>o||f<=o&&c<=o)return!1;return i+(o-f)*(s-i)/(c-f)>r}function b(n,t){let e=0;for(const r of t){const t=r.length;for(let o=1;o<t;o++){const t=r[o-1],i=r[o];G([n[0],n[1]],[t[0],t[1]],[i[0],i[1]])&&e++}}return e%2==1}function P(n,t,e){const r=1e-9,o=(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0]);return Math.abs(o)<=r&&n[0]>=Math.min(t[0],e[0])-r&&n[0]<=Math.max(t[0],e[0])+r&&n[1]>=Math.min(t[1],e[1])-r&&n[1]<=Math.max(t[1],e[1])+r}function Z(n,t){for(let o=0;o<4;o++){const e=n[o],r=n[(o+1)%4];for(let n=0;n<4;n++){const o=t[n],i=t[(n+1)%4];if(p(e,r,o,i)||P(e,o,i)||P(r,o,i)||P(o,e,r)||P(i,e,r))return!0}}const e=[...n,n[0]],r=[...t,t[0]];return b(n[0],[r])||b(t[0],[e])}function j(n,t){const e=n.length>1&&!z(n)?[...n,n[0]]:n;for(const r of t){if(r.some(n=>b(n,[e])))return!0;if(z(r))for(const n of e)if(b(n,t))return!0;for(let n=1;n<r.length;n++){const t=r[n-1],o=r[n];for(let n=0;n<e.length;n++){if(p(t,o,e[n],e[(n+1)%e.length]))return!0}}}return!1}function q(n){switch(n){case"esriGeometryEnvelope":case"extent":return i;case"esriGeometryMultipoint":case"multipoint":return f;case"esriGeometryPoint":case"point":return o;case"esriGeometryMultiPatch":case"multipatch":case"esriGeometryPolygon":case"polygon":return x;case"esriGeometryPolyline":case"polyline":return y}}export{i as extentIntersectsExtent,f as extentIntersectsMultipoint,o as extentIntersectsPoint,x as extentIntersectsPolygon,y as extentIntersectsPolyline,q as getFeatureExtentIntersector,M as nearLine,b as pointInPolygon,Z as rectsIntersect,p as segmentIntersects,j as targetIntersectsPolygon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{Cyclical as t}from"../../core/Cyclical.js";import e from"../../core/Error.js";import{importLazily as n}from"../../core/importUtils.js";import{whenOrAbort as r}from"../../core/promiseUtils.js";import o from"../Extent.js";import i from"../Polygon.js";import s from"../Polyline.js";import l from"../SpatialReference.js";import{getGeometryParts as a}from"./normalizeUtilsCommon.js";import{getInfo as c}from"./spatialReferenceUtils.js";function p(t){const e=[];let n=0,r=0;for(let o=0;o<t.length;o++){const i=t[o];let s=null;for(let t=0;t<i.length;t++)s=i[t],e.push(s),0===t?(n=s[0],r=n):(n=Math.min(n,s[0]),r=Math.max(r,s[0]));s&&e.push([(n+r)/2,0])}return e}function
|
|
2
|
+
import{Cyclical as t}from"../../core/Cyclical.js";import e from"../../core/Error.js";import{importLazily as n}from"../../core/importUtils.js";import{whenOrAbort as r}from"../../core/promiseUtils.js";import o from"../Extent.js";import i from"../Polygon.js";import s from"../Polyline.js";import l from"../SpatialReference.js";import{getGeometryParts as a}from"./normalizeUtilsCommon.js";import{getInfo as c}from"./spatialReferenceUtils.js";function p(t){const e=[];let n=0,r=0;for(let o=0;o<t.length;o++){const i=t[o];let s=null;for(let t=0;t<i.length;t++)s=i[t],e.push(s),0===t?(n=s[0],r=n):(n=Math.min(n,s[0]),r=Math.max(r,s[0]));s&&e.push([(n+r)/2,0])}return e}function m(t,n){switch(t.type){case"polygon":case"polyline":break;default:throw new e("internal:geometry","straightLineDensify: the input geometry is neither polyline nor polygon")}const r=a(t),o=[];for(const e of r){const t=[];o.push(t),t.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],i=e[r][1],s=e[r+1][0],l=e[r+1][1],a=Math.sqrt((s-o)*(s-o)+(l-i)*(l-i)),c=(l-i)/a,p=(s-o)/a,m=a/n;if(m>1){for(let l=1;l<=m-1;l++){const e=l*n,r=p*e+o,s=c*e+i;t.push([r,s])}const e=(a+Math.floor(m-1)*n)/2,r=p*e+o,s=c*e+i;t.push([r,s])}t.push([s,l])}}return"polygon"===t.type?new i({rings:o,spatialReference:t.spatialReference}):new s({paths:o,spatialReference:t.spatialReference})}async function f(t,e,n){Array.isArray(t)||(t=[t]),null!=e&&"object"==typeof e&&"authMode"in e&&(n=e);let o=null;for(const r of t)o??=r?.spatialReference;if(!o)return t;const s=c(o);if(!s)return t;if(1===t.length&&"extent"===t[0]?.type){const e=t[0].clone().normalizeAsSingleGeometry(s);return["xmin"in e?e:new i(e)]}const[l,a]=s.valid;let p=!1;for(const r of t){if(!r)continue;if("point"===r.type){p||=r.x>=a,p||=r.x<=l;continue}const{extent:t}=r;if(null==t){p=!0;break}p||=t.xmin>=a,p||=t.xmin<=l,p||=t.xmax>=a,p||=t.xmax<=l}if(!p)return t;const[{foldInto360Range:m},f]=await r(Promise.all([u.getImportPromise(),h.getImportPromise()]),n),x=f.fromSpatialReference(o);return t.map(t=>{if(null==t||"mesh"===t.type)return t;const e=f.fromGeometry(t),n=f.toGeometry(m(e,x),o);return"extent"===t.type&&1===n?.rings.length?n.extent:n})}const u=n(()=>import("../operators/gx/operatorProject.js").then(t=>t.load().then(()=>t))),h=n(()=>import("../operators/support/apiConverter.js"));function x(t){if(!t||"mesh"===t.type)return null;const{extent:e,spatialReference:n}=t,r=n&&c(n);if("point"===t.type){const{x:e,y:r}=t;return new o({xmin:e,ymin:r,xmax:e,ymax:r,spatialReference:n})}if(!e||!r)return e;const[i,s]=r.valid,l=2*s,{width:a}=e;let m,{xmin:f,xmax:u}=e;if([f,u]=[u,f],"extent"===t.type||0===a||a<=s||a>l||f<i||u>s)return e;switch(t.type){case"polygon":if(!(t.rings.length>1))return e;m=p(t.rings);break;case"polyline":if(!(t.paths.length>1))return e;m=p(t.paths);break;case"multipoint":m=t.points}const h=e.clone();for(let o=0;o<m.length;o++){let t=m[o][0];t<0?(t+=s,u=Math.max(t,u)):(t-=s,f=Math.min(t,f))}return h.xmin=f,h.xmax=u,h.width<a?(h.xmin-=s,h.xmax-=s,h):e}function y(t,e,n){const r=c(n);if(null==r)return t;const[o,i]=r.valid,s=2*i;let l=0,a=0;e>i?l=Math.ceil(Math.abs(e-i)/s):e<o&&(l=-Math.ceil(Math.abs(e-o)/s)),t>i?a=Math.ceil(Math.abs(t-i)/s):t<o&&(a=-Math.ceil(Math.abs(t-o)/s));let p=t+(l-a)*s;const m=p-e;return m>i?p-=s:m<o&&(p+=s),p}function g(t,e){const n=M(e);return n?.normalize(t)??t}function M(e){const n=c(e);if(null==n)return null;const[r,o]=n.valid;return new t(r,o)}const j=M(l.WGS84),w=M(l.WebMercator);export{M as createSpatialReferenceCyclical,j as gcsCyclical,y as getClosestDenormalizedXToReference,x as getDenormalizedExtent,f as normalizeCentralMeridian,g as normalizeMapX,m as straightLineDensify,w as webMercatorCyclical};
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.113",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Error.js";import r from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{property as a,subclass as l}from"../core/accessorSupport/decorators.js";import p from"../geometry/Extent.js";import n from"../geometry/SpatialReference.js";import m from"./Layer.js";import{APIKeyMixin as y}from"./mixins/APIKeyMixin.js";import{ArcGISService as u}from"./mixins/ArcGISService.js";import{CustomParametersMixin as c}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as d}from"./mixins/OperationalLayer.js";import{PortalLayer as h}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as f}from"./mixins/ScaleRangeLayer.js";import{url as S,elevationInfo as v}from"./support/commonProperties.js";import{default3DTilesFullExtent as x,default3DTilesSpatialReference as g,initFullExtent as j,hasEsriCrs as w}from"./support/tiles3DUtils.js";import{logInvalidElevationInfoWarning as E,elevationModeRequiredMessage as L,featureExpressionUnsupportedMessage as R}from"../support/elevationInfoUtils.js";let T=class extends(u(d(h(f(s(c(y(m)))))))){constructor(e){super(e),this.operationalLayerType="GaussianSplatLayer",this.type="gaussian-splat",this.opacity=1,this.minScale=0,this.maxScale=0,this.url=null,this.rootTilesetJSON=null,this.fullExtent=x,this.spatialReference=g,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Error.js";import r from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{property as a,subclass as l}from"../core/accessorSupport/decorators.js";import p from"../geometry/Extent.js";import n from"../geometry/SpatialReference.js";import m from"./Layer.js";import{APIKeyMixin as y}from"./mixins/APIKeyMixin.js";import{ArcGISService as u}from"./mixins/ArcGISService.js";import{CustomParametersMixin as c}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as d}from"./mixins/OperationalLayer.js";import{PortalLayer as h}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as f}from"./mixins/ScaleRangeLayer.js";import{url as S,elevationInfo as v}from"./support/commonProperties.js";import{default3DTilesFullExtent as x,default3DTilesSpatialReference as g,initFullExtent as j,hasEsriCrs as w}from"./support/tiles3DUtils.js";import{logInvalidElevationInfoWarning as E,elevationModeRequiredMessage as L,featureExpressionUnsupportedMessage as R}from"../support/elevationInfoUtils.js";let T=class extends(u(d(h(f(s(c(y(m)))))))){constructor(e){super(e),this.operationalLayerType="GaussianSplatLayer",this.type="gaussian-splat",this.opacity=1,this.minScale=0,this.maxScale=0,this.url=null,this.rootTilesetJSON=null,this.fullExtent=x,this.spatialReference=g,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[n.WGS84,this.esriCrsSpatialReference]:[n.WGS84]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[x,this.esriCrsFullExtent]:[x]}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 r=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("GaussianSplat"))return!0;throw new i("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service"})}},e)}catch(s){o(s)}if(this.url){const e=t(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:r}).then(e=>{this.rootTilesetJSON=e.data,this.fullExtent=j(this.rootTilesetJSON,!1);w(this.rootTilesetJSON)&&(this.esriCrsFullExtent=j(this.rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference)},e=>{o(e)});await e}}_validateElevationInfo(e){const t="Gaussian Splat layers";E(r.getLogger(this),L(t,"absolute-height",e)),E(r.getLogger(this),R(t,e))}};e([a({type:["GaussianSplatLayer"]})],T.prototype,"operationalLayerType",void 0),e([a({readOnly:!0})],T.prototype,"type",void 0),e([a({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],T.prototype,"opacity",void 0),e([a({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],T.prototype,"minScale",void 0),e([a({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],T.prototype,"maxScale",void 0),e([a(S)],T.prototype,"url",void 0),e([a({type:p})],T.prototype,"fullExtent",void 0),e([a({type:n})],T.prototype,"spatialReference",void 0),e([a({readOnly:!0})],T.prototype,"supportedSpatialReferences",null),e([a({type:[p]})],T.prototype,"fullExtents",null),e([a({type:["show","hide"]})],T.prototype,"listMode",void 0),e([a(v)],T.prototype,"elevationInfo",null),T=e([l("esri.layers.GaussianSplatLayer")],T);const C=T;export{C as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import s from"../core/Error.js";import i from"../core/Logger.js";import{removeMaybe as o}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as a}from"../core/MultiOriginJSONSupport.js";import{debounce as n,throwIfAbortError as p}from"../core/promiseUtils.js";import{watch as l}from"../core/reactiveUtils.js";import{property as c,subclass as m}from"../core/accessorSupport/decorators.js";import{ensureClass as u}from"../core/accessorSupport/ensureType.js";import h from"../graphic/ImageryTileGraphicOrigin.js";import d from"./Layer.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as R}from"./mixins/RasterJobHandlerMixin.js";import{RasterPresetRendererMixin as S}from"./mixins/RasterPresetRendererMixin.js";import{RefreshableLayer as j}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as _}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as I}from"./mixins/TemporalLayer.js";import{TiledImagery as O}from"./mixins/TiledImagery.js";import{isFunctionRaster as F,getPrimaryRasters as b}from"./raster/datasets/datasetUtils.js";import T from"./raster/datasets/FunctionRaster.js";import P from"./raster/datasets/RasterFactory.js";import{getPrimaryRasterUrls as J,create as N}from"./raster/functions/rasterFunctionHelper.js";import{legendEnabled as x,screenSizePerspectiveEnabled as L}from"./support/commonProperties.js";import C from"./support/Field.js";import{getServicePixelValueField as E,getRawServicePixelValueField as M,getRasterAttributeTableFields as W,getMagnitudeField as U,getDirectionField as H,getMultidimensionalFields as k,commonRasterFieldNames as z,setDefaultRasterFieldFormats as A}from"./support/rasterFieldUtils.js";import B from"./support/RasterFunction.js";import{getRasterJobHandler as D,releaseRasterJobHandler as G}from"./support/rasterJobHelper.js";import V from"./support/TileInfo.js";import{logInvalidElevationInfoWarning as $,elevationModeUnsupportedMessage as Y,featureExpressionUnsupportedMessage as q}from"../support/elevationInfoUtils.js";import{createPopupTemplate as K}from"../support/popupUtils.js";import Q from"../symbols/support/ElevationInfo.js";import{addLayerUnsupportedError as X}from"../webdoc/support/unsupportedErrors.js";let Z=class extends(f(_(v(w(S(g(O(R(I(y(j(a(t(d)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.charts=null,this.graphicOrigin=new h(this),this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=n(async(e,r,t)=>{const{save:s,saveAs:i}=await(import("./save/imageryUtils.js"));switch(e){case 0:return s(this,r);case 1:return i(this,t,r)}})}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(p).then(()=>this._openRaster(r))),Promise.resolve(this)}destroy(){super.destroy(),this._releaseWorkerHandle=o(this._releaseWorkerHandle)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[E("Pixel Value"),M("Raw Pixel Value")],r=this.raster?.rasterInfo??this.serviceRasterInfo,t=r?.attributeTable;if(t){const r=W(t);e.push(...r)}const s=r?.dataType,i=r?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=i){const r=i.variables[0].unit?.trim(),t=U(r),s=H();e.push(t,s)}if(i){const r=k(i);e.push(...r)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:r}=this,t=e?.visibleFieldNames??new Set(r.map(({name:e})=>e).filter(e=>e!==z.rawServicePixelValue)),s=K({fields:r,title:this.title},{...e,visibleFieldNames:t}),{rasterInfo:i}=this.raster;return s?.fieldInfos&&i&&A(s.fieldInfos,i),s}async generateRasterInfo(e,r){const t=u(B,e);if(await this.load(),!t||"none"===t.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:e}=await this._openFunctionRaster(t,r);return e}catch(i){if(i instanceof s)throw i;throw new s("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,r){return this._debouncedSaveOperations(1,r,e)}supportsExportMapTiles(){const e=this._primaryRasters[0]??this.raster,r="RasterTileServer"===e?.datasetFormat,t=!!this.sourceJSON?.exportTilesAllowed,s=this.sourceJSON?.datasetFormat?.toLowerCase(),i=!/\/tiledimageservices[^.]*\.arcgis\.com/i.test(this.url)&&"Raster"===e?.tileType&&("cache/jpegplus"===s||"cache/jpegpng"===s);return r&&t&&("Map"===e?.tileType||i)}supportsWrite(){const e=this._primaryRasters[0]??this.raster;return!!(this.loaded?"RasterTileServer"===e.datasetFormat&&("Raster"===e.tileType||"Map"===e.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,r){return this.supportsWrite()?super.write(e,r):(X(r,this),null)}async hasDataChanged(){try{const e=this._primaryRasters[0]??this.raster,{dataChanged:r,updates:t}=await e.refresh();return r&&(this.serviceRasterInfo!==e.rasterInfo&&this._set("serviceRasterInfo",e.rasterInfo),e.sourceJSON&&this.sourceJSON!==e.sourceJSON&&(this.sourceJSON=e.sourceJSON),t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0})),r}catch{return!1}}async _openRaster(e){let r=!1;if(this.raster)await this._openFromRaster(this.raster,e),r=F(this.raster),!r&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:r,rasterFunction:t,source:i}=this;if(!r&&!i)throw new s("imagery-tile-layer:open","missing url or source parameter");i?await this._openFromSource(i,e):t?await this._openFromUrlWithRasterFunction(r,t,e):await this._openFromUrl(r,e)}const t=this.raster.rasterInfo;if(!t)throw new s("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",r?t:this._primaryRasters[0].rasterInfo),this._set("spatialReference",t.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(l(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,r){e.rasterInfo||await e.open({signal:r}),this._primaryRasters=b(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,r,t){const i=[e];let o;r&&J(r.toJSON(),i),i.some(e=>re(e))&&(o=await D(),this._releaseWorkerHandle={remove:()=>G()});const a=await Promise.all(i.map(e=>P.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:o,signal:t}))),n=a.findIndex(e=>null==e);if(n>-1)throw new s("imagery-tile-layer:open",`cannot open raster: ${i[n]}`);return this._primaryRasters=a,this._initializeWithFunctionRaster(r)}async _openFromUrl(e,r){let t;re(e)&&(t=await D(),this._releaseWorkerHandle={remove:()=>G()});const i=await P.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:t,signal:r});if(null==i)throw new s("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,r){const t="the tiled imagery data source is not supported",i="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!i)throw new s("imagery-tile-layer:open",t);"MEMORY"===i&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const o=await P.open({url:"",source:e,datasetFormat:i,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:r});if(null==o)throw new s("imagery-tile-layer:open",t);this._primaryRasters=[o],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=o}async _openFunctionRaster(e,r){const t={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>t[e.url]=e);const s=N(e.functionDefinition?.toJSON()??e.toJSON(),t),i=new T({rasterFunction:s});return await i.open(r),i}async _initializeWithFunctionRaster(e,r){try{this.raster=await this._openFunctionRaster(e,r)}catch(t){t instanceof s&&i.getLogger(this).error("imagery-tile-layer:open",t.message),i.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){$(i.getLogger(this),Y("ImageryTile layers","relative-to-scene",e)),$(i.getLogger(this),q("ImageryTile layers",e))}};e([c({clonable:!1})],Z.prototype,"_primaryRasters",void 0),e([c({clonable:!1})],Z.prototype,"_releaseWorkerHandle",void 0),e([c({json:{origins:{"web-scene":{write:!1}},write:!0}})],Z.prototype,"charts",void 0),e([c({type:Q,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],Z.prototype,"elevationInfo",null),e([c({type:V})],Z.prototype,"tileInfo",void 0),e([c({readOnly:!0,clonable:!1})],Z.prototype,"graphicOrigin",void 0),e([c(x)],Z.prototype,"legendEnabled",void 0),e([c({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Z.prototype,"isReference",void 0),e([c({type:["show","hide"]})],Z.prototype,"listMode",void 0),e([c({json:{read:!0,write:!0}})],Z.prototype,"blendMode",void 0),e([c({type:B,json:{name:"renderingRule",write:!0}})],Z.prototype,"rasterFunction",void 0),e([c()],Z.prototype,"sourceJSON",void 0),e([c({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],Z.prototype,"version",void 0),e([c({readOnly:!0,json:{read:!1}})],Z.prototype,"type",void 0),e([c({type:["ArcGISTiledImageServiceLayer"]})],Z.prototype,"operationalLayerType",void 0),e([c({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,r,t){r[t]=!e}}}})],Z.prototype,"popupEnabled",void 0),e([c({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],Z.prototype,"popupTemplate",void 0),e([c({readOnly:!0})],Z.prototype,"defaultPopupTemplate",null),e([c(L)],Z.prototype,"screenSizePerspectiveEnabled",void 0),e([c({readOnly:!0,type:[C]})],Z.prototype,"fields",void 0),e([c({readOnly:!0,type:[C]})],Z.prototype,"rasterFields",null),e([c({constructOnly:!0})],Z.prototype,"source",void 0),Z=e([m("esri.layers.ImageryTileLayer")],Z);const ee=Z;function re(e){return/\.(jpe?g|png)$/i.test(e)}export{ee as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import{ClonableMixin as t}from"../core/Clonable.js";import s from"../core/Error.js";import i from"../core/Logger.js";import{removeMaybe as o}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as a}from"../core/MultiOriginJSONSupport.js";import{debounce as n,throwIfAbortError as l}from"../core/promiseUtils.js";import{watch as p}from"../core/reactiveUtils.js";import{property as c,subclass as m}from"../core/accessorSupport/decorators.js";import{ensureClass as u}from"../core/accessorSupport/ensureType.js";import h from"../graphic/ImageryTileGraphicOrigin.js";import d from"./Layer.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as R}from"./mixins/RasterJobHandlerMixin.js";import{RasterPresetRendererMixin as S}from"./mixins/RasterPresetRendererMixin.js";import{RefreshableLayer as j}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as _}from"./mixins/TemporalLayer.js";import{TiledImagery as O}from"./mixins/TiledImagery.js";import{isFunctionRaster as F,getPrimaryRasters as b}from"./raster/datasets/datasetUtils.js";import T from"./raster/datasets/FunctionRaster.js";import P from"./raster/datasets/RasterFactory.js";import{getPrimaryRasterUrls as J,create as N}from"./raster/functions/rasterFunctionHelper.js";import{legendEnabled as x,screenSizePerspectiveEnabled as L}from"./support/commonProperties.js";import C from"./support/Field.js";import{getServicePixelValueField as E,getRawServicePixelValueField as M,getRasterAttributeTableFields as W,getMagnitudeField as U,getDirectionField as H,getMultidimensionalFields as k,commonRasterFieldNames as z,setDefaultRasterFieldFormats as A}from"./support/rasterFieldUtils.js";import B from"./support/RasterFunction.js";import{getRasterJobHandler as D,releaseRasterJobHandler as G}from"./support/rasterJobHelper.js";import V from"./support/TileInfo.js";import{logInvalidElevationInfoWarning as $,elevationModeUnsupportedMessage as Y,featureExpressionUnsupportedMessage as q}from"../support/elevationInfoUtils.js";import{createPopupTemplate as K}from"../support/popupUtils.js";import Q from"../symbols/support/ElevationInfo.js";import{addLayerUnsupportedError as X}from"../webdoc/support/unsupportedErrors.js";let Z=class extends(f(I(v(w(S(g(O(R(_(y(j(a(t(d)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.charts=null,this.graphicOrigin=new h(this),this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=n(async(e,r,t)=>{const{save:s,saveAs:i}=await(import("./save/imageryUtils.js"));switch(e){case 0:return s(this,r);case 1:return i(this,t,r)}})}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l).then(()=>this._openRaster(r))),Promise.resolve(this)}destroy(){super.destroy(),this._releaseWorkerHandle=o(this._releaseWorkerHandle)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[E("Pixel Value"),M("Raw Pixel Value")],r=this.raster?.rasterInfo??this.serviceRasterInfo,t=r?.attributeTable;if(t){const r=W(t);e.push(...r)}const s=r?.dataType,i=r?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=i){const r=i.variables[0].unit?.trim(),t=U(r),s=H();e.push(t,s)}if(i){const r=k(i);e.push(...r)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:r}=this,t=e?.visibleFieldNames??new Set(r.map(({name:e})=>e).filter(e=>e!==z.rawServicePixelValue)),s=K({fields:r,title:this.title},{...e,visibleFieldNames:t}),{rasterInfo:i}=this.raster;return s?.fieldInfos&&i&&A(s.fieldInfos,i),s}async generateRasterInfo(e,r){const t=u(B,e);if(await this.load(),!t||"none"===t.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:e}=await this._openFunctionRaster(t,r);return e}catch(i){if(i instanceof s)throw i;throw new s("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,r){return this._debouncedSaveOperations(1,r,e)}supportsExportMapTiles(){const e=this._primaryRasters[0]??this.raster,r="RasterTileServer"===e?.datasetFormat,t=!!this.sourceJSON?.exportTilesAllowed,s=this.sourceJSON?.datasetFormat?.toLowerCase(),i=!/\/tiledimageservices[^.]*\.arcgis\.com/i.test(this.url)&&"Raster"===e?.tileType&&("cache/jpegplus"===s||"cache/jpegpng"===s);return r&&t&&("Map"===e?.tileType||i)}supportsWrite(){const e=this._primaryRasters[0]??this.raster;return!!(this.loaded?"RasterTileServer"===e.datasetFormat&&("Raster"===e.tileType||"Map"===e.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,r){return this.supportsWrite()?super.write(e,r):(X(r,this),null)}async hasDataChanged(){try{const e=this._primaryRasters[0]??this.raster,{dataChanged:r,updates:t}=await e.refresh();return r&&(this.serviceRasterInfo!==e.rasterInfo&&this._set("serviceRasterInfo",e.rasterInfo),e.sourceJSON&&this.sourceJSON!==e.sourceJSON&&(this.sourceJSON=e.sourceJSON),t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0})),r}catch{return!1}}async _openRaster(e){let r=!1;if(this.raster)await this._openFromRaster(this.raster,e),r=F(this.raster),!r&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:r,rasterFunction:t,source:i}=this;if(!r&&!i)throw new s("imagery-tile-layer:open","missing url or source parameter");i?await this._openFromSource(i,e):t?await this._openFromUrlWithRasterFunction(r,t,e):await this._openFromUrl(r,e)}const t=this.raster.rasterInfo;if(!t)throw new s("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",r?t:this._primaryRasters[0].rasterInfo),this._set("spatialReference",t.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(p(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,r){e.rasterInfo||await e.open({signal:r}),this._primaryRasters=b(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,r,t){const i=[e];let o;r&&J(r.toJSON(),i),i.some(e=>re(e))&&(o=await D(),this._releaseWorkerHandle={remove:()=>G()});const a=await Promise.all(i.map(e=>P.open({url:e,rasterInfo:1===i.length?this.serviceRasterInfo:void 0,sourceJSON:1===i.length?this.sourceJSON:void 0,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:o,signal:t}))),n=a.findIndex(e=>null==e);if(n>-1)throw new s("imagery-tile-layer:open",`cannot open raster: ${i[n]}`);return this._primaryRasters=a,this._initializeWithFunctionRaster(r)}async _openFromUrl(e,r){let t;re(e)&&(t=await D(),this._releaseWorkerHandle={remove:()=>G()});const i=await P.open({url:e,rasterInfo:this.serviceRasterInfo,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:t,signal:r});if(null==i)throw new s("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,r){const t="the tiled imagery data source is not supported",i="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!i)throw new s("imagery-tile-layer:open",t);"MEMORY"===i&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const o=await P.open({url:"",source:e,datasetFormat:i,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:r});if(null==o)throw new s("imagery-tile-layer:open",t);this._primaryRasters=[o],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=o}async _openFunctionRaster(e,r){const t={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>t[e.url]=e);const s=N(e.functionDefinition?.toJSON()??e.toJSON(),t),i=new T({rasterFunction:s});return await i.open(r),i}async _initializeWithFunctionRaster(e,r){try{this.raster=await this._openFunctionRaster(e,r)}catch(t){t instanceof s&&i.getLogger(this).error("imagery-tile-layer:open",t.message),i.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){$(i.getLogger(this),Y("ImageryTile layers","relative-to-scene",e)),$(i.getLogger(this),q("ImageryTile layers",e))}};e([c({clonable:!1})],Z.prototype,"_primaryRasters",void 0),e([c({clonable:!1})],Z.prototype,"_releaseWorkerHandle",void 0),e([c({json:{origins:{"web-scene":{write:!1}},write:!0}})],Z.prototype,"charts",void 0),e([c({type:Q,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],Z.prototype,"elevationInfo",null),e([c({type:V})],Z.prototype,"tileInfo",void 0),e([c({readOnly:!0,clonable:!1})],Z.prototype,"graphicOrigin",void 0),e([c(x)],Z.prototype,"legendEnabled",void 0),e([c({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Z.prototype,"isReference",void 0),e([c({type:["show","hide"]})],Z.prototype,"listMode",void 0),e([c({json:{read:!0,write:!0}})],Z.prototype,"blendMode",void 0),e([c({type:B,json:{name:"renderingRule",write:!0}})],Z.prototype,"rasterFunction",void 0),e([c()],Z.prototype,"sourceJSON",void 0),e([c({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],Z.prototype,"version",void 0),e([c({readOnly:!0,json:{read:!1}})],Z.prototype,"type",void 0),e([c({type:["ArcGISTiledImageServiceLayer"]})],Z.prototype,"operationalLayerType",void 0),e([c({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,r,t){r[t]=!e}}}})],Z.prototype,"popupEnabled",void 0),e([c({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],Z.prototype,"popupTemplate",void 0),e([c({readOnly:!0})],Z.prototype,"defaultPopupTemplate",null),e([c(L)],Z.prototype,"screenSizePerspectiveEnabled",void 0),e([c({readOnly:!0,type:[C]})],Z.prototype,"fields",void 0),e([c({readOnly:!0,type:[C]})],Z.prototype,"rasterFields",null),e([c({constructOnly:!0})],Z.prototype,"source",void 0),Z=e([m("esri.layers.ImageryTileLayer")],Z);const ee=Z;function re(e){return/\.(jpe?g|png)$/i.test(e)}export{ee as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import r from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as n}from"../core/promiseUtils.js";import{on as a,sync as l,watch as p}from"../core/reactiveUtils.js";import{property as m,subclass as c}from"../core/accessorSupport/decorators.js";import{persistable as u}from"../core/accessorSupport/decorators/persistable.js";import d from"../geometry/Extent.js";import h from"../geometry/SpatialReference.js";import f from"./Layer.js";import{APIKeyMixin as y}from"./mixins/APIKeyMixin.js";import{ArcGISService as g}from"./mixins/ArcGISService.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as v}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as T,url as x}from"./support/commonProperties.js";import w from"./support/SceneModifications.js";import{default3DTilesSpatialReference as R,default3DTilesFullExtent as b,initFullExtent as E,hasEsriCrs as L}from"./support/tiles3DUtils.js";import k from"../portal/Portal.js";import{getElevationOffsetInMeters as G,logInvalidElevationInfoWarning as I,elevationModeRequiredMessage as P,featureExpressionUnsupportedMessage as U}from"../support/elevationInfoUtils.js";import{isGround as D}from"../support/groundInstanceUtils.js";import{f as O}from"../chunks/persistableUrlUtils.js";import{isBasemap as C}from"../support/userTypeGuards/isBasemap.js";import{initialize as M,switchMeshModificationPolygonVCSSync as q}from"../views/3d/layers/Lyr3DWorker.js";import{toWasmModification as N,fromWasmModification as A}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{reader as J}from"../core/accessorSupport/decorators/reader.js";let W=class extends(g(_(v(j(s(S(y(i(f))))))))){readModifications(e,t,i){this._modificationsSource={url:O(e,i),context:i}}initialize(){this.addHandles([a(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},l),p(()=>this.modifications,()=>this._modificationsGeneration++)])}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=R,this.fullExtent=b,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null,this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null,this.queryElevationCallback=null,this._modificationsGeneration=0,this._simulateGoogleUrl=!1}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[h.WGS84,this.esriCrsSpatialReference]:[h.WGS84]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[b,this.esriCrsFullExtent]:[b]}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}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){const t=[e];for(;t?.length>0;){const e=t.pop();if(!e)return;for(const[r,o]of Object.entries(e)){if("uri"===r)try{const e=new URL("https://tmp"+o).searchParams.get("session");if(e)return e}catch(i){}"object"==typeof o&&null!==o&&t.push(o)}}return null}async requestRootAndSession(e){const i=(e,t)=>new r("3dtiles-init:"+e,t);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((r,s)=>{this.url||s(i("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null;new Promise((e,r)=>{if(this.replacesTerrain&&!this._key){const o=this.portalItem?.portal||this.parent?.portalItem?.portal||k.getDefault();o.signIn().then(()=>{o.g3dTilesEnabled?t(o.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>r(i("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):r(i("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+o.url))},()=>r(i("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{t(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(t){return void s(i("root-parse-failed","Error parsing root tile, details: "+t))}if(!this._rootTilesetJSON)return void s(i("root-is-null","Root tile is null."));this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=E(this._rootTilesetJSON);L(this._rootTilesetJSON)&&(this.esriCrsFullExtent=E(this._rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference),r(),this._rootRequestPromise=null},e=>{n(e),s(i("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,o.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>s(e))})),this._rootRequestPromise}_haveWGS84ZModifications(e){for(const t of e){if(!t.geometry?.spatialReference)return!0;if(115700===t.geometry?.spatialReference.vcsWkid&&4326===t.geometry?.spatialReference.wkid)return!0}return!1}async _doLoad(e){const t=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new r("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(i){n(i)}if(null!=this._modificationsSource){const t=await w.fromUrl(this._modificationsSource.url,this.spatialReference,e,!0);if(this._haveWGS84ZModifications(t)){await M();try{const e=N(null,t.toArray(),h.WGS84),i=q({modifications:e,inVCS:115700});i.success&&i.modifications&&A(i.modifications,t)}catch(s){o.getLogger(this).error("convert-mesh-modification-z-error","Error when converting:",s)}}this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}async beforeSave(){if(null==this._modificationsSource){const{modifications:e}=this;return void(e&&e.length>0&&await M())}await this.load().then(()=>{},()=>{})}get memoizedElevationQueryDependencies(){return[this.loadStatus,null!=this.queryElevationCallback,G(this.elevationInfo),this._modificationsGeneration]}get hasAttributionData(){return!1}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";I(o.getLogger(this),P(t,"absolute-height",e)),I(o.getLogger(this),U(t,e))}get replacesTerrain(){return this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return has("enable-feature:im-as-ground")?C(this.parent)||D(this.parent):C(this.parent)}get hasGoogleUrl(){return this._simulateGoogleUrl||!!this.url?.match(/.+\.googleapis.com/)}get test(){}};e([m({type:["IntegratedMesh3DTilesLayer"]})],W.prototype,"operationalLayerType",void 0),e([m({type:w,clonable:e=>e?.clone()??null}),u({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],W.prototype,"modifications",void 0),e([m({clonable:e=>e?{...e}:null})],W.prototype,"_modificationsSource",void 0),e([J(["web-scene","portal-item"],"modifications")],W.prototype,"readModifications",null),e([m({type:h})],W.prototype,"spatialReference",void 0),e([m({type:d})],W.prototype,"fullExtent",void 0),e([m({readOnly:!0})],W.prototype,"supportedSpatialReferences",null),e([m({type:[d]})],W.prototype,"fullExtents",null),e([m(T)],W.prototype,"elevationInfo",null),e([m({type:["show","hide"]})],W.prototype,"listMode",void 0),e([m(x)],W.prototype,"url",void 0),e([m({readOnly:!0})],W.prototype,"type",void 0),e([m({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],W.prototype,"path",void 0),e([m({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],W.prototype,"minScale",void 0),e([m({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],W.prototype,"maxScale",void 0),e([m()],W.prototype,"queryElevationCallback",void 0),e([m()],W.prototype,"_modificationsGeneration",void 0),e([m()],W.prototype,"memoizedElevationQueryDependencies",null),e([m({readOnly:!0})],W.prototype,"hasAttributionData",null),e([m()],W.prototype,"replacesTerrain",null),e([m()],W.prototype,"isUsedAsGroundLayer",null),e([m()],W.prototype,"hasGoogleUrl",null),e([m()],W.prototype,"_simulateGoogleUrl",void 0),W=e([c("esri.layers.IntegratedMesh3DTilesLayer")],W);const z=W;export{z as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__addDisposableResource as e,__disposeResources as t,__decorate as o}from"tslib";import{isSome as r}from"../core/arrayUtils.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Error.js";import{abortHandle as n,disposable as a,makeHandle as l}from"../core/handleUtils.js";import p from"../core/Logger.js";import{MultiOriginJSONSupportMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as y,throwIfAbortError as m}from"../core/promiseUtils.js";import{on as
|
|
2
|
+
import{__addDisposableResource as e,__disposeResources as t,__decorate as o}from"tslib";import{isSome as r}from"../core/arrayUtils.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Error.js";import{abortHandle as n,disposable as a,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{MultiOriginJSONSupportMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as y,throwIfAbortError as m}from"../core/promiseUtils.js";import{on as u,sync as c,watch as h}from"../core/reactiveUtils.js";import{property as f,subclass as v}from"../core/accessorSupport/decorators.js";import{persistable as g}from"../core/accessorSupport/decorators/persistable.js";import S from"./Layer.js";import{APIKeyMixin as _}from"./mixins/APIKeyMixin.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{PortalLayer as Q}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as L}from"./mixins/ScaleRangeLayer.js";import{SceneService as I}from"./mixins/SceneService.js";import{elevationInfo as x}from"./support/commonProperties.js";import{GeometryDescriptor as A}from"./support/GeometryDescriptor.js";import{queryIntegratedMeshElevation as k,defaultNoDataValue as D}from"./support/I3SIntegratedMeshElevationQuery.js";import{I3SNodePageDefinition as T,I3SMaterialDefinition as C,I3STextureSetDefinition as M,I3SGeometryDefinition as W}from"./support/I3SLayerDefinitions.js";import E from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as U,elevationModeRequiredMessage as G,featureExpressionUnsupportedMessage as O}from"../support/elevationInfoUtils.js";import{isGround as P}from"../support/groundInstanceUtils.js";import{f as N}from"../chunks/persistableUrlUtils.js";import{isBasemap as R}from"../support/userTypeGuards/isBasemap.js";import{SceneLayerWorkerHandle as H}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{I3SDataRequester as z}from"../views/3d/layers/i3s/I3SDataRequester.js";import K from"../views/3d/layers/i3s/I3SNodeLoader.js";import{ImmediateTask as V}from"../views/support/Scheduler.js";import{reader as q}from"../core/accessorSupport/decorators/reader.js";let F=class extends(I(j(b(Q(L(d(w(_(i(S)))))))))){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._modificationsSource=null,this.path=null,this.definitionExpression=null,this._elevationQueryAbortController=new AbortController,this._elevationQueryWorkerContext=`i3s-elevation-query-${this.uid}`,this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,this._modificationsGeneration=0}destroy(){this._elevationQueryAbortController.abort();const e=this._elevationQueryWorkerHandle;this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,null!=e&&e.destroyContextAndSelf(this._elevationQueryWorkerContext),super.destroy()}initialize(){this.addHandles([u(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},c),h(()=>this.modifications,()=>this._modificationsGeneration++,c),h(()=>this.memoizedElevationQueryDependencies,()=>this._abortElevationQueriesAfterDependencyChange(),c)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,o){this._modificationsSource={url:N(e,o),context:o}}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}get _elevationQueryWorker(){return this._elevationQueryWorkerHandle??=new H((e,t)=>V.schedule(e,t))}get memoizedElevationQueryDependencies(){return[this.elevationInfo?.offset,this._modificationsGeneration]}async queryElevation(o,i,s){const p={stack:[],error:void 0,hasError:!1};try{const t=s?.noDataValue??Number.MAX_VALUE,d=this._elevationQueryWorker,m=new AbortController;o.addHandles(n(m),m);e(p,a(l(()=>o.removeHandles(m))),!1);const u=AbortSignal.any([s?.signal,this._elevationQueryAbortController.signal,m.signal].filter(r));await this.load({signal:u}),y(u);const c=A.fromGeometry(i),h={signal:u,elevationOffset:this.elevationInfo?.offset??0,scheduler:o.resourceController.scheduler};if(null==this._elevationQueryWorkerSetup){const e=this.store?.defaultGeometrySchema;null!=e&&(this._elevationQueryWorkerSetup=d.setLegacySchema(this._elevationQueryWorkerContext,e))}const f=await k(this,c,h);y(u);const v=f.coordinates[0].z===D;v&&(f.coordinates[0].z=t);const g=await f.project(i.spatialReference,u);y(u);const S=g??c.clone(),_={geometry:S.export(),noDataValue:t};return s?.returnSampleInfo&&(_.sampleInfo=S.coordinates.map(()=>({demResolution:v?-1:1}))),_}catch(d){p.error=d,p.hasError=!0}finally{t(p)}}_abortElevationQueriesAfterDependencyChange(){const e=this._elevationQueryAbortController;this._elevationQueryAbortController=new AbortController,e.abort()}async processElevationQueryGeometry(e,t){return await this._elevationQueryWorkerSetup,y(t),this._elevationQueryWorker.invoke(e,t)}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(o){m(o)}if(y(t),await this._fetchService(t),y(t),null!=this._modificationsSource){const o=await E.fromUrl(this._modificationsSource.url,this.spatialReference,e);y(t),this.setAtOrigin("modifications",o,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t),y(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)}get isUsedAsGroundLayer(){return!has("enable-feature:im-as-ground")||(R(this.parent)||P(this.parent))}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new s("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("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("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}get elevationQueryDataRequester(){return new z(this.customParameters,this.apiKey)}get elevationQueryNodeLoader(){return new K(this,this.elevationQueryDataRequester,p.getLogger("esri.layers.IntegratedMeshLayer"),this.store?.defaultGeometrySchema,[],{loadFeatureData:!1,textureUsageMask:0})}_validateElevationInfo(e){const t="Integrated mesh layers";U(p.getLogger(this),G(t,"absolute-height",e)),U(p.getLogger(this),O(t,e))}};o([f({type:String,readOnly:!0})],F.prototype,"geometryType",void 0),o([f({type:["show","hide"]})],F.prototype,"listMode",void 0),o([f({type:["IntegratedMeshLayer"]})],F.prototype,"operationalLayerType",void 0),o([f({json:{read:!1},readOnly:!0})],F.prototype,"type",void 0),o([f({type:T,readOnly:!0,clonable:!1})],F.prototype,"nodePages",void 0),o([f({type:[C],readOnly:!0,clonable:!1})],F.prototype,"materialDefinitions",void 0),o([f({type:[M],readOnly:!0,clonable:!1})],F.prototype,"textureSetDefinitions",void 0),o([f({type:[W],readOnly:!0,clonable:!1})],F.prototype,"geometryDefinitions",void 0),o([f({readOnly:!0})],F.prototype,"serviceUpdateTimeStamp",void 0),o([f({type:E,clonable:e=>e?.clone()??e}),g({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],F.prototype,"modifications",void 0),o([f({clonable:e=>e?{...e}:null})],F.prototype,"_modificationsSource",void 0),o([q(["web-scene","portal-item"],"modifications")],F.prototype,"readModifications",null),o([f(x)],F.prototype,"elevationInfo",null),o([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],F.prototype,"path",void 0),o([f({clonable:!1})],F.prototype,"_elevationQueryWorker",null),o([f()],F.prototype,"_modificationsGeneration",void 0),o([f()],F.prototype,"memoizedElevationQueryDependencies",null),o([f()],F.prototype,"isUsedAsGroundLayer",null),o([f({clonable:!1})],F.prototype,"elevationQueryDataRequester",null),o([f({clonable:!1})],F.prototype,"elevationQueryNodeLoader",null),F=o([v("esri.layers.IntegratedMeshLayer")],F);const B=F;export{B as default};
|
package/layers/SceneLayer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,throwIfAborted as u,isAbortError as y,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as f}from"../core/accessorSupport/decorators.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as w}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as T}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as O}from"./mixins/EditBusLayer.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SceneService as A}from"./mixins/SceneService.js";import{useViewTimeProperty as E}from"./mixins/TemporalLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as D}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as R,labelsVisible as C,legendEnabled as Q,popupEnabled as N,attributeTableTemplate as G,screenSizePerspectiveEnabled as k}from"./support/commonProperties.js";import{getFieldDomain as M,computeEffectiveEditingEnabled as V,getGlobalIdToObjectIdMap as K}from"./support/featureLayerUtils.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as $}from"./support/fieldProperties.js";import H from"./support/FieldsIndex.js";import{fixRendererFields as W,fixTimeInfoFields as B,unpackFieldNames as Z}from"./support/fieldUtils.js";import{I3SNodePageDefinition as J,I3SMaterialDefinition as X,I3STextureSetDefinition as Y,I3SGeometryDefinition as ee}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as te,isFileSupported as re}from"./support/infoFor3D.js";import ie from"./support/LabelClass.js";import{reader as se}from"./support/labelingInfo.js";import oe from"./support/LayerFloorInfo.js";import{layersLoaderMap as ae}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ne}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as le}from"./support/RangeInfo.js";import pe from"./support/SceneFilter.js";import{cacheIsOutOfSync as de}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as ye}from"./support/SceneServiceTimeInfo.js";import ce from"./support/TimeInfo.js";import{loadStyleRenderer as me}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as ge,elevationModeUnsupportedMessage as ve,featureExpressionUnsupportedMessage as we}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as Ie}from"../support/zipUtils.js";import Le from"../time/TimeExtent.js";import je from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Fe}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Se,getFetchPopupTemplate as Te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Oe}from"../webdoc/support/opacityUtils.js";import{reader as _e}from"../core/accessorSupport/decorators/reader.js";const xe=new Set(["3DObject","Point"]),Pe=$();let Ae=class extends(O(A(S(_(x(P(p(T(F(i(I))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?M(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new H(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&V(this.associatedLayer)}get geometryType(){return Ue[this.profile]||"mesh"}set renderer(e){W(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:q;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:u},operations:{supportsEditing:y,supportsAdd:c,supportsUpdate:m,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:g,supportsAsyncConvert3D:v},attachment:w}=e,b=e.operations.supportsChangeTracking,I=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:I&&a,supportsUploadWithItemId:o},data:{supportsAttachment:u,supportsZ:l,supportsM:p,isVersioned:d,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:f,supportsQueryAttachments:g,supportsEditing:y&&b,supportsAdd:I&&c&&b,supportsDelete:I&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:w}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ee[r]?Ee[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await me(this,{origin:"service"},t),W(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){n.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new fe;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){const[r,{queryModels:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryModel(e,t){const[r,{queryModel:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=Z(this.fieldsIndex,await Se(this,Te(this)));return Fe(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await(import("./graphics/editingSupport.js"));let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await K(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);u(t);const s=i.reduce((e,t)=>te(this.infoFor3D,t)?e+1:e,0);0===s&&r(new L),s>1&&r(new j);const a=this.spatialReference,l=t.origin,p=await w(l??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:a}),a,t),d=a.isGeographic?"local":"georeferenced",{createWithExternalSource:y}=await(import("../geometry/support/meshUtils.js"));u(t);const c=y(p,{type:"client",files:i},{vertexSpace:d,transform:ne(a),unitConversionDisabled:!0}),[m]=await this.uploadAssets([c],{...t,useAssetOrigin:!l});return m}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await Ie(e)).filter(e=>re(t,e))}validateLayer(e){if(e.layerType&&!xe.has(e.layerType))throw new o("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!de(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await D(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ae.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await m(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void c(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&ge(n.getLogger(this),ve("Mesh scene layers","relative-to-scene",e)),ge(n.getLogger(this),we("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(de({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await this.fetchStatistics(t,e);i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:o,maxTimeStr:a,max:n}=i,l=t===r?s??o:a??n;return null!=l?new Date(l):null},[o,a]=await Promise.all([s(r),s(i)]);if(null!=r&&null==o||null!=i&&null==a)return;const n=new Le({start:o,end:a});this.setAtOrigin("timeInfo",new ce({endField:i,startField:r,fullTimeExtent:n}),"service")}};e([h({types:{key:"type",base:null,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Ae.prototype,"featureReduction",void 0),e([h({type:[le],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Ae.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Ae.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Ae.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Ae.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Ae.prototype,"type",void 0),e([h({...Pe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"fields",void 0),e([h()],Ae.prototype,"types",null),e([h()],Ae.prototype,"typeIdField",null),e([h()],Ae.prototype,"templates",null),e([h()],Ae.prototype,"formTemplate",null),e([h({readOnly:!0})],Ae.prototype,"graphicOrigin",void 0),e([h({readOnly:!0,clonable:!1})],Ae.prototype,"fieldsIndex",null),e([h({type:oe,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Ae.prototype,"floorInfo",void 0),e([h(Pe.outFields)],Ae.prototype,"outFields",void 0),e([h({type:J,readOnly:!0,json:{read:!1},clonable:!1})],Ae.prototype,"nodePages",void 0),e([_e("service","nodePages",["nodePages","pointNodePages"])],Ae.prototype,"readNodePages",null),e([h({type:[X],readOnly:!0,clonable:!1})],Ae.prototype,"materialDefinitions",void 0),e([h({type:[Y],readOnly:!0,clonable:!1})],Ae.prototype,"textureSetDefinitions",void 0),e([h({type:[ee],readOnly:!0,clonable:!1})],Ae.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Ae.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Ae.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Ae.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Ae.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Ae.prototype,"definitionExpression",void 0),e([h({type:pe,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Ae.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ae.prototype,"path",void 0),e([h(R)],Ae.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Ae.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Ae.prototype,"geometryType",null),e([h(C)],Ae.prototype,"labelsVisible",void 0),e([h({type:[ie],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:se},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:se},write:!0}})],Ae.prototype,"labelingInfo",void 0),e([h(Q)],Ae.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Ae.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"semantic",void 0),e([h({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Ae.prototype,"renderer",null),e([h({json:{read:!1}})],Ae.prototype,"cachedDrawingInfo",void 0),e([_e("service","cachedDrawingInfo")],Ae.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Ae.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"relationships",null),e([h(N)],Ae.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Ae.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"defaultPopupTemplate",null),e([h(G)],Ae.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Ae.prototype,"objectIdField",void 0),e([_e("service","objectIdField",["objectIdField","fields"])],Ae.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"globalIdField",void 0),e([_e("service","globalIdField",["globalIdField","fields"])],Ae.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Ae.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"profile",void 0),e([_e("service","profile",["store.profile"])],Ae.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Ae.prototype,"normalReferenceFrame",void 0),e([h(k)],Ae.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"serviceItemId",void 0),e([h(E)],Ae.prototype,"useViewTime",null),e([h({type:ce,json:{read:!1,write:!1}})],Ae.prototype,"timeInfo",null),e([h({type:Le,json:{read:!1,write:!1}})],Ae.prototype,"timeExtent",null),e([h({type:je,json:{read:!1,write:!1}})],Ae.prototype,"timeOffset",null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Ae.prototype,"datesInUnknownTimezone",null),e([h({type:ye,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],Ae.prototype,"serviceTimeInfo",void 0),Ae=e([f("esri.layers.SceneLayer")],Ae);const Ee={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Ue={"mesh-pyramids":"mesh",points:"point"},De=Ae;export{De as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,throwIfAborted as u,isAbortError as y,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as f}from"../core/accessorSupport/decorators.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as w}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as T}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as O}from"./mixins/EditBusLayer.js";import{OperationalLayer as _}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as A}from"./mixins/ScaleRangeLayer.js";import{SceneService as P}from"./mixins/SceneService.js";import{useViewTimeProperty as E}from"./mixins/TemporalLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as D}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as R,labelsVisible as C,legendEnabled as Q,popupEnabled as G,attributeTableTemplate as N,screenSizePerspectiveEnabled as k}from"./support/commonProperties.js";import{getFieldDomain as M,computeEffectiveEditingEnabled as V,getGlobalIdToObjectIdMap as K}from"./support/featureLayerUtils.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as $}from"./support/fieldProperties.js";import H from"./support/FieldsIndex.js";import{fixRendererFields as W,fixTimeInfoFields as B,unpackFieldNames as Z}from"./support/fieldUtils.js";import{I3SNodePageDefinition as J,I3SMaterialDefinition as X,I3STextureSetDefinition as Y,I3SGeometryDefinition as ee}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as te,isFileSupported as re}from"./support/infoFor3D.js";import ie from"./support/LabelClass.js";import{reader as se}from"./support/labelingInfo.js";import oe from"./support/LayerFloorInfo.js";import{layersLoaderMap as ae}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ne}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as le}from"./support/RangeInfo.js";import pe from"./support/SceneFilter.js";import{cacheIsOutOfSync as de}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as ye}from"./support/SceneServiceTimeInfo.js";import ce from"./support/TimeInfo.js";import{loadStyleRenderer as me}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as ge,elevationModeUnsupportedMessage as ve,featureExpressionUnsupportedMessage as we}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as Ie}from"../support/zipUtils.js";import Le from"../time/TimeExtent.js";import je from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Fe}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Se,getFetchPopupTemplate as Te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Oe}from"../webdoc/support/opacityUtils.js";import{reader as _e}from"../core/accessorSupport/decorators/reader.js";const xe=new Set(["3DObject","Point"]),Ae=$();let Pe=class extends(O(P(S(_(x(A(p(T(F(i(I))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?M(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new H(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&V(this.associatedLayer)}get geometryType(){return Ue[this.profile]||"mesh"}set renderer(e){W(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:q;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:u},operations:{supportsEditing:y,supportsAdd:c,supportsUpdate:m,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:g,supportsAsyncConvert3D:v},attachment:w}=e,b=e.operations.supportsChangeTracking,I=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:I&&a,supportsUploadWithItemId:o},data:{supportsAttachment:u,supportsZ:l,supportsM:p,isVersioned:d,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:f,supportsQueryAttachments:g,supportsEditing:y&&b,supportsAdd:I&&c&&b,supportsDelete:I&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:w}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ee[r]?Ee[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await me(this,{origin:"service"},t),W(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){n.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new fe;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){const[r,{queryModels:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryModel(e,t){const[r,{queryModel:i}]=await Promise.all([this._getAssociatedLayerForQuery(),import("./scene/modelQuerySupport.js")]);return i(this,r,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=Z(this.fieldsIndex,await Se(this,Te(this)));return Fe(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new o("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await(import("./graphics/editingSupport.js"));let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await K(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);u(t);const s=i.reduce((e,t)=>te(this.infoFor3D,t)?e+1:e,0);0===s&&r(new L),s>1&&r(new j);const a=this.spatialReference,l=t.origin,p=await w(l??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:a}),a,t),d=a.isGeographic?"local":"georeferenced",{createWithExternalSource:y}=await(import("../geometry/support/meshUtils.js"));u(t);const c=y(p,{type:"client",files:i},{vertexSpace:d,transform:ne(a),unitConversionDisabled:!0}),[m]=await this.uploadAssets([c],{...t,useAssetOrigin:!l});return m}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await Ie(e)).filter(e=>re(t,e))}validateLayer(e){if(e.layerType&&!xe.has(e.layerType))throw new o("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!de(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await D(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ae.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await m(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void c(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&ge(n.getLogger(this),ve("Mesh scene layers","relative-to-scene",e)),ge(n.getLogger(this),we("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(de({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await this.fetchStatistics(t,e);i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:o,maxTimeStr:a,max:n}=i,l=t===r?s??o:a??n;return null!=l?new Date(l):null},[o,a]=await Promise.all([s(r),s(i)]);if(null!=r&&null==o||null!=i&&null==a)return;const n=new Le({start:o,end:a});this.setAtOrigin("timeInfo",new ce({endField:i,startField:r,fullTimeExtent:n}),"service")}};e([h({types:{key:"type",base:null,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Pe.prototype,"featureReduction",void 0),e([h({type:[le],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Pe.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Pe.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Pe.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Pe.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Pe.prototype,"type",void 0),e([h({...Ae.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"fields",void 0),e([h()],Pe.prototype,"types",null),e([h()],Pe.prototype,"typeIdField",null),e([h()],Pe.prototype,"templates",null),e([h()],Pe.prototype,"formTemplate",null),e([h({readOnly:!0})],Pe.prototype,"graphicOrigin",void 0),e([h({readOnly:!0,clonable:!1})],Pe.prototype,"fieldsIndex",null),e([h({type:oe,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Pe.prototype,"floorInfo",void 0),e([h(Ae.outFields)],Pe.prototype,"outFields",void 0),e([h({type:J,readOnly:!0,json:{read:!1},clonable:!1})],Pe.prototype,"nodePages",void 0),e([_e("service","nodePages",["nodePages","pointNodePages"])],Pe.prototype,"readNodePages",null),e([h({type:[X],readOnly:!0,clonable:!1})],Pe.prototype,"materialDefinitions",void 0),e([h({type:[Y],readOnly:!0,clonable:!1})],Pe.prototype,"textureSetDefinitions",void 0),e([h({type:[ee],readOnly:!0,clonable:!1})],Pe.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Pe.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Pe.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Pe.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Pe.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Pe.prototype,"definitionExpression",void 0),e([h({type:pe,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Pe.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Pe.prototype,"path",void 0),e([h(R)],Pe.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Pe.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Pe.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Pe.prototype,"geometryType",null),e([h(C)],Pe.prototype,"labelsVisible",void 0),e([h({type:[ie],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:se},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:se},write:!0}})],Pe.prototype,"labelingInfo",void 0),e([h(Q)],Pe.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Pe.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"semantic",void 0),e([h({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Pe.prototype,"renderer",null),e([h({json:{read:!1}})],Pe.prototype,"cachedDrawingInfo",void 0),e([_e("service","cachedDrawingInfo")],Pe.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Pe.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Pe.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Pe.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Pe.prototype,"relationships",null),e([h(G)],Pe.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Pe.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Pe.prototype,"defaultPopupTemplate",null),e([h(N)],Pe.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Pe.prototype,"objectIdField",void 0),e([_e("service","objectIdField",["objectIdField","fields"])],Pe.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Pe.prototype,"globalIdField",void 0),e([_e("service","globalIdField",["globalIdField","fields"])],Pe.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Pe.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Pe.prototype,"profile",void 0),e([_e("service","profile",["store.profile"])],Pe.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Pe.prototype,"normalReferenceFrame",void 0),e([h(k)],Pe.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"serviceItemId",void 0),e([h(E)],Pe.prototype,"useViewTime",null),e([h({type:ce,json:{read:!1,write:!1}})],Pe.prototype,"timeInfo",null),e([h({type:Le,json:{read:!1,write:!1}})],Pe.prototype,"timeExtent",null),e([h({type:je,json:{read:!1,write:!1}})],Pe.prototype,"timeOffset",null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Pe.prototype,"datesInUnknownTimezone",null),e([h({type:ye,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],Pe.prototype,"serviceTimeInfo",void 0),e([h()],Pe.prototype,"isUsedAsGroundLayer",null),Pe=e([f("esri.layers.SceneLayer")],Pe);const Ee={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Ue={"mesh-pyramids":"mesh",points:"point"},De=Pe;export{De as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import o from"../../request.js";import i from"../../core/Error.js";import{JSONMap as s}from"../../core/jsonMap.js";import{LoadableMixin as a}from"../../core/Loadable.js";import n from"../../core/Logger.js";import{EsriPromiseMixin as p}from"../../core/Promise.js";import{property as l,subclass as y}from"../../core/accessorSupport/decorators.js";import u from"../../geometry/Extent.js";import d from"../../geometry/SpatialReference.js";import c from"../../graphic/BuildingGraphicOrigin.js";import h from"../FeatureLayer.js";import m from"./BuildingSublayer.js";import{zeroCapabilities as f}from"../support/capabilities.js";import{popupEnabled as g}from"../support/commonProperties.js";import{getFieldDomain as j}from"../support/featureLayerUtils.js";import{defineFieldProperties as v}from"../support/fieldProperties.js";import b from"../support/FieldsIndex.js";import{unpackFieldNames as L}from"../support/fieldUtils.js";import{fetchIndexInfo as I}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as S,I3SMaterialDefinition as F,I3STextureSetDefinition as O,I3SGeometryDefinition as w}from"../support/I3SLayerDefinitions.js";import{webSceneRendererTypes as x}from"../../renderers/support/typeUtils.js";import P from"../../rest/support/Query.js";import{isNumber as q}from"../../support/guards.js";import{createPopupTemplate as T}from"../../support/popupUtils.js";import Q from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as U}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as E,getFetchPopupTemplate as D}from"../../views/layers/support/popupUtils.js";import{reader as R}from"../../core/accessorSupport/decorators/reader.js";import{enumeration as A}from"../../core/accessorSupport/decorators/enumeration.js";const _=v();let N=class extends(a(p(m))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}initialize(){this._set("graphicOrigin",new c(this))}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new b(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,o=t.associatedLayerID;return null!=r&&"number"==typeof o?new h({portalItem:r,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get globalIdField(){if(null!=this.fields)for(const e of this.fields)if("global-id"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then(()=>{this.indexInfo=I(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,n.getLogger(this),t),this.indexInfo.catch(()=>{})});return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return T(this,e)}async _fetchService(e){const t=(await o(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?j(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:f,{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:i,isVersioned:s}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:i,isVersioned:s}}}createQuery(){const e=new P;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(q)}async queryCachedAttributes(e,t){const r=L(this.fieldsIndex,await E(this,D(this)));return U(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const o=await this.queryCachedAttributes(e,[r]);if(!o||0===o.length)throw new i("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new t({attributes:o[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new i("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([l({readOnly:!0})],N.prototype,"parsedUrl",null),e([l({type:S,readOnly:!0})],N.prototype,"nodePages",void 0),e([l({type:[F],readOnly:!0})],N.prototype,"materialDefinitions",void 0),e([l({type:[O],readOnly:!0})],N.prototype,"textureSetDefinitions",void 0),e([l({type:[w],readOnly:!0})],N.prototype,"geometryDefinitions",void 0),e([l({readOnly:!0})],N.prototype,"serviceUpdateTimeStamp",void 0),e([l({readOnly:!0})],N.prototype,"store",void 0),e([l({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],N.prototype,"rootNode",void 0),e([l({readOnly:!0})],N.prototype,"attributeStorageInfo",void 0),e([l(_.fields)],N.prototype,"fields",void 0),e([l({readOnly:!0})],N.prototype,"fieldsIndex",null),e([l({readOnly:!0,type:h})],N.prototype,"associatedLayer",void 0),e([R("service","associatedLayer",["associatedLayerID"])],N.prototype,"readAssociatedLayer",null),e([l(_.outFields)],N.prototype,"outFields",void 0),e([l({type:String,readOnly:!0})],N.prototype,"objectIdField",null),e([l({type:String,readOnly:!0})],N.prototype,"globalIdField",null),e([l({readOnly:!0,type:String,json:{read:!1}})],N.prototype,"displayField",null),e([l({readOnly:!0,type:String})],N.prototype,"apiKey",null),e([l({readOnly:!0,type:String})],N.prototype,"customParameters",null),e([l({readOnly:!0,type:u})],N.prototype,"fullExtent",null),e([l({readOnly:!0,type:d})],N.prototype,"spatialReference",null),e([l({readOnly:!0})],N.prototype,"version",null),e([l({readOnly:!0,type:Q})],N.prototype,"elevationInfo",null),e([l({readOnly:!0,type:Number})],N.prototype,"minScale",null),e([l({readOnly:!0,type:Number})],N.prototype,"maxScale",null),e([l({readOnly:!0,type:Number})],N.prototype,"effectiveScaleRange",null),e([l({type:["hide","show"],json:{write:!0}})],N.prototype,"listMode",void 0),e([l({types:x,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],N.prototype,"renderer",void 0),e([l({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],N.prototype,"definitionExpression",void 0),e([l(g)],N.prototype,"popupEnabled",void 0),e([l({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],N.prototype,"popupTemplate",void 0),e([l({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],N.prototype,"normalReferenceFrame",void 0),e([l({readOnly:!0,json:{read:!1}})],N.prototype,"defaultPopupTemplate",null),e([l({readOnly:!0})],N.prototype,"graphicOrigin",void 0),e([l()],N.prototype,"types",null),e([l()],N.prototype,"typeIdField",null),e([l({json:{write:!1}}),A(new s({"3DObject":"3d-object",Point:"point"}))],N.prototype,"layerType",void 0),e([l()],N.prototype,"geometryType",null),e([l()],N.prototype,"profile",null),e([l({readOnly:!0,json:{read:!1}})],N.prototype,"capabilities",null),e([l({readOnly:!0})],N.prototype,"statisticsInfo",void 0),N=e([y("esri.layers.buildingSublayers.BuildingComponentSublayer")],N);export{N as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import o from"../../request.js";import s from"../../core/Error.js";import{JSONMap as i}from"../../core/jsonMap.js";import{LoadableMixin as a}from"../../core/Loadable.js";import n from"../../core/Logger.js";import{EsriPromiseMixin as p}from"../../core/Promise.js";import{property as l,subclass as y}from"../../core/accessorSupport/decorators.js";import u from"../../geometry/Extent.js";import d from"../../geometry/SpatialReference.js";import c from"../../graphic/BuildingGraphicOrigin.js";import h from"../FeatureLayer.js";import m from"./BuildingSublayer.js";import{zeroCapabilities as f}from"../support/capabilities.js";import{popupEnabled as g}from"../support/commonProperties.js";import{getFieldDomain as j}from"../support/featureLayerUtils.js";import{defineFieldProperties as v}from"../support/fieldProperties.js";import L from"../support/FieldsIndex.js";import{unpackFieldNames as b}from"../support/fieldUtils.js";import{fetchIndexInfo as I}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as S,I3SMaterialDefinition as F,I3STextureSetDefinition as O,I3SGeometryDefinition as w}from"../support/I3SLayerDefinitions.js";import{webSceneRendererTypes as x}from"../../renderers/support/typeUtils.js";import P from"../../rest/support/Query.js";import{isNumber as q}from"../../support/guards.js";import{createPopupTemplate as T}from"../../support/popupUtils.js";import U from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as Q}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as E,getFetchPopupTemplate as A}from"../../views/layers/support/popupUtils.js";import{reader as D}from"../../core/accessorSupport/decorators/reader.js";import{enumeration as R}from"../../core/accessorSupport/decorators/enumeration.js";const _=v();let N=class extends(a(p(m))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}initialize(){this._set("graphicOrigin",new c(this))}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new L(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,o=t.associatedLayerID;return null!=r&&"number"==typeof o?new h({portalItem:r,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get globalIdField(){if(null!=this.fields)for(const e of this.fields)if("global-id"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then(()=>{this.indexInfo=I(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,n.getLogger(this),t),this.indexInfo.catch(()=>{})});return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return T(this,e)}async _fetchService(e){const t=(await o(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?j(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:f,{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}}createQuery(){const e=new P;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(q)}async queryCachedAttributes(e,t){const r=b(this.fieldsIndex,await E(this,A(this)));return Q(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const o=await this.queryCachedAttributes(e,[r]);if(!o||0===o.length)throw new s("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new t({attributes:o[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}get isUsedAsGroundLayer(){return!1}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([l({readOnly:!0})],N.prototype,"parsedUrl",null),e([l({type:S,readOnly:!0})],N.prototype,"nodePages",void 0),e([l({type:[F],readOnly:!0})],N.prototype,"materialDefinitions",void 0),e([l({type:[O],readOnly:!0})],N.prototype,"textureSetDefinitions",void 0),e([l({type:[w],readOnly:!0})],N.prototype,"geometryDefinitions",void 0),e([l({readOnly:!0})],N.prototype,"serviceUpdateTimeStamp",void 0),e([l({readOnly:!0})],N.prototype,"store",void 0),e([l({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],N.prototype,"rootNode",void 0),e([l({readOnly:!0})],N.prototype,"attributeStorageInfo",void 0),e([l(_.fields)],N.prototype,"fields",void 0),e([l({readOnly:!0})],N.prototype,"fieldsIndex",null),e([l({readOnly:!0,type:h})],N.prototype,"associatedLayer",void 0),e([D("service","associatedLayer",["associatedLayerID"])],N.prototype,"readAssociatedLayer",null),e([l(_.outFields)],N.prototype,"outFields",void 0),e([l({type:String,readOnly:!0})],N.prototype,"objectIdField",null),e([l({type:String,readOnly:!0})],N.prototype,"globalIdField",null),e([l({readOnly:!0,type:String,json:{read:!1}})],N.prototype,"displayField",null),e([l({readOnly:!0,type:String})],N.prototype,"apiKey",null),e([l({readOnly:!0,type:String})],N.prototype,"customParameters",null),e([l({readOnly:!0,type:u})],N.prototype,"fullExtent",null),e([l({readOnly:!0,type:d})],N.prototype,"spatialReference",null),e([l({readOnly:!0})],N.prototype,"version",null),e([l({readOnly:!0,type:U})],N.prototype,"elevationInfo",null),e([l({readOnly:!0,type:Number})],N.prototype,"minScale",null),e([l({readOnly:!0,type:Number})],N.prototype,"maxScale",null),e([l({readOnly:!0,type:Number})],N.prototype,"effectiveScaleRange",null),e([l({type:["hide","show"],json:{write:!0}})],N.prototype,"listMode",void 0),e([l({types:x,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],N.prototype,"renderer",void 0),e([l({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],N.prototype,"definitionExpression",void 0),e([l(g)],N.prototype,"popupEnabled",void 0),e([l({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],N.prototype,"popupTemplate",void 0),e([l({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],N.prototype,"normalReferenceFrame",void 0),e([l({readOnly:!0,json:{read:!1}})],N.prototype,"defaultPopupTemplate",null),e([l({readOnly:!0})],N.prototype,"graphicOrigin",void 0),e([l()],N.prototype,"types",null),e([l()],N.prototype,"typeIdField",null),e([l({json:{write:!1}}),R(new i({"3DObject":"3d-object",Point:"point"}))],N.prototype,"layerType",void 0),e([l()],N.prototype,"geometryType",null),e([l()],N.prototype,"profile",null),e([l({readOnly:!0,json:{read:!1}})],N.prototype,"capabilities",null),e([l({readOnly:!0})],N.prototype,"statisticsInfo",void 0),e([l()],N.prototype,"isUsedAsGroundLayer",null),N=e([y("esri.layers.buildingSublayers.BuildingComponentSublayer")],N);export{N as default};
|