@arcgis/core 5.0.0-next.30 → 5.0.0-next.32
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/Basemap.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.d.ts +3 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{406d270ae2b3cf9e1f1b.js → 05e55118dc0023d500fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{93fe46be3c7fe34b5361.js → 1432e789aa4cba627337.js} +1 -1
- package/assets/esri/core/workers/chunks/1dd867fa7c58c06b79ea.js +1 -0
- package/assets/esri/core/workers/chunks/{6e9d731cb20307b83ab0.js → 1e55f152b60145f33b61.js} +1 -1
- package/assets/esri/core/workers/chunks/22d66d1c8dfccdbbcf30.js +1 -0
- package/assets/esri/core/workers/chunks/27bd88e1101873d4ce12.js +1 -0
- package/assets/esri/core/workers/chunks/{5f2cf73fb2944f82661d.js → 433d249c35c56bf15806.js} +34 -34
- package/assets/esri/core/workers/chunks/444026d1938c1078ca97.js +1 -0
- package/assets/esri/core/workers/chunks/{a425ffec91d07bbfeb80.js → 565358ea8d1bdc4d1ebc.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2fbb44e219232e61cbd.js → 794960ec36e11f4416c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{0bfb7db0a151a5e85dd1.js → 8ad6595ad44c2d60c1ce.js} +1 -1
- package/assets/esri/core/workers/chunks/{11bb437437272d8f3e2c.js → 9252854b512237b6a0ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{e615983fab688d515205.js → 944dfa9309da8f49a616.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2f4e34247882eceb50d.js → a2cee5ac0d4df0108425.js} +3 -3
- package/assets/esri/core/workers/chunks/a4b7ba8aec109beb5b4d.js +1 -0
- package/assets/esri/core/workers/chunks/{d769c1b18e2710e0388b.js → a6324f5f560ffadc6e5d.js} +1 -1
- package/assets/esri/core/workers/chunks/{a091623bbfb3d771c8d8.js → d8db2c51b2fb42f37b2a.js} +1 -1
- package/assets/esri/core/workers/chunks/da517b4b07d4d27ce94c.js +1 -0
- package/assets/esri/core/workers/chunks/{984bb0943d07c86b7e77.js → ded3ef385d5a3a2ec8ca.js} +1 -1
- package/assets/esri/core/workers/chunks/defc6b50df5018bd9e86.js +1 -0
- package/assets/esri/core/workers/chunks/ed1dabed10ff9f4e0369.js +1 -0
- package/assets/esri/core/workers/chunks/{14dc21fe66c7b98fb456.js → f3127bdf28a1d9b8db27.js} +1 -1
- package/assets/esri/core/workers/chunks/fee942ef802a162e0248.js +1 -0
- package/assets/esri/themes/base/widgets/_Attribution.scss +8 -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/chunks/BlendLayers.glsl.js +1 -1
- package/config.js +1 -1
- package/core/Message.js +1 -1
- package/core/deprecate.js +1 -1
- package/core/keyboard.js +5 -0
- package/geometry/Circle.js +1 -1
- package/geometry/Extent.js +1 -1
- package/geometry/geodesicUtils.js +5 -0
- package/geometry/support/geodesicUtils.js +1 -1
- package/interfaces.d.ts +482 -190
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
- package/layers/support/BuildingFilterBlock.js +1 -1
- package/package.json +2 -2
- package/rest/support/QueryMixin.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementController.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/grid/gridUtils.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/OGCFeatureLayerView2D.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
- package/views/3d/layers/DimensionLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/ViewshedLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
- package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/support/Attribution3D.js +5 -0
- package/views/3d/terrain/TileBlendTechniqueConfiguration.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +4 -4
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +4 -4
- package/views/Attribution.js +5 -0
- package/views/DOMContainer.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/support/managers/DrawTooltipManager.js +5 -0
- package/views/interactive/sketch/constraintUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDynamic.js +5 -0
- package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
- package/views/interactive/tooltip/fields/TooltipField.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +5 -0
- package/views/layers/DimensionLayerView.js +1 -1
- package/views/layers/DimensionLayerViewMixin.js +5 -0
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/FeatureLayerViewMixin.d.ts +2 -2
- package/views/layers/FeatureLayerViewMixin.js +5 -0
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryLayerViewMixin.js +5 -0
- package/views/layers/LayerView.js +1 -1
- package/views/layers/LineOfSightLayerView.js +1 -1
- package/views/layers/LineOfSightLayerViewMixin.js +5 -0
- package/views/layers/MediaLayerView.js +1 -1
- package/views/layers/MediaLayerViewMixin.js +5 -0
- package/views/layers/OGCFeatureLayerView.js +1 -1
- package/views/layers/PointCloudLayerView.js +1 -1
- package/views/layers/StreamLayerView.js +1 -1
- package/views/layers/ViewshedLayerView.js +1 -1
- package/views/layers/ViewshedLayerViewMixin.js +5 -0
- package/views/support/AttributionItem.d.ts +4 -0
- package/views/support/AttributionItem.js +5 -0
- package/views/support/LayerLayerViewInfo.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/angularMeasurementUtils.js +1 -1
- package/views/support/attributionUtils.js +5 -0
- package/views/support/drapedUtils.js +1 -1
- package/views/support/geodesicAreaMeasurementUtils.js +1 -1
- package/views/support/geodesicLengthMeasurementUtils.js +1 -1
- package/views/support/geodesicMeasurementUtils.js +1 -1
- package/views/ui/2d/DefaultUI2D.js +1 -1
- package/views/ui/3d/DefaultUI3D.js +1 -1
- package/webscene/Environment.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/support/decorators/accessibleHandler.js +1 -1
- package/widgets/support/forms/expressions/FormExpressionArcadeExecutor.js +1 -1
- package/widgets/support/jsxWidgetSupport.js +1 -1
- package/widgets/support/widget.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/25143b919e75d5d2da05.js +0 -1
- package/assets/esri/core/workers/chunks/2d17ed5321ca05acb8e3.js +0 -1
- package/assets/esri/core/workers/chunks/447b53a9280b2b19b7a6.js +0 -1
- package/assets/esri/core/workers/chunks/6ce7ca6bebdc61d8eada.js +0 -1
- package/assets/esri/core/workers/chunks/8fbda0b85731ac77e1d8.js +0 -1
- package/assets/esri/core/workers/chunks/98c32d10a2344cd7a50b.js +0 -1
- package/assets/esri/core/workers/chunks/b66e41d626a7d1b81d48.js +0 -1
- package/assets/esri/core/workers/chunks/d5b464ff83ce29b51968.js +0 -1
- package/assets/esri/core/workers/chunks/d777d7cb8df3f21ac97e.js +0 -1
- package/layers/support/attributionUtils.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{BackgroundGrid as e}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js";import{TileBackground as r}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import{TileComposite as o}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{Float3PassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";function l(l){const t=new a,g=t.fragment;if(t.include(o),1===l.background){const r=2===l.output;return r?g.uniforms.add(new i("backgroundColor",e=>e.backgroundColor)):g.include(e),g.main.add(s`fragColor = vec4(${r?s`backgroundColor`:s`gridColor(uv)`}, 1.0);`),t}return t.include(r,l),g.uniforms.add(new d("tex",e=>e.texture),new n("opacity",e=>e.opacity))
|
|
5
|
+
import{BackgroundGrid as e}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js";import{TileBackground as r}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import{TileComposite as o}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{Float3PassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";function l(l){const t=new a,g=t.fragment;if(t.include(o),1===l.background){const r=2===l.output;return r?g.uniforms.add(new i("backgroundColor",e=>e.backgroundColor)):g.include(e),g.main.add(s`fragColor = vec4(${r?s`backgroundColor`:s`gridColor(uv)`}, 1.0);`),t}return t.include(r,l),g.uniforms.add(new d("tex",e=>e.texture),new n("opacity",e=>e.opacity)).main.add(s`fragColor = blendLayers(uv, texture(tex, uv), opacity);`),t}const t=Object.freeze(Object.defineProperty({__proto__:null,build:l},Symbol.toStringTag,{value:"Module"}));export{t as B,l as b};
|
package/config.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.
|
|
5
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.32";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/core/Message.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getDeepValue as t}from"./object.js";function s(s,e){return s.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,(s,r)=>{if(""===r)return"$";const
|
|
5
|
+
import{getDeepValue as t}from"./object.js";function s(s,e){return s.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,(s,r)=>{if(""===r)return"$";const n=t(r,e);return(n??"").toString()})}class e{constructor(t,e,r){this.name=t,this.details=r,this.message=(e&&s(e,r))??""}toString(){return"["+this.name+"]: "+this.message}}export{e as default};
|
package/core/deprecate.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./has.js";const e=new WeakMap;function n(n,t,r=!1){const o=`🛑 DEPRECATED - ${t}`;if(!r)return void n.warn(o);let i=e.get(n);i||(i=new Set,e.set(n,i)),i.has(t)||(i.add(t),n.warn(o))}const t="https://www.esriurl.com/";function r(e,n,r,o={}){has("esri-deprecation-warnings")&&m(e,`This widget is deprecated. Use the ${n} component instead.`,{see:[`${n} component reference: ${t}${r}/`,`Esri's move to web components: ${t}components-transition-plan/`],replacement:`<${r}></${r}>`,warnOnce:!0,...o})}function o(e,n,r,o={}){has("esri-deprecation-warnings")&&m(e,`This view model is deprecated. Use the ${n} component directly instead.`,{see:[`${n} component reference: ${t}${r}/`,`Esri's move to web components: ${t}components-transition-plan/`],replacement:`<${r}></${r}>`,warnOnce:!0,...o})}function i(e,n,t={}){has("esri-deprecation-warnings")&&m(e,`Module: ${n}`,t)}function s(e,n,t={}){if(has("esri-deprecation-warnings")){const{moduleName:r}=t;m(e,`Function: ${(r?r+"::":"")+n+"()"}`,t)}}function c(e,n,t={}){if(has("esri-deprecation-warnings")){const{moduleName:r}=t;m(e,`Property: ${(r?r+"::":"")+n}`,t)}}function a(e,n,t,r={}){if(has("esri-deprecation-warnings")){const{moduleName:o}=r;m(e,`'${(o?o+"::":"")+n}' value: ${t}`,r)}}function p(e,n,t={}){has("esri-deprecation-warnings")&&m(e,`Multiple argument constructor: ${n}`,{warnOnce:!0,replacement:`new ${n}({ <your properties here> })`,...t})}function m(e,t,r={}){if(has("esri-deprecation-warnings")){const{replacement:o,version:i,see:s,warnOnce:c}=r;let a=t;if(o&&(a+=`\n\t🛠️ Replacement: ${o}`),i&&(a+=`\n\t⚙️ Version: ${i}`),s)if(Array.isArray(s)){a+="\n\t🔗 See for more details:";for(const e of s)a+=`\n\t\t${e}`}else a+=`\n\t🔗 See ${s} for more details.`;n(e,a,c)}}export{o as deprecateUnnecessaryViewModel,r as deprecateWidget,m as deprecated,p as deprecatedConstructorSignature,s as deprecatedFunction,i as deprecatedModule,c as deprecatedProperty,a as deprecatedPropertyValue};
|
|
5
|
+
import has from"./has.js";const e=new WeakMap;function n(n,t,r=!1){const o=`🛑 DEPRECATED - ${t}`;if(!r)return void n.warn(o);let i=e.get(n);i||(i=new Set,e.set(n,i)),i.has(t)||(i.add(t),n.warn(o))}const t="https://www.esriurl.com/";function r(e,n,r,o={}){has("esri-deprecation-warnings")&&m(e,`This widget is deprecated. Use the ${n} component instead.`,{see:[`${n} component reference: ${t}${r}/`,`Esri's move to web components: ${t}components-transition-plan/`],replacement:`<${r}></${r}>`,warnOnce:!0,...o})}function o(e,n,r,o={}){has("esri-deprecation-warnings")&&m(e,`This view model is deprecated. Use the ${n} component directly instead.`,{see:[`${n} component reference: ${t}${r}/`,`Esri's move to web components: ${t}components-transition-plan/`],replacement:`<${r}></${r}>`,warnOnce:!0,...o})}function i(e,n,t={}){has("esri-deprecation-warnings")&&m(e,`Module: ${n}`,t)}function s(e,n,t={}){if(has("esri-deprecation-warnings")){const{moduleName:r}=t;m(e,`Function: ${(r?r+"::":"")+n+"()"}`,t)}}function c(e,n,t={}){if(has("esri-deprecation-warnings")){const{moduleName:r}=t;m(e,`Property: ${(r?r+"::":"")+n}`,t)}}function a(e,n,t,r={}){if(has("esri-deprecation-warnings")){const{moduleName:o}=r;m(e,`'${(o?o+"::":"")+n}' value: ${t}`,r)}}function p(e,n,t={}){has("esri-deprecation-warnings")&&m(e,`Multiple argument constructor: ${n}`,{warnOnce:!0,replacement:`new ${n}({ <your properties here> })`,...t})}function m(e,t,r={}){if(has("esri-deprecation-warnings")){const{replacement:o,version:i,see:s,warnOnce:c}=r;let a=t;if(o&&(a+=`\n\t🛠️ Replacement: ${o}`),i&&(a+=`\n\t⚙️ Version: ${i}`),s)if(Array.isArray(s)){a+="\n\t🔗 See for more details:";for(const e of s)a+=`\n\t\t${e}`}else a+=`\n\t🔗 See ${s} for more details.`;n(e,a,c)}}export{o as deprecateUnnecessaryViewModel,r as deprecateWidget,m as deprecated,p as deprecatedConstructorSignature,s as deprecatedFunction,i as deprecatedModule,c as deprecatedProperty,a as deprecatedPropertyValue,t as esriurl};
|
package/core/keyboard.js
ADDED
package/geometry/Circle.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{convertUnit as t,isProjectedWKT as r,getMetersPerUnit as s,lengthToDegrees as i}from"../core/units.js";import{property as o,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureType as n}from"../core/accessorSupport/ensureType.js";import{getReferenceEllipsoid as a}from"./ellipsoidUtils.js";import p
|
|
5
|
+
import{__decorate as e}from"tslib";import{convertUnit as t,isProjectedWKT as r,getMetersPerUnit as s,lengthToDegrees as i}from"../core/units.js";import{property as o,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureType as n}from"../core/accessorSupport/ensureType.js";import{getReferenceEllipsoid as a}from"./ellipsoidUtils.js";import{directGeodeticSolver as p}from"./geodesicUtils.js";import l from"./Point.js";import u from"./Polygon.js";import h from"./SpatialReference.js";import{webMercatorToGeographic as d,geographicToWebMercator as m}from"./support/webMercatorUtils.js";import f from"./support/WKIDUnitConversion.js";var g;let b=g=class extends u{constructor(e){super(e),this.geodesic=!1,this.numberOfPoints=60,this.radius=1e3,this.radiusUnit="meters"}initialize(){const e=this.center,o=this.numberOfPoints;if(this.hasZ=e?.hasZ??!1,0!==this.rings.length||!e)return;const c=t(this.radius,this.radiusUnit,"meters"),n=e.spatialReference;let p,l="geographic";if(n.isWebMercator?l="webMercator":(null!=(n.wkid&&f[n.wkid])||(n.wkt2||n.wkt)&&r(n.wkt2||n.wkt))&&(l="projected"),this.geodesic){let t;switch(l){case"webMercator":t=d(e);break;case"projected":console.error("Creating a geodesic circle requires the center to be specified in web mercator or geographic coordinate system");break;case"geographic":t=e}p=this._createGeodesicCircle(t,c,o),"webMercator"===l&&(p=m(p))}else{let t;"webMercator"===l||"projected"===l?t=c/s(e.spatialReference):"geographic"===l&&(t=i(c,"meters",a(e.spatialReference).radius)),p=this._createPlanarCircle(e,t,o)}this.spatialReference=p.spatialReference,this.addRing(p.rings[0])}get center(){return this._get("center")}set center(e){this._set("center",n(l,e))}clone(){const{center:e,numberOfPoints:t,radius:r,radiusUnit:s,geodesic:i}=this;return new g({center:e?.clone(),numberOfPoints:t,radius:r,radiusUnit:s,geodesic:i})}_createGeodesicCircle(e,t,r){const s=[],i=[e.x,e.y];for(let o=0;o<360;o+=360/r){const r=this.hasZ?[0,0,e.z??0]:[0,0];p(r,i,o,t,h.WGS84),s.push(r)}return s.push(s[0]),new u({rings:[s]})}_createPlanarCircle(e,t,r){const s=[],i=2*Math.PI/r;for(let o=0;o<r;++o){const r=i*o,c=[e.x+Math.cos(-r)*t,e.y+Math.sin(-r)*t];this.hasZ&&c.push(e.z??0),s.push(c)}return s.push(s[0]),new u({spatialReference:e.spatialReference,rings:[s]})}};e([o({type:l,useTypeForAutocast:!1,value:null})],b.prototype,"center",null),e([o()],b.prototype,"geodesic",void 0),e([o()],b.prototype,"numberOfPoints",void 0),e([o()],b.prototype,"radius",void 0),e([o()],b.prototype,"radiusUnit",void 0),b=g=e([c("esri.geometry.Circle")],b);const w=b;export{w as default};
|
package/geometry/Extent.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{replace as i}from"../core/string.js";import{property as e,subclass as s}from"../core/accessorSupport/decorators.js";import n from"./Geometry.js";import m from"./Point.js";import r from"./SpatialReference.js";import{extentContainsPoint as a,extentContainsExtent as h}from"./support/contains.js";import{getFeatureExtentIntersector as o}from"./support/intersectsBase.js";import{equals as x,getInfo as l}from"./support/spatialReferenceUtils.js";import{canProject as p,geographicToWebMercator as c,webMercatorToGeographic as y}from"./support/webMercatorUtils.js";var u;function f(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}function d(t,i,e){return null==i?e:null==e?i:t(i,e)}let z=u=class extends n{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,i,e,s,n){return f(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?r.WGS84:t.spatialReference,t):{xmin:t,ymin:i,xmax:e,ymax:s,spatialReference:n??r.WGS84}}static fromPoint(t){return new u({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new m({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const i=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-i.x,t.y-i.y,t.z-i.z):this.offset(t.x-i.x,t.y-i.y)}clone(){const t=new u;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const i=this.spatialReference,e=t.spatialReference;return i&&e&&!i.equals(e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0)),"point"===t.type?a(this,t):"extent"===t.type&&h(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const i=this.spatialReference,e=t.spatialReference;return i&&e&&!i.equals(e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const i=.5*(1-t),e=this.width*i,s=this.height*i;if(this.xmin+=e,this.ymin+=s,this.xmax-=e,this.ymax-=s,this.hasZ){const t=(this.zmax-this.zmin)*i;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*i;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const i=this.spatialReference,e=t.spatialReference;i&&e&&!x(i,e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0));return o(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,i,e){return this.xmin+=t,this.ymin+=i,this.xmax+=t,this.ymax+=i,null!=e&&(this.zmin+=e,this.zmax+=e),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=d(Math.min,this.zmin,t.zmin),this.zmax=d(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=d(Math.min,this.mmin,t.mmin),this.mmax=d(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=d(Math.max,this.zmin,t.zmin),this.zmax=d(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=d(Math.max,this.mmin,t.mmin),this.mmax=d(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=l(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,s=this._getCM(t);if(s){const n=e.isWebMercator?y(s):s;this.xmin-=s.x,this.xmax-=s.x,e.isWebMercator||(n.x=M(n.x,t).x),this.spatialReference=new r(i((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:n.x}))}return this}_getCM(t){let i=null;const[e,s]=t.valid,n=this.xmin,m=this.xmax;return n>=e&&n<=s&&(m>=e&&m<=s)||(i=this.center),i}_normalize(t,i,e){const s=this.spatialReference;if(!s)return this;const n=e??l(s);if(null==n)return this;const m=this._getParts(n).map(t=>t.extent);if(m.length<2)return m[0]||this;if(m.length>2)return t?this._shiftCM(n):this.set({xmin:n.valid[0],xmax:n.valid[1]});if(t)return this._shiftCM(n);if(i)return m;let r=!0,a=!0;return m.forEach(t=>{t.hasZ||(r=!1),t.hasM||(a=!1)}),{rings:m.map(t=>{const i=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(r){const e=(t.zmax-t.zmin)/2;for(let t=0;t<i.length;t++)i[t].push(e)}if(a){const e=(t.mmax-t.mmin)/2;for(let t=0;t<i.length;t++)i[t].push(e)}return i}),hasZ:r,hasM:a,spatialReference:s}}_getParts(t){let i=this.cache._parts;if(!i){i=[];const{ymin:e,ymax:s,spatialReference:n}=this,m=this.width,r=this.xmin,a=this.xmax;let h;t=t||l(n);const[o,x]=t.valid;h=M(this.xmin,t);const p=h.x,c=h.frameId;h=M(this.xmax,t);const y=h.x,f=h.frameId,d=p===y&&m>0;if(m>2*x){const t=new u(r<a?p:y,e,x,s,n),m=new u(o,e,r<a?y:p,s,n),h=new u(0,e,x,s,n),l=new u(o,e,0,s,n),d=[],z=[];t.contains(h)&&d.push(c),t.contains(l)&&z.push(c),m.contains(h)&&d.push(f),m.contains(l)&&z.push(f);for(let i=c+1;i<f;i++)d.push(i),z.push(i);i.push({extent:t,frameIds:[c]},{extent:m,frameIds:[f]},{extent:h,frameIds:d},{extent:l,frameIds:z})}else p>y||d?i.push({extent:new u(p,e,x,s,n),frameIds:[c]},{extent:new u(o,e,y,s,n),frameIds:[f]}):i.push({extent:new u(p,e,y,s,n),frameIds:[c]});this.cache._parts=i}const e=this.hasZ,s=this.hasM;if(e||s){const t={};e&&(t.zmin=this.zmin,t.zmax=this.zmax),s&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let e=0;e<i.length;e++)i[e].extent.set(t)}return i}};function M(t,i){const[e,s]=i.valid,n=2*s;let m,r=0;return t>s?(m=Math.ceil(Math.abs(t-s)/n),t-=m*n,r=m):t<e&&(m=Math.ceil(Math.abs(t-e)/n),t+=m*n,r=-m),{x:t,frameId:r}}t([e({readOnly:!0})],z.prototype,"cache",null),t([e({readOnly:!0})],z.prototype,"center",null),t([e({readOnly:!0})],z.prototype,"extent",null),t([e({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasM",null),t([e({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasZ",null),t([e({readOnly:!0})],z.prototype,"height",null),t([e({readOnly:!0})],z.prototype,"width",null),t([e({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],z.prototype,"xmin",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"ymin",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],z.prototype,"mmin",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],z.prototype,"zmin",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"xmax",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"ymax",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],z.prototype,"mmax",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],z.prototype,"zmax",void 0),z=u=t([s("esri.geometry.Extent")],z),z.prototype.toJSON.isDefaultToJSON=!0;export{z as default};
|
|
5
|
+
import{__decorate as t}from"tslib";import{replace as i}from"../core/string.js";import{property as e,subclass as s}from"../core/accessorSupport/decorators.js";import n from"./Geometry.js";import m from"./Point.js";import r from"./SpatialReference.js";import{extentContainsPoint as a,extentContainsExtent as h}from"./support/contains.js";import{getFeatureExtentIntersector as o}from"./support/intersectsBase.js";import{equals as x,getInfo as l}from"./support/spatialReferenceUtils.js";import{canProject as p,geographicToWebMercator as c,webMercatorToGeographic as y}from"./support/webMercatorUtils.js";var u;function f(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}function d(t,i,e){return null==i?e:null==e?i:t(i,e)}let z=u=class extends n{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,i,e,s,n){return f(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?r.WGS84:t.spatialReference,t):{xmin:t,ymin:i,xmax:e,ymax:s,spatialReference:n??r.WGS84}}static fromPoint(t){return new u({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new m({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const i=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-i.x,t.y-i.y,t.z-i.z):this.offset(t.x-i.x,t.y-i.y)}clone(){const t=new u;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const i=this.spatialReference,e=t.spatialReference;return i&&e&&!i.equals(e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0)),"point"===t.type?a(this,t):"extent"===t.type&&h(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const i=this.spatialReference,e=t.spatialReference;return i&&e&&!i.equals(e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const i=.5*(1-t),e=this.width*i,s=this.height*i;if(this.xmin+=e,this.ymin+=s,this.xmax-=e,this.ymax-=s,this.hasZ){const t=(this.zmax-this.zmin)*i;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*i;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const i=this.spatialReference,e=t.spatialReference;i&&e&&!x(i,e)&&p(i,e)&&(t=i.isWebMercator?c(t):y(t,!0));return o(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,i,e){return this.xmin+=t,this.ymin+=i,this.xmax+=t,this.ymax+=i,null!=e&&(this.zmin+=e,this.zmax+=e),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=d(Math.min,this.zmin,t.zmin),this.zmax=d(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=d(Math.min,this.mmin,t.mmin),this.mmax=d(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=d(Math.max,this.zmin,t.zmin),this.zmax=d(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=d(Math.max,this.mmin,t.mmin),this.mmax=d(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=l(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,s=this._getCM(t);if(s){const n=e.isWebMercator?y(s):s;this.xmin-=s.x,this.xmax-=s.x,e.isWebMercator||(n.x=M(n.x,t).x),this.spatialReference=new r(i((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:n.x}))}return this}_getCM(t){let i=null;const[e,s]=t.valid,n=this.xmin,m=this.xmax;return n>=e&&n<=s&&(m>=e&&m<=s)||(i=this.center),i}_normalize(t,i,e){const s=this.spatialReference;if(!s)return this;const n=e??l(s);if(null==n)return this;const m=this._getParts(n).map(t=>t.extent);if(m.length<2)return m[0]||this;if(m.length>2)return t?this._shiftCM(n):this.set({xmin:n.valid[0],xmax:n.valid[1]});if(t)return this._shiftCM(n);if(i)return m;let r=!0,a=!0;return m.forEach(t=>{t.hasZ||(r=!1),t.hasM||(a=!1)}),{rings:m.map(t=>{const i=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(r){const e=(t.zmax-t.zmin)/2;for(let t=0;t<i.length;t++)i[t].push(e)}if(a){const e=(t.mmax-t.mmin)/2;for(let t=0;t<i.length;t++)i[t].push(e)}return i}),hasZ:r,hasM:a,spatialReference:s}}_getParts(t){let i=this.cache._parts;if(!i){i=[];const{ymin:e,ymax:s,spatialReference:n}=this,m=this.width,r=this.xmin,a=this.xmax;let h;t=t||l(n);const[o,x]=t.valid;h=M(this.xmin,t);const p=h.x,c=h.frameId;h=M(this.xmax,t);const y=h.x,f=h.frameId,d=p===y&&m>0;if(m>2*x){const t=new u(r<a?p:y,e,x,s,n),m=new u(o,e,r<a?y:p,s,n),h=new u(0,e,x,s,n),l=new u(o,e,0,s,n),d=[],z=[];t.contains(h)&&d.push(c),t.contains(l)&&z.push(c),m.contains(h)&&d.push(f),m.contains(l)&&z.push(f);for(let i=c+1;i<f;i++)d.push(i),z.push(i);i.push({extent:t,frameIds:[c]},{extent:m,frameIds:[f]},{extent:h,frameIds:d},{extent:l,frameIds:z})}else p>y||d?i.push({extent:new u(p,e,x,s,n),frameIds:[c]},{extent:new u(o,e,y,s,n),frameIds:[f]}):i.push({extent:new u(p,e,y,s,n),frameIds:[c]});this.cache._parts=i}const e=this.hasZ,s=this.hasM;if(e||s){const t={};e&&(t.zmin=this.zmin,t.zmax=this.zmax),s&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let e=0;e<i.length;e++)i[e].extent.set(t)}return i}};function M(t,i){const[e,s]=i.valid,n=2*s;let m,r=0;return t>s?(m=Math.ceil(Math.abs(t-s)/n),t-=m*n,r=m):t<e&&(m=Math.ceil(Math.abs(t-e)/n),t+=m*n,r=-m),{x:t,frameId:r}}t([e({readOnly:!0})],z.prototype,"cache",null),t([e({readOnly:!0})],z.prototype,"center",null),t([e({readOnly:!0})],z.prototype,"extent",null),t([e({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasM",null),t([e({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasZ",null),t([e({readOnly:!0})],z.prototype,"height",null),t([e({type:r,json:{write:!0},value:r.WGS84})],z.prototype,"spatialReference",void 0),t([e({readOnly:!0})],z.prototype,"width",null),t([e({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],z.prototype,"xmin",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"ymin",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],z.prototype,"mmin",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],z.prototype,"zmin",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"xmax",void 0),t([e({type:Number,json:{write:!0}})],z.prototype,"ymax",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],z.prototype,"mmax",void 0),t([e({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],z.prototype,"zmax",void 0),z=u=t([s("esri.geometry.Extent")],z),z.prototype.toJSON.isDefaultToJSON=!0;export{z as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import e from"../core/Error.js";import{convertUnit as t}from"../core/units.js";import{ensureClass as n}from"../core/accessorSupport/ensureType.js";import s from"./Point.js";import i from"./Polygon.js";import r from"./Polyline.js";import a from"./SpatialReference.js";import{toRadians as o,spheroids as c,wktSpheroidRegex as h}from"./support/geodesicConstants.js";import{isGeographic as l,isWebMercator as p,equals as u}from"./support/spatialReferenceUtils.js";function f(e){if(!e)return null;const t=e.wkid;if(t)return c[t];const n=e.wkt2??e.wkt;return n?m(n):null}function m(e){const t=h.exec(e);if(!t||2!==t.length)return null;const n=t[1].split(",");if(!n||n.length<3)return null;const s=parseFloat(n[1]),i=parseFloat(n[2]);if(isNaN(s)||isNaN(i))return null;return{a:s,f:0===i?0:1/i}}function d(e){const t=f(e);if(g(t))return t;const n=t.a*(1-t.f);return Object.assign(t,{b:n,eSq:1-(n/t.a)**2,radius:(2*t.a+n)/3,densificationRatio:1e4/((2*t.a+n)/3)})}function g(e){return null!=e&&"b"in e&&"eSq"in e&&"radius"in e}function M(e){return null!=e&&e<0?e+360:e}function w(e,t,n){const{a:s,eSq:i}=d(n),r=Math.sqrt(i),a=Math.sin(t[1]*o),c=s*t[0]*o;let h;if(i>0){h=s*((1-i)*(a/(1-i*(a*a))-1/(2*r)*Math.log((1-r*a)/(1+r*a))))*.5}else h=s*a;return e[0]=c,e[1]=h,e}function y(e){return l(e)&&!!f(e)}function R(n,s="square-meters"){if(n.some(e=>!y(e.spatialReference)))throw new e("geodesic-areas:invalid-spatial-reference","the input geometries spatial reference is not supported");const i=[];for(let e=0;e<n.length;e++){const t=n[e],s=t.spatialReference,{radius:r,densificationRatio:a}=d(s),o=r*a;i.push(z(t,o))}const r=[],a=[0,0],o=[0,0];for(let e=0;e<i.length;e++){const{rings:n,spatialReference:c}=i[e];let h=0;for(let e=0;e<n.length;e++){const t=n[e];w(a,t[0],c),w(o,t[t.length-1],c);let s=o[0]*a[1]-a[0]*o[1];for(let e=0;e<t.length-1;e++)w(a,t[e+1],c),w(o,t[e],c),s+=o[0]*a[1]-a[0]*o[1];h+=s}h=t(h,"square-meters",s),r.push(h/-2)}return r}function v(n,s="meters"){if(!n)throw new e("geodesic-lengths:invalid-geometries","the input geometries type is not supported");if(n.some(e=>!y(e.spatialReference)))throw new e("geodesic-lengths:invalid-spatial-reference","the input geometries spatial reference is not supported");const i=[];for(let e=0;e<n.length;e++){const r=n[e],{spatialReference:a}=r,o="polyline"===r.type?r.paths:r.rings;let c=0;for(let e=0;e<o.length;e++){const t=o[e];let n=0;for(let e=1;e<t.length;e++){const s=t[e-1][0],i=t[e][0],r=t[e-1][1],o=t[e][1];if(r!==o||s!==i){const e=new b;q(e,[s,r],[i,o],a),n+=e.distance}}c+=n}c=t(c,"meters",s),i.push(c)}return i}function z(t,s){if("polyline"!==t.type&&"polygon"!==t.type)throw new e("geodesic-densify:invalid-geometry","the input geometry is neither polyline nor polygon");const{spatialReference:o}=t;if(!y(o))throw new e("geodesic-densify:invalid-spatial-reference","the input geometry spatial reference is not supported");const c="polyline"===t.type?t.paths:t.rings,h=[],l=[0,0],p=new b;for(const e of c){const t=[];h.push(t),t.push([e[0][0],e[0][1]]);let n,i,r=e[0][0],a=e[0][1];for(let c=0;c<e.length-1;c++){if(n=e[c+1][0],i=e[c+1][1],r===n&&a===i)continue;const h=[r,a];q(p,[r,a],[n,i],o);const{azimuth:u,distance:f}=p,m=f/s;if(m>1){for(let e=1;e<=m-1;e++){j(l,h,u,e*s,o),t.push(l.slice())}j(l,h,u,(f+Math.floor(m-1)*s)/2,o),t.push(l.slice())}j(l,h,u,f,o),t.push(l.slice()),r=l[0],a=l[1]}}const u=n(a,o);return"polyline"===t.type?new r({paths:h,spatialReference:u}):new i({rings:h,spatialReference:u})}class b{constructor(e=0,t,n){this.distance=e,this.azimuth=t,this.reverseAzimuth=n}}function j(e,t,n,s,i){const r=t[0],a=t[1],c=r*o,h=a*o,l=(n??0)*o,{a:p,b:u,f}=d(i),m=Math.sin(l),g=Math.cos(l),M=(1-f)*Math.tan(h),w=1/Math.sqrt(1+M*M),y=M*w,R=Math.atan2(M,g),v=w*m,z=v*v,b=1-z,j=b*(p*p-u*u)/(u*u),q=1+j/16384*(4096+j*(j*(320-175*j)-768)),x=j/1024*(256+j*(j*(74-47*j)-128));let A,N,S,P=s/(u*q),k=2*Math.PI;for(;Math.abs(P-k)>1e-12;){S=Math.cos(2*R+P),A=Math.sin(P),N=Math.cos(P);k=P,P=s/(u*q)+x*A*(S+x/4*(N*(2*S*S-1)-x/6*S*(4*A*A-3)*(4*S*S-3)))}const F=y*A-w*N*g,C=Math.atan2(y*N+w*A*g,(1-f)*Math.sqrt(z+F*F)),E=f/16*b*(4+f*(4-3*b)),G=Math.atan2(A*m,w*N-y*A*g)-(1-E)*f*v*(P+E*A*(S+E*N*(2*S*S-1)));return e[0]=(c+G)/o,e[1]=C/o,e}function q(e,t,n,s){const i=t[0]*o,r=t[1]*o,a=n[0]*o,c=n[1]*o,{a:h,b:l,f:p,radius:u}=d(s),f=a-i,m=Math.atan((1-p)*Math.tan(r)),g=Math.atan((1-p)*Math.tan(c)),M=Math.sin(m),w=Math.cos(m),y=Math.sin(g),R=Math.cos(g);let v,z,b,j,q,x,A,N,S,P,k=1e3,F=f;do{if(A=Math.sin(F),N=Math.cos(F),b=Math.sqrt(R*A*(R*A)+(w*y-M*R*N)*(w*y-M*R*N)),0===b)return e.distance=0,e.azimuth=void 0,e.reverseAzimuth=void 0,e;q=M*y+w*R*N,x=Math.atan2(b,q),S=w*R*A/b,z=1-S*S,j=q-2*M*y/z,isNaN(j)&&(j=0),P=p/16*z*(4+p*(4-3*z)),v=F,F=f+(1-P)*p*S*(x+P*b*(j+P*q*(2*j*j-1)))}while(Math.abs(F-v)>1e-12&&--k>0);if(0===k){const t=u,n=Math.acos(Math.sin(r)*Math.sin(c)+Math.cos(r)*Math.cos(c)*Math.cos(a-i))*t,s=a-i,h=Math.sin(s)*Math.cos(c),l=Math.cos(r)*Math.sin(c)-Math.sin(r)*Math.cos(c)*Math.cos(s),p=Math.atan2(h,l);return e.azimuth=p/o,e.distance=n,e.reverseAzimuth=void 0,e}const C=z*(h*h-l*l)/(l*l),E=C/1024*(256+C*(C*(74-47*C)-128)),G=l*(1+C/16384*(4096+C*(C*(320-175*C)-768)))*(x-E*b*(j+E/4*(q*(2*j*j-1)-E/6*j*(4*b*b-3)*(4*j*j-3)))),I=Math.atan2(R*Math.sin(F),w*y-M*R*Math.cos(F)),O=Math.atan2(w*Math.sin(F),w*y*Math.cos(F)-M*R);return e.azimuth=I/o,e.distance=G,e.reverseAzimuth=O/o,e}function x(n,s,i="meters"){if(!n||!s)throw new e("geodesic-distance:missing-parameters","one or both input parameters are missing");if(!n.spatialReference||!s.spatialReference)throw new e("geodesic-distance:invalid-parameters","one or both input points do not have a spatial reference");if(!u(n.spatialReference,s.spatialReference))throw new e("geodesic-distance:invalid-parameters","spatial references of input parameters do not match");const{spatialReference:r}=n;if(!y(r))throw new e("geodesic-distance:not-supported","input geometry spatial reference is not supported");if(n.x===s.x&&n.y===s.y)return new b(0,0,0);const a=new b;return q(a,[n.x,n.y],[s.x,s.y],r),a.distance=t(a.distance,"meters",i),a.azimuth=M(a.azimuth),a.reverseAzimuth=M(a.reverseAzimuth),a}function A(t,n,i){if(!t||null==n||null==i)throw new e("point-from-distance:missing-parameters","one or more input parameters are missing or undefined");if(i<0||i>360)throw new e("point-from-distance:-of-bounds","azimuth is restricted to angles between, and including, 0° to 360° degrees");if(!t.spatialReference)throw new e("point-from-distance:missing-spatial-reference","the input point must have a spatial reference");const{spatialReference:r}=t;if(!y(r))throw new e("geodesic-distance:not-supported","input geometry spatial reference is not supported");const a=[0,0];return j(a,[t.x,t.y],i,n,r),new s({x:a[0],y:a[1],spatialReference:r})}function N(e){return y(e)?e:p(e)?a.WGS84:null}export{b as InverseGeodeticSolverResult,j as directGeodeticSolver,R as geodesicAreas,N as geodesicCompatibleSpatialReference,z as geodesicDensify,x as geodesicDistance,v as geodesicLengths,q as inverseGeodeticSolver,y as isSupported,A as pointFromDistance};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import{deprecatedModule as e}from"../../core/deprecate.js";import r from"../../core/Logger.js";import{geodesicAreas as s,geodesicLengths as o,geodesicDensify as t,geodesicDistance as i,pointFromDistance as n}from"../geodesicUtils.js";function c(e,r="square-meters"){return s(e,r)}function g(e,r="meters"){return o(e,r)}function u(e,r){return t(e,r)}function m(e,r,s="meters"){return i(e,r,s)}function a(e,r,s){return n(e,r,s)}e(r.getLogger("esri.geometry.support.geodesicUtils"),"esri.geometry.support.geodesicUtils",{version:"4.33",warnOnce:!0});export{c as geodesicAreas,u as geodesicDensify,m as geodesicDistance,g as geodesicLengths,a as pointFromDistance};
|