@arcgis/core 5.2.0-next.161 → 5.2.0-next.163
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/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/092e311cb7aea92a6a26.js +1 -0
- package/assets/esri/core/workers/chunks/17c6d66b47aa690df0d4.js +1 -0
- package/assets/esri/core/workers/chunks/1e1c45f75020d5e05dc3.js +1 -0
- package/assets/esri/core/workers/chunks/{4ed76fb5f6096a089f5b.js → 1f7f4f821d422b46cae7.js} +1 -1
- package/assets/esri/core/workers/chunks/1fe24ffcd88280d84fbe.js +1 -0
- package/assets/esri/core/workers/chunks/25a3bd8bede2d07d3a54.js +1 -0
- package/assets/esri/core/workers/chunks/2ad69cc496235702bbf2.js +1 -0
- package/assets/esri/core/workers/chunks/3f46acfda693c70abbdd.js +1 -0
- package/assets/esri/core/workers/chunks/434a8ba841a59e0deab9.js +1 -0
- package/assets/esri/core/workers/chunks/45fd2b456a6997584ca1.js +1 -0
- package/assets/esri/core/workers/chunks/{8480fe6b4372dbbfa7cc.js → 46c5371c7a627537098c.js} +10 -10
- package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +1 -0
- package/assets/esri/core/workers/chunks/542e5640ea1b80ef801a.js +1 -0
- package/assets/esri/core/workers/chunks/5a9b7eb26f936f03d02e.js +1 -0
- package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +1 -0
- package/assets/esri/core/workers/chunks/5dc604e3691f36f03959.js +1 -0
- package/assets/esri/core/workers/chunks/5f07f52bb8b7721f08d3.js +1 -0
- package/assets/esri/core/workers/chunks/{32b351b047ce1eb58146.js → 60c79934799927114074.js} +1 -1
- package/assets/esri/core/workers/chunks/67f54efc817b241f8746.js +1 -0
- package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +29 -0
- package/assets/esri/core/workers/chunks/771dd92cb3e6a3427f66.js +1 -0
- package/assets/esri/core/workers/chunks/792d2b62356a1d953c88.js +1 -0
- package/assets/esri/core/workers/chunks/89c8b0f684c1f27d149e.js +1 -0
- package/assets/esri/core/workers/chunks/{9401cc22373566e1171e.js → 8a7b02037151767542f1.js} +1 -1
- package/assets/esri/core/workers/chunks/8ab57cb1bfd3dc8d3c2a.js +1 -0
- package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +1 -0
- package/assets/esri/core/workers/chunks/97b5f4302fb867c829f4.js +1 -0
- package/assets/esri/core/workers/chunks/9de5ad77bc37ec142218.js +1 -0
- package/assets/esri/core/workers/chunks/a65951f1d5702cfd996e.js +1 -0
- package/assets/esri/core/workers/chunks/a6f969851d4278865cc5.js +1 -0
- package/assets/esri/core/workers/chunks/aa4f3751f0d830113bed.js +1 -0
- package/assets/esri/core/workers/chunks/b1d989b72203113a06fe.js +1 -0
- package/assets/esri/core/workers/chunks/{fc73737b41e086f0ce0b.js → b59aaf30c7fe2c8d1aaa.js} +1 -1
- package/assets/esri/core/workers/chunks/b6d71a4ab788a09714f3.js +1 -0
- package/assets/esri/core/workers/chunks/b704f489d0f072a0bfcd.js +1 -0
- package/assets/esri/core/workers/chunks/{28b74bc77f7c13080074.js → be97a629e2ae4d13ceb3.js} +1 -1
- package/assets/esri/core/workers/chunks/{d33360c4f85203edafff.js → bf4d913e523eae2fda28.js} +1 -1
- package/assets/esri/core/workers/chunks/{d6cd0039d6e9c40961e3.js → d1f98c5249c487eb96f1.js} +1 -1
- package/assets/esri/core/workers/chunks/e077e321a3109c2fbbe2.js +1 -0
- package/assets/esri/core/workers/chunks/e251921bc5367258c4d2.js +1 -0
- package/assets/esri/core/workers/chunks/ee08ae5b73439a1ff666.js +1 -0
- package/assets/esri/core/workers/chunks/fcaf9450642fcef83286.js +1 -0
- package/assets/esri/core/workers/chunks/feb41abc03d677df6f73.js +1 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -5
- 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/DefaultMaterial.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/RibbonLine.glsl.js +70 -64
- package/config.d.ts +11 -30
- package/config.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/core/workers.d.ts +17 -0
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +39 -19
- package/layers/FeatureLayer.js +1 -1
- package/layers/MapImageLayer.d.ts +10 -3
- package/layers/MapNotesLayer.d.ts +2 -2
- package/layers/SubtypeGroupLayer.d.ts +64 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +16 -16
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/support/LabelClass.d.ts +20 -2
- package/layers/support/Sublayer.d.ts +61 -17
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/TimeInformation.js +2 -0
- package/package.json +2 -2
- package/rest/layerSources/DynamicDataLayer.d.ts +4 -2
- package/rest/layerSources/DynamicDataLayer.js +1 -1
- package/rest/layerSources/DynamicMapLayer.d.ts +1 -1
- package/rest/layerSources/DynamicWorkspaceLayer.d.ts +49 -0
- package/rest/layerSources/DynamicWorkspaceLayer.js +2 -0
- package/rest/layerSources/typeUtils.js +2 -0
- package/rest/query/operations/queryRelatedRecords.js +1 -1
- package/rest/query/operations/queryUtils.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/RelationshipQuery.js +1 -1
- package/rest/support/timeUtils.js +2 -0
- package/symbols/LineSymbol3D.d.ts +5 -3
- package/symbols/TextSymbol.d.ts +27 -2
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +6 -0
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +6 -0
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/environment/SunLighting.d.ts +17 -1
- package/views/3d/environment/SunLighting.js +1 -1
- package/views/3d/environment/VirtualLighting.d.ts +17 -1
- package/views/3d/environment/VirtualLighting.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/manipulators/ResizeManipulator.js +1 -1
- package/views/3d/interactive/manipulators/RotateManipulator.js +1 -1
- package/views/3d/interactive/manipulators/ShiftManipulator.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/support/elevationUpdateUtils.js +1 -1
- package/views/3d/terrain/TerrainData.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialExternalColor.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/output/getEmissions.glsl.js +2 -2
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.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/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/BasemapView.js +1 -1
- package/views/BreakpointsOwner.d.ts +6 -0
- package/views/GroundView.d.ts +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/support/ScheduledQueueProcessor.js +1 -1
- package/views/types.d.ts +3 -0
- package/views/webgl/ShaderBuilder.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +61 -2
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +3 -2
- package/widgets/TimeSlider.d.ts +5 -4
- package/assets/esri/core/workers/chunks/0a5a9885ee6f5b5f99f0.js +0 -1
- package/assets/esri/core/workers/chunks/0bd5012da287469b17d5.js +0 -1
- package/assets/esri/core/workers/chunks/112befb3b5b406f29298.js +0 -1
- package/assets/esri/core/workers/chunks/172cfeb5f415e4662432.js +0 -1
- package/assets/esri/core/workers/chunks/2d13a22f7b2427927fdc.js +0 -1
- package/assets/esri/core/workers/chunks/3e3e076fa5e8d5d5f33f.js +0 -1
- package/assets/esri/core/workers/chunks/42fd2a7b22b03dacc6a7.js +0 -1
- package/assets/esri/core/workers/chunks/43cf862577bf37344ff4.js +0 -1
- package/assets/esri/core/workers/chunks/4be559c53fe5ac0d0d2e.js +0 -1
- package/assets/esri/core/workers/chunks/4e350d6c76957f5beb70.js +0 -1
- package/assets/esri/core/workers/chunks/4fe34da1c5d63e66ce98.js +0 -1
- package/assets/esri/core/workers/chunks/510502a4c9a2ba8d3f7b.js +0 -1
- package/assets/esri/core/workers/chunks/612104dff305ff062dfa.js +0 -29
- package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +0 -1
- package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +0 -1
- package/assets/esri/core/workers/chunks/74c866e0b66e61751861.js +0 -1
- package/assets/esri/core/workers/chunks/830ab9b8d000169da675.js +0 -1
- package/assets/esri/core/workers/chunks/8ff23ac0abeea0073b47.js +0 -1
- package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +0 -1
- package/assets/esri/core/workers/chunks/95dbbddac6581b9d671f.js +0 -1
- package/assets/esri/core/workers/chunks/a40b6d8b5c73e06e14d4.js +0 -1
- package/assets/esri/core/workers/chunks/aa1ac7954e4f0fefe15b.js +0 -1
- package/assets/esri/core/workers/chunks/b5df193c93e9c19f9700.js +0 -1
- package/assets/esri/core/workers/chunks/befa32b9e7b3fbdd431e.js +0 -1
- package/assets/esri/core/workers/chunks/c2c1f51a4668055c2838.js +0 -1
- package/assets/esri/core/workers/chunks/d0f5bee9db1ad51ae687.js +0 -1
- package/assets/esri/core/workers/chunks/d95d63e8d51244d71afb.js +0 -1
- package/assets/esri/core/workers/chunks/dfd2dc5cdc97ffba8926.js +0 -1
- package/assets/esri/core/workers/chunks/e1b7806ab3e1967b15f0.js +0 -1
- package/assets/esri/core/workers/chunks/e1f5d00878f27e1d413e.js +0 -1
- package/assets/esri/core/workers/chunks/e8bf653376a607f00897.js +0 -1
- package/assets/esri/core/workers/chunks/f4a7aa3cdbc0c429c359.js +0 -1
- package/assets/esri/core/workers/chunks/ffbcb816b611049a6276.js +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ClonableMixin } from "../../core/Clonable.js";
|
|
2
|
+
import type { JSONSupport } from "../../core/JSONSupport.js";
|
|
3
|
+
|
|
4
|
+
export interface DynamicWorkspaceLayerProperties extends Partial<Pick<DynamicWorkspaceLayer, "definitionExpression" | "layerId" | "workspaceId">> {}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A dynamic workspace layer references a pre-authored ArcGIS Pro layer file (`.lyrx`) stored in a registered folder.
|
|
8
|
+
* It allows a map service to use the layer's advanced renderer and cartographically enriched symbols, including
|
|
9
|
+
* symbols that are not supported by the map service's REST API specifications.
|
|
10
|
+
*
|
|
11
|
+
* Use it as the [source](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/#source) of a sublayer in a [MapImageLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MapImageLayer/), or as the
|
|
12
|
+
* [dynamic data source](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#dynamicDataSource) of a [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/).
|
|
13
|
+
*
|
|
14
|
+
* > [!WARNING]
|
|
15
|
+
* >
|
|
16
|
+
* > **Known Limitations**
|
|
17
|
+
* >
|
|
18
|
+
* > [Sublayers](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/) and [FeatureLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) with a `DynamicWorkspaceLayer` source cannot be persisted to web maps, web scenes, link charts, or portal items.
|
|
19
|
+
*
|
|
20
|
+
* @since 5.2
|
|
21
|
+
* @see [ArcGIS REST API - Layer source object](https://developers.arcgis.com/rest/services-reference/enterprise/layer-source-object/#dynamic-workspace-layer)
|
|
22
|
+
* @see [ArcGIS Server - Enabling dynamic layers](https://enterprise.arcgis.com/en/server/latest/publish-services/windows/about-dynamic-layers.htm#GUID-C302852F-9E23-44C6-A71E-09E95EAF0E49)
|
|
23
|
+
* @example
|
|
24
|
+
* ```js
|
|
25
|
+
* const sublayer = new Sublayer({
|
|
26
|
+
* source: new DynamicWorkspaceLayer({
|
|
27
|
+
* workspaceId: "lyrx_folder",
|
|
28
|
+
* layerId: "WorldCities.lyrx"
|
|
29
|
+
* })
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* const layer = new MapImageLayer({
|
|
33
|
+
* url: "<your-map-service-url>",
|
|
34
|
+
* sublayers: [sublayer]
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export default class DynamicWorkspaceLayer extends DynamicWorkspaceLayerSuperclass {
|
|
39
|
+
constructor(properties?: DynamicWorkspaceLayerProperties);
|
|
40
|
+
/** A SQL where clause used to filter the features in the layer. Only features that satisfy the expression will be displayed. */
|
|
41
|
+
accessor definitionExpression: string | null | undefined;
|
|
42
|
+
/** The `lyrx` file name with extension. */
|
|
43
|
+
accessor layerId: string;
|
|
44
|
+
/** This value is always `workspace-layer`. */
|
|
45
|
+
get type(): "workspace-layer";
|
|
46
|
+
/** The registered workspace id. */
|
|
47
|
+
accessor workspaceId: string;
|
|
48
|
+
}
|
|
49
|
+
declare const DynamicWorkspaceLayerSuperclass: typeof JSONSupport & typeof ClonableMixin
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONSupport as n}from"../../core/JSONSupport.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{ensureType as a}from"../../core/accessorSupport/ensureType.js";import{enumeration as o}from"../../core/accessorSupport/decorators/enumeration.js";let s=class extends t(n){constructor(e){super(e),this.type=`workspace-layer`}toLayerSourceJSON(){let{definitionExpression:e,...t}=this.toJSON();return{definitionExpression:e,source:t}}};e([r({type:String,json:{write:!0}})],s.prototype,`definitionExpression`,void 0),e([r({type:String,json:{write:!0}})],s.prototype,`layerId`,void 0),e([o({workspaceLayer:`workspace-layer`}),r({json:{write:{isRequired:!0}}})],s.prototype,`type`,void 0),e([r({type:String,json:{write:!0}})],s.prototype,`workspaceId`,void 0),s=e([i(`esri.rest.layerSources.DynamicWorkspaceLayer`)],s);const c=s;s.from=a(s);export{c as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../request.js";import{srToRESTValue as t}from"../../../geometry/support/spatialReferenceUtils.js";import{mapParameters as n}from"../../operations/urlUtils.js";function r(e,n){let r=e.toJSON();
|
|
2
|
+
import e from"../../../request.js";import{srToRESTValue as t}from"../../../geometry/support/spatialReferenceUtils.js";import{mapParameters as n}from"../../operations/urlUtils.js";function r(e,n){let r=e.toJSON();if(r.objectIds&&=r.objectIds.join(`,`),r.orderByFields&&=r.orderByFields.join(`,`),r.outFields&&!n?.returnCountOnly?r.outFields=r.outFields.includes(`*`)?`*`:r.outFields.join(`,`):delete r.outFields,r.outSR&&=t(r.outSR),r.dynamicDataSource){if(`definitionExpression`in r.dynamicDataSource&&r.dynamicDataSource.definitionExpression){let{definitionExpression:e,...t}=r.dynamicDataSource;r.layer=JSON.stringify({query:e,source:t})}else r.layer=JSON.stringify({source:r.dynamicDataSource});delete r.dynamicDataSource}return r}async function i(e,t,n){let r=await o(e,t,n),i=r.data,a=i.geometryType,s=i.spatialReference,c={};for(let e of i.relatedRecordGroups){let t={fields:void 0,geometryType:a,spatialReference:s,hasZ:!!i.hasZ,hasM:!!i.hasM,features:e.relatedRecords};if(e.objectId!=null)c[e.objectId]=t;else for(let n of Object.keys(e))n!==`relatedRecords`&&(c[e[n]]=t)}return{...r,data:c}}async function a(e,t,n){let r=await o(e,t,n,{returnCountOnly:!0}),i=r.data,a={};for(let e of i.relatedRecordGroups)e.objectId!=null&&(a[e.objectId]=e.count);return{...r,data:a}}async function o(t,i,a={},o){let s=n({...t.query,f:`json`,...o,...r(i,o)});return e(t.path+`/queryRelatedRecords`,{...a,query:{...a.query,...s}})}export{i as executeRelationshipQuery,a as executeRelationshipQueryForCount,r as toQueryStringParameters};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{sqlAnd as e}from"../../../core/sql.js";import{getJsonType as t}from"../../../geometry/support/jsonTypeUtils.js";import{srToRESTValue as n}from"../../../geometry/support/spatialReferenceUtils.js";import{timeExtentToQueryParameter as r}from"../../support/timeUtils.js";function i(e,t){if(t&&e.type===`extent`)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&e.type===`point`)return`${e.x},${e.y}`;let n=e.toJSON();return delete n.spatialReference,JSON.stringify(n)}function a(a,o,s){let{geometry:c}=a,l=a.compactGeometryEnabled??!1,u=a.toJSON();delete u.compactGeometryEnabled,delete u.defaultSpatialReferenceEnabled;let d=u,f,p,m;if(c&&(p=c.spatialReference,m=n(p),d.geometryType=t(c),d.geometry=i(c,l),d.inSR=m),u.groupByFieldsForStatistics&&(d.groupByFieldsForStatistics=u.groupByFieldsForStatistics.join(`,`)),u.objectIds)switch(s?.uniqueIdFields?.length){case void 0:d.objectIds=u.objectIds.join(`,`);break;case 1:d.uniqueIds=JSON.stringify(u.objectIds),delete d.objectIds;break;default:d.uniqueIds=JSON.stringify(u.objectIds.map(e=>JSON.parse(e))),delete d.objectIds}if(u.orderByFields&&(d.orderByFields=u.orderByFields.join(`,`)),u.outFields&&(u.returnDistinctValues||!(o?.returnCountOnly||o?.returnExtentOnly||o?.returnIdsOnly))?d.outFields=u.outFields.includes(`*`)?`*`:u.outFields.join(`,`):delete d.outFields,u.outSR?(d.outSR=n(u.outSR),f=a.outSpatialReference):c&&(u.returnGeometry||u.returnCentroid)&&(d.outSR=d.inSR,f=p),u.returnGeometry&&delete u.returnGeometry,u.outStatistics&&(d.outStatistics=JSON.stringify(u.outStatistics)),u.outDistance&&(d.outDistance=JSON.stringify(u.outDistance)),u.fullText&&(d.fullText=JSON.stringify(u.fullText)),u.pixelSize&&(d.pixelSize=JSON.stringify(u.pixelSize)),u.quantizationParameters&&(a.defaultSpatialReferenceEnabled&&p!=null&&a.quantizationParameters?.extent!=null&&p.equals(a.quantizationParameters.extent.spatialReference)&&delete u.quantizationParameters.extent.spatialReference,d.quantizationParameters=JSON.stringify(u.quantizationParameters)),u.parameterValues&&(d.parameterValues=JSON.stringify(u.parameterValues)),u.rangeValues&&(d.rangeValues=JSON.stringify(u.rangeValues)),u.dynamicDataSource){if(`definitionExpression`in u.dynamicDataSource&&u.dynamicDataSource.definitionExpression){let{definitionExpression:e,...t}=u.dynamicDataSource;d.layer=JSON.stringify({query:e,source:t})}else d.layer=JSON.stringify({source:u.dynamicDataSource});delete u.dynamicDataSource}if(a.timeExtent){let t=s?.timeInformation;if(t){let n=t.getExpression(a.timeExtent);switch(n?.type){case`time`:d.time=n.value;break;case`where`:n.value&&(d.where=e(d.where,n.value))}}else d.time=r(a.timeExtent);delete u.timeExtent}return a.defaultSpatialReferenceEnabled&&p!=null&&f!=null&&p.equals(f)&&(d.defaultSR=d.inSR,delete d.inSR,delete d.outSR),d}const o=`json`;export{i as encodeGeometry,a as queryLikeToQueryStringParameters,o as safeExtentResultFormat};
|
package/rest/support/Query.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{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as n}from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as i,cast as a,subclass as o}from"../../core/accessorSupport/decorators.js";import{ensureClass as s}from"../../core/accessorSupport/ensureType.js";import c from"../../geometry/Point.js";import l from"../../geometry/SpatialReference.js";import{fromJSON as u}from"../../geometry/support/jsonUtils.js";import{geometryTypes as d}from"../../geometry/support/typeUtils.js";import f
|
|
2
|
+
import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as n}from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as i,cast as a,subclass as o}from"../../core/accessorSupport/decorators.js";import{ensureClass as s}from"../../core/accessorSupport/ensureType.js";import c from"../../geometry/Point.js";import l from"../../geometry/SpatialReference.js";import{fromJSON as u}from"../../geometry/support/jsonUtils.js";import{geometryTypes as d}from"../../geometry/support/typeUtils.js";import{dynamicDataSourceTypes as f}from"../layerSources/typeUtils.js";import p from"./FullTextSearch.js";import m from"./OutDistance.js";import h from"./QuantizationParameters.js";import{spatialRelKebabDict as g}from"./spatialRelationships.js";import _ from"./StatisticDefinition.js";import v from"../../time/TimeExtent.js";import{writer as y}from"../../core/accessorSupport/decorators/writer.js";import{enumeration as b}from"../../core/accessorSupport/decorators/enumeration.js";var x;const S=new t({esriSRUnit_Meter:`meters`,esriSRUnit_Kilometer:`kilometers`,esriSRUnit_Foot:`feet`,esriSRUnit_StatuteMile:`miles`,esriSRUnit_NauticalMile:`nautical-miles`,esriSRUnit_USNauticalMile:`us-nautical-miles`});let C=class extends n{static{x=this}static from(e){return s(x,e)}constructor(e){super(e),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnStatisticsAggregatedIds=!1,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnExceededLimitGeometries=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.returnTrueCurves=void 0,this.sourceSpatialReference=null,this.spatialRelationship=`intersects`,this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.outDistance=null,this.where=null}castDatumTransformation(e){return typeof e==`number`||typeof e==`object`?e:null}writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeParameterValues(e,t){if(e){let n={};for(let t in e){let r=e[t];n[t]=Array.isArray(r)?r.map(e=>e instanceof Date?e.getTime():e):r instanceof Date?r.getTime():r}t.parameterValues=n}}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,t.where=`1=1`}writeWhere(e,t){t.where=e||`1=1`}clone(){return new x(r({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:this.historicMoment==null?null:new Date(this.historicMoment),maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnStatisticsAggregatedIds:this.returnStatisticsAggregatedIds,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnExceededLimitGeometries:this.returnExceededLimitGeometries,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,returnTrueCurves:this.returnTrueCurves,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,outDistance:this.outDistance,where:this.where}))}static{this.MAX_MAX_RECORD_COUNT_FACTOR=5}};e([i({json:{write:!0}})],C.prototype,`aggregateIds`,void 0),e([i({type:Boolean,json:{write:!0}})],C.prototype,`cacheHint`,void 0),e([i({type:Boolean,json:{default:!1,write:!0}})],C.prototype,`compactGeometryEnabled`,void 0),e([i({json:{write:!0}})],C.prototype,`datumTransformation`,void 0),e([a(`datumTransformation`)],C.prototype,`castDatumTransformation`,null),e([i({type:Boolean,json:{default:!1,write:!0}})],C.prototype,`defaultSpatialReferenceEnabled`,void 0),e([i({type:Number,json:{write:{overridePolicy(e){return{enabled:!!e}}}}})],C.prototype,`distance`,void 0),e([i({types:f,json:{write:!0}})],C.prototype,`dynamicDataSource`,void 0),e([i({type:String,json:{write:!0}})],C.prototype,`formatOf3DObjects`,void 0),e([i({type:[p],json:{write:{enabled:!0,overridePolicy(){return{enabled:this.fullText!=null&&this.fullText.length>0}}}}})],C.prototype,`fullText`,void 0),e([i({type:String,json:{write:!0}})],C.prototype,`gdbVersion`,void 0),e([i({types:d,json:{read:u,write:!0}})],C.prototype,`geometry`,void 0),e([i({type:Number,json:{write:!0}})],C.prototype,`geometryPrecision`,void 0),e([i({type:[String],json:{write:!0}})],C.prototype,`groupByFieldsForStatistics`,void 0),e([i({type:String,json:{write:!0}})],C.prototype,`having`,void 0),e([i({type:Date})],C.prototype,`historicMoment`,void 0),e([y(`historicMoment`)],C.prototype,`writeHistoricMoment`,null),e([i({type:Number,json:{write:!0}})],C.prototype,`maxAllowableOffset`,void 0),e([i({type:Number,cast(e){return e<1?1:e>x.MAX_MAX_RECORD_COUNT_FACTOR?x.MAX_MAX_RECORD_COUNT_FACTOR:e},json:{write:{overridePolicy(e){return{enabled:e>1}}}}})],C.prototype,`maxRecordCountFactor`,void 0),e([i({type:[`xyFootprint`],json:{write:!0}})],C.prototype,`multipatchOption`,void 0),e([i({type:Number,json:{read:{source:`resultRecordCount`}}})],C.prototype,`num`,void 0),e([i({json:{write:!0}})],C.prototype,`objectIds`,void 0),e([i({type:[String],json:{write:!0}})],C.prototype,`orderByFields`,void 0),e([i({type:[String],json:{write:!0}})],C.prototype,`outFields`,void 0),e([i({type:l,json:{name:`outSR`,write:!0}})],C.prototype,`outSpatialReference`,void 0),e([i({type:[_],json:{write:{enabled:!0,overridePolicy(){return{enabled:this.outStatistics!=null&&this.outStatistics.length>0}}}}})],C.prototype,`outStatistics`,void 0),e([i({json:{write:!0}})],C.prototype,`parameterValues`,void 0),e([y(`parameterValues`)],C.prototype,`writeParameterValues`,null),e([i({type:c,json:{write:!0}})],C.prototype,`pixelSize`,void 0),e([i({type:h,json:{write:!0}})],C.prototype,`quantizationParameters`,void 0),e([i({type:[Object],json:{write:!0}})],C.prototype,`rangeValues`,void 0),e([i({type:String,json:{read:{source:`relationParam`},write:{target:`relationParam`,overridePolicy(){return{enabled:this.spatialRelationship===`relation`}}}}})],C.prototype,`relationParameter`,void 0),e([i({type:String,json:{write:!0}})],C.prototype,`resultType`,void 0),e([i({type:Boolean,json:{name:`returnAggIds`,write:{overridePolicy(e){return{enabled:e&&!!this.groupByFieldsForStatistics?.length&&!!this.outStatistics?.length}}}}})],C.prototype,`returnStatisticsAggregatedIds`,void 0),e([i({type:Boolean,json:{default:!1,write:!0}})],C.prototype,`returnCentroid`,void 0),e([i({type:Boolean,json:{default:!1,write:!0}})],C.prototype,`returnDistinctValues`,void 0),e([i({type:Boolean,json:{default:!0,write:!0}})],C.prototype,`returnExceededLimitFeatures`,void 0),e([i({type:Boolean,json:{default:!0,write:!0}})],C.prototype,`returnExceededLimitGeometries`,void 0),e([i({type:Boolean,json:{write:!0}})],C.prototype,`returnGeometry`,void 0),e([i({type:Boolean,json:{default:!1,write:!0}})],C.prototype,`returnQueryGeometry`,void 0),e([i({type:Boolean,json:{default:!1,write:!0}})],C.prototype,`returnM`,void 0),e([i({type:Boolean,json:{write:{overridePolicy(e){return{enabled:e}}}}})],C.prototype,`returnZ`,void 0),e([i({type:Boolean,json:{write:!0}})],C.prototype,`returnTrueCurves`,void 0),e([i({type:l,json:{write:!0}})],C.prototype,`sourceSpatialReference`,void 0),e([b(g,{ignoreUnknown:!1,name:`spatialRel`})],C.prototype,`spatialRelationship`,void 0),e([i({type:Number,json:{read:{source:`resultOffset`}}})],C.prototype,`start`,void 0),e([y(`start`),y(`num`)],C.prototype,`writeStart`,null),e([i({type:String,json:{write:!0}})],C.prototype,`sqlFormat`,void 0),e([i({type:String,json:{write:!0}})],C.prototype,`text`,void 0),e([i({type:v,json:{write:!0}})],C.prototype,`timeExtent`,void 0),e([i({type:Boolean,json:{default:!1,write:!0}})],C.prototype,`timeReferenceUnknownClient`,void 0),e([b(S,{ignoreUnknown:!1}),i({json:{write:{overridePolicy(e){return{enabled:!!e&&!!this.distance}}}}})],C.prototype,`units`,void 0),e([i({type:m,json:{write:!0}})],C.prototype,`outDistance`,void 0),e([i({type:String,json:{write:{overridePolicy(e){return{enabled:e!=null||this.start!=null&&this.start>0}}}}})],C.prototype,`where`,void 0),e([y(`where`)],C.prototype,`writeWhere`,null),C=x=e([o(`esri.rest.support.Query`)],C);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{JSONSupport as t}from"../../core/JSONSupport.js";import{clone as n}from"../../core/lang.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{ensureType as a}from"../../core/accessorSupport/ensureType.js";import o from"../../geometry/SpatialReference.js";import s
|
|
2
|
+
import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{clone as n}from"../../core/lang.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{ensureType as a}from"../../core/accessorSupport/ensureType.js";import o from"../../geometry/SpatialReference.js";import{dynamicDataSourceTypes as s}from"../layerSources/typeUtils.js";import{writer as c}from"../../core/accessorSupport/decorators/writer.js";var l;let u=class extends t{static{l=this}constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.returnTrueCurves=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&this.where==null&&(t.definitionExpression=`1=1`)}clone(){return new l(n({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnTrueCurves:this.returnTrueCurves,returnM:this.returnM}))}};e([r({type:Boolean,json:{write:!0}})],u.prototype,`cacheHint`,void 0),e([r({types:s,json:{write:!0}})],u.prototype,`dynamicDataSource`,void 0),e([r({type:String,json:{write:!0}})],u.prototype,`gdbVersion`,void 0),e([r({type:Number,json:{write:!0}})],u.prototype,`geometryPrecision`,void 0),e([r({type:Date})],u.prototype,`historicMoment`,void 0),e([c(`historicMoment`)],u.prototype,`_writeHistoricMoment`,null),e([r({type:Number,json:{write:!0}})],u.prototype,`maxAllowableOffset`,void 0),e([r({json:{write:!0}})],u.prototype,`objectIds`,void 0),e([r({type:[String],json:{write:!0}})],u.prototype,`orderByFields`,void 0),e([r({type:[String],json:{write:!0}})],u.prototype,`outFields`,void 0),e([r({type:o,json:{read:{source:`outSR`},write:{target:`outSR`}}})],u.prototype,`outSpatialReference`,void 0),e([r({json:{write:!0}})],u.prototype,`relationshipId`,void 0),e([r({type:Number,json:{read:{source:`resultOffset`}}})],u.prototype,`start`,void 0),e([c(`start`),c(`num`)],u.prototype,`writeStart`,null),e([r({type:Number,json:{read:{source:`resultRecordCount`}}})],u.prototype,`num`,void 0),e([r({json:{write:!0}})],u.prototype,`returnGeometry`,void 0),e([r({type:Boolean,json:{write:{overridePolicy(e){return{enabled:e}}}}})],u.prototype,`returnM`,void 0),e([r({type:Boolean,json:{write:{overridePolicy(e){return{enabled:e}}}}})],u.prototype,`returnZ`,void 0),e([r({type:Boolean,json:{write:!0}})],u.prototype,`returnTrueCurves`,void 0),e([r({type:String,json:{read:{source:`definitionExpression`},write:{target:`definitionExpression`}}})],u.prototype,`where`,void 0),u=l=e([i(`esri.rest.support.RelationshipQuery`)],u),u.from=a(u);export{u as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
function e(e){let{start:t,end:n}=e;if(t||n){if(!t&&n)return`null,${n.getTime()}`;if(!n&&t)return`${t.getTime()},null`;if(n&&t)return t.getTime()===n.getTime()?`${t.getTime()}`:`${t.getTime()},${n.getTime()}`}}export{e as timeExtentToQueryParameter};
|
|
@@ -65,13 +65,15 @@ export default class LineSymbol3D extends Symbol3D {
|
|
|
65
65
|
/** The symbol type. */
|
|
66
66
|
get type(): "line-3d";
|
|
67
67
|
/**
|
|
68
|
-
* Indicates whether
|
|
68
|
+
* Indicates whether size properties that support both screen- and world-based sizing are interpreted
|
|
69
|
+
* in meters rather than screen points.
|
|
69
70
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
71
|
+
* For instance, this applies to the [LineSymbol3DLayer.size](https://developers.arcgis.com/javascript/latest/references/core/symbols/LineSymbol3DLayer/#size) property.
|
|
72
|
+
* Properties that only support world sizing are unaffected.
|
|
72
73
|
*
|
|
73
74
|
* @default false
|
|
74
75
|
* @since 5.2
|
|
76
|
+
* @see [Sample: World-sized lines in 3D](https://developers.arcgis.com/javascript/latest/sample-code/visualization-world-sized-lines/)
|
|
75
77
|
*/
|
|
76
78
|
accessor worldSized: boolean;
|
|
77
79
|
/**
|
package/symbols/TextSymbol.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export interface TextSymbolProperties extends SymbolProperties, Partial<Pick<Tex
|
|
|
38
38
|
/**
|
|
39
39
|
* The [Font](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/) used to style the text.
|
|
40
40
|
* This property allows the developer to set the font's family, decoration, size, style, and weight properties.
|
|
41
|
+
* The font can also be defined using [formatting tags](https://doc.esri.com/en/arcgis-pro/latest/help/mapping/text/text-formatting-tags.html)
|
|
42
|
+
* in the [text](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/#text) if the associated [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) supports it.
|
|
41
43
|
*
|
|
42
44
|
* See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/labeling/) for more information and known limitations.
|
|
43
45
|
*
|
|
@@ -48,7 +50,6 @@ export interface TextSymbolProperties extends SymbolProperties, Partial<Pick<Tex
|
|
|
48
50
|
* > The available [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) property values depend on whether you are
|
|
49
51
|
* > working with a 2D [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
50
52
|
*
|
|
51
|
-
* @see [Labeling Guide](https://developers.arcgis.com/javascript/latest/labeling/)
|
|
52
53
|
* @example
|
|
53
54
|
* let textSymbol = {
|
|
54
55
|
* type: "text", // autocasts as new TextSymbol()
|
|
@@ -60,6 +61,15 @@ export interface TextSymbolProperties extends SymbolProperties, Partial<Pick<Tex
|
|
|
60
61
|
* weight: "bold"
|
|
61
62
|
* }
|
|
62
63
|
* };
|
|
64
|
+
* @example
|
|
65
|
+
* ```js
|
|
66
|
+
* // same example but using formatting tags
|
|
67
|
+
*
|
|
68
|
+
* let textSymbol = {
|
|
69
|
+
* type: "text", // autocasts as new TextSymbol()
|
|
70
|
+
* text: "<BOL><ITA><FNT name='Merriweather' size='12'>Science of Where</FNT></ITA></BOL>",
|
|
71
|
+
* };
|
|
72
|
+
* ```
|
|
63
73
|
*/
|
|
64
74
|
font?: FontProperties;
|
|
65
75
|
/**
|
|
@@ -303,6 +313,8 @@ export default class TextSymbol extends Symbol {
|
|
|
303
313
|
/**
|
|
304
314
|
* The [Font](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/) used to style the text.
|
|
305
315
|
* This property allows the developer to set the font's family, decoration, size, style, and weight properties.
|
|
316
|
+
* The font can also be defined using [formatting tags](https://doc.esri.com/en/arcgis-pro/latest/help/mapping/text/text-formatting-tags.html)
|
|
317
|
+
* in the [text](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/#text) if the associated [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) supports it.
|
|
306
318
|
*
|
|
307
319
|
* See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/labeling/) for more information and known limitations.
|
|
308
320
|
*
|
|
@@ -313,7 +325,6 @@ export default class TextSymbol extends Symbol {
|
|
|
313
325
|
* > The available [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) property values depend on whether you are
|
|
314
326
|
* > working with a 2D [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
315
327
|
*
|
|
316
|
-
* @see [Labeling Guide](https://developers.arcgis.com/javascript/latest/labeling/)
|
|
317
328
|
* @example
|
|
318
329
|
* let textSymbol = {
|
|
319
330
|
* type: "text", // autocasts as new TextSymbol()
|
|
@@ -325,6 +336,15 @@ export default class TextSymbol extends Symbol {
|
|
|
325
336
|
* weight: "bold"
|
|
326
337
|
* }
|
|
327
338
|
* };
|
|
339
|
+
* @example
|
|
340
|
+
* ```js
|
|
341
|
+
* // same example but using formatting tags
|
|
342
|
+
*
|
|
343
|
+
* let textSymbol = {
|
|
344
|
+
* type: "text", // autocasts as new TextSymbol()
|
|
345
|
+
* text: "<BOL><ITA><FNT name='Merriweather' size='12'>Science of Where</FNT></ITA></BOL>",
|
|
346
|
+
* };
|
|
347
|
+
* ```
|
|
328
348
|
*/
|
|
329
349
|
get font(): Font;
|
|
330
350
|
set font(value: FontProperties);
|
|
@@ -468,6 +488,10 @@ export default class TextSymbol extends Symbol {
|
|
|
468
488
|
* The length of the line is controlled by the [lineWidth](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/#lineWidth) property.
|
|
469
489
|
* To manually create a new line, use the `\n` escape character.
|
|
470
490
|
*
|
|
491
|
+
* This property supports [formatting tags](https://doc.esri.com/en/arcgis-pro/latest/help/mapping/text/text-formatting-tags.html) if
|
|
492
|
+
* the associated [Font.family](https://developers.arcgis.com/javascript/latest/references/core/symbols/Font/#family) supports it. See the [Labeling guide](https://developers.arcgis.com/javascript/latest/labeling/#formatting-tags)
|
|
493
|
+
* for more details.
|
|
494
|
+
*
|
|
471
495
|
* > [!WARNING]
|
|
472
496
|
* >
|
|
473
497
|
* > **Known Limitations**
|
|
@@ -478,6 +502,7 @@ export default class TextSymbol extends Symbol {
|
|
|
478
502
|
* @see [lineWidth](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/#lineWidth)
|
|
479
503
|
* @example symbol.text = "You are here";
|
|
480
504
|
* @example symbol.text = "Wish you were \n here";
|
|
505
|
+
* @example symbol.text = "Wish you were <BOL>Bold</BOL> and <UND>Underlined</UND>";
|
|
481
506
|
*/
|
|
482
507
|
accessor text: string;
|
|
483
508
|
/** The symbol type. */
|
|
@@ -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"../../../../core/Accessor.js";import{multiplyOpacity as n}from"../../../../core/colorUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import{isAborted as i,ignoreAbortErrors as a}from"../../../../core/promiseUtils.js";import{watch as o,initial as s}from"../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../symbols/SimpleFillSymbol.js";import f from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as p}from"../../../analysis/ExclusiveOperationManager.js";import{bindViewToolOptions as m}from"../../../interactive/options/bindViewToolOptions.js";import h from"../../../../widgets/Sketch/SketchViewModel.js";function g(e){return e?.type===`polygon`}let _=class extends t{constructor(e){super(e),this._invisibleAreaSymbol=new d({color:null,outline:null}),this._invisibleLineSymbol=new f({color:null,width:0}),this._operationManager=new p,this._updatingHandles=new u}initialize(){this._sketchViewModel=new h({defaultCreateOptions:{mode:`click`},defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{edgeOperation:`none`,shapeOperation:`none`},toggleToolOnClick:!1,tool:`reshape`},updateOnGraphicClick:!1,cancelUpdateOnClickAway:!1,view:this.view}),this.addHandles([o(()=>({interactive:this.measurementViewData.interactive,visible:this.measurementViewData.visible}),({interactive:e,visible:t})=>{!t||!e?this._operationManager.stop():this._analysis.geometry&&this._operationManager.currentOperationType!==`place`&&this.reshape().catch(()=>{})}),o(()=>this.measurementViewData.analysis.geometry,e=>{e||(this._operationManager.stop(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll())}),o(()=>this.measurementViewData.snappingOptions,e=>{this._sketchViewModel&&(this._sketchViewModel.snappingOptions=e)},s),m(this._sketchViewModel.sketchOptions,()=>this.view.options,()=>({values:{displayUnits:{area:this._analysis.unit}}})),o(()=>this.view.effectiveTheme.accentColor,e=>{this._areaSymbol=new d({color:n(e,.3),outline:new f({color:e,width:2})})},s)])}destroy(){this._areaSymbol?.destroy(),this._invisibleAreaSymbol.destroy(),this._invisibleLineSymbol.destroy(),this._operationManager.destroy(),this._sketchViewModel?.destroy(),this._updatingHandles.destroy()}get state(){if(!this.measurementViewData.visible||!this._operationManager.currentOperationType)return`idle`;switch(this._operationManager.currentOperationType){case`place`:return`placing`;case`reshape`:return`reshaping`}}get updating(){return!this._sketchViewModel||this._sketchViewModel.updating||this._updatingHandles.updating}async place(e){return this._operationManager.start(`place`,async t=>{if(!
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{multiplyOpacity as n}from"../../../../core/colorUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{isAborted as i,ignoreAbortErrors as a}from"../../../../core/promiseUtils.js";import{watch as o,initial as s}from"../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../symbols/SimpleFillSymbol.js";import f from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as p}from"../../../analysis/ExclusiveOperationManager.js";import{bindViewToolOptions as m}from"../../../interactive/options/bindViewToolOptions.js";import h from"../../../../widgets/Sketch/SketchViewModel.js";function g(e){return e?.type===`polygon`}let _=class extends t{constructor(e){super(e),this._invisibleAreaSymbol=new d({color:null,outline:null}),this._invisibleLineSymbol=new f({color:null,width:0}),this._operationManager=new p,this._updatingHandles=new u}initialize(){this._sketchViewModel=new h({defaultCreateOptions:{mode:`click`},defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{edgeOperation:`none`,shapeOperation:`none`},toggleToolOnClick:!1,tool:`reshape`},updateOnGraphicClick:!1,cancelUpdateOnClickAway:!1,view:this.view}),this.addHandles([o(()=>({interactive:this.measurementViewData.interactive,visible:this.measurementViewData.visible}),({interactive:e,visible:t})=>{!t||!e?this._operationManager.stop():this._analysis.geometry&&this._operationManager.currentOperationType!==`place`&&this.reshape().catch(()=>{})}),o(()=>this.measurementViewData.analysis.geometry,e=>{e||(this._operationManager.stop(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll())}),o(()=>this.measurementViewData.snappingOptions,e=>{this._sketchViewModel&&(this._sketchViewModel.snappingOptions=e)},s),m(this._sketchViewModel.sketchOptions,()=>this.view.options,()=>({values:{displayUnits:{area:this._analysis.unit}}})),o(()=>this.view.effectiveTheme.accentColor,e=>{this._areaSymbol=new d({color:n(e,.3),outline:new f({color:e,width:2})})},s)])}destroy(){this._areaSymbol?.destroy(),this._invisibleAreaSymbol.destroy(),this._invisibleLineSymbol.destroy(),this._operationManager.destroy(),this._sketchViewModel?.destroy(),this._updatingHandles.destroy()}get state(){if(!this.measurementViewData.visible||!this._operationManager.currentOperationType)return`idle`;switch(this._operationManager.currentOperationType){case`place`:return`placing`;case`reshape`:return`reshaping`}}get updating(){return!this._sketchViewModel||this._sketchViewModel.updating||this._updatingHandles.updating}async place(e){return this._operationManager.start(`place`,async t=>{let n=this._sketchViewModel;if(!n||!this.measurementViewData.sketchGraphicsLayer)return;let o=this._analysis.clone(),s,c=n.on([`create`,`undo`,`redo`],e=>{let n=`state`in e?e.state:`active`,r=`graphic`in e?e.graphic:e.graphics?.at(0);r&&(s=r);let i=r?.geometry;switch(n){case`start`:case`active`:i?.type===`polygon`&&(this._analysis.geometry=i);break;case`cancel`:case`complete`:n===`complete`&&i?.type===`polygon`&&(this._analysis.geometry=i),t.stop(),a(this.reshape())}});t.handles.push(c,r(()=>{c.remove(),n.cancel(),s&&this._analysis.geometry&&(this._analysis.geometry=g(s.geometry)?s.geometry:null),this.measurementViewData.sketchGraphicsLayer?.removeAll();let r=this._analysis;if(!r.valid)return r.clear(),t.reject();if(i(e)||o.equals(r))return t.reject();t.resolve({})})),n.activeLineSymbol=this._invisibleLineSymbol,n.polygonSymbol=this._invisibleAreaSymbol,n.layer=this.measurementViewData.sketchGraphicsLayer,this._updatingHandles.consumePromise(a(n.create(`polygon`)))},e)}async reshape(e){return this._operationManager.start(`reshape`,async t=>{if(!this._sketchViewModel)return;let n=()=>!this._areaSymbol||!this._sketchViewModel||!this.measurementViewData.manipulatorGraphic||!this.measurementViewData.manipulatorGraphicsLayer?Promise.resolve():(this._sketchViewModel.activeLineSymbol=null,this._sketchViewModel.polygonSymbol=this._areaSymbol,this._sketchViewModel.layer=this.measurementViewData.manipulatorGraphicsLayer,this._updatingHandles.addPromise(a(this._sketchViewModel.update(this.measurementViewData.manipulatorGraphic,{tool:`reshape`})))),o=this._sketchViewModel.on(`update`,e=>{let r=e.graphics[0]?.geometry;this._analysis.geometry=g(r)?r:null,e.state===`complete`&&(this.measurementViewData.interactive?n():t.stop())});t.handles.push(o,r(()=>{if(o.remove(),this._sketchViewModel?.cancel(),i(e))return t.reject();t.resolve()})),await n()},e)}get _analysis(){return this.measurementViewData.analysis}get test(){}};e([c()],_.prototype,`_sketchViewModel`,void 0),e([c()],_.prototype,`measurementViewData`,void 0),e([c()],_.prototype,`state`,null),e([c()],_.prototype,`updating`,null),e([c()],_.prototype,`view`,void 0),_=e([l(`esri.views.2d.analysis.AreaMeasurement.AreaMeasurementTool`)],_);export{_ as AreaMeasurementTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{toAdaptiveLengthUnitForArea as t,toAdaptiveAreaUnit as n}from"../../../core/quantity.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as a}from"../../../support/getDefaultUnitForView.js";import o from"./AnalysisView2D.js";import{AreaMeasurementAreaVisualization as s}from"./AreaMeasurement/AreaMeasurementAreaVisualization.js";import{AreaMeasurementController as c}from"./AreaMeasurement/AreaMeasurementController.js";import{AreaMeasurementManipulatorVisualization as l}from"./AreaMeasurement/AreaMeasurementManipulatorVisualization.js";import{AreaMeasurementSketchVisualization as u}from"./AreaMeasurement/AreaMeasurementSketchVisualization.js";import{AreaMeasurementTool as d}from"./AreaMeasurement/AreaMeasurementTool.js";import f from"../../interactive/snapping/SnappingOptions.js";let p=class extends o{constructor(e){super(e),this.analysis=null,this.snappingOptions=new f,this.type=`area-measurement-view-2d`}initialize(){let{view:e}=this;this._areaVisualization=new s({view:e,measurementViewData:this}),this._controller=new c({view:e,measurementViewData:this}),this._manipulatorVisualization=new l({view:e,measurementViewData:this}),this._sketchVisualization=new u({view:e,measurementViewData:this}),this._tool=new d({view:e,measurementViewData:this})}destroy(){this._areaVisualization?.destroy(),this._controller?.destroy(),this._manipulatorVisualization?.destroy(),this._sketchVisualization?.destroy(),this._tool?.destroy()}get manipulatorGraphic(){return this._manipulatorVisualization?.graphic}get manipulatorGraphicsLayer(){return this._manipulatorVisualization?.graphicsLayer}get sketchGraphicsLayer(){return this._sketchVisualization?.graphicsLayer}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get result(){let e=this._controller?.result;if(!e)return e;let{unit:r}=this,{area:i,display:a,mode:o,perimeter:s}=e;return{area:i?n(i,r):null,display:a,mode:o,perimeter:s?t(s,r):null}}get unit(){return this.analysis.unit??this.view.options.displayUnits.area??a(this.view)}get updating(){return(this._areaVisualization?.updating??!0)||(this._controller?.updating??!0)||(this._sketchVisualization?.updating??!0)||(this._tool?.updating??!0)}get visible(){return super.visible}set visible(e){super.visible=e}async place(e){return this.interactive=!0,this._tool.place(e)}};e([r()],p.prototype,`_areaVisualization`,void 0),e([r()],p.prototype,`_controller`,void 0),e([r()],p.prototype,`_manipulatorVisualization`,void 0),e([r()],p.prototype,`_sketchVisualization`,void 0),e([r()],p.prototype,`_tool`,void 0),e([r({constructOnly:!0})],p.prototype,`analysis`,void 0),e([r()],p.prototype,`manipulatorGraphic`,null),e([r()],p.prototype,`manipulatorGraphicsLayer`,null),e([r()],p.prototype,`sketchGraphicsLayer`,null),e([r({readOnly:!0})],p.prototype,`result`,null),e([r({type:f,nonNullable:!0})],p.prototype,`snappingOptions`,void 0),e([r({readOnly:!0})],p.prototype,`type`,void 0),e([r({readOnly:!0})],p.prototype,`unit`,null),e([r({readOnly:!0})],p.prototype,`updating`,null),p=e([i(`esri.views.2d.analysis.AreaMeasurementAnalysisView2D`)],p);const m=p;export{m as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../../core/has.js";import{toAdaptiveLengthUnitForArea as t,toAdaptiveAreaUnit as n}from"../../../core/quantity.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as a}from"../../../support/getDefaultUnitForView.js";import o from"./AnalysisView2D.js";import{AreaMeasurementAreaVisualization as s}from"./AreaMeasurement/AreaMeasurementAreaVisualization.js";import{AreaMeasurementController as c}from"./AreaMeasurement/AreaMeasurementController.js";import{AreaMeasurementManipulatorVisualization as l}from"./AreaMeasurement/AreaMeasurementManipulatorVisualization.js";import{AreaMeasurementSketchVisualization as u}from"./AreaMeasurement/AreaMeasurementSketchVisualization.js";import{AreaMeasurementTool as d}from"./AreaMeasurement/AreaMeasurementTool.js";import f from"../../interactive/snapping/SnappingOptions.js";let p=class extends o{constructor(e){super(e),this.analysis=null,this.snappingOptions=new f,this.type=`area-measurement-view-2d`}initialize(){let{view:e}=this;this._areaVisualization=new s({view:e,measurementViewData:this}),this._controller=new c({view:e,measurementViewData:this}),this._manipulatorVisualization=new l({view:e,measurementViewData:this}),this._sketchVisualization=new u({view:e,measurementViewData:this}),this._tool=new d({view:e,measurementViewData:this})}destroy(){this._areaVisualization?.destroy(),this._controller?.destroy(),this._manipulatorVisualization?.destroy(),this._sketchVisualization?.destroy(),this._tool?.destroy()}get manipulatorGraphic(){return this._manipulatorVisualization?.graphic}get manipulatorGraphicsLayer(){return this._manipulatorVisualization?.graphicsLayer}get sketchGraphicsLayer(){return this._sketchVisualization?.graphicsLayer}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get result(){let e=this._controller?.result;if(!e)return e;let{unit:r}=this,{area:i,display:a,mode:o,perimeter:s}=e;return{area:i?n(i,r):null,display:a,mode:o,perimeter:s?t(s,r):null}}get unit(){return this.analysis.unit??this.view.options.displayUnits.area??a(this.view)}get updating(){return(this._areaVisualization?.updating??!0)||(this._controller?.updating??!0)||(this._sketchVisualization?.updating??!0)||(this._tool?.updating??!0)}get visible(){return super.visible}set visible(e){super.visible=e}async place(e){return this.interactive=!0,this._tool.place(e)}get test(){}};e([r()],p.prototype,`_areaVisualization`,void 0),e([r()],p.prototype,`_controller`,void 0),e([r()],p.prototype,`_manipulatorVisualization`,void 0),e([r()],p.prototype,`_sketchVisualization`,void 0),e([r()],p.prototype,`_tool`,void 0),e([r({constructOnly:!0})],p.prototype,`analysis`,void 0),e([r()],p.prototype,`manipulatorGraphic`,null),e([r()],p.prototype,`manipulatorGraphicsLayer`,null),e([r()],p.prototype,`sketchGraphicsLayer`,null),e([r({readOnly:!0})],p.prototype,`result`,null),e([r({type:f,nonNullable:!0})],p.prototype,`snappingOptions`,void 0),e([r({readOnly:!0})],p.prototype,`type`,void 0),e([r({readOnly:!0})],p.prototype,`unit`,null),e([r({readOnly:!0})],p.prototype,`updating`,null),p=e([i(`esri.views.2d.analysis.AreaMeasurementAnalysisView2D`)],p);const m=p;export{m 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"../../../../core/Accessor.js";import{multiplyOpacity as n}from"../../../../core/colorUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{multiplyOpacity as n}from"../../../../core/colorUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{isAborted as i,ignoreAbortErrors as a}from"../../../../core/promiseUtils.js";import{watch as o,initial as s}from"../../../../core/reactiveUtils.js";import{property as c,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as f}from"../../../analysis/ExclusiveOperationManager.js";import{bindViewToolOptions as p}from"../../../interactive/options/bindViewToolOptions.js";import m from"../../../../widgets/Sketch/SketchViewModel.js";function h(e){return e?.type===`polyline`}let g=class extends t{constructor(e){super(e),this._invisibleLineSymbol=new d({color:null,width:0}),this._operationManager=new f,this._updatingHandles=new u}initialize(){this._sketchViewModel=new m({defaultCreateOptions:{mode:`click`},defaultUpdateOptions:{enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,enableZ:!1,highlightOptions:{enabled:!1},multipleSelectionEnabled:!1,reshapeOptions:{edgeOperation:`none`,shapeOperation:`none`},toggleToolOnClick:!1,tool:`reshape`},updateOnGraphicClick:!1,view:this.view}),this.addHandles([o(()=>({interactive:this.measurementViewData.interactive,visible:this.measurementViewData.visible}),({interactive:e,visible:t})=>{!t||!e?this._operationManager.stop():this._analysis.geometry&&this._operationManager.currentOperationType!==`place`&&this.reshape().catch(()=>{})}),o(()=>this.measurementViewData.analysis.geometry,e=>{e||(this._operationManager.stop(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll())}),o(()=>this.measurementViewData.snappingOptions,e=>{this._sketchViewModel&&(this._sketchViewModel.snappingOptions=e)},s),p(this._sketchViewModel.sketchOptions,()=>this.view.options,()=>({values:{displayUnits:{length:this._analysis.unit}}})),o(()=>this.view.effectiveTheme.accentColor,e=>{this._lineSymbol=new d({color:n(e,.3),width:2})},s)])}destroy(){this._invisibleLineSymbol.destroy(),this._lineSymbol?.destroy(),this._operationManager.destroy(),this._sketchViewModel?.destroy(),this._updatingHandles.destroy()}get state(){if(!this.measurementViewData.visible||!this._operationManager.currentOperationType)return`idle`;switch(this._operationManager.currentOperationType){case`place`:return`placing`;case`reshape`:return`reshaping`}}get updating(){return!this._sketchViewModel||this._sketchViewModel.updating||this._updatingHandles.updating}async place(e){return this._operationManager.start(`place`,async t=>{let n=this._sketchViewModel;if(!n||!this.measurementViewData.sketchGraphicsLayer)return;let o=this._analysis.clone(),s,c=n.on([`create`,`undo`,`redo`],e=>{let n=`state`in e?e.state:`active`,r=`graphic`in e?e.graphic:e.graphics?.at(0);r&&(s=r);let i=r?.geometry;switch(n){case`start`:case`active`:i?.type===`polyline`&&(this._analysis.geometry=i);break;case`cancel`:case`complete`:n===`complete`&&i?.type===`polyline`&&(this._analysis.geometry=i),t.stop(),a(this.reshape())}});t.handles.push(c,r(()=>{c.remove(),n.cancel(),s&&this._analysis.geometry&&(this._analysis.geometry=h(s.geometry)?s.geometry:null),this.measurementViewData.sketchGraphicsLayer?.removeAll();let r=this._analysis;if(!r.valid)return r.clear(),t.reject();if(i(e)||o.equals(r))return t.reject();t.resolve({})})),n.activeLineSymbol=this._invisibleLineSymbol,n.polylineSymbol=this._invisibleLineSymbol,n.layer=this.measurementViewData.sketchGraphicsLayer,this._updatingHandles.consumePromise(a(n.create(`polyline`)))},e)}async reshape(e){return this._operationManager.start(`reshape`,async t=>{if(!this._sketchViewModel)return;let n=()=>!this._lineSymbol||!this._sketchViewModel||!this.measurementViewData.manipulatorGraphic||!this.measurementViewData.manipulatorGraphicsLayer?Promise.resolve():(this._sketchViewModel.activeLineSymbol=null,this._sketchViewModel.polylineSymbol=this._lineSymbol,this._sketchViewModel.layer=this.measurementViewData.manipulatorGraphicsLayer,this._updatingHandles.addPromise(a(this._sketchViewModel.update(this.measurementViewData.manipulatorGraphic,{tool:`reshape`})))),o=this._sketchViewModel.on(`update`,e=>{let r=e.graphics[0]?.geometry;this._analysis.geometry=h(r)?r:null,e.state===`complete`&&(this.measurementViewData.interactive?n():t.stop())});t.handles.push(o,r(()=>{if(o.remove(),this._sketchViewModel?.cancel(),i(e))return t.reject();t.resolve()})),await n()},e)}get _analysis(){return this.measurementViewData.analysis}get test(){}};e([c()],g.prototype,`_sketchViewModel`,void 0),e([c()],g.prototype,`measurementViewData`,void 0),e([c()],g.prototype,`state`,null),e([c()],g.prototype,`updating`,null),e([c()],g.prototype,`view`,void 0),g=e([l(`esri.views.2d.analysis.DistanceMeasurement.DistanceMeasurementTool`)],g);export{g as DistanceMeasurementTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{toAdaptiveLengthUnit as t}from"../../../core/quantity.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as i}from"../../../support/getDefaultUnitForView.js";import a from"./AnalysisView2D.js";import{DistanceMeasurementController as o}from"./DistanceMeasurement/DistanceMeasurementController.js";import{DistanceMeasurementLineVisualization as s}from"./DistanceMeasurement/DistanceMeasurementLineVisualization.js";import{DistanceMeasurementManipulatorVisualization as c}from"./DistanceMeasurement/DistanceMeasurementManipulatorVisualization.js";import{DistanceMeasurementSketchVisualization as l}from"./DistanceMeasurement/DistanceMeasurementSketchVisualization.js";import{DistanceMeasurementTool as u}from"./DistanceMeasurement/DistanceMeasurementTool.js";import d from"../../interactive/snapping/SnappingOptions.js";let f=class extends a{constructor(e){super(e),this.analysis=null,this.snappingOptions=new d,this.type=`distance-measurement-view-2d`}initialize(){let{view:e}=this;this._lineVisualization=new s({view:e,measurementViewData:this}),this._controller=new o({view:e,measurementViewData:this}),this._manipulatorVisualization=new c({view:e,measurementViewData:this}),this._sketchVisualization=new l({view:e,measurementViewData:this}),this._tool=new u({view:e,measurementViewData:this})}destroy(){this._lineVisualization?.destroy(),this._controller?.destroy(),this._manipulatorVisualization?.destroy(),this._sketchVisualization?.destroy(),this._tool?.destroy()}get manipulatorGraphic(){return this._manipulatorVisualization?.graphic}get manipulatorGraphicsLayer(){return this._manipulatorVisualization?.graphicsLayer}get sketchGraphicsLayer(){return this._sketchVisualization?.graphicsLayer}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get result(){let e=this._controller?.result;return e&&{...e,length:t(e.length,this.unit)}}get unit(){return this.analysis.unit??this.view.options.displayUnits.length??i(this.view)}get updating(){return(this._controller?.updating??!0)||(this._lineVisualization?.updating??!0)||(this._sketchVisualization?.updating??!0)||(this._tool?.updating??!0)}get visible(){return super.visible}set visible(e){super.visible=e}async place(e){return this.interactive=!0,this._tool.place(e)}};e([n()],f.prototype,`_lineVisualization`,void 0),e([n()],f.prototype,`_controller`,void 0),e([n()],f.prototype,`_manipulatorVisualization`,void 0),e([n()],f.prototype,`_sketchVisualization`,void 0),e([n()],f.prototype,`_tool`,void 0),e([n({constructOnly:!0})],f.prototype,`analysis`,void 0),e([n()],f.prototype,`manipulatorGraphic`,null),e([n()],f.prototype,`manipulatorGraphicsLayer`,null),e([n()],f.prototype,`sketchGraphicsLayer`,null),e([n({readOnly:!0})],f.prototype,`result`,null),e([n({type:d,nonNullable:!0})],f.prototype,`snappingOptions`,void 0),e([n({readOnly:!0})],f.prototype,`type`,void 0),e([n({readOnly:!0})],f.prototype,`unit`,null),e([n({readOnly:!0})],f.prototype,`updating`,null),f=e([r(`esri.views.2d.analysis.DistanceMeasurementAnalysisView2D`)],f);const p=f;export{p as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../../core/has.js";import{toAdaptiveLengthUnit as t}from"../../../core/quantity.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as i}from"../../../support/getDefaultUnitForView.js";import a from"./AnalysisView2D.js";import{DistanceMeasurementController as o}from"./DistanceMeasurement/DistanceMeasurementController.js";import{DistanceMeasurementLineVisualization as s}from"./DistanceMeasurement/DistanceMeasurementLineVisualization.js";import{DistanceMeasurementManipulatorVisualization as c}from"./DistanceMeasurement/DistanceMeasurementManipulatorVisualization.js";import{DistanceMeasurementSketchVisualization as l}from"./DistanceMeasurement/DistanceMeasurementSketchVisualization.js";import{DistanceMeasurementTool as u}from"./DistanceMeasurement/DistanceMeasurementTool.js";import d from"../../interactive/snapping/SnappingOptions.js";let f=class extends a{constructor(e){super(e),this.analysis=null,this.snappingOptions=new d,this.type=`distance-measurement-view-2d`}initialize(){let{view:e}=this;this._lineVisualization=new s({view:e,measurementViewData:this}),this._controller=new o({view:e,measurementViewData:this}),this._manipulatorVisualization=new c({view:e,measurementViewData:this}),this._sketchVisualization=new l({view:e,measurementViewData:this}),this._tool=new u({view:e,measurementViewData:this})}destroy(){this._lineVisualization?.destroy(),this._controller?.destroy(),this._manipulatorVisualization?.destroy(),this._sketchVisualization?.destroy(),this._tool?.destroy()}get manipulatorGraphic(){return this._manipulatorVisualization?.graphic}get manipulatorGraphicsLayer(){return this._manipulatorVisualization?.graphicsLayer}get sketchGraphicsLayer(){return this._sketchVisualization?.graphicsLayer}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get result(){let e=this._controller?.result;return e&&{...e,length:t(e.length,this.unit)}}get unit(){return this.analysis.unit??this.view.options.displayUnits.length??i(this.view)}get updating(){return(this._controller?.updating??!0)||(this._lineVisualization?.updating??!0)||(this._sketchVisualization?.updating??!0)||(this._tool?.updating??!0)}get visible(){return super.visible}set visible(e){super.visible=e}async place(e){return this.interactive=!0,this._tool.place(e)}get test(){}};e([n()],f.prototype,`_lineVisualization`,void 0),e([n()],f.prototype,`_controller`,void 0),e([n()],f.prototype,`_manipulatorVisualization`,void 0),e([n()],f.prototype,`_sketchVisualization`,void 0),e([n()],f.prototype,`_tool`,void 0),e([n({constructOnly:!0})],f.prototype,`analysis`,void 0),e([n()],f.prototype,`manipulatorGraphic`,null),e([n()],f.prototype,`manipulatorGraphicsLayer`,null),e([n()],f.prototype,`sketchGraphicsLayer`,null),e([n({readOnly:!0})],f.prototype,`result`,null),e([n({type:d,nonNullable:!0})],f.prototype,`snappingOptions`,void 0),e([n({readOnly:!0})],f.prototype,`type`,void 0),e([n({readOnly:!0})],f.prototype,`unit`,null),e([n({readOnly:!0})],f.prototype,`updating`,null),f=e([r(`esri.views.2d.analysis.DistanceMeasurementAnalysisView2D`)],f);const p=f;export{p as default};
|
|
@@ -37,6 +37,12 @@ import type { ElevationProfileStatistics, ElevationProfileEffectiveDisplayUnits,
|
|
|
37
37
|
export default abstract class ElevationProfileAnalysisView2D extends AnalysisView2D {
|
|
38
38
|
/** The elevation profile analysis associated with the analysis view. */
|
|
39
39
|
get analysis(): ElevationProfileAnalysis;
|
|
40
|
+
/**
|
|
41
|
+
* Whether placement has at least two committed vertices and can be stopped.
|
|
42
|
+
*
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
get canStopPlacing(): boolean;
|
|
40
46
|
/**
|
|
41
47
|
* Units used for all the [results](https://developers.arcgis.com/javascript/latest/references/core/views/2d/analysis/ElevationProfileAnalysisView2D/#results) and [statistics](https://developers.arcgis.com/javascript/latest/references/core/views/2d/analysis/ElevationProfileAnalysisView2D/#statistics) of the elevation profile analysis.
|
|
42
48
|
*
|
|
@@ -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"../../../core/Collection.js";import n from"../../../core/Error.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import a from"./AnalysisView2D.js";import{ElevationProfileVisualization2D as o}from"./ElevationProfile/ElevationProfileVisualization2D.js";import{ElevationProfileController as s}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as c}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as l}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as u}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as d}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let f=class extends a{constructor(e){super(e),this.type=`elevation-profile-view-2d`,this.analysis=null,this.indicatorRelativePosition=null}initialize(){let{analysis:e,view:t}=this;this._controller=new s({analysis:e,analysisViewData:this,view:t,computationFactory:{create:e=>{switch(e.profile.type){case`ground`:return new c(e);case`input`:return new l(e);case`query`:return new u(e);case`scene`:throw new n(`elevation-profile-analysis-view-2d:unsupported`,`The scene profile line type is not supported in 2D views.`)}}}}),this._visualization=new o({view:t,analysisViewData:this}),this._sketchTool=new d({view:t,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveDisplayUnits(){return this._controller?.effectiveDisplayUnits??{distance:`meters`,elevation:`meters`}}get error(){return this._controller?.error}get flatProfiles(){return this._controller?.flatProfiles??m}get indicatorPoints(){return this._controller?.indicatorPoints??[]}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return this._controller?.updating===!0||this._visualization?.updating===!0||this._sketchTool?.updating===!0}get visible(){return super.visible}set visible(e){super.visible=e}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??`idle`}place(e){return this._sketchTool.place(e)}pickFeature(e){return this._sketchTool.pickFeature(e)}};e([r({readOnly:!0})],f.prototype,`type`,void 0),e([r({constructOnly:!0,nonNullable:!0})],f.prototype,`analysis`,void 0),e([r({readOnly:!0})],f.prototype,`effectiveDisplayUnits`,null),e([r({readOnly:!0})],f.prototype,`error`,null),e([r()],f.prototype,`flatProfiles`,null),e([r()],f.prototype,`indicatorRelativePosition`,void 0),e([r()],f.prototype,`indicatorPoints`,null),e([r({readOnly:!0})],f.prototype,`progress`,null),e([r({readOnly:!0})],f.prototype,`results`,null),e([r({readOnly:!0})],f.prototype,`statistics`,null),e([r({readOnly:!0})],f.prototype,`updating`,null),e([r()],f.prototype,`sketchGraphic`,null),e([r()],f.prototype,`toolState`,null),e([r()],f.prototype,`_controller`,void 0),e([r()],f.prototype,`_visualization`,void 0),e([r()],f.prototype,`_sketchTool`,void 0),f=e([i(`esri.views.2d.analysis.ElevationProfileAnalysisView2D`)],f);const p=f,m=new t;export{p as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import n from"../../../core/Error.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import a from"./AnalysisView2D.js";import{ElevationProfileVisualization2D as o}from"./ElevationProfile/ElevationProfileVisualization2D.js";import{ElevationProfileController as s}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as c}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as l}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as u}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as d}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let f=class extends a{constructor(e){super(e),this.type=`elevation-profile-view-2d`,this.analysis=null,this.indicatorRelativePosition=null}initialize(){let{analysis:e,view:t}=this;this._controller=new s({analysis:e,analysisViewData:this,view:t,computationFactory:{create:e=>{switch(e.profile.type){case`ground`:return new c(e);case`input`:return new l(e);case`query`:return new u(e);case`scene`:throw new n(`elevation-profile-analysis-view-2d:unsupported`,`The scene profile line type is not supported in 2D views.`)}}}}),this._visualization=new o({view:t,analysisViewData:this}),this._sketchTool=new d({view:t,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveDisplayUnits(){return this._controller?.effectiveDisplayUnits??{distance:`meters`,elevation:`meters`}}get error(){return this._controller?.error}get flatProfiles(){return this._controller?.flatProfiles??m}get indicatorPoints(){return this._controller?.indicatorPoints??[]}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return this._controller?.updating===!0||this._visualization?.updating===!0||this._sketchTool?.updating===!0}get visible(){return super.visible}set visible(e){super.visible=e}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??`idle`}get canStopPlacing(){return this._sketchTool?.canStopPlacing??!1}place(e){return this._sketchTool.place(e)}pickFeature(e){return this._sketchTool.pickFeature(e)}};e([r({readOnly:!0})],f.prototype,`type`,void 0),e([r({constructOnly:!0,nonNullable:!0})],f.prototype,`analysis`,void 0),e([r({readOnly:!0})],f.prototype,`effectiveDisplayUnits`,null),e([r({readOnly:!0})],f.prototype,`error`,null),e([r()],f.prototype,`flatProfiles`,null),e([r()],f.prototype,`indicatorRelativePosition`,void 0),e([r()],f.prototype,`indicatorPoints`,null),e([r({readOnly:!0})],f.prototype,`progress`,null),e([r({readOnly:!0})],f.prototype,`results`,null),e([r({readOnly:!0})],f.prototype,`statistics`,null),e([r({readOnly:!0})],f.prototype,`updating`,null),e([r()],f.prototype,`sketchGraphic`,null),e([r()],f.prototype,`toolState`,null),e([r()],f.prototype,`canStopPlacing`,null),e([r()],f.prototype,`_controller`,void 0),e([r()],f.prototype,`_visualization`,void 0),e([r()],f.prototype,`_sketchTool`,void 0),f=e([i(`esri.views.2d.analysis.ElevationProfileAnalysisView2D`)],f);const p=f,m=new t;export{p as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clone as e}from"../../../../../core/lang.js";import{sqlAnd as t}from"../../../../../core/sql.js";import{isHostedAgolService as n}from"../../../../../layers/support/arcgisLayerUrl.js";import{canConvertSqlRelativeTime as r,sqlRelativeTimeToAbsolute as i}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as a}from"../../../../../networks/support/networkFieldUtils.js";import{getEffectiveFeatureReduction as o}from"./featureReductionUtils.js";import{createFeatureIdInfo as s}from"./featureServiceUtils.js";import{addFloorFilter as c,hasFloorFilter as l}from"./floorFilterUtils.js";import{getServiceGeometryType as u}from"./geometryUtils.js";import{createLabelVVEvaluator as d}from"./labelingUtils.js";import{ExceedsLimitCache as f}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as p,createFeatureSourceSchema as m}from"../schema/SourceSchema.js";import{createServiceTimeSchema as h}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as g}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as _}from"../support/rendererUtils.js";class v{constructor(e){this.layer=e,this._cache=new f}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:d(this.layer.renderer)}}]}async createSourceSchema(e,n){let a=this._createServiceInfo(e),o=this.layer.editingInfo?.lastEditDate!=null,s=this.layer.refreshInterval>0,c=!o&&s,l=p(a.isSourceHosted,c,this.layer.capabilities,a.metadata.geometryType,e.extent,this.layer.fullExtent),u=this.layer.subtypeCode==null?null:`${this.layer.subtypeField} = ${this.layer.subtypeCode}`,d=t(this.layer.definitionExpression,u),f=r(d)?await i(this.layer.fieldsIndex,d,this.layer.capabilities.query.relativeTimeBinWindow):d,h=d===f?null:{where:d},{gdbVersion:g,apiKey:_,historicMoment:v,timeExtent:y,customParameters:b,displayFilterInfo:x}=this.layer;return m(a,l,{definitionExpression:f,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:h,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:x,customParameters:b,gdbVersion:g,historicMoment:v,timeExtent:y,apiKey:_,sourceRefreshVersion:n,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,t,n){let{fields:r,renderer:i,geometryType:a,labelingInfo:s,labelsVisible:c,orderBy:l,objectIdField:u,trackInfo:d,symbolLayerDrawing:f}=this.layer,p={fields:r.map(e=>e.toJSON()),renderer:i?.clone(),labelingInfoSource:this.layer.id,featureReduction:o(this.layer,t),geometryType:a,labelingInfo:s,labelsVisible:c,objectIdField:u,orderBy:l??`default`,trackInfo:d,symbolLayerDrawing:f};return g(e,t,p,n)}get hasRequiredSupport(){return _(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,t){return c(this.layer,e,t)}getUpdateHashProperties(e){return this.layer.destroyed?[]:[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>o(this.layer,e),()=>l(this.layer,e)?e.floors:null,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.subtypeCode,()=>this.layer.trackInfo,()=>this.layer.symbolLayerDrawing?.drawOrder,()=>this.layer.symbolLayerDrawing?.enabled,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&a(e,this.layer)]}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(t){let r=this.layer,{capabilities:i,editingInfo:a,typeIdField:o,globalIdField:c,datesInUnknownTimezone:l,dateFieldsTimeZone:d,orderBy:f,subtypeField:p}=r,m=r.fieldsIndex.toJSON(),g=u(r),{hasZ:_,hasM:v}=r,y=h(r.timeInfo),b=r.spatialReference.toJSON(),x=r.types?.map(e=>e.toJSON()),S=e(this.layer.parsedUrl);this.layer.dynamicDataSource&&(S.query={layer:JSON.stringify(
|
|
2
|
+
import{clone as e}from"../../../../../core/lang.js";import{sqlAnd as t}from"../../../../../core/sql.js";import{isHostedAgolService as n}from"../../../../../layers/support/arcgisLayerUrl.js";import{canConvertSqlRelativeTime as r,sqlRelativeTimeToAbsolute as i}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as a}from"../../../../../networks/support/networkFieldUtils.js";import{getEffectiveFeatureReduction as o}from"./featureReductionUtils.js";import{createFeatureIdInfo as s}from"./featureServiceUtils.js";import{addFloorFilter as c,hasFloorFilter as l}from"./floorFilterUtils.js";import{getServiceGeometryType as u}from"./geometryUtils.js";import{createLabelVVEvaluator as d}from"./labelingUtils.js";import{ExceedsLimitCache as f}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as p,createFeatureSourceSchema as m}from"../schema/SourceSchema.js";import{createServiceTimeSchema as h}from"../schema/TimeSchema.js";import{createSimpleProcessorSchema as g}from"../schema/processor/SimpleProcessorSchema.js";import{isRendererSupported as _}from"../support/rendererUtils.js";class v{constructor(e){this.layer=e,this._cache=new f}getLabelingDeconflictionInfo(){return[{vvEvaluators:{0:d(this.layer.renderer)}}]}async createSourceSchema(e,n){let a=this._createServiceInfo(e),o=this.layer.editingInfo?.lastEditDate!=null,s=this.layer.refreshInterval>0,c=!o&&s,l=p(a.isSourceHosted,c,this.layer.capabilities,a.metadata.geometryType,e.extent,this.layer.fullExtent),u=this.layer.subtypeCode==null?null:`${this.layer.subtypeField} = ${this.layer.subtypeCode}`,d=t(this.layer.definitionExpression,u),f=r(d)?await i(this.layer.fieldsIndex,d,this.layer.capabilities.query.relativeTimeBinWindow):d,h=d===f?null:{where:d},{gdbVersion:g,apiKey:_,historicMoment:v,timeExtent:y,customParameters:b,displayFilterInfo:x}=this.layer;return m(a,l,{definitionExpression:f,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:h,queryScaleRanges:[],displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:x,customParameters:b,gdbVersion:g,historicMoment:v,timeExtent:y,apiKey:_,sourceRefreshVersion:n,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,t,n){let{fields:r,renderer:i,geometryType:a,labelingInfo:s,labelsVisible:c,orderBy:l,objectIdField:u,trackInfo:d,symbolLayerDrawing:f}=this.layer,p={fields:r.map(e=>e.toJSON()),renderer:i?.clone(),labelingInfoSource:this.layer.id,featureReduction:o(this.layer,t),geometryType:a,labelingInfo:s,labelsVisible:c,objectIdField:u,orderBy:l??`default`,trackInfo:d,symbolLayerDrawing:f};return g(e,t,p,n)}get hasRequiredSupport(){return _(this.layer.renderer)}get timeOptions(){return this.layer}addFilters(e,t){return c(this.layer,e,t)}getUpdateHashProperties(e){return this.layer.destroyed?[]:[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>o(this.layer,e),()=>l(this.layer,e)?e.floors:null,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>this.layer.labelsVisible?this.layer.labelingInfo:null,()=>this.layer.orderBy,()=>this.layer.outFields,()=>this.layer.renderer,()=>this.layer.subtypeCode,()=>this.layer.trackInfo,()=>this.layer.symbolLayerDrawing?.drawOrder,()=>this.layer.symbolLayerDrawing?.enabled,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&a(e,this.layer)]}getRenderer(){return this.layer.renderer}setGraphicOrigin(e){e.origin=this.layer.graphicOrigin}setAggregateGraphicOrigin(e){e.origin=this.layer.aggregateGraphicOrigin}setTrackGraphicOrigin(e){e.origin=this.layer.trackGraphicOrigin}_createServiceInfo(t){let r=this.layer,{capabilities:i,editingInfo:a,typeIdField:o,globalIdField:c,datesInUnknownTimezone:l,dateFieldsTimeZone:d,orderBy:f,subtypeField:p}=r,m=r.fieldsIndex.toJSON(),g=u(r),{hasZ:_,hasM:v}=r,y=h(r.timeInfo),b=r.spatialReference.toJSON(),x=r.types?.map(e=>e.toJSON()),S=e(this.layer.parsedUrl);this.layer.dynamicDataSource&&(S.query={layer:JSON.stringify(this.layer.dynamicDataSource.toLayerSourceJSON())});let C=this.layer.objectIdField;if(f?.length){let e=!f[0].valueExpression&&f[0].field;e&&(C=e)}let w=n(S.path),T=t.spatialReference.toJSON();return{type:`feature-service`,source:S,isSourceHosted:w,orderByFields:C,outSpatialReference:T,metadata:{typeIdField:o??void 0,types:x,timeReferenceUnknownClient:l,dateFieldsTimeZone:d,subtypeField:p,globalIdField:c,fieldsIndex:m,geometryType:g,hasZ:_,hasM:v,featureIdInfo:s(r),timeInfo:y,spatialReference:b,outSpatialReference:T,attributeSpatialReference:null,subtypes:this.layer.subtypes?.map(e=>e.toJSON())},queryMetadata:{supportsCacheHint:i.query.supportsCacheHint,maxRecordCount:i.query.maxRecordCount,tileMaxRecordCount:i.query.tileMaxRecordCount,supportsCompactGeometry:i.query.supportsCompactGeometry,supportsDefaultSpatialReference:i.query.supportsDefaultSpatialReference,supportsFormatPBF:i.query.supportsFormatPBF,supportsMaxRecordCountFactor:i.query.supportsMaxRecordCountFactor,supportsQuantization:i.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:i.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:i.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:i.query.supportsReturnExceededLimitGeometries,lastEditDate:a?.lastEditDate?.getTime()}}}}export{v as FeatureLayerAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clone as e}from"../../../../../core/lang.js";import{floatEqualAbsolute as t}from"../../../../../core/mathUtils.js";import{sqlAnd as n}from"../../../../../core/sql.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import i from"../../../../../layers/support/FeatureFilter.js";import{canConvertSqlRelativeTime as a,sqlRelativeTimeToAbsolute as o}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as s}from"../../../../../networks/support/networkFieldUtils.js";import{createFeatureIdInfo as c}from"./featureServiceUtils.js";import{addFloorFilter as l,hasFloorFilter as u}from"./floorFilterUtils.js";import{getServiceGeometryType as d}from"./geometryUtils.js";import{ExceedsLimitCache as f}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as p,createFeatureSourceSchema as m}from"../schema/SourceSchema.js";import{createServiceTimeSchema as h}from"../schema/TimeSchema.js";import{createSubtypeProcessorSchema as g}from"../schema/processor/SubtypeProcessorSchema.js";class _{constructor(e){this.layer=e,this._cache=new f}getLabelingDeconflictionInfo(){return[{vvEvaluators:{}}]}async createSourceSchema(e,t){let{definitionExpression:n,customParameters:r,gdbVersion:i,historicMoment:s,timeExtent:c,apiKey:l,displayFilterInfo:u}=this.layer,d=this._createServiceInfo(e),f=this.layer.editingInfo?.lastEditDate!=null,h=this.layer.refreshInterval>0,g=!f&&h,_=p(d.isSourceHosted,g,this.layer.capabilities,d.metadata.geometryType,e.extent,this.layer.fullExtent),v=a(n)?await o(this.layer.fieldsIndex,n,this.layer.capabilities.query.relativeTimeBinWindow):n,y=n===v?null:{where:n};return m(d,_,{definitionExpression:v,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:y,queryScaleRanges:this.layer.sublayers.items.map(e=>({subtypeCode:e.subtypeCode,minScale:e.minScale,maxScale:e.maxScale})),displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:u,customParameters:r,gdbVersion:i,historicMoment:s,timeExtent:c,apiKey:l,sourceRefreshVersion:t,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,t,n){let r={labelingInfoSource:this.layer.id,subtypeField:this.layer.subtypeField,sublayers:Array.from(this.layer.sublayers,(e,t)=>({featureReduction:null,geometryType:this.layer.geometryType,labelingInfoSource:this.layer.id+`-${t}`,labelingInfo:e.labelingInfo,labelsVisible:e.labelsVisible,renderer:e.renderer,subtypeCode:e.subtypeCode,orderBy:null}))};return g(e,t,r,n)}addFilters(e,t){e=l(this.layer,e,t);let r=this.layer.sublayers.filter(e=>!v(e,t)).map(e=>e.subtypeCode);if(!r.length)return e;e??=new i;let a=`NOT ${this.layer.subtypeField} IN (${r.join(`,`)})`;return e.where=n(e.where,a),e}get hasRequiredSupport(){return!0}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>u(this.layer,e)?e.floors:null,()=>this.layer.outFields,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&s(e,this.layer),()=>this.layer.sublayers.map(({renderer:e,labelsVisible:t,labelingInfo:n,visible:r,minScale:i,maxScale:a})=>({renderer:e,labelsVisible:t,labelingInfo:n,visible:r,minScale:i,maxScale:a}))]}setGraphicOrigin(e){let t=this.layer.findSublayerForFeature(e);e.layer=e.sourceLayer=t,e.origin=t?.graphicOrigin}getRenderer(e){return this.layer.findSublayerForFeature(e)?.renderer}_createServiceInfo(t){let{capabilities:n,datesInUnknownTimezone:i,dateFieldsTimeZone:a,editingInfo:o,globalIdField:s,objectIdField:l,subtypeField:u}=this.layer,f=this.layer.fieldsIndex.toJSON(),p=d(this.layer),m=h(this.layer.timeInfo),g=this.layer.spatialReference.toJSON(),_=e(this.layer.parsedUrl),v=l,y=r(_.path),b=t.spatialReference.toJSON();return{type:`feature-service`,source:_,isSourceHosted:y,orderByFields:v,outSpatialReference:b,metadata:{timeReferenceUnknownClient:i,dateFieldsTimeZone:a,subtypeField:u,globalIdField:s,fieldsIndex:f,geometryType:p,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:c(this.layer),timeInfo:m,spatialReference:g,outSpatialReference:b,attributeSpatialReference:null,subtypes:this.layer.subtypes?.map(e=>e.toJSON()),typeIdField:null,types:null},queryMetadata:{supportsCacheHint:n.query.supportsCacheHint,maxRecordCount:n.query.maxRecordCount,tileMaxRecordCount:n.query.tileMaxRecordCount,supportsCompactGeometry:n.query.supportsCompactGeometry,supportsDefaultSpatialReference:n.query.supportsDefaultSpatialReference,supportsFormatPBF:n.query.supportsFormatPBF,supportsMaxRecordCountFactor:n.query.supportsMaxRecordCountFactor,supportsQuantization:n.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:n.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:n.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:n.query.supportsReturnExceededLimitGeometries,lastEditDate:o?.lastEditDate?.getTime()}}}}function v(e,n){return e.visible&&(e.minScale===0||t(n.scale,e.minScale)||n.scale<e.minScale)&&(e.maxScale===0||t(n.scale,e.maxScale)||n.scale>e.maxScale)}export{_ as SubtypeGroupLayerAdapter};
|
|
2
|
+
import{clone as e}from"../../../../../core/lang.js";import{floatEqualAbsolute as t}from"../../../../../core/mathUtils.js";import{sqlAnd as n}from"../../../../../core/sql.js";import{isHostedAgolService as r}from"../../../../../layers/support/arcgisLayerUrl.js";import i from"../../../../../layers/support/FeatureFilter.js";import{canConvertSqlRelativeTime as a,sqlRelativeTimeToAbsolute as o}from"../../../../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as s}from"../../../../../networks/support/networkFieldUtils.js";import{createFeatureIdInfo as c}from"./featureServiceUtils.js";import{addFloorFilter as l,hasFloorFilter as u}from"./floorFilterUtils.js";import{getServiceGeometryType as d}from"./geometryUtils.js";import{ExceedsLimitCache as f}from"../schema/ExceedsLimitCache.js";import{createSnapshotInfo as p,createFeatureSourceSchema as m}from"../schema/SourceSchema.js";import{createServiceTimeSchema as h}from"../schema/TimeSchema.js";import{createSubtypeProcessorSchema as g}from"../schema/processor/SubtypeProcessorSchema.js";class _{constructor(e){this.layer=e,this._cache=new f}getLabelingDeconflictionInfo(){return[{vvEvaluators:{}}]}async createSourceSchema(e,t){let{definitionExpression:n,customParameters:r,gdbVersion:i,historicMoment:s,timeExtent:c,apiKey:l,displayFilterInfo:u}=this.layer,d=this._createServiceInfo(e),f=this.layer.editingInfo?.lastEditDate!=null,h=this.layer.refreshInterval>0,g=!f&&h,_=p(d.isSourceHosted,g,this.layer.capabilities,d.metadata.geometryType,e.extent,this.layer.fullExtent),v=a(n)?await o(this.layer.fieldsIndex,n,this.layer.capabilities.query.relativeTimeBinWindow):n,y=n===v?null:{where:n};return m(d,_,{definitionExpression:v,returnZ:e.returnZ,returnM:e.returnM,postQueryFilter:y,queryScaleRanges:this.layer.sublayers.items.map(e=>({subtypeCode:e.subtypeCode,minScale:e.minScale,maxScale:e.maxScale})),displayFilterEnabled:e.displayFilterEnabled,displayFilterInfo:u,customParameters:r,gdbVersion:i,historicMoment:s,timeExtent:c,apiKey:l,sourceRefreshVersion:t,availableFields:e.availableFields,cache:this._cache})}createProcessorSchema(e,t,n){let r={labelingInfoSource:this.layer.id,subtypeField:this.layer.subtypeField,sublayers:Array.from(this.layer.sublayers,(e,t)=>({featureReduction:null,geometryType:this.layer.geometryType,labelingInfoSource:this.layer.id+`-${t}`,labelingInfo:e.labelingInfo,labelsVisible:e.labelsVisible,renderer:e.renderer,subtypeCode:e.subtypeCode,orderBy:null}))};return g(e,t,r,n)}addFilters(e,t){e=l(this.layer,e,t);let r=this.layer.sublayers.filter(e=>!v(e,t)).map(e=>e.subtypeCode);if(!r.length)return e;e??=new i;let a=`NOT ${this.layer.subtypeField} IN (${r.join(`,`)})`;return e.where=n(e.where,a),e}get hasRequiredSupport(){return!0}get timeOptions(){return this.layer}getUpdateHashProperties(e){return[()=>this.layer.apiKey,()=>this.layer.customParameters,()=>this.layer.definitionExpression,()=>u(this.layer,e)?e.floors:null,()=>this.layer.outFields,()=>this.layer.gdbVersion,()=>this.layer.historicMoment,()=>e?.requiredFieldsOptions?.featureTitleFields&&this.layer.featureTitleFields,()=>e?.requiredFieldsOptions?.utilityNetworkFields&&s(e,this.layer),()=>this.layer.sublayers.map(({renderer:e,labelsVisible:t,labelingInfo:n,visible:r,minScale:i,maxScale:a})=>({renderer:e,labelsVisible:t,labelingInfo:n,visible:r,minScale:i,maxScale:a}))]}setGraphicOrigin(e){let t=this.layer.findSublayerForFeature(e);e.layer=e.sourceLayer=t,e.origin=t?.graphicOrigin}getRenderer(e){return this.layer.findSublayerForFeature(e)?.renderer}_createServiceInfo(t){let{capabilities:n,datesInUnknownTimezone:i,dateFieldsTimeZone:a,editingInfo:o,globalIdField:s,objectIdField:l,subtypeField:u}=this.layer,f=this.layer.fieldsIndex.toJSON(),p=d(this.layer),m=h(this.layer.timeInfo),g=this.layer.spatialReference.toJSON(),_=e(this.layer.parsedUrl),v=l,y=r(_.path),b=t.spatialReference.toJSON();return this.layer.dynamicDataSource&&(_.query={layer:JSON.stringify(this.layer.dynamicDataSource.toLayerSourceJSON())}),{type:`feature-service`,source:_,isSourceHosted:y,orderByFields:v,outSpatialReference:b,metadata:{timeReferenceUnknownClient:i,dateFieldsTimeZone:a,subtypeField:u,globalIdField:s,fieldsIndex:f,geometryType:p,hasZ:this.layer.hasZ,hasM:this.layer.hasM,featureIdInfo:c(this.layer),timeInfo:m,spatialReference:g,outSpatialReference:b,attributeSpatialReference:null,subtypes:this.layer.subtypes?.map(e=>e.toJSON()),typeIdField:null,types:null},queryMetadata:{supportsCacheHint:n.query.supportsCacheHint,maxRecordCount:n.query.maxRecordCount,tileMaxRecordCount:n.query.tileMaxRecordCount,supportsCompactGeometry:n.query.supportsCompactGeometry,supportsDefaultSpatialReference:n.query.supportsDefaultSpatialReference,supportsFormatPBF:n.query.supportsFormatPBF,supportsMaxRecordCountFactor:n.query.supportsMaxRecordCountFactor,supportsQuantization:n.query.supportsQuantization,supportsCentroidOnDegeneratedQuantizedGeometry:n.query.supportsCentroidOnDegeneratedQuantizedGeometry,supportsDegeneratedQuantizedGeometry:n.query.supportsDegeneratedQuantizedGeometry,supportsReturnExceededLimitGeometries:n.query.supportsReturnExceededLimitGeometries,lastEditDate:o?.lastEditDate?.getTime()}}}}function v(e,n){return e.visible&&(e.minScale===0||t(n.scale,e.minScale)||n.scale<e.minScale)&&(e.maxScale===0||t(n.scale,e.maxScale)||n.scale>e.maxScale)}export{_ as SubtypeGroupLayerAdapter};
|
package/views/3d/GroundView3D.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{EventedMixin as t}from"../../core/Evented.js";import has from"../../core/has.js";import{when as n,watch as r,syncAndInitial as i}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{create as s,equals as c,intersection as l,union as u}from"../../geometry/support/aaBoundingRect.js";import d from"../GroundView.js";import{ElevationRange as f}from"./support/ElevationRange.js";import{toBoundingRect as p}from"./support/extentUtils.js";import{webMercatorWorldExtent as m,geographicWorldExtent as h}from"./terrain/TerrainConst.js";import{isIntegratedMeshLayerView as g}from"../support/layerViewUtils.js";const _=Symbol(`integrated-mesh-elevation-providers`);let v=class extends t(d){initialize(){super.initialize(),this.addHandles(n(()=>this._terrainSurface,e=>e.on(`elevation-change`,e=>this._elevationChange(e)))),r(()=>[this.view?.basemapView?.groundLayerViews.toArray(),this.layerViews.toArray()],()=>{this.removeHandles(_),this.addHandles(this._integratedMeshGroundLayerViews.map(({elevationProvider:e})=>e.on(`elevation-change`,e=>this._elevationChange(e))),_)},i),this.addHandles([r(()=>this.memoizedElevationQueryDependencies,()=>{this.emit(`elevation-query-change`)})])}get memoizedElevationQueryDependencies(){return(this.ground?.allLayers??[]).filter(e=>e.type===`elevation`||e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain).map(e=>e.memoizedElevationQueryDependencies)}_elevationChange(e){this.emit(`elevation-change`,e)}get _integratedMeshGroundLayerViews(){return has(`enable-feature:im-as-ground`)?[...this.view?.basemapView?.groundLayerViews.filter(g)??[],...this.layerViews.filter(g)]:[...this.view?.basemapView?.groundLayerViews.filter(g).filter(e=>e.replacesTerrain)??[]]}get _terrainSurface(){return this.view.basemapTerrain}get _usingTerrain(){return!this.hasTerrainReplacement&&(this._terrainSurface?.enabled??!1)}get spatialReference(){return this._terrainSurface?.spatialReference}get userClippingExtent(){let{spatialReference:e}=this,{clippingArea:t}=this.view;if(t==null||e==null)return null;let n=s(),r=p(t,n,e)?n:null,i=this._get(`userClippingExtent`);return c(r,i)?i:r}
|
|
2
|
+
import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../core/Evented.js";import has from"../../core/has.js";import{when as n,watch as r,syncAndInitial as i}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{create as s,equals as c,intersection as l,union as u}from"../../geometry/support/aaBoundingRect.js";import d from"../GroundView.js";import{ElevationRange as f}from"./support/ElevationRange.js";import{toBoundingRect as p}from"./support/extentUtils.js";import{webMercatorWorldExtent as m,geographicWorldExtent as h}from"./terrain/TerrainConst.js";import{isIntegratedMeshLayerView as g}from"../support/layerViewUtils.js";const _=Symbol(`integrated-mesh-elevation-providers`);let v=class extends t(d){initialize(){super.initialize(),this.addHandles(n(()=>this._terrainSurface,e=>e.on(`elevation-change`,e=>this._elevationChange(e)))),r(()=>[this.view?.basemapView?.groundLayerViews.toArray(),this.layerViews.toArray()],()=>{this.removeHandles(_),this.addHandles(this._integratedMeshGroundLayerViews.map(({elevationProvider:e})=>e.on(`elevation-change`,e=>this._elevationChange(e))),_)},i),this.addHandles([r(()=>this.memoizedElevationQueryDependencies,()=>{this.emit(`elevation-query-change`)})])}get memoizedElevationQueryDependencies(){return(this.ground?.allLayers??[]).filter(e=>e.type===`elevation`||e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain).map(e=>e.memoizedElevationQueryDependencies)}_elevationChange(e){this.emit(`elevation-change`,e)}get _integratedMeshGroundLayerViews(){return has(`enable-feature:im-as-ground`)?[...this.view?.basemapView?.groundLayerViews.filter(g)??[],...this.layerViews.filter(g)]:[...this.view?.basemapView?.groundLayerViews.filter(g).filter(e=>e.replacesTerrain)??[]]}get _terrainSurface(){return this.view.basemapTerrain}get _usingTerrain(){return!this.hasTerrainReplacement&&(this._terrainSurface?.enabled??!1)}get spatialReference(){return this._terrainSurface?.spatialReference}get userClippingExtent(){let{spatialReference:e}=this,{clippingArea:t}=this.view;if(t==null||e==null)return null;let n=s(),r=p(t,n,e)?n:null,i=this._get(`userClippingExtent`);return c(r,i)?i:r}isUpdating(){return this._usingTerrain&&this._terrainSurface.updating||super.isUpdating()}getElevation(e,t,n,r){let i=this._usingTerrain?this._terrainSurface?.getElevation(e,t,n,r):null;return this._integratedMeshGroundLayerViews.reduce((i,a)=>{let o=a.elevationProvider.getElevation(e,t,n,r);return o==null?i:Math.max(o,i??o)},i)}getElevations(e,t,n){let r=this.view.groundSpatialReference;if(r==null){for(let e=0;e<t;++e)n(e,null);return}for(let i=0;i<t;++i){let t=i*3;n(i,this.getElevation(e[t],e[t+1],e[t+2],r))}}intersect(e,t,n,r){this._usingTerrain&&this._terrainSurface.intersect(e,t,n,r),this._integratedMeshGroundLayerViews.forEach(i=>i.intersect(e,t,n,r))}getSphereElevationRange(e,t,n){let r=this._usingTerrain?this._terrainSurface?.getSphereElevationRange?.(e,t):null;return this._integratedMeshGroundLayerViews.reduce((n,r)=>{let i=r.elevationProvider.getSphereElevationRange?.(e,t);return i==null?n:(n??=new f,n.expandElevationRange(i),n)},r?new f(r.minElevation,r.maxElevation):null)}getRootElevationRange(){let e=this._usingTerrain?this._terrainSurface?.getRootElevationRange?.():null;return this._integratedMeshGroundLayerViews.reduce((e,t)=>{let n=t.elevationProvider.getRootElevationRange?.();return n==null?e:(e??=new f,e.expandElevationRange(n),e)},e?new f(e.minElevation,e.maxElevation):null)}get elevationQueryCache(){let e=this.view?.basemapTerrain;return e?.enabled?e.elevationQueryCache:null}get elevationQueryReady(){for(let e of this.ground?.allLayers??[])if(e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain&&e.loadStatus!==`failed`&&e.queryElevationCallback==null)return!1;return!0}get groundExtent(){let{fullGroundExtent:e}=this;return e?this.userClippingExtent?l(e,this.userClippingExtent,s()):this.fullGroundExtent:null}get fullGroundExtent(){let e=this._usingTerrain?this._terrainSurface.fullGroundExtent:null;if(this._integratedMeshGroundLayerViews.length===0)return e;let t=this.view.spatialReference;if(!t.isWebMercator&&!t.isWGS84)return e;let n=b(t);return e?u(e,n,s()):n}get visibleElevationRange(){let e=this._usingTerrain?this._terrainSurface.visibleElevationRange:null;return this._integratedMeshGroundLayerViews.reduce((e,t)=>e==null?new f(t.visibleElevationRange.minElevation,t.visibleElevationRange.maxElevation):(e.expandElevationRange(t.visibleElevationRange),e),e?new f(e.minElevation,e.maxElevation):null)??y}get opaque(){return this._usingTerrain&&this._terrainSurface.opaque||this._integratedMeshGroundLayerViews.some(({opaque:e})=>e)}get invisible(){return(!this._usingTerrain||this._terrainSurface.invisible)&&this._integratedMeshGroundLayerViews.every(({invisible:e})=>e)}get baseOpacity(){return this.ground?.opacity??1}get wireframe(){return this._usingTerrain?this._terrainSurface?.wireframe??!1:!1}get freeze(){return this._usingTerrain&&(this._terrainSurface?.freeze??!1)||this._integratedMeshGroundLayerViews.some(e=>e.type===`integrated-mesh-3dtiles`&&e.freeze)}set freeze(e){this._usingTerrain&&(this._terrainSurface.freeze=e),this._integratedMeshGroundLayerViews.forEach(t=>{t.type===`integrated-mesh-3dtiles`&&(t.freeze=e)})}get suspended(){return(!this._usingTerrain||super.suspended)&&this._integratedMeshGroundLayerViews.length>0&&this._integratedMeshGroundLayerViews.every(({suspended:e})=>e)}get ready(){return!this._usingTerrain&&this._integratedMeshGroundLayerViews.length===0?!1:(!this._usingTerrain||this._terrainSurface.ready)&&this._integratedMeshGroundLayerViews.every(({ready:e})=>e)}updateOverlayParameters(){this._terrainSurface?.updateOverlayParameters()}requestRender(e){this.view.stage.renderView?.requestRender(e)}};e([a()],v.prototype,`memoizedElevationQueryDependencies`,null),e([a({readOnly:!0})],v.prototype,`_integratedMeshGroundLayerViews`,null),e([a({readOnly:!0})],v.prototype,`_terrainSurface`,null),e([a({readOnly:!0})],v.prototype,`_usingTerrain`,null),e([a({readOnly:!0})],v.prototype,`spatialReference`,null),e([a({readOnly:!0})],v.prototype,`userClippingExtent`,null),e([a({readOnly:!0})],v.prototype,`elevationQueryCache`,null),e([a()],v.prototype,`elevationQueryReady`,null),e([a({readOnly:!0})],v.prototype,`groundExtent`,null),e([a({readOnly:!0})],v.prototype,`fullGroundExtent`,null),e([a({readOnly:!0})],v.prototype,`visibleElevationRange`,null),e([a({readOnly:!0})],v.prototype,`opaque`,null),e([a({readOnly:!0})],v.prototype,`invisible`,null),e([a({readOnly:!0})],v.prototype,`baseOpacity`,null),e([a({readOnly:!0})],v.prototype,`wireframe`,null),e([a()],v.prototype,`freeze`,null),e([a({readOnly:!0})],v.prototype,`suspended`,null),e([a({readOnly:!0})],v.prototype,`ready`,null),v=e([o(`esri.views.3d.GroundView3D`)],v);const y=new f(0,0);function b(e){return e.isWebMercator?m:h}export{v as GroundView3D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{onLocaleChange as t,fetchMessageBundle as n}from"../../../../intl.js";import r from"../../../../core/Accessor.js";import{destroyHandle as i}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{mapCollection as a}from"../../../../core/mapCollectionUtils.js";import{watch as o,syncAndInitial as s,when as c,sync as l}from"../../../../core/reactiveUtils.js";import{pt2px as u}from"../../../../core/screenUtils.js";import{property as d,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{LengthDimensionVisualization as m}from"./LengthDimensionVisualization.js";import{markerLineSizeFraction as h,offsetLineSizeFraction as g}from"./settings.js";import{LineMarkerMaterial as _}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{createStipplePatternSimple as v}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as y}from"../../webgl-engine/materials/RibbonLineMaterial.js";let b=class extends r{get analysis(){return this.analysisViewData.analysis}get visible(){return this.analysisViewData.visible}constructor(e){super(e),this.loadingMessages=!1,this._messages=null}initialize(){let e=this.isDecoration,n=this.view.state.isGlobal;this._markerMaterial=new _({width:1,anchor:1,color:p,placement:`begin-end`,worldSpace:!0,hideOnShortSegments:!0,hasTip:!0,renderOccluded:4,markerPrimitive:`triangle`,isDecoration:e},n),this._dimensionLineMaterial=new y({width:1,color:p,renderOccluded:4,markerParameters:this._markerMaterial.parameters,isDecoration:e},
|
|
2
|
+
import{__decorate as e}from"tslib";import{onLocaleChange as t,fetchMessageBundle as n}from"../../../../intl.js";import r from"../../../../core/Accessor.js";import{destroyHandle as i}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{mapCollection as a}from"../../../../core/mapCollectionUtils.js";import{watch as o,syncAndInitial as s,when as c,sync as l}from"../../../../core/reactiveUtils.js";import{pt2px as u}from"../../../../core/screenUtils.js";import{property as d,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{LengthDimensionVisualization as m}from"./LengthDimensionVisualization.js";import{markerLineSizeFraction as h,offsetLineSizeFraction as g}from"./settings.js";import{LineMarkerMaterial as _}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{createStipplePatternSimple as v}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as y}from"../../webgl-engine/materials/RibbonLineMaterial.js";let b=class extends r{get analysis(){return this.analysisViewData.analysis}get visible(){return this.analysisViewData.visible}constructor(e){super(e),this.loadingMessages=!1,this._messages=null}initialize(){let e=this.isDecoration,n=this.view.state.isGlobal;this._markerMaterial=new _({width:1,anchor:1,color:p,placement:`begin-end`,worldSpace:!0,hideOnShortSegments:!0,hasTip:!0,renderOccluded:4,markerPrimitive:`triangle`,isDecoration:e},n),this._dimensionLineMaterial=new y({width:1,color:p,renderOccluded:4,markerParameters:this._markerMaterial.parameters,isDecoration:e},this.view),this._offsetLineMaterial=new y({width:1,color:p,renderOccluded:4,stipplePattern:v(5),isDecoration:e},this.view),this._smallDimensionLineMaterial=new y({width:1,color:p,renderOccluded:4,isDecoration:e},this.view),this._smallOffsetLineMaterial=new y({width:1,color:p,renderOccluded:4,stipplePattern:v(5),isDecoration:e},this.view);let r=a(()=>this.analysisViewData.computations,({computation:e})=>this._createVisualization(e));this._dimensionVisualizations=r,this.addHandles([i(r),o(()=>this.analysis.style.color.toUnitRGBA(),e=>{for(let t of this._lineMaterials())t.setParameters({color:e})},s),o(()=>this.analysis.style.lineSize,e=>{let t=u(e);this._markerMaterial.setParameters({width:t*h}),this._dimensionLineMaterial.setParameters({width:t,markerParameters:this._markerMaterial.parameters});let n=Math.max(t*g,1);this._offsetLineMaterial.setParameters({width:n})},s),o(()=>({camera:this.view.state.camera,style:x(this.analysis)}),({camera:e,style:t})=>{for(let{visualization:n}of this._dimensionVisualizations)n.updateCameraDependentElements(e,n.computation.geometry,t),n.updateLabelStyle(t)}),o(()=>this.visible,e=>{for(let{visualization:t}of this._dimensionVisualizations)t.visible=e})]),this.addHandles([t(()=>this._updateMessageBundle()),c(()=>!this.loadingMessages,()=>{for(let{visualization:e}of this._dimensionVisualizations)e.updateUnitsMessages(this._messages)},l)]),this._updateMessageBundle()}get testInfo(){}_createVisualization(e){let t=new m({analysis:this.analysis,computation:e,view:this.view,visible:this.visible,markerMaterial:this._markerMaterial,dimensionLineMaterial:this._dimensionLineMaterial,offsetLineMaterial:this._offsetLineMaterial,smallDimensionLineMaterial:this._smallDimensionLineMaterial,smallOffsetLineMaterial:this._smallOffsetLineMaterial,messages:this._messages,isDecoration:this.isDecoration});return{visualization:t,remove:()=>t.destroy()}}_lineMaterials(){return[this._markerMaterial,this._dimensionLineMaterial,this._offsetLineMaterial,this._smallDimensionLineMaterial,this._smallOffsetLineMaterial]}async _updateMessageBundle(){this.loadingMessages=!0;try{this._messages=await n(`esri/core/t9n/Units`)}finally{this.loadingMessages=!1}}};e([d({constructOnly:!0})],b.prototype,`analysisViewData`,void 0),e([d({constructOnly:!0,nonNullable:!0})],b.prototype,`view`,void 0),e([d({constructOnly:!0})],b.prototype,`isDecoration`,void 0),e([d()],b.prototype,`analysis`,null),e([d()],b.prototype,`visible`,null),e([d()],b.prototype,`loadingMessages`,void 0),b=e([f(`esri.views.3d.analysis.Dimension.DimensionVisualization`)],b);function x(e){let{fontSize:t,lineSize:n,textColor:r,textBackgroundColor:i}=e.style;return{fontSize:t,lineSize:n,textBackgroundColor:i.clone(),textColor:r.clone()}}export{b as DimensionVisualization};
|