@vertigis/arcgis-extensions 32.8.5 → 32.10.0
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/AppConfig.schema.json +43 -11
- package/docs/html/assets/js/search.js +1 -1
- package/docs/html/classes/mapping_grouplayerextension.grouplayerextensioncollection.html +13 -13
- package/docs/html/classes/mapping_mapextension.mapextension.html +7 -7
- package/docs/html/classes/mapping_support__layerextensioncollection.layerextensioncollectionbase.html +19 -19
- package/docs/html/enums/portal_featurelayer.featurelayermode.html +4 -4
- package/docs/html/index.html +9 -0
- package/docs/html/interfaces/data__tableextension.tableproperties.html +51 -9
- package/docs/html/interfaces/mapping_featurelayerextension.featurelayerproperties.html +76 -13
- package/docs/html/interfaces/mapping_featurelayerextensionbase.featurelayerbaseproperties.html +76 -13
- package/docs/html/interfaces/mapping_support__layerextensioncollection.layerextensioncollection.html +3 -3
- package/docs/html/interfaces/portal_applicationproperties.applicationproperties.html +32 -2
- package/docs/html/interfaces/portal_bookmark.bookmark.html +18 -3
- package/docs/html/interfaces/portal_csvlayer.csvlayer-1.html +27 -7
- package/docs/html/interfaces/portal_drawinginfo.drawinginfo-1.html +29 -8
- package/docs/html/interfaces/portal_featurelayer.featurelayer-1.html +73 -13
- package/docs/html/interfaces/portal_forminfo.formattachmentelement.html +351 -0
- package/docs/html/interfaces/portal_forminfo.formbarcodescannerinput.html +257 -0
- package/docs/html/interfaces/portal_forminfo.formcomboboxinput.html +254 -0
- package/docs/html/interfaces/portal_forminfo.formdatetimepickerinput.html +274 -0
- package/docs/html/interfaces/portal_forminfo.formexpressioninfo.html +273 -0
- package/docs/html/interfaces/portal_forminfo.formfieldelement.html +386 -0
- package/docs/html/interfaces/portal_forminfo.formgroupelement.html +315 -0
- package/docs/html/interfaces/portal_forminfo.forminfo.html +271 -0
- package/docs/html/interfaces/portal_forminfo.formradiobuttonsinput.html +253 -0
- package/docs/html/interfaces/portal_forminfo.formrelationshipelement.html +334 -0
- package/docs/html/interfaces/portal_forminfo.formswitchinput.html +252 -0
- package/docs/html/interfaces/portal_forminfo.formtextareainput.html +254 -0
- package/docs/html/interfaces/portal_forminfo.formtextboxinput.html +255 -0
- package/docs/html/interfaces/portal_grouplayer.grouplayer-1.html +7 -4
- package/docs/html/interfaces/portal_grouplayer.subtypegrouplayer.html +501 -0
- package/docs/html/interfaces/portal_imageservicelayer.imageservicelayer-1.html +33 -13
- package/docs/html/interfaces/portal_imageservicevectorlayer.imageservicevectorlayer.html +28 -8
- package/docs/html/interfaces/portal_item.item-1.html +158 -41
- package/docs/html/interfaces/portal_labelinginfo.labelinginfo-1.html +19 -10
- package/docs/html/interfaces/portal_layerdefinition.fieldoverride.html +241 -0
- package/docs/html/interfaces/portal_layerdefinition.layerdefinition-1.html +116 -31
- package/docs/html/interfaces/portal_layerdefinition.layerdefinitiondefaults.html +12 -0
- package/docs/html/interfaces/portal_layerdefinition.layertimeinfo.html +381 -0
- package/docs/html/interfaces/portal_layerdefinition.timeinfoexportoptions.html +262 -0
- package/docs/html/interfaces/portal_mapfloorinfo.facilitylayerinfo.html +254 -0
- package/docs/html/interfaces/portal_mapfloorinfo.levellayerinfo.html +315 -0
- package/docs/html/interfaces/portal_mapfloorinfo.mapfloorinfo-1.html +233 -0
- package/docs/html/interfaces/portal_mapfloorinfo.sitelayerinfo.html +231 -0
- package/docs/html/interfaces/portal_mapservicelayer.mapservicelayer-1.html +26 -6
- package/docs/html/interfaces/portal_renderer.authoringinfo.html +28 -5
- package/docs/html/interfaces/portal_renderer.colorramp.html +291 -0
- package/docs/html/interfaces/portal_renderer.rendererbase.html +3 -0
- package/docs/html/interfaces/portal_streamlayer.streamlayer-1.html +75 -12
- package/docs/html/interfaces/portal_symbol.font.html +4 -4
- package/docs/html/interfaces/portal_table.table.html +49 -9
- package/docs/html/interfaces/portal_tiledimageservicelayer.tiledimageservicelayer-1.html +23 -3
- package/docs/html/interfaces/portal_tiledmapservicelayer.tiledmapservicelayer-1.html +27 -7
- package/docs/html/interfaces/portal_utilitynetwork.traceconfiguration.html +201 -0
- package/docs/html/interfaces/portal_utilitynetwork.utilitynetwork.html +243 -0
- package/docs/html/interfaces/portal_vectortilelayer.vectortilelayer-1.html +24 -4
- package/docs/html/interfaces/portal_webmap.webmap-1.html +71 -13
- package/docs/html/interfaces/portal_webscene.webscene-1.html +34 -15
- package/docs/html/interfaces/portal_webtilelayer.webtilelayer-1.html +8 -8
- package/docs/html/interfaces/portal_widgets.floorfilter.html +310 -0
- package/docs/html/interfaces/portal_widgets.range.html +6 -3
- package/docs/html/interfaces/portal_widgets.timeslider.html +4 -1
- package/docs/html/interfaces/portal_widgets.widgets.html +22 -0
- package/docs/html/modules/mapping_mapextension.html +1 -1
- package/docs/html/modules/portal_applicationproperties.html +2 -2
- package/docs/html/modules/portal_featurelayer.featurelayer.html +8 -8
- package/docs/html/modules/portal_featurelayer.html +1 -1
- package/docs/html/modules/portal_forminfo.html +178 -0
- package/docs/html/modules/portal_grouplayer.grouplayer.html +3 -3
- package/docs/html/modules/portal_grouplayer.html +5 -1
- package/docs/html/modules/portal_labelinginfo.html +1 -1
- package/docs/html/modules/portal_labelinginfo.labelplacement.html +2 -2
- package/docs/html/modules/portal_layerdefinition.html +32 -1
- package/docs/html/modules/portal_layerdefinition.layerdefinitioncapabilities.html +6 -6
- package/docs/html/modules/portal_mapfloorinfo.html +153 -0
- package/docs/html/modules/portal_mapfloorinfo.mapfloorinfo.html +209 -0
- package/docs/html/modules/portal_renderer.html +10 -6
- package/docs/html/modules/portal_table.html +5 -5
- package/docs/html/modules/portal_tiledmapservicelayer.tiledmapservicelayer.html +1 -1
- package/docs/html/modules/portal_utilitynetwork.html +134 -0
- package/docs/html/modules/portal_webmap.webmap.html +3 -3
- package/docs/html/modules/portal_webscene.webscene.html +3 -3
- package/docs/html/modules/portal_webtilelayer.webtilelayer.html +1 -1
- package/docs/html/modules/portal_widgets.html +5 -1
- package/docs/html/modules/version.html +1 -1
- package/docs/html/modules.html +12 -0
- package/mapping/MapExtension.js +1 -1
- package/mapping/support/_LayerExtensionCollection.js +1 -1
- package/package.json +1 -1
- package/portal/ApplicationProperties.d.ts +25 -0
- package/portal/Bookmark.d.ts +8 -2
- package/portal/CSVLayer.d.ts +5 -0
- package/portal/DrawingInfo.d.ts +9 -3
- package/portal/FeatureLayer.d.ts +16 -0
- package/portal/FormInfo.d.ts +391 -0
- package/portal/FormInfo.js +1 -0
- package/portal/GroupLayer.d.ts +25 -0
- package/portal/ImageServiceLayer.d.ts +5 -0
- package/portal/ImageServiceVectorLayer.d.ts +5 -0
- package/portal/Item.d.ts +37 -10
- package/portal/LabelingInfo.d.ts +7 -2
- package/portal/LayerDefinition.d.ts +121 -0
- package/portal/MapFloorInfo.d.ts +130 -0
- package/portal/MapFloorInfo.js +1 -0
- package/portal/MapServiceLayer.d.ts +5 -0
- package/portal/MapServiceLayer.js +1 -1
- package/portal/Renderer.d.ts +32 -0
- package/portal/Symbol.d.ts +4 -4
- package/portal/Table.d.ts +11 -0
- package/portal/TiledImageServiceLayer.d.ts +5 -0
- package/portal/TiledMapServiceLayer.d.ts +5 -0
- package/portal/TiledMapServiceLayer.js +1 -1
- package/portal/UtilityNetwork.d.ts +42 -0
- package/portal/UtilityNetwork.js +1 -0
- package/portal/VectorTileLayer.d.ts +5 -0
- package/portal/WebMap.d.ts +16 -0
- package/portal/WebMap.js +1 -1
- package/portal/WebScene.d.ts +5 -0
- package/portal/WebScene.js +1 -1
- package/portal/WebTileLayer.js +1 -1
- package/portal/Widgets.d.ts +45 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import EsriApiFloorInfo from "@arcgis/core/support/MapFloorInfo";
|
|
2
|
+
export declare namespace MapFloorInfo {
|
|
3
|
+
/**
|
|
4
|
+
* Converts an ArcGIS Portal JSON representation of a MapFloorInfo object to its Esri
|
|
5
|
+
* JavaScript API equivalent.
|
|
6
|
+
*
|
|
7
|
+
* @param floorInfo The MapFloorInfo JSON to convert.
|
|
8
|
+
*/
|
|
9
|
+
function toEsriApiFloorInfo(floorInfo: MapFloorInfo): EsriApiFloorInfo;
|
|
10
|
+
/**
|
|
11
|
+
* Converts an Esri JavaScript API MapFloorInfo object to its ArcGIS Portal JSON
|
|
12
|
+
* representation.
|
|
13
|
+
*
|
|
14
|
+
* @param floorInfo The MapFloorInfo object to convert.
|
|
15
|
+
*/
|
|
16
|
+
function fromEsriApiFloorInfo(floorInfo: EsriApiFloorInfo): MapFloorInfo;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Contains floor-awareness information for the map. Defines the layers and
|
|
20
|
+
* required fields for each layer that are used for floor filtering.
|
|
21
|
+
* {@link https://developers.arcgis.com/web-map-specification/objects/mapFloorInfo/}.
|
|
22
|
+
*/
|
|
23
|
+
export interface MapFloorInfo {
|
|
24
|
+
/**
|
|
25
|
+
* Defines the layer and field properties for the Facility layer used for
|
|
26
|
+
* floor filtering.
|
|
27
|
+
*/
|
|
28
|
+
facilityLayer?: FacilityLayerInfo;
|
|
29
|
+
/**
|
|
30
|
+
* Defines the layer and field properties for the Level layer used for floor
|
|
31
|
+
* filtering.
|
|
32
|
+
*/
|
|
33
|
+
levelLayer?: LevelLayerInfo;
|
|
34
|
+
/**
|
|
35
|
+
* Defines the layer and field properties for the Site layer used for floor
|
|
36
|
+
* filtering. This property is optional.
|
|
37
|
+
*/
|
|
38
|
+
siteLayer?: SiteLayerInfo;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Defines the layer and field properties for the Facility layer used for
|
|
42
|
+
* floor filtering.
|
|
43
|
+
* {@link https://developers.arcgis.com/web-map-specification/objects/facilityLayerInfo/}.
|
|
44
|
+
*/
|
|
45
|
+
export interface FacilityLayerInfo {
|
|
46
|
+
/**
|
|
47
|
+
* The name of the attribute field that contains a facility feature's
|
|
48
|
+
* unique identifier.
|
|
49
|
+
*/
|
|
50
|
+
facilityIdField?: string;
|
|
51
|
+
/**
|
|
52
|
+
* A layer ID that refers to an operational layer in the map. The layer
|
|
53
|
+
* provides access to Facility features to use for floor filtering.
|
|
54
|
+
*/
|
|
55
|
+
layerId?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The name of the attribute field that contains a facility feature's
|
|
58
|
+
* name.
|
|
59
|
+
*/
|
|
60
|
+
nameField?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The name of the attribute field that contains a facility feature's
|
|
63
|
+
* site identifier (a foreign key to the Site layer).
|
|
64
|
+
*/
|
|
65
|
+
siteIdField?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Defines the layer and field properties for the Level layer used for floor
|
|
69
|
+
* filtering.
|
|
70
|
+
* {@link https://developers.arcgis.com/web-map-specification/objects/levelLayerInfo/}.
|
|
71
|
+
*/
|
|
72
|
+
export interface LevelLayerInfo {
|
|
73
|
+
/**
|
|
74
|
+
* The name of the attribute field that contains a level feature's
|
|
75
|
+
* facility identifier (a foreign key to the Facility layer).
|
|
76
|
+
*/
|
|
77
|
+
facilityIdField?: string;
|
|
78
|
+
/**
|
|
79
|
+
* A layer ID that refers to an operational layer in the map. The layer
|
|
80
|
+
* provides access to Level features to use for floor filtering.
|
|
81
|
+
*/
|
|
82
|
+
layerId?: string;
|
|
83
|
+
/**
|
|
84
|
+
* The name of the attribute field that contains a level feature's
|
|
85
|
+
* unique identifier.
|
|
86
|
+
*/
|
|
87
|
+
levelIdField?: string;
|
|
88
|
+
/**
|
|
89
|
+
* The name of the attribute field that contains a level feature's level
|
|
90
|
+
* number specific to its facility.
|
|
91
|
+
*/
|
|
92
|
+
levelNumberField?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The name of the attribute field that contains a level feature's long
|
|
95
|
+
* name.
|
|
96
|
+
*/
|
|
97
|
+
longNameField?: string;
|
|
98
|
+
/**
|
|
99
|
+
* The name of the attribute field that contains a level feature's short
|
|
100
|
+
* name.
|
|
101
|
+
*/
|
|
102
|
+
shortNameField?: string;
|
|
103
|
+
/**
|
|
104
|
+
* The name of the attribute field that contains a level feature's
|
|
105
|
+
* vertical order. The vertical order defines the order of display in
|
|
106
|
+
* the floor filter widget, and it also references the floor levels of
|
|
107
|
+
* an Indoor Positioning System.
|
|
108
|
+
*/
|
|
109
|
+
verticalOrderField?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Defines the layer and field properties for the Site layer used for floor
|
|
113
|
+
* filtering. This property is optional.
|
|
114
|
+
* {@link https://developers.arcgis.com/web-map-specification/objects/siteLayerInfo/}.
|
|
115
|
+
*/
|
|
116
|
+
export interface SiteLayerInfo {
|
|
117
|
+
/**
|
|
118
|
+
* A layer ID that refers to an operational layer in the map. The layer
|
|
119
|
+
* provides access to Site features to use for floor filtering.
|
|
120
|
+
*/
|
|
121
|
+
layerId?: string;
|
|
122
|
+
/**
|
|
123
|
+
* The name of the attribute field that contains a site feature's name.
|
|
124
|
+
*/
|
|
125
|
+
nameField?: string;
|
|
126
|
+
/**
|
|
127
|
+
* The name of the attribute field that contains a site feature's unique identifier.
|
|
128
|
+
*/
|
|
129
|
+
siteIdField?: string;
|
|
130
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import EsriApiFloorInfo from"@arcgis/core/support/MapFloorInfo";import{checkArg}from"../utilities/checkArg.js";export var MapFloorInfo;!function(o){o.toEsriApiFloorInfo=function(o){return checkArg("floorInfo",o).isNotMissing(),EsriApiFloorInfo.fromJSON(o)},o.fromEsriApiFloorInfo=function(o){return checkArg("floorInfo",o).isNotMissing(),o.toJSON()}}(MapFloorInfo||(MapFloorInfo={}));
|
|
@@ -45,6 +45,11 @@ export declare namespace MapServiceLayer {
|
|
|
45
45
|
* {@link https://developers.arcgis.com/web-scene-specification/objects/mapServiceLayer/}.
|
|
46
46
|
*/
|
|
47
47
|
export interface MapServiceLayer extends OperationalLayerBase, BaseMapLayerBase {
|
|
48
|
+
/**
|
|
49
|
+
* A sequence of custom parameters appended to the URL of all requests
|
|
50
|
+
* related to supporting ArcGIS layer types.
|
|
51
|
+
*/
|
|
52
|
+
customParameters?: Record<string, unknown>;
|
|
48
53
|
/**
|
|
49
54
|
* Type of the layer.
|
|
50
55
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Collection from"@arcgis/core/core/Collection";import Portal from"@arcgis/core/portal/Portal";import EsriPortalItem from"@arcgis/core/portal/PortalItem";import{isMapImageLayer}from"../utilities/_layers.js";import{checkArg}from"../utilities/checkArg.js";import{compareAsync}from"../utilities/collection.js";import{deepClone}from"../utilities/object.js";import{Layer}from"./Layer.js";import{ERR_LAYER_TYPE_MISMATCH,applyLayerBaseToEsriApiLayer,applyBasemapLayerToEsriApiLayer,applyOperationalLayerToEsriApiLayer,fromEsriApiLayerToLayerBase,fromEsriApiLayerToOperationalLayer}from"./_layerHelper.js";export var MapServiceLayer;function isDynamicLayer(e){if(e.layerDefinition){if(e.layerDefinition.source)return!0;const{drawingInfo:r}=e.layerDefinition;if(r&&(r.renderer||r.labelingInfo||void 0!==r.showLabels&&null!==r.showLabels))return!0}return!1}function fixDynamicLayer(e){const{layerDefinition:r}=e;if(r){r.source&&(delete r.source,console.warn("The map service does not support dynamic layers. Ignoring property: layer.layerDefinition.source"));const{drawingInfo:e}=r;e&&(e.renderer&&(delete e.renderer,console.warn("The map service does not support dynamic layers. Ignoring property: layer.layerDefinition.drawingInfo.renderer")),e.labelingInfo&&(delete e.labelingInfo,console.warn("The map service does not support dynamic layers. Ignoring property: layer.layerDefinition.drawingInfo.labelingInfo")),void 0!==e.showLabels&&null!==e.showLabels&&(delete e.showLabels,console.warn("The map service does not support dynamic layers. Ignoring property: layer.layerDefinition.showLabels.labelingInfo")))}}async function applySublayerPropertiesToEsriApiLayer(e,r){var a,i
|
|
1
|
+
import Collection from"@arcgis/core/core/Collection";import Portal from"@arcgis/core/portal/Portal";import EsriPortalItem from"@arcgis/core/portal/PortalItem";import{isMapImageLayer}from"../utilities/_layers.js";import{checkArg}from"../utilities/checkArg.js";import{compareAsync}from"../utilities/collection.js";import{deepClone}from"../utilities/object.js";import{Layer}from"./Layer.js";import{ERR_LAYER_TYPE_MISMATCH,applyLayerBaseToEsriApiLayer,applyBasemapLayerToEsriApiLayer,applyOperationalLayerToEsriApiLayer,fromEsriApiLayerToLayerBase,fromEsriApiLayerToOperationalLayer}from"./_layerHelper.js";export var MapServiceLayer;function isDynamicLayer(e){if(e.layerDefinition){if(e.layerDefinition.source)return!0;const{drawingInfo:r}=e.layerDefinition;if(r&&(r.renderer||r.labelingInfo||void 0!==r.showLabels&&null!==r.showLabels))return!0}return!1}function fixDynamicLayer(e){const{layerDefinition:r}=e;if(r){r.source&&(delete r.source,console.warn("The map service does not support dynamic layers. Ignoring property: layer.layerDefinition.source"));const{drawingInfo:e}=r;e&&(e.renderer&&(delete e.renderer,console.warn("The map service does not support dynamic layers. Ignoring property: layer.layerDefinition.drawingInfo.renderer")),e.labelingInfo&&(delete e.labelingInfo,console.warn("The map service does not support dynamic layers. Ignoring property: layer.layerDefinition.drawingInfo.labelingInfo")),void 0!==e.showLabels&&null!==e.showLabels&&(delete e.showLabels,console.warn("The map service does not support dynamic layers. Ignoring property: layer.layerDefinition.showLabels.labelingInfo")))}}async function applySublayerPropertiesToEsriApiLayer(e,r){var a,i;const s=null===(i=null===(a=r.capabilities)||void 0===a?void 0:a.exportMap)||void 0===i?void 0:i.supportsDynamicLayers;if(e.layers)if(s&&e.layers.some(isDynamicLayer)){const a=[...e.layers].reverse(),i=new Map;await compareAsync(r.allSublayers,a,{equals:(e,r)=>+e.id==+r.id,onMatch:async(e,r)=>{await Layer.applyToEsriApiSublayer(r,e)},onMissing:e=>{r.sublayers.remove(e)},onNew:async e=>{const a=await Layer.toEsriApiSublayer(e,"ArcGISMapServiceLayer");a.layer=r,i.set(a.id,a)}}),a.forEach(((e,s)=>{var o;const l=+e.id,y=i.get(l);if(y)if(null!=e.parentLayerId&&-1!==e.parentLayerId){const r=i.get(e.parentLayerId);r&&(r.sublayers=null!==(o=r.sublayers)&&void 0!==o?o:new Collection,r.sublayers.add(y))}else r.sublayers.add(y);else{const i=r.allSublayers.find((e=>e.id===l));if(i){let o,l=r.allSublayers.find((r=>r.id===e.parentLayerId));if(l){o=a.filter((e=>e.parentLayerId===l.id)).map((e=>a.indexOf(e))).indexOf(s)}else o=s,l=r;l.sublayers.reorder(i,o)}}})),r.allSublayers.refresh()}else if(r.sublayers)for(const a of e.layers){if(void 0===a.id||null===a.id)continue;const e=r.allSublayers.find((e=>e.id===a.id));e&&(isDynamicLayer(a)&&fixDynamicLayer(a),await Layer.applyToEsriApiSublayer(a,e))}if(e.visibleLayers&&r.allSublayers)for(const a of r.allSublayers.toArray())a.visible=e.visibleLayers.includes(a.id)}!function(e){async function r(e,r,a){checkArg("layerJson",e).isNotMissing(),checkArg("layerJson.layerType",e.layerType).satisfies((e=>!e||"ArcGISMapServiceLayer"===e),ERR_LAYER_TYPE_MISMATCH),checkArg("layer",r).isNotMissing().satisfies(isMapImageLayer,ERR_LAYER_TYPE_MISMATCH);const i=deepClone(e);if(applyLayerBaseToEsriApiLayer(i,r),applyBasemapLayerToEsriApiLayer(i,r),applyOperationalLayerToEsriApiLayer(i,r),i.hasOwnProperty("url")&&(r.url=i.url),i.hasOwnProperty("itemId")&&(r.portalItem?r.portalItem.id=i.itemId:r.portalItem=new EsriPortalItem({id:i.itemId,portal:a||Portal.getDefault()})),r.loaded)await applySublayerPropertiesToEsriApiLayer(i,r);else{const e=r.load;let a=!1;r.load=async()=>{await e(),a||(a=!0,await applySublayerPropertiesToEsriApiLayer(i,r))}}}e.esriMapImageLayerDefaults={legendEnabled:!0,visible:!0,opacity:1},e.toEsriApiLayer=async function(e){checkArg("layerJson",e).isNotMissing(),checkArg("layerJson.layerType",e.layerType).satisfies((e=>!e||"ArcGISMapServiceLayer"===e),ERR_LAYER_TYPE_MISMATCH);const a=new((await import("@arcgis/core/layers/MapImageLayer")).default);return await r(e,a),a},e.applyToEsriApiLayer=r,e.fromEsriApiMapImageLayer=function(r){checkArg("layer",r).isNotMissing();const a={...fromEsriApiLayerToLayerBase(r,e.esriMapImageLayerDefaults),...fromEsriApiLayerToOperationalLayer(r),layerType:"ArcGISMapServiceLayer",url:r.url},i=e=>e.subLayerIds?Math.min(Number(e.id),...e.subLayerIds.map((e=>e-1))):Number(e.id);return r.portalItem&&(a.itemId=r.portalItem.id),r.allSublayers&&(a.layers=r.allSublayers.toArray().map((e=>Layer.fromEsriApiSublayer(e,r))).sort(((e,r)=>i(e)-i(r))),a.visibleLayers=r.allSublayers.toArray().filter((e=>e.visible)).map((e=>e.id))),a}}(MapServiceLayer||(MapServiceLayer={}));
|
package/portal/Renderer.d.ts
CHANGED
|
@@ -96,6 +96,11 @@ export interface AuthoringInfo {
|
|
|
96
96
|
* See {@link ClassificationMethod}.
|
|
97
97
|
*/
|
|
98
98
|
classificationMethod?: ClassificationMethod;
|
|
99
|
+
/**
|
|
100
|
+
* A colorRamp object is used to specify a range of colors that are applied
|
|
101
|
+
* to a group of symbols.
|
|
102
|
+
*/
|
|
103
|
+
colorRamp?: ColorRamp;
|
|
99
104
|
/**
|
|
100
105
|
* Contains information about an attribute field.
|
|
101
106
|
*/
|
|
@@ -121,6 +126,33 @@ export interface AuthoringInfo {
|
|
|
121
126
|
*/
|
|
122
127
|
visualVariables?: VisualVariable;
|
|
123
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* A colorRamp object is used to specify a range of colors that are applied to a
|
|
131
|
+
* group of symbols.
|
|
132
|
+
* {@link https://developers.arcgis.com/web-map-specification/objects/colorRamp/}.
|
|
133
|
+
*/
|
|
134
|
+
export interface ColorRamp {
|
|
135
|
+
/**
|
|
136
|
+
* Algorithm used for calculating the ramp.
|
|
137
|
+
*/
|
|
138
|
+
algorithm?: "esriCIELabAlgorithm" | "esriHSVAlgorithm" | "esriLabLChAlgorithm";
|
|
139
|
+
/**
|
|
140
|
+
* A multipart color ramp is defined by a list of constituent color ramps.
|
|
141
|
+
*/
|
|
142
|
+
colorRamps?: ColorRamp[];
|
|
143
|
+
/**
|
|
144
|
+
* Array representing the initial color to start the ramp from.
|
|
145
|
+
*/
|
|
146
|
+
fromColor?: [number, number, number, number];
|
|
147
|
+
/**
|
|
148
|
+
* Array representing the final color to end the ramp with.
|
|
149
|
+
*/
|
|
150
|
+
toColor?: [number, number, number, number];
|
|
151
|
+
/**
|
|
152
|
+
* Value indicating the type of colorRamp.
|
|
153
|
+
*/
|
|
154
|
+
type: "algorithmic" | "multipart";
|
|
155
|
+
}
|
|
124
156
|
/**
|
|
125
157
|
* The classification method for AuthoringInfo.
|
|
126
158
|
*/
|
package/portal/Symbol.d.ts
CHANGED
|
@@ -52,19 +52,19 @@ export interface Font {
|
|
|
52
52
|
/**
|
|
53
53
|
* The font family.
|
|
54
54
|
*/
|
|
55
|
-
family
|
|
55
|
+
family?: string;
|
|
56
56
|
/**
|
|
57
57
|
* The font size.
|
|
58
58
|
*/
|
|
59
|
-
size
|
|
59
|
+
size?: number;
|
|
60
60
|
/**
|
|
61
61
|
* The text style. See {@link FontStyle}.
|
|
62
62
|
*/
|
|
63
|
-
style
|
|
63
|
+
style?: FontStyle;
|
|
64
64
|
/**
|
|
65
65
|
* The text weight. See {@link FontWeight}.
|
|
66
66
|
*/
|
|
67
|
-
weight
|
|
67
|
+
weight?: FontWeight;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Color is represented as a four-element array. The four elements represent
|
package/portal/Table.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { LayerDefinition } from "../portal/LayerDefinition.js";
|
|
|
3
3
|
import { PopupInfo } from "../portal/PopupInfo.js";
|
|
4
4
|
import type { Table as EsriTable } from "../portal/Table.js";
|
|
5
5
|
import type { DefinitionEditor } from "./DefinitionEditor.js";
|
|
6
|
+
import type { FormInfo } from "./FormInfo.js";
|
|
6
7
|
/**
|
|
7
8
|
* Table type constants.
|
|
8
9
|
*/
|
|
@@ -29,6 +30,10 @@ export interface Table {
|
|
|
29
30
|
* filter.
|
|
30
31
|
*/
|
|
31
32
|
definitionEditor?: DefinitionEditor;
|
|
33
|
+
/**
|
|
34
|
+
* A formInfo object defining the content of the form when you are editing a record.
|
|
35
|
+
*/
|
|
36
|
+
formInfo?: FormInfo;
|
|
32
37
|
/**
|
|
33
38
|
* Unique string identifier for the table.
|
|
34
39
|
*/
|
|
@@ -48,6 +53,12 @@ export interface Table {
|
|
|
48
53
|
* and the sort option for child related records.
|
|
49
54
|
*/
|
|
50
55
|
popupInfo?: PopupInfo;
|
|
56
|
+
/**
|
|
57
|
+
* Refresh interval of the table in minutes. Non-zero value indicates
|
|
58
|
+
* automatic table refresh at the specified interval. Value of 0 indicates
|
|
59
|
+
* auto refresh is not enabled.
|
|
60
|
+
*/
|
|
61
|
+
refreshInterval?: number;
|
|
51
62
|
/**
|
|
52
63
|
* String value for the title of the table.
|
|
53
64
|
*/
|
|
@@ -44,6 +44,11 @@ export declare namespace TiledImageServiceLayer {
|
|
|
44
44
|
* {@link https://developers.arcgis.com/web-scene-specification/objects/tiledImageServiceLayer/}.
|
|
45
45
|
*/
|
|
46
46
|
export interface TiledImageServiceLayer extends OperationalLayerBase, BaseMapLayerBase {
|
|
47
|
+
/**
|
|
48
|
+
* A sequence of custom parameters appended to the URL of all requests
|
|
49
|
+
* related to supporting ArcGIS layer types.
|
|
50
|
+
*/
|
|
51
|
+
customParameters?: Record<string, unknown>;
|
|
47
52
|
/**
|
|
48
53
|
* The type of layer.
|
|
49
54
|
*/
|
|
@@ -45,6 +45,11 @@ export declare namespace TiledMapServiceLayer {
|
|
|
45
45
|
* {@link https://developers.arcgis.com/web-scene-specification/objects/tiledMapServiceLayer/}.
|
|
46
46
|
*/
|
|
47
47
|
export interface TiledMapServiceLayer extends OperationalLayerBase, BaseMapLayerBase {
|
|
48
|
+
/**
|
|
49
|
+
* A sequence of custom parameters appended to the URL of all requests
|
|
50
|
+
* related to supporting ArcGIS layer types.
|
|
51
|
+
*/
|
|
52
|
+
customParameters?: Record<string, unknown>;
|
|
48
53
|
/**
|
|
49
54
|
* NOTE: Applicable if used as a baseMapLayer. Integer value(s) indicating
|
|
50
55
|
* the display levels of the basemap layer. Only applicable for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isTileLayer}from"../utilities/_layers.js";import{checkArg}from"../utilities/checkArg.js";import{Layer}from"./Layer.js";import{ERR_LAYER_TYPE_MISMATCH,applyLayerBaseToEsriApiLayer,applyBasemapLayerToEsriApiLayer,applyOperationalLayerToEsriApiLayer,fromEsriApiLayerToLayerBase,fromEsriApiLayerToOperationalLayer}from"./_layerHelper.js";export var TiledMapServiceLayer;async function applySublayerPropertiesToEsriApiLayer(e,r){if(e.layers&&r.sublayers)for(const a of e.layers){if(void 0===a.id||null===a.id)continue;const e=r.allSublayers.find((e=>e.id===a.id));e&&await Layer.applyToEsriApiSublayer(a,e)}}!function(e){async function r(e,r){if(checkArg("layerJson",e).isNotMissing(),checkArg("layerJson.layerType",e.layerType).satisfies((e=>!e||"ArcGISTiledMapServiceLayer"===e),ERR_LAYER_TYPE_MISMATCH),checkArg("layer",r).isNotMissing().satisfies(isTileLayer,ERR_LAYER_TYPE_MISMATCH),applyLayerBaseToEsriApiLayer(e,r),applyBasemapLayerToEsriApiLayer(e,r),applyOperationalLayerToEsriApiLayer(e,r),e.hasOwnProperty("url")&&(r.url=e.url),r.loaded)await applySublayerPropertiesToEsriApiLayer(e,r);else{const a=r.load;let i=!1;r.load=async()=>{await a(),i||(i=!0,await applySublayerPropertiesToEsriApiLayer(e,r))}}}e.esriTileLayerDefaults={legendEnabled:!0,visible:!0,opacity:1,minScale:0,maxScale:0},e.toEsriApiLayer=async function(e){checkArg("layerJson",e).isNotMissing(),checkArg("layerJson.layerType",e.layerType).satisfies((e=>!e||"ArcGISTiledMapServiceLayer"===e),ERR_LAYER_TYPE_MISMATCH);const a={};(null==e?void 0:e.url)&&(a.url=e.url);const i=new((await import("@arcgis/core/layers/TileLayer")).default)(a);return await r(e,i),i},e.applyToEsriApiLayer=r,e.fromEsriApiTileLayer=function(r){return checkArg("layer",r).isNotMissing(),{...fromEsriApiLayerToLayerBase(r,e.esriTileLayerDefaults),...fromEsriApiLayerToOperationalLayer(r),layerType:"ArcGISTiledMapServiceLayer",url:r.url}}}(TiledMapServiceLayer||(TiledMapServiceLayer={}));
|
|
1
|
+
import{isTileLayer}from"../utilities/_layers.js";import{checkArg}from"../utilities/checkArg.js";import{Layer}from"./Layer.js";import{ERR_LAYER_TYPE_MISMATCH,applyLayerBaseToEsriApiLayer,applyBasemapLayerToEsriApiLayer,applyOperationalLayerToEsriApiLayer,fromEsriApiLayerToLayerBase,fromEsriApiLayerToOperationalLayer}from"./_layerHelper.js";export var TiledMapServiceLayer;async function applySublayerPropertiesToEsriApiLayer(e,r){if(e.layers&&r.sublayers)for(const a of e.layers){if(void 0===a.id||null===a.id)continue;const e=r.allSublayers.find((e=>e.id===a.id));e&&await Layer.applyToEsriApiSublayer(a,e)}}!function(e){async function r(e,r){if(checkArg("layerJson",e).isNotMissing(),checkArg("layerJson.layerType",e.layerType).satisfies((e=>!e||"ArcGISTiledMapServiceLayer"===e),ERR_LAYER_TYPE_MISMATCH),checkArg("layer",r).isNotMissing().satisfies(isTileLayer,ERR_LAYER_TYPE_MISMATCH),applyLayerBaseToEsriApiLayer(e,r),applyBasemapLayerToEsriApiLayer(e,r),applyOperationalLayerToEsriApiLayer(e,r),e.hasOwnProperty("customParameters")&&(r.customParameters=e.customParameters),e.hasOwnProperty("url")&&(r.url=e.url),r.loaded)await applySublayerPropertiesToEsriApiLayer(e,r);else{const a=r.load;let i=!1;r.load=async()=>{await a(),i||(i=!0,await applySublayerPropertiesToEsriApiLayer(e,r))}}}e.esriTileLayerDefaults={legendEnabled:!0,visible:!0,opacity:1,minScale:0,maxScale:0},e.toEsriApiLayer=async function(e){checkArg("layerJson",e).isNotMissing(),checkArg("layerJson.layerType",e.layerType).satisfies((e=>!e||"ArcGISTiledMapServiceLayer"===e),ERR_LAYER_TYPE_MISMATCH);const a={};(null==e?void 0:e.url)&&(a.url=e.url);const i=new((await import("@arcgis/core/layers/TileLayer")).default)(a);return await r(e,i),i},e.applyToEsriApiLayer=r,e.fromEsriApiTileLayer=function(r){return checkArg("layer",r).isNotMissing(),{...fromEsriApiLayerToLayerBase(r,e.esriTileLayerDefaults),...fromEsriApiLayerToOperationalLayer(r),customParameters:r.customParameters,layerType:"ArcGISTiledMapServiceLayer",url:r.url}}}(TiledMapServiceLayer||(TiledMapServiceLayer={}));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifies the central object for utility network schema information to
|
|
3
|
+
* access utility-related functionality, such as tracing and querying
|
|
4
|
+
* associations.
|
|
5
|
+
* {@link https://developers.arcgis.com/web-map-specification/objects/utilityNetwork/}.
|
|
6
|
+
*/
|
|
7
|
+
export interface UtilityNetwork {
|
|
8
|
+
/**
|
|
9
|
+
* A unique identifying string for the utility network.
|
|
10
|
+
*/
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* A user-friendly string title for the utility network that can be used in
|
|
14
|
+
* a table of contents.
|
|
15
|
+
*/
|
|
16
|
+
title?: string;
|
|
17
|
+
/**
|
|
18
|
+
* An array of pre-configured trace configurations for quickly running
|
|
19
|
+
* common traces.
|
|
20
|
+
*/
|
|
21
|
+
traceConfigurations?: TraceConfiguration[];
|
|
22
|
+
/**
|
|
23
|
+
* A string value indicating the URL to the utility network layer.
|
|
24
|
+
*/
|
|
25
|
+
url?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* An array of pre-configured trace configurations for quickly running
|
|
29
|
+
* common traces.
|
|
30
|
+
* {@link https://developers.arcgis.com/web-map-specification/objects/traceConfiguration/}.
|
|
31
|
+
*/
|
|
32
|
+
export interface TraceConfiguration {
|
|
33
|
+
/**
|
|
34
|
+
* A unique identifying string for the trace configuration.
|
|
35
|
+
*/
|
|
36
|
+
id?: string;
|
|
37
|
+
/**
|
|
38
|
+
* A user-friendly string title for the trace configuration that can be
|
|
39
|
+
* used in a table of contents.
|
|
40
|
+
*/
|
|
41
|
+
title?: string;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -45,6 +45,11 @@ export declare namespace VectorTileLayer {
|
|
|
45
45
|
* {@link https://developers.arcgis.com/web-scene-specification/objects/vectorTileLayer/}.
|
|
46
46
|
*/
|
|
47
47
|
export interface VectorTileLayer extends OperationalLayerBase, BaseMapLayerBase {
|
|
48
|
+
/**
|
|
49
|
+
* A sequence of custom parameters appended to the URL of all requests
|
|
50
|
+
* related to supporting ArcGIS layer types.
|
|
51
|
+
*/
|
|
52
|
+
customParameters?: Record<string, unknown>;
|
|
48
53
|
/**
|
|
49
54
|
* Optional string containing the item ID of the service if it's registered
|
|
50
55
|
* on ArcGIS Online or your organization's portal.
|
package/portal/WebMap.d.ts
CHANGED
|
@@ -6,10 +6,13 @@ import { BaseMap } from "./BaseMap.js";
|
|
|
6
6
|
import type { Bookmark } from "./Bookmark.js";
|
|
7
7
|
import type { InitialState } from "./InitialState.js";
|
|
8
8
|
import { Item } from "./Item.js";
|
|
9
|
+
import { MapFloorInfo } from "./MapFloorInfo.js";
|
|
10
|
+
import type { MapRangeInfo } from "./MapRangeInfo.js";
|
|
9
11
|
import type { OperationalLayer } from "./OperationalLayer.js";
|
|
10
12
|
import type { Presentation } from "./Presentation.js";
|
|
11
13
|
import { SpatialReference } from "./SpatialReference.js";
|
|
12
14
|
import type { Table } from "./Table.js";
|
|
15
|
+
import type { UtilityNetwork } from "./UtilityNetwork.js";
|
|
13
16
|
import { Viewpoint as PortalViewpoint } from "./Viewpoint.js";
|
|
14
17
|
import type { Widgets } from "./Widgets.js";
|
|
15
18
|
export declare namespace WebMap {
|
|
@@ -80,6 +83,14 @@ export interface WebMap {
|
|
|
80
83
|
* The initial state at which to open the map.
|
|
81
84
|
*/
|
|
82
85
|
initialState?: InitialState;
|
|
86
|
+
/**
|
|
87
|
+
* Contains floor-awareness information for the map.
|
|
88
|
+
*/
|
|
89
|
+
mapFloorInfo?: MapFloorInfo;
|
|
90
|
+
/**
|
|
91
|
+
* Map range information.
|
|
92
|
+
*/
|
|
93
|
+
mapRangeInfo?: MapRangeInfo;
|
|
83
94
|
/**
|
|
84
95
|
* Operational layers contain your business data. They are used to make
|
|
85
96
|
* thematic maps. Usually, a basemap sits beneath your operational layers to
|
|
@@ -100,6 +111,11 @@ export interface WebMap {
|
|
|
100
111
|
* Specify an array of table objects.
|
|
101
112
|
*/
|
|
102
113
|
tables?: Table[];
|
|
114
|
+
/**
|
|
115
|
+
* An array of utility network objects the map can use to access
|
|
116
|
+
* utility-related functionality, such as tracing and querying associations.
|
|
117
|
+
*/
|
|
118
|
+
utilityNetworks?: UtilityNetwork[];
|
|
103
119
|
/**
|
|
104
120
|
* Root element in the web map specifying a string value indicating the web
|
|
105
121
|
* map version.
|
package/portal/WebMap.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Viewpoint from"@arcgis/core/Viewpoint";import EsriWebMap from"@arcgis/core/WebMap";import EsriSpatialReference from"@arcgis/core/geometry/SpatialReference";import{geographicToWebMercator}from"@arcgis/core/geometry/support/webMercatorUtils";import EsriPortalItem from"@arcgis/core/portal/PortalItem";import EsriBookmark from"@arcgis/core/webmap/Bookmark";import InitialViewProperties from"@arcgis/core/webmap/InitialViewProperties";import{applyToEsriTable,toEsriApiTable}from"../data/Table.js";import{WellKnownBasemap}from"../support/esri.js";import{basemapsAreEquivalent,standardBasemaps}from"../utilities/_layers.js";import{checkArg}from"../utilities/checkArg.js";import{Collection,compareAsync}from"../utilities/collection.js";import{BaseMap}from"./BaseMap.js";import{toEsriApiGeometry}from"./Geometry.js";import{Item}from"./Item.js";import{LayerBase}from"./LayerBase.js";import{SpatialReference}from"./SpatialReference.js";import{Viewpoint as PortalViewpoint}from"./Viewpoint.js";export var WebMap;function readSourceVersion(e){const i=e.split("."),r=i[1];return{major:parseInt(i[0],10),minor:parseInt(r,10)}}function getInitialExtent(e,i){var r,
|
|
1
|
+
import Viewpoint from"@arcgis/core/Viewpoint";import EsriWebMap from"@arcgis/core/WebMap";import EsriSpatialReference from"@arcgis/core/geometry/SpatialReference";import{geographicToWebMercator}from"@arcgis/core/geometry/support/webMercatorUtils";import EsriPortalItem from"@arcgis/core/portal/PortalItem";import EsriBookmark from"@arcgis/core/webmap/Bookmark";import InitialViewProperties from"@arcgis/core/webmap/InitialViewProperties";import{applyToEsriTable,toEsriApiTable}from"../data/Table.js";import{WellKnownBasemap}from"../support/esri.js";import{basemapsAreEquivalent,standardBasemaps}from"../utilities/_layers.js";import{checkArg}from"../utilities/checkArg.js";import{Collection,compareAsync}from"../utilities/collection.js";import{BaseMap}from"./BaseMap.js";import{toEsriApiGeometry}from"./Geometry.js";import{Item}from"./Item.js";import{LayerBase}from"./LayerBase.js";import{MapFloorInfo}from"./MapFloorInfo.js";import{SpatialReference}from"./SpatialReference.js";import{Viewpoint as PortalViewpoint}from"./Viewpoint.js";export var WebMap;function readSourceVersion(e){const i=e.split("."),r=i[1];return{major:parseInt(i[0],10),minor:parseInt(r,10)}}function getInitialExtent(e,i){var r,o;let a;const t=null===(r=e.initialViewProperties)||void 0===r?void 0:r.spatialReference,s=(null==i?void 0:i.extent)||(null===(o=e.portalItem)||void 0===o?void 0:o.extent);return t&&s&&(a=a=t.isWebMercator?geographicToWebMercator(s):s.clone()),a}function processEsriApiLayers(e,i){i.operationalLayers=[];for(let r=0;r<e.length;r++)i.operationalLayers.push(LayerBase.fromEsriApiLayer(e.getItemAt(r)))}!function(e){async function i(e,i,r){var o,a;if(checkArg("json",e).isNotMissing(),checkArg("map",i).isNotMissing(),i instanceof EsriWebMap){const t=i;if(e.hasOwnProperty("authoringApp")&&(t.authoringApp=e.authoringApp),e.hasOwnProperty("authoringAppVersion")&&(t.authoringAppVersion=e.authoringAppVersion),e.hasOwnProperty("bookmarks")&&(t.bookmarks.removeAll(),t.bookmarks.addMany((null!==(o=e.bookmarks)&&void 0!==o?o:[]).map((e=>{var i;return new EsriBookmark({name:e.name,thumbnail:e.thumbnail,viewpoint:null!==(i=e.viewpoint&&Viewpoint.fromJSON(e.viewpoint))&&void 0!==i?i:new Viewpoint({targetGeometry:toEsriApiGeometry(e.extent)})})})))),e.hasOwnProperty("presentation"),i.initialViewProperties||(i.initialViewProperties=new InitialViewProperties),e.hasOwnProperty("spatialReference")?i.initialViewProperties.spatialReference=SpatialReference.toEsriApiSpatialReference(e.spatialReference):null===i.initialViewProperties.spatialReference&&(i.initialViewProperties.spatialReference=EsriSpatialReference.WebMercator),null===(a=e.initialState)||void 0===a?void 0:a.viewpoint)i.initialViewProperties.viewpoint=PortalViewpoint.toEsriApiViewpoint(e.initialState.viewpoint);else if(e.hasOwnProperty("$initialViewpoint"))console.warn("The '$initialViewpoint' property has been deprecated as of August 2020 and will be removed in a future release. Use WebMap.initialState.viewpoint"),i.initialViewProperties.viewpoint=PortalViewpoint.toEsriApiViewpoint(e.$initialViewpoint);else{const e=getInitialExtent(t,r);e&&(i.initialViewProperties.viewpoint=new Viewpoint({targetGeometry:e}))}e.hasOwnProperty("mapFloorInfo")&&e.mapFloorInfo&&(i.floorInfo=MapFloorInfo.toEsriApiFloorInfo(e.mapFloorInfo)),e.hasOwnProperty("tables")&&e.tables&&await compareAsync(i.tables,e.tables,{onNew:async(e,r)=>{i.tables.add(await toEsriApiTable(e),r)},onMatch:async(e,r,o,a)=>{o!==a&&i.tables.reorder(e,a),await applyToEsriTable(r,e)},onMissing:e=>{i.tables.remove(e)},equals:(e,i)=>e.id===i.id||e.title===i.title}),e.hasOwnProperty("version")&&t._set("sourceVersion",readSourceVersion(e.version))}const t=r?r.portal:void 0;e.hasOwnProperty("baseMap")&&(i.basemap&&basemapsAreEquivalent(i.basemap,e.baseMap)?await BaseMap.applyToEsriApiBasemap(e.baseMap,i.basemap,t):i.basemap=await BaseMap.toEsriApiBasemap(e.baseMap,t)),e.hasOwnProperty("operationalLayers")&&await LayerBase.applyToEsriApiLayers(i.layers,e.operationalLayers,t)}e.toEsriApiWebMap=async function(e,r){checkArg("json",e).isNotMissing();const o=new EsriWebMap,a={...e},t=[];let s;return a.version||(t.push("'version' -- assuming '2.8'"),a.version="2.8"),a.baseMap||(t.push("'baseMap' -- assuming 'topo-vector'"),a.baseMap=standardBasemaps[WellKnownBasemap.TOPO_VECTOR]),a.spatialReference||t.push("'spatialReference' -- assuming 'Web Mercator'"),t.length&&console.warn(`WebMap JSON is missing the following required properties: ${t.join(", ")}`),r&&(s=r instanceof EsriPortalItem?r:Item.toEsriApiPortalItem(r),await s.load()),await i(a,o,s),o},e.applyToEsriApiMap=i,e.fromEsriApiMap=function(e){var i,r;checkArg("map",e).isNotMissing();const o={};if(e instanceof EsriWebMap){const a=e;a.hasOwnProperty("authoringApp")&&(o.authoringApp=a.authoringApp),a.hasOwnProperty("authoringAppVersion")&&(o.authoringAppVersion=a.authoringAppVersion),Collection.isCollection(a.bookmarks)&&(o.bookmarks=a.bookmarks.toArray().map((e=>{var i,r;return{name:e.name,extent:null===(i=e.extent)||void 0===i?void 0:i.toJSON(),viewpoint:null===(r=e.viewpoint)||void 0===r?void 0:r.toJSON(),thumbnail:e.thumbnail}}))),a.hasOwnProperty("sourceVersion")&&a.sourceVersion&&(o.version=`${a.sourceVersion.major}.${a.sourceVersion.minor}`),(null===(i=a.initialViewProperties)||void 0===i?void 0:i.spatialReference)&&(o.spatialReference=SpatialReference.fromEsriApiSpatialReference(a.initialViewProperties.spatialReference)),(null===(r=a.initialViewProperties)||void 0===r?void 0:r.viewpoint)&&(o.initialState={viewpoint:PortalViewpoint.fromEsriApiViewpoint(a.initialViewProperties.viewpoint)}),a.hasOwnProperty("floorInfo")&&a.floorInfo&&(o.mapFloorInfo=MapFloorInfo.fromEsriApiFloorInfo(a.floorInfo)),a.hasOwnProperty("tables")&&a.tables&&(o.tables=a.tables.toArray().map((e=>{const i=LayerBase.fromEsriApiLayer(e);return delete i.layerType,i}))),o.version=isNaN(a.version)?"2.6":a.version}return e.hasOwnProperty("basemap")&&e.basemap&&(o.baseMap=BaseMap.fromEsriApiBasemap(e.basemap)),processEsriApiLayers(e.layers,o),o}}(WebMap||(WebMap={}));
|
package/portal/WebScene.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { Ground } from "./Ground.js";
|
|
|
6
6
|
import type { HeightModelInfo } from "./HeightModelInfo.js";
|
|
7
7
|
import { InitialState } from "./InitialState.js";
|
|
8
8
|
import { Item } from "./Item.js";
|
|
9
|
+
import { MapFloorInfo } from "./MapFloorInfo.js";
|
|
9
10
|
import type { MapRangeInfo } from "./MapRangeInfo.js";
|
|
10
11
|
import type { OperationalLayer } from "./OperationalLayer.js";
|
|
11
12
|
import { Presentation } from "./Presentation.js";
|
|
@@ -94,6 +95,10 @@ export interface WebScene {
|
|
|
94
95
|
* Defines the initial state when opening web scene.
|
|
95
96
|
*/
|
|
96
97
|
initialState?: InitialState;
|
|
98
|
+
/**
|
|
99
|
+
* Contains floor-awareness information for the web scene.
|
|
100
|
+
*/
|
|
101
|
+
mapFloorInfo?: MapFloorInfo;
|
|
97
102
|
/**
|
|
98
103
|
* Map Range Information.
|
|
99
104
|
*/
|
package/portal/WebScene.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Viewpoint from"@arcgis/core/Viewpoint";import EsriWebScene from"@arcgis/core/WebScene";import{geographicToWebMercator}from"@arcgis/core/geometry/support/webMercatorUtils";import EsriPortalItem from"@arcgis/core/portal/PortalItem";import EsriInitialViewProperties from"@arcgis/core/webscene/InitialViewProperties";import{applyToEsriTable,toEsriApiTable}from"../data/Table.js";import{checkArg}from"../utilities/checkArg.js";import{compareAsync}from"../utilities/collection.js";import{ElevationLayer}from"./ElevationLayer.js";import{FeatureLayerMode}from"./FeatureLayer.js";import{Ground}from"./Ground.js";import{InitialState}from"./InitialState.js";import{Item}from"./Item.js";import{LayerBase}from"./LayerBase.js";import{Presentation}from"./Presentation.js";import{SpatialReference}from"./SpatialReference.js";import{WebSceneBaseMap}from"./WebSceneBaseMap.js";import{resolveRelativeHrefs}from"./_utils.js";export var WebScene;function readSourceVersion(e){const
|
|
1
|
+
import Viewpoint from"@arcgis/core/Viewpoint";import EsriWebScene from"@arcgis/core/WebScene";import{geographicToWebMercator}from"@arcgis/core/geometry/support/webMercatorUtils";import EsriPortalItem from"@arcgis/core/portal/PortalItem";import EsriInitialViewProperties from"@arcgis/core/webscene/InitialViewProperties";import{applyToEsriTable,toEsriApiTable}from"../data/Table.js";import{checkArg}from"../utilities/checkArg.js";import{compareAsync}from"../utilities/collection.js";import{ElevationLayer}from"./ElevationLayer.js";import{FeatureLayerMode}from"./FeatureLayer.js";import{Ground}from"./Ground.js";import{InitialState}from"./InitialState.js";import{Item}from"./Item.js";import{LayerBase}from"./LayerBase.js";import{MapFloorInfo}from"./MapFloorInfo.js";import{Presentation}from"./Presentation.js";import{SpatialReference}from"./SpatialReference.js";import{WebSceneBaseMap}from"./WebSceneBaseMap.js";import{resolveRelativeHrefs}from"./_utils.js";export var WebScene;function readSourceVersion(e){const r=e.split("."),i=r[1];return{major:parseInt(r[0],10),minor:parseInt(i,10)}}function getInitialExtent(e,r){var i,o,a;let t;const n=null===(i=e.initialViewProperties)||void 0===i?void 0:i.spatialReference,s=null!==(o=null==r?void 0:r.extent)&&void 0!==o?o:null===(a=e.portalItem)||void 0===a?void 0:a.extent;return n&&s&&(t=n.isWebMercator?geographicToWebMercator(s):s.clone()),t}!function(e){async function r(e,r,i){checkArg("json",e).isNotMissing(),checkArg("scene",r).isNotMissing(),e.hasOwnProperty("authoringApp")&&(r.authoringApp=e.authoringApp),e.hasOwnProperty("authoringAppVersion")&&(r.authoringAppVersion=e.authoringAppVersion),e.hasOwnProperty("initialState")&&(r.initialViewProperties=InitialState.toEsriApiInitialViewProperties(e.initialState)),e.hasOwnProperty("mapFloorInfo")&&e.mapFloorInfo&&(r.floorInfo=MapFloorInfo.toEsriApiFloorInfo(e.mapFloorInfo)),e.hasOwnProperty("spatialReference")&&(r.initialViewProperties||(r.initialViewProperties=new EsriInitialViewProperties),r.initialViewProperties.spatialReference=SpatialReference.toEsriApiSpatialReference(e.spatialReference)),e.hasOwnProperty("viewingMode")&&(r.initialViewProperties||(r.initialViewProperties=new EsriInitialViewProperties),r.initialViewProperties.viewingMode=e.viewingMode);const o=getInitialExtent(r,i);o&&!r.initialViewProperties.viewpoint&&(r.initialViewProperties.viewpoint=new Viewpoint({targetGeometry:o})),e.hasOwnProperty("version")&&r._set("sourceVersion",readSourceVersion(e.version)),e.hasOwnProperty("presentation")&&(r.presentation=await Presentation.toEsriApiPresentation(e.presentation));const a=i?i.portal:void 0;if(e.hasOwnProperty("baseMap")&&(!r.basemap||r.basemap.id!==e.baseMap.id&&r.basemap.title!==e.baseMap.title?r.basemap=await WebSceneBaseMap.toEsriApiBasemap(e.baseMap,a):await WebSceneBaseMap.applyToEsriApiBasemap(e.baseMap,r.basemap,a),e.baseMap.elevationLayers)){await LayerBase.applyToEsriApiLayers(r.ground.layers,e.baseMap.elevationLayers);const i=e.baseMap.elevationLayers.map((e=>({id:e.id})));r.presentation.slides.forEach((e=>{e.visibleLayers.addMany(i)}))}e.hasOwnProperty("tables")&&e.tables&&await compareAsync(r.tables,e.tables,{onNew:async(e,i)=>{r.tables.add(await toEsriApiTable(e),i)},onMatch:async(e,i,o,a)=>{o!==a&&r.tables.reorder(e,a),await applyToEsriTable(i,e)},onMissing:e=>{r.tables.remove(e)},equals:(e,r)=>e.id===r.id||e.title===r.title}),e.hasOwnProperty("operationalLayers")&&await LayerBase.applyToEsriApiLayers(r.layers,e.operationalLayers.filter((e=>"ArcGISTiledElevationServiceLayer"!==e.layerType)),a),e.hasOwnProperty("ground")&&await Ground.applyToEsriApiGround(e.ground,r.ground,a),r.allLayers.forEach((e=>{void 0!==e.mode&&(e.mode=FeatureLayerMode.MODE_SNAPSHOT),void 0!==e.returnZ&&(e.returnZ=!0)}))}e.toEsriApiWebScene=async function(e,i){checkArg("json",e).isNotMissing();const o=new EsriWebScene,a={...e};let t;return i&&(t=i instanceof EsriPortalItem?i:Item.toEsriApiPortalItem(i),await t.load(),resolveRelativeHrefs(a,t)),a.hasOwnProperty("ground")&&a.ground.layers&&!a.ground.layers.some((e=>e.id===Ground.DEFAULT_ELEVATION_ID&&e.url===Ground.DEFAULT_ELEVATION_URL&&e.title===Ground.DEFAULT_ELEVATION_TITLE))&&(a.ground.layers=[ElevationLayer.fromEsriApiElevationLayer(await Ground.createDefaultElevationService()),...a.ground.layers]),await r(a,o,t),o},e.applyToEsriApiWebScene=r,e.fromEsriApiWebScene=function(e){checkArg("scene",e).isNotMissing();const r={};return e instanceof EsriWebScene&&(e.hasOwnProperty("authoringApp")&&(r.authoringApp=e.authoringApp),e.hasOwnProperty("authoringAppVersion")&&(r.authoringAppVersion=e.authoringAppVersion),e.hasOwnProperty("sourceVersion")&&e.sourceVersion&&(r.version=`${e.sourceVersion.major}.${e.sourceVersion.minor}`),e.initialViewProperties&&(r.initialState=InitialState.fromEsriApiInitialViewProperties(e.initialViewProperties),e.initialViewProperties.spatialReference&&(r.spatialReference=SpatialReference.fromEsriApiSpatialReference(e.initialViewProperties.spatialReference)),e.initialViewProperties.viewingMode&&(r.viewingMode=e.initialViewProperties.viewingMode)),e.hasOwnProperty("floorInfo")&&e.floorInfo&&(r.mapFloorInfo=MapFloorInfo.fromEsriApiFloorInfo(e.floorInfo)),e.hasOwnProperty("presentation")&&(r.presentation=Presentation.fromEsriApiPresentation(e.presentation))),r.version=isNaN(e.version)?"1.8":e.version,e.hasOwnProperty("basemap")&&e.basemap&&(r.baseMap=WebSceneBaseMap.fromEsriApiBasemap(e.basemap)),r.operationalLayers=e.layers.map(LayerBase.fromEsriApiLayer).toArray(),e.ground&&(r.ground=Ground.fromEsriApiGround(e.ground)),r}}(WebScene||(WebScene={}));
|
package/portal/WebTileLayer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import EsriExtent from"@arcgis/core/geometry/Extent";import Portal from"@arcgis/core/portal/Portal";import PortalItem from"@arcgis/core/portal/PortalItem";import{isWebTileLayer,isWMTSLayer}from"../utilities/_layers.js";import{checkArg}from"../utilities/checkArg.js";import{deepClone}from"../utilities/object.js";import{TileInfo}from"./TileInfo.js";import{WMTSInfo}from"./WMTSInfo.js";import{ERR_LAYER_TYPE_MISMATCH,applyLayerBaseToEsriApiLayer,applyBasemapLayerToEsriApiLayer,applyOperationalLayerToEsriApiLayer,fromEsriApiLayerToLayerBase,fromEsriApiLayerToOperationalLayer}from"./_layerHelper.js";export var WebTileLayer;!function(e){async function r(e,r,i){checkArg("layerJson",e).isNotMissing();const a=e.layerType||e.type;checkArg("layerJson.layerType",a).satisfies((e=>!e||"WebTiledLayer"===e||"OpenStreetMap"===e),ERR_LAYER_TYPE_MISMATCH),checkArg("layer",r).isNotMissing().satisfies((e=>isWebTileLayer(e)||isWMTSLayer(e)),ERR_LAYER_TYPE_MISMATCH),applyLayerBaseToEsriApiLayer(e,r),applyBasemapLayerToEsriApiLayer(e,r),applyOperationalLayerToEsriApiLayer(e,r),e.hasOwnProperty("copyright")&&(r.copyright=e.copyright),e.hasOwnProperty("fullExtent")&&(r.fullExtent=EsriExtent.fromJSON(e.fullExtent)),e.hasOwnProperty("itemId")&&isWMTSLayer(r)&&(r.portalItem?r.portalItem.id=e.itemId:r.portalItem=new PortalItem({id:e.itemId,portal:i||Portal.getDefault()})),isWebTileLayer(r)?(e.hasOwnProperty("subDomains")&&(r.subDomains=deepClone(e.subDomains)),e.hasOwnProperty("templateUrl")&&(r.urlTemplate=e.templateUrl),e.hasOwnProperty("tileInfo")&&(r.tileInfo=TileInfo.toEsriApiTileInfo(e.tileInfo))):(checkArg("layerJson.layerType",a).satisfies((e=>"WebTiledLayer"===e),ERR_LAYER_TYPE_MISMATCH),e.wmtsInfo&&await WMTSInfo.applyToEsriApiLayer(e.wmtsInfo,r))}function i(e){return void 0!==e.wmtsInfo}e.toEsriApiLayer=async function(e){checkArg("layerJson",e).isNotMissing();const a=e.layerType||e.type;checkArg("layerJson.layerType",a).satisfies((e=>!e||"WebTiledLayer"===e),ERR_LAYER_TYPE_MISMATCH);const t=i(e)?new((await import("@arcgis/core/layers/WMTSLayer")).default):new((await import("@arcgis/core/layers/WebTileLayer")).default);return await r(e,t),t},e.applyToEsriApiLayer=r,e.fromEsriApiLayer=function(e){checkArg("layer",e).isNotMissing();const r={...fromEsriApiLayerToLayerBase(e),...fromEsriApiLayerToOperationalLayer(e),layerType:"WebTiledLayer"};return delete r.showLegend,e.copyright&&(r.copyright=e.copyright),e.fullExtent&&(r.fullExtent=e.fullExtent.toJSON()),isWebTileLayer(e)?(e.subDomains&&(r.subDomains=deepClone(e.subDomains)),e.urlTemplate&&(r.templateUrl=e.urlTemplate),e.tileInfo&&(r.tileInfo=TileInfo.fromEsriApiTileInfo(e.tileInfo))):(r.wmtsInfo=WMTSInfo.fromEsriApiLayer(e),e.portalItem&&(r.itemId=e.portalItem.id)),r},e.isTileLayerWMTS=i}(WebTileLayer||(WebTileLayer={}));
|
|
1
|
+
import EsriExtent from"@arcgis/core/geometry/Extent";import Portal from"@arcgis/core/portal/Portal";import PortalItem from"@arcgis/core/portal/PortalItem";import{isWebTileLayer,isWMTSLayer}from"../utilities/_layers.js";import{checkArg}from"../utilities/checkArg.js";import{deepClone}from"../utilities/object.js";import{TileInfo}from"./TileInfo.js";import{WMTSInfo}from"./WMTSInfo.js";import{ERR_LAYER_TYPE_MISMATCH,applyLayerBaseToEsriApiLayer,applyBasemapLayerToEsriApiLayer,applyOperationalLayerToEsriApiLayer,fromEsriApiLayerToLayerBase,fromEsriApiLayerToOperationalLayer}from"./_layerHelper.js";export var WebTileLayer;!function(e){async function r(e,r,i){checkArg("layerJson",e).isNotMissing();const a=e.layerType||e.type;checkArg("layerJson.layerType",a).satisfies((e=>!e||"WebTiledLayer"===e||"OpenStreetMap"===e),ERR_LAYER_TYPE_MISMATCH),checkArg("layer",r).isNotMissing().satisfies((e=>isWebTileLayer(e)||isWMTSLayer(e)),ERR_LAYER_TYPE_MISMATCH),applyLayerBaseToEsriApiLayer(e,r),applyBasemapLayerToEsriApiLayer(e,r),applyOperationalLayerToEsriApiLayer(e,r),e.hasOwnProperty("copyright")&&(r.copyright=e.copyright),e.hasOwnProperty("fullExtent")&&(r.fullExtent=EsriExtent.fromJSON(e.fullExtent)),e.hasOwnProperty("itemId")&&isWMTSLayer(r)&&(r.portalItem?r.portalItem.id=e.itemId:r.portalItem=new PortalItem({id:e.itemId,portal:i||Portal.getDefault()})),isWebTileLayer(r)?(e.hasOwnProperty("subDomains")&&(r.subDomains=deepClone(e.subDomains)),e.hasOwnProperty("templateUrl")&&(r.urlTemplate=e.templateUrl),e.hasOwnProperty("tileInfo")&&(r.tileInfo=TileInfo.toEsriApiTileInfo(e.tileInfo))):(checkArg("layerJson.layerType",a).satisfies((e=>"WebTiledLayer"===e),ERR_LAYER_TYPE_MISMATCH),e.wmtsInfo&&await WMTSInfo.applyToEsriApiLayer(e.wmtsInfo,r))}function i(e){return void 0!==e.wmtsInfo}e.toEsriApiLayer=async function(e){checkArg("layerJson",e).isNotMissing();const a=e.layerType||e.type;checkArg("layerJson.layerType",a).satisfies((e=>!e||"WebTiledLayer"===e),ERR_LAYER_TYPE_MISMATCH);const t=i(e)?new((await import("@arcgis/core/layers/WMTSLayer")).default):new((await import("@arcgis/core/layers/WebTileLayer")).default);return await r(e,t),t},e.applyToEsriApiLayer=r,e.fromEsriApiLayer=function(e){checkArg("layer",e).isNotMissing();const r={...fromEsriApiLayerToLayerBase(e),...fromEsriApiLayerToOperationalLayer(e),layerType:"WebTiledLayer"};return delete r.showLegend,e.copyright&&(r.copyright=e.copyright),e.fullExtent&&(r.fullExtent=e.fullExtent.toJSON()),isWebTileLayer(e)?(e.subDomains&&(r.subDomains=deepClone(e.subDomains)),e.urlTemplate&&(r.templateUrl=e.urlTemplate),e.tileInfo&&(r.tileInfo=TileInfo.fromEsriApiTileInfo(e.tileInfo))):(r.wmtsInfo=WMTSInfo.fromEsriApiLayer(e),e.customParameters&&(r.wmtsInfo.customParameters=e.customParameters),e.portalItem&&(r.itemId=e.portalItem.id)),r},e.isTileLayerWMTS=i}(WebTileLayer||(WebTileLayer={}));
|
package/portal/Widgets.d.ts
CHANGED
|
@@ -14,6 +14,51 @@ export interface Widgets {
|
|
|
14
14
|
* slider widget will act upon all the time aware layers in the map.
|
|
15
15
|
*/
|
|
16
16
|
timeSlider?: TimeSlider;
|
|
17
|
+
/**
|
|
18
|
+
* Configurable properties used by the floor filter widget.
|
|
19
|
+
*/
|
|
20
|
+
floorFilter?: FloorFilter;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Configurable properties used by the floor filter widget.
|
|
24
|
+
* {@link https://developers.arcgis.com/web-map-specification/objects/floorFilter/}.
|
|
25
|
+
*/
|
|
26
|
+
export interface FloorFilter {
|
|
27
|
+
/**
|
|
28
|
+
* Indicates whether the floor filter is actively filtering the displayed
|
|
29
|
+
* content according to the floor filter selection.
|
|
30
|
+
*/
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Contains a facility identifier for the initially selected facility in
|
|
34
|
+
* the floor filter.
|
|
35
|
+
*/
|
|
36
|
+
facility?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Contains a level identifier for the initially selected floor, which is
|
|
39
|
+
* used when filtering floor-aware layers.
|
|
40
|
+
*/
|
|
41
|
+
level?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Indicates whether the floor filter is showing long names instead of short
|
|
44
|
+
* names for floor levels.
|
|
45
|
+
*/
|
|
46
|
+
longNames?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Indicates whether the floor filter has been minimized to show only the
|
|
49
|
+
* levels list instead of showing the full set of breadcrumbs.
|
|
50
|
+
*/
|
|
51
|
+
minimized?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Indicates whether the floor filter has been pinned to show the floor
|
|
54
|
+
* levels list, instead of including the levels as a breadcrumb dropdown.
|
|
55
|
+
*/
|
|
56
|
+
pinnedLevels?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Contains a site identifier for the initially selected site in the floor
|
|
59
|
+
* filter.
|
|
60
|
+
*/
|
|
61
|
+
siteIdentifier?: string;
|
|
17
62
|
}
|
|
18
63
|
/**
|
|
19
64
|
* Time animation is controlled by a configurable time slider. Those
|
package/version.d.ts
CHANGED
package/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version="32.
|
|
1
|
+
export const version="32.10.0";
|