@arcgis/core 5.1.0-next.44 → 5.1.0-next.46
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/applications/Components/featureUtils.d.ts +11 -7
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9aa1ad8b436b5b0dd5f5.js → 08d76c600926d7642a8b.js} +1 -1
- package/assets/esri/core/workers/chunks/{54db91c0a3bd1946e026.js → 0d59f5cd3fdd7d6fd693.js} +1 -1
- package/assets/esri/core/workers/chunks/128799741dd3c6fc69b9.js +1 -0
- package/assets/esri/core/workers/chunks/13eb0162d95b4d27389c.js +1 -0
- package/assets/esri/core/workers/chunks/1a481f3ae3146682eb00.js +1 -0
- package/assets/esri/core/workers/chunks/1cce2f8837ad765acf44.js +1 -0
- package/assets/esri/core/workers/chunks/{288082ae7b19837a3d38.js → 20e715e3aeb1c3265901.js} +1 -1
- package/assets/esri/core/workers/chunks/2379c64b0ca30814a815.js +1 -0
- package/assets/esri/core/workers/chunks/23a9070e9362b8439770.js +1 -0
- package/assets/esri/core/workers/chunks/2b3a8a53cd68f666676b.js +1 -0
- package/assets/esri/core/workers/chunks/{4d16b6ac52e25bd7e6aa.js → 32a51ce8e1a362115c89.js} +1 -1
- package/assets/esri/core/workers/chunks/{392941013107bbd96503.js → 365ad1ffd496ed86637b.js} +1 -1
- package/assets/esri/core/workers/chunks/{45cf181c1945e6c77a4b.js → 3a7c02616d942c81257d.js} +1 -1
- package/assets/esri/core/workers/chunks/3e9700445518b8f9ae1b.js +1 -0
- package/assets/esri/core/workers/chunks/{eab74d830c2eaa9d133b.js → 4869e2f35aaf6b058281.js} +1 -1
- package/assets/esri/core/workers/chunks/4b3545965b11a54184d4.js +2 -0
- package/assets/esri/core/workers/chunks/{10941b50f5933d168df6.js → 521a671182b0f79e3624.js} +1 -1
- package/assets/esri/core/workers/chunks/{c2f3fc1b34a6782b431f.js → 5351e71ce7839636d06d.js} +1 -1
- package/assets/esri/core/workers/chunks/569e4479707bc6881d97.js +1 -0
- package/assets/esri/core/workers/chunks/5b515b5741733bcb4645.js +1 -0
- package/assets/esri/core/workers/chunks/{1669f1bf959c4e3083da.js → 5c0b3c76a7bc971c61dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{5f81f9e586b3ba0c34d4.js → 5c830cce32710d70dfa6.js} +1 -1
- package/assets/esri/core/workers/chunks/5e9bd5ed6ecee5b15127.js +1 -0
- package/assets/esri/core/workers/chunks/617328964d480d4a3a45.js +1 -0
- package/assets/esri/core/workers/chunks/650614a9e4871714c42e.js +1 -0
- package/assets/esri/core/workers/chunks/66baacbef23291eab853.js +1 -0
- package/assets/esri/core/workers/chunks/{c9f5d72b86ecb2a30587.js → 6c49ac7888679b9f7823.js} +1 -1
- package/assets/esri/core/workers/chunks/7278cc37e85f0242f19b.js +1 -0
- package/assets/esri/core/workers/chunks/{3c597d8ef898627b8f93.js → 768bbc910be6c65ac107.js} +1 -1
- package/assets/esri/core/workers/chunks/{a1f36240a31057f998da.js → 79dc7045d9a2d43ba8df.js} +1 -1
- package/assets/esri/core/workers/chunks/{4140d4c8b6b122fc2cd4.js → 7b48c102a44606291f82.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9da5c81535eaffc8b9c.js → 7f07f490c6fcc794c8d9.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b386374330d96387aec.js → 851fc5290497991ba001.js} +1 -1
- package/assets/esri/core/workers/chunks/{30cdb2d1d9f018f1642d.js → 9032c040b214b5af775b.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff8ec6369c8a1bee9bb4.js → 908f171b9c512d738dea.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7799ba861ac5af08e6a.js → 92d4e962284e13ba2fc5.js} +1 -1
- package/assets/esri/core/workers/chunks/970d971551e42f7ae08d.js +1 -0
- package/assets/esri/core/workers/chunks/9802770413ad814dab29.js +1 -0
- package/assets/esri/core/workers/chunks/{6cc5c37d6bdaf5483bd4.js → a422cfe1e2afe0722acd.js} +1 -1
- package/assets/esri/core/workers/chunks/{6e8cfe69617876ee0dac.js → a69f1879735a031f62e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{af804beb43d4d10c54d9.js → a9f35127c3f5bf42036b.js} +1 -1
- package/assets/esri/core/workers/chunks/{fb69a0bb025b7a5ec588.js → b45fdc04d399d2849d63.js} +1 -1
- package/assets/esri/core/workers/chunks/{c0cc4ca138db47052845.js → b49b608c0d58a9b55fa2.js} +1 -1
- package/assets/esri/core/workers/chunks/b744b950999b92393e37.js +1 -0
- package/assets/esri/core/workers/chunks/beb53b372d356800f333.js +1 -0
- package/assets/esri/core/workers/chunks/c2aa3b1344b42a904234.js +1 -0
- package/assets/esri/core/workers/chunks/cdeb6aec578a1c07d663.js +1 -0
- package/assets/esri/core/workers/chunks/{1a3f874700f86b750390.js → ce0a6bc9df30af778ac9.js} +2 -2
- package/assets/esri/core/workers/chunks/cf5e4cf9b1aa37eeb6b0.js +1 -0
- package/assets/esri/core/workers/chunks/d0adf059085ddf7151dd.js +1 -0
- package/assets/esri/core/workers/chunks/d2af5342fbe80e2d8c60.js +1 -0
- package/assets/esri/core/workers/chunks/e4e0c5a45cf32973d5d5.js +1 -0
- package/assets/esri/core/workers/chunks/{465cc0e00f03cdb640b2.js → e7402dfd683f82878360.js} +1 -1
- package/assets/esri/core/workers/chunks/{8838ff9668b472af16a1.js → ef0eae13408cbf83a64f.js} +1 -1
- package/assets/esri/core/workers/chunks/f1767b8ba82fdd9bd947.js +1 -0
- package/assets/esri/core/workers/chunks/{b86cb84c03b76e824213.js → f9fe89ced41b49608667.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c7ee71f0d8582e6d78f.js → ff75fb0fce51ac12e656.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Grid.scss +5 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/HUDMaterial.glsl.js +1 -1
- package/chunks/Jpg.js +1 -1
- package/chunks/LineCallout.glsl.js +1 -1
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +4 -4
- package/chunks/Zlib.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/config.js +1 -1
- package/geometry/support/zscale.js +1 -1
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/knowledgeGraph/dataModelVisualizationUtils.js +1 -1
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
- package/layers/raster/formats/JpgPlus.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/formats/TiffDecoder.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/save/groupLayerUtils.js +1 -1
- package/layers/save/mapImageLayerUtils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/schemaValidator.js +1 -1
- package/libs/ajv/ajv.bundle-wrapper.js +2 -0
- package/package.json +3 -3
- package/renderers/visualVariables/SizeVariable.js +1 -1
- package/rest/locator/locationToAddress.js +1 -1
- package/rest/query/operations/pbfFeatureSetUtils.js +1 -1
- package/rest/query/operations/pbfFlatFeatureSet.js +1 -1
- package/rest/query/operations/pbfOptimizedFeatureSet.js +1 -1
- package/rest/support/LocationToAddressParameters.d.ts +62 -2
- package/rest/support/types.d.ts +6 -0
- package/support/revision.js +1 -1
- package/third-party-notices.txt +2 -2
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/engine/ManagedCanvas.js +1 -1
- package/views/2d/engine/vectorTiles/Placement.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentDrawParameters.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/webgl/InstanceCounter.js +1 -1
- package/webscene/support/schemaValidator.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +2 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/assets/esri/core/workers/chunks/02a0a58ca5916db1db19.js +0 -1
- package/assets/esri/core/workers/chunks/03c8453ae72a4e190252.js +0 -1
- package/assets/esri/core/workers/chunks/0e669a04999feb9f98c9.js +0 -1
- package/assets/esri/core/workers/chunks/244dd7a948ca8a7dc6ef.js +0 -1
- package/assets/esri/core/workers/chunks/26cafd20c8d03c274389.js +0 -1
- package/assets/esri/core/workers/chunks/2cd0934163cb627ce251.js +0 -1
- package/assets/esri/core/workers/chunks/2fa86dacc8a12a6a6c43.js +0 -1
- package/assets/esri/core/workers/chunks/385f1bb9164b2d488b2d.js +0 -1
- package/assets/esri/core/workers/chunks/3e26f9af6b8c75bad97a.js +0 -1
- package/assets/esri/core/workers/chunks/5a6a6e7151085a3cd3dd.js +0 -1
- package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +0 -1
- package/assets/esri/core/workers/chunks/65865c25487d23dd2e31.js +0 -1
- package/assets/esri/core/workers/chunks/65ea5028eb12457a3aeb.js +0 -1
- package/assets/esri/core/workers/chunks/73d7337ac9efdbad14a4.js +0 -1
- package/assets/esri/core/workers/chunks/8333561a938bcdf6c2e6.js +0 -1
- package/assets/esri/core/workers/chunks/848c6989a6a222c7a1d8.js +0 -2
- package/assets/esri/core/workers/chunks/91718795fc4ca6516ac7.js +0 -1
- package/assets/esri/core/workers/chunks/9b80569819cd1c72a9ff.js +0 -1
- package/assets/esri/core/workers/chunks/a4a2e7bc3369434c5cfa.js +0 -1
- package/assets/esri/core/workers/chunks/b056b4c79bcd542dd1d2.js +0 -1
- package/assets/esri/core/workers/chunks/b553264db0f10bb8c5f7.js +0 -1
- package/assets/esri/core/workers/chunks/c4f64195e44986644993.js +0 -1
- package/assets/esri/core/workers/chunks/ca6012135929b028ea1b.js +0 -1
- package/assets/esri/core/workers/chunks/de79645e559a2d1ffa67.js +0 -1
- package/assets/esri/core/workers/chunks/df5788d42787ee8bf523.js +0 -1
- package/assets/esri/core/workers/chunks/f0e6a26a3625068b08ab.js +0 -1
- package/assets/esri/core/workers/chunks/f36a234ef35faf8ca04d.js +0 -1
- package/chunks/ajv.bundle.js +0 -2
- /package/assets/esri/core/workers/chunks/{848c6989a6a222c7a1d8.js.LICENSE.txt → 4b3545965b11a54184d4.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.46",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@amcharts/amcharts5": "~5.16.
|
|
22
|
-
"@arcgis/toolkit": "^5.1.0-next.
|
|
21
|
+
"@amcharts/amcharts5": "~5.16.2",
|
|
22
|
+
"@arcgis/toolkit": "^5.1.0-next.46",
|
|
23
23
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
24
24
|
"@esri/calcite-components": "^5.0.2",
|
|
25
25
|
"@vaadin/grid": "~25.0.8",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{property as s,subclass as r}from"../../core/accessorSupport/decorators.js";import n from"./VisualVariable.js";import{castSizeFromStringOrNumber as a}from"./support/castSizeVariable.js";import o from"./support/SizeStop.js";import l from"./support/SizeVariableLegendOptions.js";import{isSizeVariable as p,getInputValueType as u,getTransformationType as m}from"./support/sizeVariableUtils.js";import{viewScaleRE as h}from"./support/visualVariableUtils.js";import{addPropertyUnsupportedError as d,addUnsupportedMessage as y}from"../../webdoc/support/unsupportedErrors.js";import{reader as c}from"../../core/accessorSupport/decorators/reader.js";import{writer as S}from"../../core/accessorSupport/decorators/writer.js";var z;const x=new t({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),w=new t({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers"});function v(e){if(null!=e)return"string"==typeof e||"number"==typeof e?a(e):"size"===e.type?p(e)?e:(delete(e={...e}).type,new V(e)):void 0}function g(e,t,i){if("object"!=typeof e)return e;if("web-scene"===i.origin)return;const s=new V;return s.read(e,i),s}function f(e,t,i,s){"number"!=typeof e?"web-scene"!==s?.origin?t[i]=e.toJSON(s):y(s,"error","property",`Size variable '${i}' can only be a number in web scenes.`):t[i]=e}let V=z=class extends n{constructor(e){super(e),this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:null!=this.valueExpression&&h.test(this.valueExpression)}}set index(e){p(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),p(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return u(this)}set maxDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}get maxSize(){return this._get("maxSize")}set maxSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",v(e))}readMaxSize(e,t,i){return g(e,t,i)}writeMaxSize(e,t,i,s){return f(e,t,i,s)}set minDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}get minSize(){return this._get("minSize")}set minSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",v(e))}readMinSize(e,t,i){return g(e,t,i)}writeMinSize(e,t,i,s){return f(e,t,i,s)}get arcadeRequired(){return!!this.valueExpression||(null!=this.minSize&&"object"==typeof this.minSize&&this.minSize.arcadeRequired||null!=this.maxSize&&"object"==typeof this.maxSize&&this.maxSize.arcadeRequired)}set stops(e){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value):e&&(i.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return m(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,i,s){if(
|
|
2
|
+
import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{property as s,subclass as r}from"../../core/accessorSupport/decorators.js";import n from"./VisualVariable.js";import{castSizeFromStringOrNumber as a}from"./support/castSizeVariable.js";import o from"./support/SizeStop.js";import l from"./support/SizeVariableLegendOptions.js";import{isSizeVariable as p,getInputValueType as u,getTransformationType as m}from"./support/sizeVariableUtils.js";import{viewScaleRE as h}from"./support/visualVariableUtils.js";import{addPropertyUnsupportedError as d,addUnsupportedMessage as y}from"../../webdoc/support/unsupportedErrors.js";import{reader as c}from"../../core/accessorSupport/decorators/reader.js";import{writer as S}from"../../core/accessorSupport/decorators/writer.js";var z;const x=new t({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),w=new t({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers"});function v(e){if(null!=e)return"string"==typeof e||"number"==typeof e?a(e):"size"===e.type?p(e)?e:(delete(e={...e}).type,new V(e)):void 0}function g(e,t,i){if("object"!=typeof e)return e;if("web-scene"===i.origin)return;const s=new V;return s.read(e,i),s}function f(e,t,i,s){"number"!=typeof e?"web-scene"!==s?.origin?t[i]=e.toJSON(s):y(s,"error","property",`Size variable '${i}' can only be a number in web scenes.`):t[i]=e}let V=z=class extends n{constructor(e){super(e),this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:null!=this.valueExpression&&h.test(this.valueExpression)}}set index(e){p(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),p(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return u(this)}set maxDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}get maxSize(){return this._get("maxSize")}set maxSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",v(e))}readMaxSize(e,t,i){return g(e,t,i)}writeMaxSize(e,t,i,s){return f(e,t,i,s)}set minDataValue(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}get minSize(){return this._get("minSize")}set minSize(e){e&&this.stops&&(i.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",v(e))}readMinSize(e,t,i){return g(e,t,i)}writeMinSize(e,t,i,s){return f(e,t,i,s)}get arcadeRequired(){return!!this.valueExpression||(null!=this.minSize&&"object"==typeof this.minSize&&this.minSize.arcadeRequired||null!=this.maxSize&&"object"==typeof this.maxSize&&this.maxSize.arcadeRequired)}set stops(e){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value):e&&(i.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return m(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,i,s){if(h.test(e)){if(s?.messages){const e=this.index;d(s,`visualVariables[${"string"==typeof e?e:`visualVariables[${e}]`}].valueExpression`,"SizeVariable with '$view.scale' valueExpression is not supported in Web Scene. Please remove this property to save the Web Scene.")}}else t[i]=e}readValueUnit(e){return e?w.read(e):null}clone(){return new z({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:p(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:p(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops?.map(e=>e.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions?.clone()})}flipSizes(){if("clamped-linear"===this.transformationType){const{minSize:e,maxSize:t}=this;return this.minSize=t,this.maxSize=e,this}if("stops"===this.transformationType){const e=this.stops;if(!e)return this;const t=e.map(e=>e.size).reverse(),i=e.length;for(let s=0;s<i;s++)e[s].size=t[s];return this}return this}getAttributeHash(){return`${super.getAttributeHash()}-${this.target}-${this.normalizationField}`}_interpolateData(){return this.stops?.map(e=>e.value||0)}};e([s({readOnly:!0})],V.prototype,"cache",null),e([s({type:x.apiValues,json:{type:x.jsonValues,origins:{"web-map":{read:!1}},read:x.read,write:x.write}})],V.prototype,"axis",void 0),e([s()],V.prototype,"index",null),e([s({type:String,readOnly:!0})],V.prototype,"inputValueType",null),e([s({type:l,json:{write:!0}})],V.prototype,"legendOptions",void 0),e([s({type:Number,value:null,json:{write:!0}})],V.prototype,"maxDataValue",null),e([s({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],V.prototype,"maxSize",null),e([c("maxSize")],V.prototype,"readMaxSize",null),e([S("maxSize")],V.prototype,"writeMaxSize",null),e([s({type:Number,value:null,json:{write:!0}})],V.prototype,"minDataValue",null),e([s({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],V.prototype,"minSize",null),e([c("minSize")],V.prototype,"readMinSize",null),e([S("minSize")],V.prototype,"writeMinSize",null),e([s({type:String,json:{write:!0}})],V.prototype,"normalizationField",void 0),e([s({readOnly:!0})],V.prototype,"arcadeRequired",null),e([s({type:String})],V.prototype,"scaleBy",void 0),e([s({type:[o],value:null,json:{write:!0}})],V.prototype,"stops",null),e([s({type:["outline"],json:{write:!0}})],V.prototype,"target",void 0),e([s({type:String,readOnly:!0})],V.prototype,"transformationType",null),e([s({type:["size"],json:{type:["sizeInfo"]}})],V.prototype,"type",void 0),e([s({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],V.prototype,"useSymbolValue",void 0),e([s({type:String,json:{write:!0}})],V.prototype,"valueExpression",void 0),e([c("valueExpression",["valueExpression","expression"])],V.prototype,"readValueExpression",null),e([S("web-scene","valueExpression")],V.prototype,"writeValueExpressionWebScene",null),e([s({type:["radius","diameter","area","width","distance"],json:{write:!0}})],V.prototype,"valueRepresentation",void 0),e([s({type:w.apiValues,json:{write:w.write,origins:{"web-map":{read:!1},"web-scene":{write:!0},"portal-item":{write:!0}}}})],V.prototype,"valueUnit",void 0),e([c("valueUnit")],V.prototype,"readValueUnit",null),V=z=e([r("esri.renderers.visualVariables.SizeVariable")],V);export{V as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import o from"../../request.js";import r from"../../core/Error.js";import{parseUrl as e}from"../utils.js";import t from"../support/AddressCandidate.js";import a from"../support/LocationToAddressParameters.js";async function n(n,s,d){const u=e(n),{path:c,query:p}=u,l=a.from(s);if(!l.location)throw new r("location-to-address:location-required","The location parameter is required");const f={...d,query:{...p,...
|
|
2
|
+
import o from"../../request.js";import r from"../../core/Error.js";import{parseUrl as e}from"../utils.js";import t from"../support/AddressCandidate.js";import a from"../support/LocationToAddressParameters.js";async function n(n,s,d){const u=e(n),{path:c,query:p}=u,l=a.from(s);if(!l.location)throw new r("location-to-address:location-required","The location parameter is required");const f=i(l),m={...d,query:{...p,...f,f:"json",...d?.query}},y=`${c}/reverseGeocode`,{data:j}=await o(y,m),{address:S,location:q}=j;return t.fromJSON({address:S?.Match_addr??"",attributes:S,location:q,score:100})}function i(o){const r=o.toJSON(),{featureTypes:e,forStorage:t,langCode:a,location:n,locationType:i,outFields:s,outSR:d,preferredLabelValues:u,returnInputLocation:c,token:p}=r;return{featureTypes:e?.join(","),forStorage:t,langCode:a,location:JSON.stringify(n),locationType:i,outFields:s?.join(","),outSR:d?.wkid??void 0,preferredLabelValues:u,returnInputLocation:c,token:p}}export{n as locationToAddress};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import r from"../../../core/Logger.js";function t(r){return class{constructor(){for(const t of r)this[t]=null}}}function e(r,t=1){const{transform:e,hasZ:o,hasM:s}=r;if(null==e)return o&&1!==t?r=>{r[2]*=t}:null;const[i,u]=n(e,o,s,t),
|
|
2
|
+
import r from"../../../core/Logger.js";function t(r){return class{constructor(){for(const t of r)this[t]=null}}}function e(r,t=1){const{transform:e,hasZ:o,hasM:s}=r;if(null==e)return o&&1!==t?r=>{r[2]*=t}:null;const[i,u]=n(e,o,s,t),a=r.hasZ?3:2;return r=>{for(let t=0;t<r.length&&(t!==a||0!==r[t]);++t)r[t]=r[t]*i[t]+u[t]}}function n(r,t,e,n){let{scale:o,translate:s,originPosition:i}=r;return"upperLeft"===i&&(o=o.map((r,t)=>1===t?-r:r)),t&&(o=o.map((r,t)=>2===t?r*n:r),s=s.map((r,t)=>2===t?r*n:r)),!t&&e&&(o=o.filter((r,t)=>2!==t),s=s.filter((r,t)=>2!==t)),[o,s]}function o(){return r.getLogger("esri.rest.query.operations.pbfFeatureServiceParser")}export{o as getLogger,t as makeAttributesClass,e as makeVertexTransformer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{allocateFlatGeometry as t,writeBezierCurveSegment as e,writeCircularArcSegment as s,writeEllipticArc7Segment as r}from"../../../geometry/FlatGeometry.js";import{featureGeometryTypeKebabDictionary as i}from"../../../geometry/support/typeUtils.js";import{zScale as h}from"../../../geometry/support/zscale.js";import{FlatFeature as o}from"../../../layers/graphics/FlatFeature.js";import{FlatFeatureSet as a}from"../../../layers/graphics/FlatFeatureSet.js";import _ from"../../../layers/graphics/OptimizedGeometry.js";import{createFeatureId as n}from"../../../layers/graphics/data/createFeatureId.js";import{makeAttributesClass as f,makeVertexTransformer as m}from"./pbfFeatureSetUtils.js";class u{constructor(t){this._options=t,this.featureSet=new a,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=u._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t?this._idInfo??={type:"object-id",fieldName:t}:this._idInfo={type:"unique-id-simple",fieldName:t.name}}finish(){if(this._idInfo)for(const s of this.featureSet.features)s.objectId=n(s,this._idInfo);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:s}of e)s&&(s.spatialReference=t);this.featureSet.transform=null}feature(){this._attributesClass??=f(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push(new o(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(t){const{hasZ:e,hasM:s}=this.featureSet;this.featureSet.features.at(-1).centroid=new _([],t,e,s)}geometry(e,s,r){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:h,hasM:o}=this.featureSet;h??=!1,o??=!1,this._vertex=[0,0],h&&this._vertex.push(0),o&&this._vertex.push(0);const a=i.fromJSON(s);this._isPolygon="polygon"===a;const _=Number(this._isPolygon),n="point"===a?1:r.reduce((t,e)=>t+e-_,0),f=r.length;if(this._geometry=t(a,n,f,h,o,!1),this._push=h?o?u._pushXYZM:u._pushXYZ:o?u._pushXYM:u._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let t=0;t<f;++t)this._geometry.partOffsets[t+1]=this._geometry.partOffsets[t]+r[t]-_}this._ringEndsAt=_?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=s):this.featureSet.features.at(-1).geometry=this._geometry}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(e),this._push(this)))}curvedGeometry(e,s,r,h){let{hasZ:o,hasM:a}=this.featureSet;o??=!1,a??=!1,this._i=this._iVertex=this._iPart=0;const _=i.fromJSON(e);this._isPolygon="polygon"===_;const n=Number(!this._isPolygon),f=s.length;let m=0,u=0,
|
|
2
|
+
import{allocateFlatGeometry as t,writeBezierCurveSegment as e,writeCircularArcSegment as s,writeEllipticArc7Segment as r}from"../../../geometry/FlatGeometry.js";import{featureGeometryTypeKebabDictionary as i}from"../../../geometry/support/typeUtils.js";import{zScale as h}from"../../../geometry/support/zscale.js";import{FlatFeature as o}from"../../../layers/graphics/FlatFeature.js";import{FlatFeatureSet as a}from"../../../layers/graphics/FlatFeatureSet.js";import _ from"../../../layers/graphics/OptimizedGeometry.js";import{createFeatureId as n}from"../../../layers/graphics/data/createFeatureId.js";import{makeAttributesClass as f,makeVertexTransformer as m}from"./pbfFeatureSetUtils.js";class u{constructor(t){this._options=t,this.featureSet=new a,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=u._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t?this._idInfo??={type:"object-id",fieldName:t}:this._idInfo={type:"unique-id-simple",fieldName:t.name}}finish(){if(this._idInfo)for(const s of this.featureSet.features)s.objectId=n(s,this._idInfo);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:s}of e)s&&(s.spatialReference=t);this.featureSet.transform=null}feature(){this._attributesClass??=f(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push(new o(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(t){const{hasZ:e,hasM:s}=this.featureSet;this.featureSet.features.at(-1).centroid=new _([],t,e,s)}geometry(e,s,r){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:h,hasM:o}=this.featureSet;h??=!1,o??=!1,this._vertex=[0,0],h&&this._vertex.push(0),o&&this._vertex.push(0);const a=i.fromJSON(s);this._isPolygon="polygon"===a;const _=Number(this._isPolygon),n="point"===a?1:r.reduce((t,e)=>t+e-_,0),f="point"===a?0:r.length;if(this._geometry=t(a,n,f,h,o,!1),this._push=h?o?u._pushXYZM:u._pushXYZ:o?u._pushXYM:u._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let t=0;t<f;++t)this._geometry.partOffsets[t+1]=this._geometry.partOffsets[t]+r[t]-_}this._ringEndsAt=_?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=s):this.featureSet.features.at(-1).geometry=this._geometry}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(e),this._push(this)))}curvedGeometry(e,s,r,h){let{hasZ:o,hasM:a}=this.featureSet;o??=!1,a??=!1,this._i=this._iVertex=this._iPart=0;const _=i.fromJSON(e);this._isPolygon="polygon"===_;const n=Number(!this._isPolygon),f=s.length;let m=0,u=0,p=n*f;for(let t=0;t<r.length;++t)switch(p+=h[t],r[t]){case 1:case 3:m+=h[t];continue;case 2:u+=h[t]}this._geometry=t(_,p,f,o,a,!0,m,u);const{partOffsets:l}=this._geometry;l[0]=0;for(let t=0,i=0;t<f;++t){l[t+1]=l[t]+n;for(let e=0;e<s[t];++e)l[t+1]+=h[i++]}switch(e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`)}this.featureSet.features.at(-1).geometry=this._geometry}startCurvedPart(t){}finishCurvedPart(t){this._isPolygon||(this._transform(t,this._vertex),this._push(this)),++this._iPart}lineSegment(t,e){this._transform(t,this._vertex),this._push(this)}bezierSegment(t,s,r,i){this._transform(t,this._vertex),this._push(this),this._transformXY(s,y.b[0]),this._transformXY(r,y.b[1]),this._transformXY(i,y.b[2]),this._i=e(this._vertex,y,this._geometry,this._iVertex-1,this._i)}circularArcSegment(t,e,r){this._transform(t,this._vertex),this._push(this),this._transformXY(e,p.c[0]),this._transformXY(r,p.c[1]),this._i=s(this._vertex,p,this._geometry,this._iVertex-1,this._i)}ellipticArcSegment(t,e,s,i,h,o,a,_){this._transform(t,this._vertex),this._push(this),this._transformXY(e,l.a[0]),this._transformXY(s,l.a[1]),l.a[2]=i,l.a[3]=h,l.a[4]=o,l.a[5]=a,l.a[6]=_,this._i=r(this._vertex,l,this._geometry,this._iVertex-1,this._i)}static _pushXY(t){const e=t._iVertex++,{vertexXY:s}=t._geometry;[s[2*e],s[2*e+1]]=t._vertex}static _pushXYZ(t){const e=t._iVertex++,{vertexXY:s,vertexZ:r}=t._geometry;[s[2*e],s[2*e+1],r[e]]=t._vertex}static _pushXYM(t){const e=t._iVertex++,{vertexXY:s,vertexM:r}=t._geometry;[s[2*e],s[2*e+1],r[e]]=t._vertex}static _pushXYZM(t){const e=t._iVertex++,{vertexXY:s,vertexM:r,vertexZ:i}=t._geometry;[s[2*e],s[2*e+1],i[e],r[e]]=t._vertex}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:s,transform:r}=this.featureSet,i=s?h(t,e):1;this._transformInPlace??=m(this.featureSet,i),this._transformInPlaceXY??=m({transform:r})}_transform(t,e){for(let s=0;s<t.length;++s)e[s]=t[s];this._transformInPlace?.(e)}_transformXY(t,e){e[0]=t[0],e[1]=t[1],this._transformInPlaceXY?.(e)}}const p={c:[[0,0],[0,0]]},l={a:[[0,0],[0,0],0,0,0,0,0]},y={b:[[0,0],[0,0],[0,0]]};export{u as FlatFeatureSetParserContext};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{zScale as e}from"../../../geometry/support/zscale.js";import{OptimizedFeature as t}from"../../../layers/graphics/OptimizedFeature.js";import r from"../../../layers/graphics/OptimizedFeatureSet.js";import s from"../../../layers/graphics/OptimizedGeometry.js";import{createFeatureId as i}from"../../../layers/graphics/data/createFeatureId.js";class o{constructor(e){this._options=e,this.featureSet=new r,this.parseOnly=null,this._idInfo=null,this._coords=null}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e?this._idInfo??={type:"object-id",fieldName:e}:this._idInfo={type:"unique-id-simple",fieldName:e.name}}finish(){if(this._idInfo)for(const e of this.featureSet.features)e.objectId=i(e,this._idInfo);const{hasZ:t,hasM:r,spatialReference:s}=this.featureSet,{sourceSpatialReference:o}=this._options,a=t?e(o,s):1;if(1!==a){const e=2+Number(t)+Number(r);for(let t=2;t<this._coords.length;t+=e)this._coords[t]*=a}}feature(){this.featureSet.features.push(new t(null,{},null,0))}centroid(e){const{hasZ:t,hasM:r}=this.featureSet;this.featureSet.features.at(-1).centroid=new s([],e,t,r)}geometry(e,t,r){this._coords=[];const{hasZ:i,hasM:o}=this.featureSet
|
|
2
|
+
import{zScale as e}from"../../../geometry/support/zscale.js";import{OptimizedFeature as t}from"../../../layers/graphics/OptimizedFeature.js";import r from"../../../layers/graphics/OptimizedFeatureSet.js";import s from"../../../layers/graphics/OptimizedGeometry.js";import{createFeatureId as i}from"../../../layers/graphics/data/createFeatureId.js";class o{constructor(e){this._options=e,this.featureSet=new r,this.parseOnly=null,this._idInfo=null,this._coords=null}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e?this._idInfo??={type:"object-id",fieldName:e}:this._idInfo={type:"unique-id-simple",fieldName:e.name}}finish(){if(this._idInfo)for(const e of this.featureSet.features)e.objectId=i(e,this._idInfo);const{hasZ:t,hasM:r,spatialReference:s}=this.featureSet,{sourceSpatialReference:o}=this._options,a=t?e(o,s):1;if(1!==a){const e=2+Number(t)+Number(r);for(let t=2;t<this._coords.length;t+=e)this._coords[t]*=a}}feature(){this.featureSet.features.push(new t(null,{},null,0))}centroid(e){const{hasZ:t,hasM:r}=this.featureSet;this.featureSet.features.at(-1).centroid=new s([],e,t,r)}geometry(e,t,r){this._coords=[];const{hasZ:i,hasM:o}=this.featureSet;"esriGeometryPoint"===t&&(r=[]);const a=new s(r,this._coords,i,o);if(1===e?(this.featureSet.queryGeometry=a,this.featureSet.queryGeometryType=t):this.featureSet.features.at(-1).geometry=a,"esriGeometryPoint"!==t)return 0}coord(e){this._coords?.push(e)}}export{o as OptimizedFeatureSetParserContext};
|
|
@@ -2,11 +2,12 @@ import type Point from "../../geometry/Point.js";
|
|
|
2
2
|
import type SpatialReference from "../../geometry/SpatialReference.js";
|
|
3
3
|
import type { JSONSupport } from "../../core/JSONSupport.js";
|
|
4
4
|
import type { LocationType } from "../types.js";
|
|
5
|
+
import type { GeocodeFeatureType, GeocodePreferredLabel } from "./types.js";
|
|
5
6
|
import type { PointProperties } from "../../geometry/Point.js";
|
|
6
7
|
import type { SpatialReferenceProperties } from "../../geometry/SpatialReference.js";
|
|
7
8
|
|
|
8
9
|
/** @since 5.0 */
|
|
9
|
-
export interface LocationToAddressParametersProperties extends Partial<Pick<LocationToAddressParameters, "locationType">> {
|
|
10
|
+
export interface LocationToAddressParametersProperties extends Partial<Pick<LocationToAddressParameters, "apiKey" | "featureTypes" | "language" | "locationType" | "preferredLabelValues" | "returnInputLocation">> {
|
|
10
11
|
/**
|
|
11
12
|
* The point at which to search for the closest address. The location
|
|
12
13
|
* should be in the same spatial reference as that of the geocode service.
|
|
@@ -26,9 +27,44 @@ export interface LocationToAddressParametersProperties extends Partial<Pick<Loca
|
|
|
26
27
|
outSpatialReference?: SpatialReferenceProperties | null;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Input parameters for [locationToAddress()](https://developers.arcgis.com/javascript/latest/references/core/rest/locator/#locationToAddress).
|
|
32
|
+
*
|
|
33
|
+
* @since 5.0
|
|
34
|
+
* @module esri/rest/support/LocationToAddressParameters
|
|
35
|
+
* @see module:esri/rest/locator
|
|
36
|
+
*/
|
|
30
37
|
export default class LocationToAddressParameters extends JSONSupport {
|
|
31
38
|
constructor(properties?: LocationToAddressParametersProperties);
|
|
39
|
+
/**
|
|
40
|
+
* An authorization string used to access a resource or service.
|
|
41
|
+
* [API keys](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/) are generated and managed in the portal.
|
|
42
|
+
* An API key is tied explicitly to an ArcGIS account; it is also used to monitor service usage.
|
|
43
|
+
* Setting a fine-grained API key on a specific class overrides the [global API key](esri-config.html#apiKey).
|
|
44
|
+
*
|
|
45
|
+
* @since 5.1
|
|
46
|
+
* @see [API keys](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/)
|
|
47
|
+
* @see [Display a map tutorial - get an access token](https://developers.arcgis.com/javascript/latest/display-a-map/#get-an-access-token)
|
|
48
|
+
* @see [ArcGIS REST APIs | reverseGeocode | token](https://developers.arcgis.com/rest/geocode/reverse-geocode/#token)
|
|
49
|
+
*/
|
|
50
|
+
accessor apiKey: string | null | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The property limits the possible match types returned by the reverseGeocode operation.
|
|
53
|
+
*
|
|
54
|
+
* @since 5.1
|
|
55
|
+
* @see [ArcGIS REST APIs | reverseGeocode | featureTypes](https://developers.arcgis.com/rest/geocode/reverse-geocode/#featuretypes)
|
|
56
|
+
*/
|
|
57
|
+
accessor featureTypes: GeocodeFeatureType[] | null | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* This property sets the language in which reverse-geocoded addresses are returned. Addresses in many countries are
|
|
60
|
+
* available in more than one language; in these cases, this property can be used to specify which language should be
|
|
61
|
+
* used for addresses returned by the reverseGeocode operation.
|
|
62
|
+
*
|
|
63
|
+
* @since 5.1
|
|
64
|
+
* @see [ArcGIS REST APIs | reverseGeocode | langCode](https://developers.arcgis.com/rest/geocode/reverse-geocode/#langcode)
|
|
65
|
+
* @see [ArcGIS REST APIs | reverseGeocode | Supported language codes](https://developers.arcgis.com/rest/geocode/geocode-coverage/#supported-language-codes)
|
|
66
|
+
*/
|
|
67
|
+
accessor language: string | null | undefined;
|
|
32
68
|
/**
|
|
33
69
|
* The point at which to search for the closest address. The location
|
|
34
70
|
* should be in the same spatial reference as that of the geocode service.
|
|
@@ -57,4 +93,28 @@ export default class LocationToAddressParameters extends JSONSupport {
|
|
|
57
93
|
*/
|
|
58
94
|
get outSpatialReference(): SpatialReference | null;
|
|
59
95
|
set outSpatialReference(value: SpatialReferenceProperties | null);
|
|
96
|
+
/**
|
|
97
|
+
* Defines how city names are resolved when ambiguity exists.
|
|
98
|
+
*
|
|
99
|
+
* Possible Value | Description
|
|
100
|
+
* ------------------------|------------------------
|
|
101
|
+
* local-city | Include the primary local city name in geocoding response output fields. This is the name of the city that the address is within, and may be different than the postal city.
|
|
102
|
+
* postal-city | Include the primary postal city value in geocoding response output fields. This is the primary name assigned to the postal code of the address.
|
|
103
|
+
*
|
|
104
|
+
* @since 5.1
|
|
105
|
+
* @see [ArcGIS REST APIs | reverseGeocode | preferredLabelValues](https://developers.arcgis.com/rest/geocode/reverse-geocode/#preferredlabelvalues)
|
|
106
|
+
*/
|
|
107
|
+
preferredLabelValues?: GeocodePreferredLabel | null;
|
|
108
|
+
/**
|
|
109
|
+
* Specifies what the type of the location returned.
|
|
110
|
+
*
|
|
111
|
+
* Possible Value | Description
|
|
112
|
+
* ------------------------|------------------------
|
|
113
|
+
* false | The response will include the reverse geocoded location. This is the default.
|
|
114
|
+
* true | The response will include the input location.
|
|
115
|
+
*
|
|
116
|
+
* @since 5.1
|
|
117
|
+
* @see [ArcGIS REST APIs | reverseGeocode | returnInputLocation](https://developers.arcgis.com/rest/geocode/reverse-geocode/#returninputlocation)
|
|
118
|
+
*/
|
|
119
|
+
accessor returnInputLocation: boolean | null | undefined;
|
|
60
120
|
}
|
package/rest/support/types.d.ts
CHANGED
|
@@ -129,6 +129,12 @@ export type JobStatus = "job-cancelled" | "job-cancelling" | "job-deleted" | "jo
|
|
|
129
129
|
/** @since 5.0 */
|
|
130
130
|
export type NetworkDate = Date | "now";
|
|
131
131
|
|
|
132
|
+
/** @since 5.1 */
|
|
133
|
+
export type GeocodeFeatureType = "distance-marker" | "locality" | "poi" | "point-address" | "postal" | "street-address" | "street-intersection" | "street-name" | "sub-address";
|
|
134
|
+
|
|
135
|
+
/** @since 5.1 */
|
|
136
|
+
export type GeocodePreferredLabel = "local-city" | "postal-city";
|
|
137
|
+
|
|
132
138
|
/** @since 5.0 */
|
|
133
139
|
export type PrintReportTemplate = "attribute-list-letter-ansi-a-landscape" | "attribute-list-letter-ansi-a-portrait" | "attribute-list-with-group-letter-ansi-a-landscape" | "attribute-list-with-group-letter-ansi-a-portrait" | "page-per-feature-letter-ansi-a-landscape" | "page-per-feature-letter-ansi-a-portrait";
|
|
134
140
|
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const c="20260319",f="4d1cac45dc930071b24203195aef607c7cf99c5f";export{c as buildDate,f as commitHash};
|
package/third-party-notices.txt
CHANGED
|
@@ -1091,7 +1091,7 @@ IN THE SOFTWARE.
|
|
|
1091
1091
|
|
|
1092
1092
|
--------------------------------------------------------------------------------
|
|
1093
1093
|
|
|
1094
|
-
esri/layers/rasterFormats/Jpg.
|
|
1094
|
+
esri/layers/rasterFormats/Jpg.mjs
|
|
1095
1095
|
|
|
1096
1096
|
Extracted from pdf.js project.
|
|
1097
1097
|
pdf.js: A general-purpose, web standards-based platform for parsing and rendering PDFs.
|
|
@@ -1254,7 +1254,7 @@ You may obtain a copy of the License at
|
|
|
1254
1254
|
|
|
1255
1255
|
-------------------------------------------------------------------------------
|
|
1256
1256
|
|
|
1257
|
-
esri/layers/rasterFormats/Zlib.
|
|
1257
|
+
esri/layers/rasterFormats/Zlib.mjs
|
|
1258
1258
|
|
|
1259
1259
|
Extracted from png.js project
|
|
1260
1260
|
png.js: A (animated) PNG decoder in JavaScript for the HTML5 canvas element and Node.js.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{multiplyOpacity as i}from"../../../../core/colorUtils.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import{isAborted as a,ignoreAbortErrors as r}from"../../../../core/promiseUtils.js";import{watch as o,initial as n}from"../../../../core/reactiveUtils.js";import{property as l,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{multiplyOpacity as i}from"../../../../core/colorUtils.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import{isAborted as a,ignoreAbortErrors as r}from"../../../../core/promiseUtils.js";import{watch as o,initial as n}from"../../../../core/reactiveUtils.js";import{property as l,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as c}from"../../../../core/support/UpdatingHandles.js";import p from"../../../../symbols/SimpleFillSymbol.js";import m from"../../../../symbols/SimpleLineSymbol.js";import{ExclusiveOperationManager as d}from"../../../analysis/ExclusiveOperationManager.js";import u from"../../../../widgets/Sketch/SketchViewModel.js";function y(e){return"polygon"===e?.type}let w=class extends t{constructor(e){super(e),this._invisibleAreaSymbol=new p({color:null,outline:null}),this._operationManager=new d,this._updatingHandles=new c}initialize(){this._sketchViewModel=new u({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._analysis.geometry?"place"!==this._operationManager.currentOperationType&&this.reshape():this._operationManager.stop()}),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)},n),o(()=>this.view.effectiveTheme.accentColor,e=>{this._areaSymbol=new p({color:i(e,.3),outline:new m({color:e,width:2})})},n)])}destroy(){this._areaSymbol?.destroy(),this._invisibleAreaSymbol.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(!this._sketchViewModel||!this.measurementViewData.sketchGraphicsLayer)return;const i=this._analysis.clone(),o=e=>{const i="state"in e?e.state:"active",s="graphic"in e?e.graphic:e.graphics?.at(0);switch(i){case"start":case"active":{const e=s?.geometry;"polygon"===e?.type&&(this._analysis.geometry=e);break}case"cancel":case"complete":t.stop(),this.reshape()}},n=this._sketchViewModel.on(["create","undo","redo"],o);t.handles.push(n,s(()=>{n.remove(),this._sketchViewModel?.cancel(),this.measurementViewData.sketchGraphicsLayer?.removeAll();const s=this._analysis;return s.valid?a(e)||i.equals(s)?t.reject():void t.resolve({}):(s.clear(),t.reject())})),this._sketchViewModel.polygonSymbol=this._invisibleAreaSymbol,this._sketchViewModel.layer=this.measurementViewData.sketchGraphicsLayer,this._updatingHandles.consumePromise(r(this._sketchViewModel.create("polygon")))},e)}async reshape(e){return this._operationManager.start("reshape",async t=>{if(!this._sketchViewModel)return;const i=()=>this._areaSymbol&&this._sketchViewModel&&this.measurementViewData.manipulatorGraphic&&this.measurementViewData.manipulatorGraphicsLayer?(this._sketchViewModel.polygonSymbol=this._areaSymbol,this._sketchViewModel.layer=this.measurementViewData.manipulatorGraphicsLayer,this._updatingHandles.addPromise(r(this._sketchViewModel.update(this.measurementViewData.manipulatorGraphic,{tool:"reshape"})))):Promise.resolve(),o=this._sketchViewModel.on("update",e=>{const s=e.graphics[0]?.geometry;this._analysis.geometry=y(s)?s:null,"complete"===e.state&&(this.measurementViewData.interactive?i():t.stop())});t.handles.push(o,s(()=>{if(o.remove(),this._sketchViewModel?.cancel(),a(e))return t.reject();t.resolve()})),await i()},e)}get _analysis(){return this.measurementViewData.analysis}};e([l()],w.prototype,"_sketchViewModel",void 0),e([l()],w.prototype,"measurementViewData",void 0),e([l()],w.prototype,"state",null),e([l()],w.prototype,"updating",null),e([l()],w.prototype,"view",void 0),w=e([h("esri.views.2d.analysis.AreaMeasurement.AreaMeasurementTool")],w);export{w as AreaMeasurementTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{EventEmitter as e}from"../../../core/Evented.js";import{on as t}from"../../../core/events.js";import{handlesGroup as a}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{identity as r,scale as n,rotate as i,translate as o}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";class c{constructor(s,r={}){this.events=new e,this._hasMajorPerformanceCaveat=!1,this._lastRenderFrameCounter=0,null!=s?(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("style","width: 100%; height:100%; display:block; willChange:transform"),s.contains(this._canvas)||s.appendChild(this._canvas)):null!=r.canvas&&(this._canvas=r.canvas);const n={failIfMajorPerformanceCaveat:!0,alpha:!0,antialias:!1,depth:!0,stencil:!0,powerPreference:"high-performance"};let i=this._canvas.getContext("webgl2",n);i||(i=this._canvas.getContext("webgl2",{...n,failIfMajorPerformanceCaveat:!1}),this._hasMajorPerformanceCaveat=!0),this._gl=i,this._handles=a([t(this._canvas,"webglcontextlost",e=>this.events.emit("webgl-context-lost",e))])}destroy(){this._canvas.remove(),this._canvas=null,this._handles.remove(),this._gl=null}get gl(){return this._gl}get canvas(){return this._canvas}render(e,t){if(this._hasMajorPerformanceCaveat||has("esri-force-performance-mode")){if(++this._lastRenderFrameCounter>=has("esri-performance-mode-frames-between-render")&&(t(),this._lastRenderViewState=e.state.clone(),this._lastRenderFrameCounter=0),this._lastRenderViewState){const[t,a,s,r,n,i]=this._computeViewTransform(this._lastRenderViewState,e.state);this._canvas.style.transform=`matrix(${t}, ${a}, ${s}, ${r}, ${n}, ${i})`}}else t()}resize(e){const t=this._canvas,a=t.style,{state:{size:s},pixelRatio:r}=e,n=s[0],i=s[1],o=Math.round(n*r),h=Math.round(i*r);t.width===o&&t.height===h||(t.width=o,t.height=h),a.width=n+"px",a.height=i+"px"}_computeViewTransform(e,t){const[a,c]=e.center,[l,m]=t.center,[f
|
|
2
|
+
import{EventEmitter as e}from"../../../core/Evented.js";import{on as t}from"../../../core/events.js";import{handlesGroup as a}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{identity as r,scale as n,rotate as i,translate as o}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";class c{constructor(s,r={}){this.events=new e,this._hasMajorPerformanceCaveat=!1,this._lastRenderFrameCounter=0,null!=s?(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("style","width: 100%; height:100%; display:block; willChange:transform"),s.contains(this._canvas)||s.appendChild(this._canvas)):null!=r.canvas&&(this._canvas=r.canvas);const n={failIfMajorPerformanceCaveat:!0,alpha:!0,antialias:!1,depth:!0,stencil:!0,powerPreference:"high-performance"};let i=this._canvas.getContext("webgl2",n);i||(i=this._canvas.getContext("webgl2",{...n,failIfMajorPerformanceCaveat:!1}),this._hasMajorPerformanceCaveat=!0,has.add("mapview-transitions-duration",0,!0,!0)),this._gl=i,this._handles=a([t(this._canvas,"webglcontextlost",e=>this.events.emit("webgl-context-lost",e))])}destroy(){this._canvas.remove(),this._canvas=null,this._handles.remove(),this._gl=null}get gl(){return this._gl}get canvas(){return this._canvas}render(e,t){if(this._hasMajorPerformanceCaveat||has("esri-force-performance-mode")){if(++this._lastRenderFrameCounter>=has("esri-performance-mode-frames-between-render")&&(t(),this._lastRenderViewState=e.state.clone(),this._lastRenderFrameCounter=0),this._lastRenderViewState){const[t,a,s,r,n,i]=this._computeViewTransform(this._lastRenderViewState,e.state);this._canvas.style.transform=`matrix(${t}, ${a}, ${s}, ${r}, ${n}, ${i})`}}else t()}resize(e){const t=this._canvas,a=t.style,{state:{size:s},pixelRatio:r}=e,n=s[0],i=s[1],o=Math.round(n*r),h=Math.round(i*r);t.width===o&&t.height===h||(t.width=o,t.height=h),a.width=n+"px",a.height=i+"px"}_computeViewTransform(e,t){const[a,c]=e.center,[l,m]=t.center,[d,f]=e.toScreen([0,0],l,m),[v,_]=e.toScreen([0,0],a,c),p=v-d,g=_-f,u=e.scale/t.scale,w=t.rotation-e.rotation,j=h();return r(j),n(j,j,[u,u]),i(j,j,s(w)),o(j,j,[p,g]),j}}export{c as ManagedCanvas};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{Point as e}from"../../../../geometry/support/TileClipper.js";import{tilePixelRatio as t}from"./constants.js";import{cDegToRad as i,cPi as n,cInfinity as s,positiveMod as
|
|
2
|
+
import{Point as e}from"../../../../geometry/support/TileClipper.js";import{tilePixelRatio as t}from"./constants.js";import{cDegToRad as i,cPi as n,cInfinity as s,positiveMod as o,radToByte as a,c2pi as h}from"./GeometryUtils.js";import{TextShaping as l,sdfGlyphSize as r,sdfGlyphBaseline as c}from"./TextShaping.js";import{sdfBufferServer as g}from"../webgl/definitions.js";const m=.5,x=2;class d{constructor(e,t,i=0,n=-1,s=m){this.x=e,this.y=t,this.angle=i,this.segment=n,this.minzoom=s}}class p{constructor(e,t,i,n,o,a=m,h=s){this.anchor=e,this.labelAngle=t,this.glyphAngle=i,this.page=n,this.alternateVerticalGlyph=o,this.minzoom=a,this.maxzoom=h}}class w{constructor(e,t,i,n,s,o,a,h,l,r,c,g){this.tl=e,this.tr=t,this.bl=i,this.br=n,this.mosaicRect=s,this.labelAngle=o,this.minAngle=a,this.maxAngle=h,this.anchor=l,this.minzoom=r,this.maxzoom=c,this.page=g}}class y{constructor(e){this.shapes=e}}class f{getIconPlacement(t,s,o){const a=new e(t.x,t.y),h=0===o.rotationAlignment,l=o.keepUpright;let r=o.rotate*i;h&&(r+=t.angle);const c=new y([]);return c.iconColliders=[],this._addIconPlacement(c,a,s,o,r),h&&l&&this._addIconPlacement(c,a,s,o,r+n),c}_addIconPlacement(t,i,n,o,a){const h=n.rasterizationScale,l=n.width/h,r=n.height/h,c=o.offset;let g=c[0],x=c[1];switch(o.anchor){case 0:g-=l/2,x-=r/2;break;case 1:x-=r/2;break;case 2:g-=l,x-=r/2;break;case 3:g-=l/2;break;case 4:g-=l/2,x-=r;break;case 5:break;case 7:x-=r;break;case 6:g-=l;break;case 8:g-=l,x-=r}const d=n.rect,p=2/h,y=g-p,f=x-p,b=y+d.width/h,u=f+d.height/h,I=new e(y,f),T=new e(b,u),k=new e(y,u),P=new e(b,f);if(0!==a){const e=Math.cos(a),t=Math.sin(a);I.rotate(e,t),T.rotate(e,t),k.rotate(e,t),P.rotate(e,t)}const N=new w(I,P,k,T,d,a,0,256,i,m,s,0);t.shapes.push(N);{const e=o.size,n=o.padding,h={xTile:i.x,yTile:i.y,dxPixels:g*e-n,dyPixels:x*e-n,hard:!o.optional,partIndex:0,width:l*e+2*n,height:r*e+2*n,angle:a,minLod:m,maxLod:s};t.iconColliders.push(h)}}getTextPlacement(o,a,h,d){const f=new e(o.x,o.y),{keepUpright:b,rotate:u,rotationAlignment:I,size:T}=d,k=u*i,P=0===I,N=b,z=d.padding;let A=m;const _=!P?0:o.angle,G=o.segment>=0&&P,M=[],E=[],L=g,V=!G;let v=Number.POSITIVE_INFINITY,j=Number.NEGATIVE_INFINITY,C=v,F=j;const S=(G||P)&&N,Y=T/r;let q=!1;for(const e of a)if(e.vertical){q=!0;break}let U,O=0,B=0;if(!G&&q){const e=l.getTextBox(a,d.lineHeight*r);switch(d.anchor){case 1:O=e.height/2,B=-e.width/2;break;case 2:O=-e.height/2,B=e.width/2;break;case 3:O=e.height/2,B=e.width/2;break;case 4:O=-e.height/2,B=-e.width/2;break;case 5:O=e.height;break;case 7:B=-e.width;break;case 6:B=e.width;break;case 8:O=-e.height}}O+=d.offset[0]*r,B+=d.offset[1]*r;for(const i of a){const a=i.glyphMosaicItem;if(!a||a.rect.isEmpty)continue;const l=a.rect,r=a.metrics,g=a.page;if(M&&V){if(void 0!==U&&U!==i.y){let e,t,i,n;q?(e=-F+O,t=v+B,i=F-C,n=j-v):(e=v+O,t=C+B,i=j-v,n=F-C);const a={xTile:o.x,yTile:o.y,dxPixels:e*Y-z,dyPixels:t*Y-z,hard:!d.optional,partIndex:1,width:i*Y+2*z,height:n*Y+2*z,angle:k,minLod:m,maxLod:s};M.push(a),v=Number.POSITIVE_INFINITY,j=Number.NEGATIVE_INFINITY,C=v,F=j}U=i.y}const y=[];if(G){const e=.5*a.metrics.width,n=(i.x+r.left-L+e)*Y*t;if(A=this._placeGlyph(o,A,n,h,o.segment,1,i.vertical,g,y),N&&(A=this._placeGlyph(o,A,n,h,o.segment,-1,i.vertical,g,y)),A>=x)break}else y.push(new p(f,_,_,g,!1)),P&&N&&y.push(new p(f,_+n,_+n,g,!1));const b=i.x+r.left,u=i.y-c-r.top,I=b+r.width,T=u+r.height;let H,R,D,J,K,Q,W,X;if(!G&&q)if(i.vertical){const t=(b+I)/2-r.height/2,i=(u+T)/2+r.width/2;H=new e(-i-L+O,t-L+B),R=new e(H.x+l.width,H.y+l.height),D=new e(H.x,R.y),J=new e(R.x,H.y)}else H=new e(-u+L+O,b-L+B),R=new e(H.x-l.height,H.y+l.width),D=new e(R.x,H.y),J=new e(H.x,R.y);else H=new e(b-L+O,u-L+B),R=new e(H.x+l.width,H.y+l.height),D=new e(H.x,R.y),J=new e(R.x,H.y);for(const t of y){let n,s,a,h;if(t.alternateVerticalGlyph){if(!K){const t=(u+T)/2+B;K=new e((b+I)/2+O-r.height/2-L,t+r.width/2+L),Q=new e(K.x+l.height,K.y-l.width),W=new e(Q.x,K.y),X=new e(K.x,Q.y)}n=K,s=W,a=X,h=Q}else n=H,s=D,a=J,h=R;const c=u,g=T,m=t.glyphAngle+k;if(0!==m){const e=Math.cos(m),t=Math.sin(m);n=n.clone(),s=s?.clone(),a=a?.clone(),h=h?.clone(),n.rotate(e,t),h?.rotate(e,t),s?.rotate(e,t),a?.rotate(e,t)}let p=0,y=256;if(G&&q?i.vertical?t.alternateVerticalGlyph?(p=32,y=96):(p=224,y=32):(p=224,y=96):(p=192,y=64),E.push(new w(n,a,s,h,l,t.labelAngle,p,y,t.anchor,t.minzoom,t.maxzoom,t.page)),M&&(!S||this._legible(t.labelAngle)))if(V)b<v&&(v=b),c<C&&(C=c),I>j&&(j=I),g>F&&(F=g);else if(t.minzoom<x){const e={xTile:o.x,yTile:o.y,dxPixels:(b+O)*Y-z,dyPixels:(c+O)*Y-z,hard:!d.optional,partIndex:1,width:(I-b)*Y+2*z,height:(g-c)*Y+2*z,angle:m,minLod:t.minzoom,maxLod:t.maxzoom};M.push(e)}}}if(A>=x)return null;if(M&&V){let e,t,i,n;q?(e=-F+O,t=v+B,i=F-C,n=j-v):(e=v+O,t=C+B,i=j-v,n=F-C);const a={xTile:o.x,yTile:o.y,dxPixels:e*Y-z,dyPixels:t*Y-z,hard:!d.optional,partIndex:1,width:i*Y+2*z,height:n*Y+2*z,angle:k,minLod:m,maxLod:s};M.push(a)}const H=new y(E);return M&&M.length>0&&(H.textColliders=M),H}_legible(e){const t=a(e);return t<65||t>=193}_placeGlyph(t,i,a,l,r,c,g,m,x){let d=c;const w=d<0?o(t.angle+n,h):t.angle;let y=0;a<0&&(d*=-1,a*=-1,y=n),d>0&&++r;let f=new e(t.x,t.y),b=l[r],u=s;if(l.length<=r)return u;for(;;){const e=b.x-f.x,t=b.y-f.y,n=Math.sqrt(e*e+t*t),s=Math.max(a/n,i),c=e/n,I=t/n,T=o(Math.atan2(I,c)+y,h);if(x.push(new p(f,w,T,m,!1,s,u)),g&&x.push(new p(f,w,T,m,!0,s,u)),s<=i)return s;f=b.clone();do{if(r+=d,l.length<=r||r<0)return s;b=l[r]}while(f.isEqual(b));let k=b.x-f.x,P=b.y-f.y;const N=Math.sqrt(k*k+P*P);k*=n/N,P*=n/N,f.x-=k,f.y-=P,u=s}}}export{d as Anchor,w as PlacedSymbol,y as Placement,f as PlacementEngine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{RenderingDevice as e}from"../webgl/RenderingDevice.js";import{simplePipelineState as t}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as i}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";const s=1e-6;class n{constructor(s,n){this.spriteMosaic=s,this.glyphMosaic=n,this._vtlTechniques=new i,this._context=null,this._vtlTechniques.startup(),this._renderingDevice=new e,this._pipelineState=t}dispose(){this._vtlTechniques&&this._vtlTechniques.shutdown(this._context),this.spriteMosaic.dispose(),this.glyphMosaic.dispose(),this._renderingDevice.dispose(),this._context=null}drawSymbols(e,t,i){const n=i.layers;e.renderPass="translucent";const a=this._vtlTechniques.getTechnique(3);r[0]=t;for(let l=0;l<n.length;l++){const t=n[l];if(3!==t.type)continue;const i=t.getLayoutProperty("visibility");if(i&&1===i.getValue())continue;const o=e.displayLevel;void 0!==t.minzoom&&t.minzoom>o+s||void 0!==t.maxzoom&&t.maxzoom<=o-s||(e.styleLayerUID=t.uid,e.styleLayer=t,a.render(e,{tiles:r}))}r[0]=null}drawBackground(e,t,i){if(0===i.backgroundBucketIds.length)return;const{displayLevel:n,requiredLevel:a}=e;t.key.level=a,this._renderingDevice.setPipelineState({...this._pipelineState,color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:!1}),e.renderPass="background";const l=this._vtlTechniques.getTechnique(0);r[0]=t,i.backgroundBucketIds.forEach(t=>{const a=i.getLayerById(t);if(0!==a.type)return;const o=a.getLayoutProperty("visibility");o&&1===o.getValue()||void 0!==a.minzoom&&a.minzoom>n+s||void 0!==a.maxzoom&&a.maxzoom<=n-s||(e.styleLayerUID=a.uid,e.styleLayer=a,l.render(e,{tiles:r}))}),r[0]=null}drawTile(e,i,s,n){const r=s.layers,{context:a}=e,l=a.getPipelineState(),{depthWrite:o}=l;let c=0,h=1;
|
|
2
|
+
import{RenderingDevice as e}from"../webgl/RenderingDevice.js";import{simplePipelineState as t}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as i}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";const s=1e-6;class n{constructor(s,n){this.spriteMosaic=s,this.glyphMosaic=n,this._vtlTechniques=new i,this._context=null,this._vtlTechniques.startup(),this._renderingDevice=new e,this._pipelineState=t}dispose(){this._vtlTechniques&&this._vtlTechniques.shutdown(this._context),this.spriteMosaic.dispose(),this.glyphMosaic.dispose(),this._renderingDevice.dispose(),this._context=null}drawSymbols(e,t,i){const n=i.layers;e.renderPass="translucent";const a=this._vtlTechniques.getTechnique(3);r[0]=t;for(let l=0;l<n.length;l++){const t=n[l];if(3!==t.type)continue;const i=t.getLayoutProperty("visibility");if(i&&1===i.getValue())continue;const o=e.displayLevel;void 0!==t.minzoom&&t.minzoom>o+s||void 0!==t.maxzoom&&t.maxzoom<=o-s||(e.styleLayerUID=t.uid,e.styleLayer=t,a.render(e,{tiles:r}))}r[0]=null}drawBackground(e,t,i){if(0===i.backgroundBucketIds.length)return;const{displayLevel:n,requiredLevel:a}=e;t.key.level=a,this._renderingDevice.setPipelineState({...this._pipelineState,color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:!1}),e.renderPass="background";const l=this._vtlTechniques.getTechnique(0);r[0]=t,i.backgroundBucketIds.forEach(t=>{const a=i.getLayerById(t);if(0!==a.type)return;const o=a.getLayoutProperty("visibility");o&&1===o.getValue()||void 0!==a.minzoom&&a.minzoom>n+s||void 0!==a.maxzoom&&a.maxzoom<=n-s||(e.styleLayerUID=a.uid,e.styleLayer=a,l.render(e,{tiles:r}))}),r[0]=null}drawTile(e,i,s,n){const r=s.layers,{context:a}=e,l=a.getPipelineState(),{depthWrite:o}=l;let c=0,h=1;void 0!==o?.zNear&&void 0!==o.zFar&&(c=o.zNear,h=o.zFar),this._pipelineState={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:{zNear:c,zFar:h},test:515}},this._renderingDevice.setPipelineState(this._pipelineState);const u=r.filter(e=>{if(null!=n&&n!==e.type||!i.layerData.has(e.uid))return!1;const t=e.getLayoutProperty("visibility");return 1!==t?.getValue()});e.renderPass="opaque";for(let t=u.length-1;t>=0;--t)this._renderStyleLayer(u[t],e,i);this._pipelineState={...t,color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:515}},this._renderingDevice.setPipelineState(this._pipelineState),e.renderPass="translucent",u.forEach(t=>this._renderStyleLayer(t,e,i)),this._renderingDevice.setPipelineState({...this._pipelineState,depth:!1}),this._context||(this._context=e.context)}setShader(e){return this._renderingDevice.setShader(e)}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,i){return this._renderingDevice.submitDraw(e,t,i)}submitDrawMesh(e,t,i,s){this._renderingDevice.submitDrawMesh(e,t,i,s)}submitDrawMeshUntyped(e,t,i,s){this._renderingDevice.submitDrawMeshUntyped(e,t,i,s)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}_renderStyleLayer(e,t,i){const{renderPass:n}=t;let a;switch(e.type){case 0:if("background"!==n)return;a=this._vtlTechniques.getTechnique(0);break;case 1:if("opaque"!==n&&"translucent"!==t.renderPass)return;a=this._vtlTechniques.getTechnique(1);break;case 2:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(2);break;case 4:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(4);break;case 3:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(3)}const{displayLevel:l}=t,{minzoom:o,maxzoom:c}=e;void 0!==o&&o>l+s||void 0!==c&&c<=l-s||!a||(this._renderingDevice.setPipelineState({...this._pipelineState,stencil:{write:{mask:0},test:!1}}),t.styleLayerUID=e.uid,t.styleLayer=e,r[0]=i,a.render(t,{tiles:r}),r[0]=null)}}const r=[null];export{n as default};
|