@vertigis/arcgis-extensions 52.1.1 → 53.0.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 +1986 -330
- package/data/Feature.d.ts +1 -1
- package/data/FeatureList.d.ts +1 -1
- package/data/FeatureList.js +1 -1
- package/data/FeatureSet.d.ts +27 -4
- package/data/FeatureSet.js +1 -1
- package/data/FeatureSettings.d.ts +6 -1
- package/data/FeatureSettings.js +1 -1
- package/data/Schema.d.ts +32 -2
- package/data/Schema.js +1 -1
- package/data/TaskSettings.d.ts +6 -1
- package/data/_TableExtension.d.ts +1 -1
- package/data/support/_dxfConverters.d.ts +2 -1
- package/data/support/_dxfFunctions.d.ts +2 -1
- package/declarations/arcgis-js-api-extensions/index.d.ts +12 -217
- package/declarations/arcgis-js-api-extensions/modules.d.ts +99 -0
- package/docs/html/assets/highlight.css +16 -16
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/Entity.EntityBase.html +7 -10
- package/docs/html/classes/data_ArcGISServiceTableExtension.ArcGISServiceTableExtension.html +7 -10
- package/docs/html/classes/data_Attachment.Attachment.html +7 -10
- package/docs/html/classes/data_Feature.Feature.html +7 -10
- package/docs/html/classes/data_FeatureList.FeatureList.html +56 -28
- package/docs/html/classes/data_FeatureSet.FeatureSet.html +6 -5
- package/docs/html/classes/data_FeatureSettings.FeatureSettings.html +6 -3
- package/docs/html/classes/data_FeatureSourceBase.FeatureSourceBase.html +7 -10
- package/docs/html/classes/data_FeatureSourceBase.RelationshipCollection.html +53 -25
- package/docs/html/classes/data_FeatureStream.FeatureStream.html +7 -10
- package/docs/html/classes/data_FieldExtension.FieldExtension.html +7 -10
- package/docs/html/classes/data_PopupContentExtension.PopupContentExtension.html +7 -10
- package/docs/html/classes/data_RelationshipBase.RelationshipBase.html +7 -10
- package/docs/html/classes/data_Schema.Schema.html +6 -3
- package/docs/html/classes/data_TaskSettings.TaskSettings.html +5 -2
- package/docs/html/classes/data__TableExtension.TableExtension.html +7 -10
- package/docs/html/classes/data__TableExtension.TableFeatureSettings.html +6 -3
- package/docs/html/classes/data__TableExtension.TableSchema.html +7 -4
- package/docs/html/classes/data_support__dxfConverters.DxfEntityProcessor.html +2 -2
- package/docs/html/classes/layer_preset_LayerPreset.LayerPreset.html +7 -10
- package/docs/html/classes/mapping_ArcGISSublayerExtension.ArcGISSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_ArcGISSublayerExtension.ArcGISSublayerRelationshipCollection.html +54 -26
- package/docs/html/classes/mapping_BasemapExtension.BasemapExtension.html +8 -11
- package/docs/html/classes/mapping_Bookmark.Bookmark.html +7 -10
- package/docs/html/classes/mapping_BuildingComponentSublayerExtension.BuildingComponentSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_BuildingComponentSublayerExtension.BuildingComponentSublayerSchema.html +5 -2
- package/docs/html/classes/mapping_BuildingGroupSublayerExtension.BuildingGroupSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_BuildingGroupSublayerExtension.BuildingGroupSublayerSchema.html +5 -2
- package/docs/html/classes/mapping_BuildingSceneLayerExtension.BuildingSceneLayerExtension.html +14 -17
- package/docs/html/classes/mapping_BuildingSceneLayerExtension.BuildingSceneLayerReadOnlySchema.html +5 -2
- package/docs/html/classes/mapping_BuildingSublayerExtension.BuildingSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_BuildingSublayerExtension.BuildingSublayerFeatureSettings.html +5 -2
- package/docs/html/classes/mapping_BuildingSublayerExtension.BuildingSublayerSchema.html +5 -2
- package/docs/html/classes/mapping_CSVLayerExtension.CSVLayerExtension.html +12 -15
- package/docs/html/classes/mapping_ElevationLayerExtension.ElevationLayerExtension.html +14 -17
- package/docs/html/classes/mapping_FeatureCollectionLayerExtension.FeatureCollectionLayerExtension.html +14 -17
- package/docs/html/classes/mapping_FeatureLayerExtension.FeatureLayerExtension.html +12 -15
- package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerExtensionBase.html +14 -17
- package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerReadOnlySchema.html +5 -2
- package/docs/html/classes/mapping_FeatureLayerExtensionBase.FeatureLayerSchema.html +5 -2
- package/docs/html/classes/mapping_GeoJSONLayerExtension.GeoJSONLayerExtension.html +12 -15
- package/docs/html/classes/mapping_GeoRSSLayerExtension.GeoRSSLayerExtension.html +14 -17
- package/docs/html/classes/mapping_GraphicsLayerExtension.GraphicsLayerExtension.html +14 -17
- package/docs/html/classes/mapping_GroundExtension.GroundExtension.html +8 -11
- package/docs/html/classes/mapping_GroupLayerExtension.GroupLayerExtension.html +15 -18
- package/docs/html/classes/mapping_GroupLayerExtension.GroupLayerExtensionCollection.html +76 -25
- package/docs/html/classes/mapping_ImageryLayerExtension.ImageryLayerExtension.html +14 -17
- package/docs/html/classes/mapping_ImageryTileLayerExtension.ImageryTileLayerExtension.html +14 -17
- package/docs/html/classes/mapping_IntegratedMeshLayerExtension.IntegratedMeshLayerExtension.html +14 -17
- package/docs/html/classes/mapping_KMLLayerExtension.KMLLayerExtension.html +14 -17
- package/docs/html/classes/mapping_KMLSublayerExtension.KMLSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_MapConstraints.MapConstraints.html +5 -2
- package/docs/html/classes/mapping_MapExtension.MapExtension.html +7 -10
- package/docs/html/classes/mapping_MapImageLayerExtension.MapImageLayerExtension.html +14 -17
- package/docs/html/classes/mapping_MapImageSublayerExtension.MapImageSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_MapNotesLayerExtension.MapNotesLayerExtension.html +14 -17
- package/docs/html/classes/mapping_MapNotesSublayerExtension.MapNotesSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_MapNotesSublayerExtension.MapNotesSublayerExtensionSchema.html +5 -2
- package/docs/html/classes/mapping_MediaLayerExtension.MediaLayerExtension.html +14 -17
- package/docs/html/classes/mapping_OpenStreetMapLayerExtension.OpenStreetMapLayerExtension.html +14 -17
- package/docs/html/classes/mapping_PointCloudLayerExtension.PointCloudLayerExtension.html +14 -17
- package/docs/html/classes/mapping_RouteLayerExtension.RouteLayerExtension.html +14 -17
- package/docs/html/classes/mapping_RouteLayerExtension.RouteLayerExtensionSchema.html +5 -2
- package/docs/html/classes/mapping_SceneLayerExtension.SceneLayerExtension.html +14 -17
- package/docs/html/classes/mapping_StreamLayerExtension.StreamLayerExtension.html +14 -17
- package/docs/html/classes/mapping_StreamLayerExtension.StreamLayerSchema.html +5 -2
- package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerExtension.html +14 -17
- package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerRelationshipCollection.html +54 -26
- package/docs/html/classes/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerSchema.html +5 -2
- package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerRelationshipCollection.html +54 -26
- package/docs/html/classes/mapping_SubtypeSublayerExtension.SubtypeSublayerSchema.html +5 -2
- package/docs/html/classes/mapping_TileLayerExtension.TileLayerExtension.html +14 -17
- package/docs/html/classes/mapping_TileSublayerExtension.TileSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_UnsupportedLayerExtension.UnsupportedLayerExtension.html +14 -17
- package/docs/html/classes/mapping_VectorTileLayerExtension.VectorTileLayerExtension.html +14 -17
- package/docs/html/classes/mapping_WFSLayerExtension.WFSLayerExtension.html +14 -17
- package/docs/html/classes/mapping_WMSLayerExtension.WMSLayerExtension.html +14 -17
- package/docs/html/classes/mapping_WMSSublayerExtension.WMSSublayerExtension.html +12 -15
- package/docs/html/classes/mapping_WMTSLayerExtension.WMTSLayerExtension.html +14 -17
- package/docs/html/classes/mapping_WebTileLayerExtension.WebTileLayerExtension.html +14 -17
- package/docs/html/classes/mapping__LayerExtension.LayerExtension.html +14 -17
- package/docs/html/classes/mapping__LayerExtension.LayerExtensionReadOnlySchema.html +5 -2
- package/docs/html/classes/mapping__LayerExtension.LayerExtensionSchema.html +5 -2
- package/docs/html/classes/mapping__LayerExtensionCollectionImpl.LayerExtensionCollectionImpl.html +76 -25
- package/docs/html/classes/mapping__SublayerExtension.SubSublayerExtensionCollection.html +76 -25
- package/docs/html/classes/mapping__SublayerExtension.SublayerExtension.html +12 -15
- package/docs/html/classes/mapping__SublayerExtension.SublayerSchema.html +5 -2
- package/docs/html/classes/mapping_support_ArrayWrappedCollection.ArrayWrappedCollection.html +53 -25
- package/docs/html/classes/mapping_support__LayerExtensionCollection.LayerExtensionCollectionBase.html +76 -25
- package/docs/html/classes/mapping_support__SublayerExtensionCollection.SublayerExtensionCollectionBase.html +76 -25
- package/docs/html/classes/menus_Menu.Menu.html +7 -10
- package/docs/html/classes/menus_MenuItem.MenuItem.html +7 -10
- package/docs/html/classes/support_FormatSettings.FormatSettings.html +5 -2
- package/docs/html/classes/support_InitializableBase.InitializableBase.html +6 -9
- package/docs/html/classes/support_InitializableCollectionProxy.InitializableCollectionProxy.html +53 -25
- package/docs/html/classes/support_ReadOnlyInitializableCollection.ReadOnlyInitializableCollection.html +53 -25
- package/docs/html/classes/support_Settings.Settings.html +5 -2
- package/docs/html/classes/support__ArcGISRelationshipCollection.ArcGISRelationshipCollection.html +54 -26
- package/docs/html/classes/tasks_geocoding_ArcGISGeocoder.ArcGISGeocoder.html +7 -10
- package/docs/html/classes/tasks_geocoding_Geocoder.Geocoder.html +7 -10
- package/docs/html/classes/tasks_identify_IdentifyService.IdentifyService.html +7 -10
- package/docs/html/classes/tasks_identify_WMSLayerFeatureInfoIdentifyProvider.WMSLayerFeatureInfoIdentifyProvider.html +2 -2
- package/docs/html/classes/tasks_query_ArcGISRelationship.ArcGISRelationship.html +7 -10
- package/docs/html/classes/tasks_query_QueryBasedRelationship.QueryBasedRelationship.html +7 -10
- package/docs/html/classes/tasks_query_QueryService.QueryService.html +8 -11
- package/docs/html/classes/tasks_query_SubtypeSublayerQueryProvider.SubtypeSublayerQueryProvider.html +2 -2
- package/docs/html/classes/tasks_search_SearchService.SearchService.html +8 -11
- package/docs/html/classes/utilities_CaseInsensitiveObservableMap.CaseInsensitiveObservableMap.html +6 -5
- package/docs/html/classes/utilities_CollectionProxy.CollectionProxy.html +56 -29
- package/docs/html/classes/utilities_CopyOnWriteCollection.CopyOnWriteCollection.html +53 -25
- package/docs/html/classes/utilities_MapTransformCollection.MapTransformCollection.html +53 -25
- package/docs/html/classes/utilities_ObservableMap.ObservableMap.html +6 -5
- package/docs/html/classes/utilities_ObservableSet.ObservableSet.html +6 -5
- package/docs/html/classes/utilities_ReadOnlyCollection.ReadOnlyCollection.html +53 -25
- package/docs/html/classes/utilities_ReadOnlyMap.ReadOnlyMap.html +35 -9
- package/docs/html/classes/utilities__ReferenceCountedHandle.default.html +2 -2
- package/docs/html/enums/support_esri.WellKnownBasemap.html +9 -1
- package/docs/html/functions/json_BasemapJson.basemapToJson.html +4 -0
- package/docs/html/functions/json_BasemapJson.jsonToBasemap.html +1 -1
- package/docs/html/functions/mapping_support_LayerListSettings.fromLayerListMode.html +1 -1
- package/docs/html/functions/support_observableUtils.observable-1.html +3 -3
- package/docs/html/functions/support_observableUtils.onWatch.html +1 -1
- package/docs/html/functions/support_observableUtils.watch.html +1 -1
- package/docs/html/functions/support_observableUtils.watchEach.html +1 -1
- package/docs/html/functions/support_observableUtils.watchEvent.html +3 -3
- package/docs/html/functions/utilities_basemaps.basemapHas3DLayers.html +4 -0
- package/docs/html/functions/utilities_basemaps.getStandardBasemapThumbnailUrl.html +3 -0
- package/docs/html/functions/utilities_basemaps.isStandardBasemap2D.html +3 -0
- package/docs/html/functions/utilities_checkArg.checkArg.html +1 -1
- package/docs/html/functions/utilities_renderers.isClassBreaksRenderer.html +1 -1
- package/docs/html/functions/utilities_renderers.isDictionaryRenderer.html +1 -1
- package/docs/html/functions/utilities_renderers.isDotDensityRenderer.html +1 -1
- package/docs/html/functions/utilities_renderers.isHeatMapRenderer.html +1 -1
- package/docs/html/functions/utilities_renderers.isRenderer.html +2 -2
- package/docs/html/functions/utilities_renderers.isSimpleRenderer.html +1 -1
- package/docs/html/functions/utilities_renderers.isUniqueValueRenderer.html +1 -1
- package/docs/html/functions/utilities_symbol.isPolygonGeometrySymbol.html +2 -2
- package/docs/html/functions/utilities_watch.onCollectionPropertyChange.html +3 -3
- package/docs/html/functions/utilities_watch.onEach.html +4 -4
- package/docs/html/functions/utilities_watch.onOnce.html +5 -5
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/interfaces/data_Feature.PresentableAttributes.html +36 -10
- package/docs/html/interfaces/data_FeatureSet.FeatureSetEvents.html +12 -0
- package/docs/html/interfaces/data_PopupContentExtension.ContentProperties.html +2 -2
- package/docs/html/interfaces/data_Schema.FieldCollection.html +1 -1
- package/docs/html/interfaces/data_Schema.SchemaEvents.html +16 -0
- package/docs/html/interfaces/data_support__dxfInterfaces.IDxfJsonComponentContext.html +2 -2
- package/docs/html/interfaces/data_support_attachments.AttachmentEnabledLayer.html +19 -6
- package/docs/html/interfaces/json_AnnotationLayerJson.AnnotationLayerJson.html +2 -2
- package/docs/html/interfaces/json_BasemapLayerJson.BasemapLayerJsonBase.html +1 -1
- package/docs/html/interfaces/json_BuildingSceneLayerJson.BuildingSceneLayerJson.html +2 -2
- package/docs/html/interfaces/json_BuildingSceneSublayerJson.BuildingSceneSublayerJson.html +2 -2
- package/docs/html/interfaces/json_CSVLayerJson.CSVLayerJson.html +2 -2
- package/docs/html/interfaces/json_EnvironmentJson.SnowyWeatherJson.html +2 -2
- package/docs/html/interfaces/json_FeatureLayerJson.FeatureLayerJson.html +2 -2
- package/docs/html/interfaces/json_GeoJSONLayerJson.GeoJSONLayerJson.html +2 -2
- package/docs/html/interfaces/json_GeoRSSLayerJson.GeoRSSLayerJson.html +2 -2
- package/docs/html/interfaces/json_GroupLayerJson.GroupLayerJson.html +2 -2
- package/docs/html/interfaces/json_ImageServiceLayerJson.ImageServiceLayerJson.html +2 -2
- package/docs/html/interfaces/json_ImageServiceVectorLayerJson.ImageServiceVectorLayerJson.html +2 -2
- package/docs/html/interfaces/json_IntegratedMeshLayerJson.IntegratedMeshLayerJson.html +2 -2
- package/docs/html/interfaces/json_KMLLayerJson.KMLLayerJson.html +2 -2
- package/docs/html/interfaces/json_MapServiceLayerJson.MapServiceLayerJson.html +2 -2
- package/docs/html/interfaces/json_MediaLayerJson.MediaLayerJson.html +2 -2
- package/docs/html/interfaces/json_OperationalLayerJson.OperationalLayerJsonBase.html +2 -2
- package/docs/html/interfaces/json_PointCloudLayerJson.PointCloudLayerJson.html +2 -2
- package/docs/html/interfaces/json_PopupInfoJson.PopupElementJson.html +2 -2
- package/docs/html/interfaces/json_RasterDataElevationLayerJson.RasterDataElevationLayerJson.html +2 -2
- package/docs/html/interfaces/json_RendererJson.SizeInfoJson.html +2 -2
- package/docs/html/interfaces/json_SceneLayerJson.SceneLayerJson.html +23 -13
- package/docs/html/interfaces/json_StreamLayerJson.StreamLayerJson.html +2 -2
- package/docs/html/interfaces/json_SubtypeGroupLayerJson.SubtypeGroupLayerJson.html +2 -2
- package/docs/html/interfaces/json_SubtypeGroupLayerJson.SubtypeSubtypeGroupLayerJson.html +2 -2
- package/docs/html/interfaces/json_SubtypeSublayerJson.SubtypeSublayerJson.html +2 -2
- package/docs/html/interfaces/json_TiledElevationServiceLayerJson.TiledElevationServiceLayerJson.html +2 -2
- package/docs/html/interfaces/json_TiledImageServiceLayerJson.TiledImageServiceLayerJson.html +2 -2
- package/docs/html/interfaces/json_TiledMapServiceLayerJson.TiledMapServiceLayerJson.html +2 -2
- package/docs/html/interfaces/json_VectorTileLayerJson.VectorTileLayerJson.html +2 -2
- package/docs/html/interfaces/json_WFSLayerJson.WFSLayerJson.html +2 -2
- package/docs/html/interfaces/json_WMSLayerJson.WMSLayerJson.html +2 -2
- package/docs/html/interfaces/json_WebSceneJson.HeightModelInfoJson.html +2 -2
- package/docs/html/interfaces/json_WebTileLayerJson.WebTileLayerJson.html +2 -2
- package/docs/html/interfaces/mapping_ArcGISSublayerExtension.ArcGISSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_BuildingComponentSublayerExtension.BuildingComponentSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_BuildingGroupSublayerExtension.BuildingGroupSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_BuildingSceneLayerExtension.BuildingSceneLayerExtensionProperties.html +3 -3
- package/docs/html/interfaces/mapping_BuildingSceneLayerExtension.BuildingSceneLayerProperties.html +2 -2
- package/docs/html/interfaces/mapping_BuildingSublayerExtension.BuildingSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_BuildingSublayerExtension.BuildingSublayerProperties.html +2 -2
- package/docs/html/interfaces/mapping_CSVLayerExtension.CSVLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_ElevationLayerExtension.ElevationLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_FeatureLayerExtension.FeatureLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_FeatureLayerExtension.FeatureLayerProperties.html +2 -2
- package/docs/html/interfaces/mapping_FeatureLayerExtensionBase.FeatureLayerBaseProperties.html +2 -2
- package/docs/html/interfaces/mapping_FeatureLayerExtensionBase.FeatureLayerExtensionBaseProperties.html +2 -2
- package/docs/html/interfaces/mapping_GeoJSONLayerExtension.GeoJSONLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_GeoRSSLayerExtension.GeoRSSLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_GraphicsLayerExtension.GraphicsLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_GroupLayerExtension.GroupLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_ImageryLayerExtension.ImageryLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_ImageryTileLayerExtension.ImageryTileLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_IntegratedMeshLayerExtension.IntegratedMeshLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_KMLLayerExtension.KMLLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_KMLSublayerExtension.KMLSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_MapExtension.MapExtensionEvents.html +14 -0
- package/docs/html/interfaces/mapping_MapImageLayerExtension.MapImageLayerExtensionProperties.html +4 -4
- package/docs/html/interfaces/mapping_MapImageSublayerExtension.MapImageSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_MapNotesLayerExtension.MapNotesLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_MapNotesSublayerExtension.MapNotesSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_MediaLayerExtension.MediaLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_OpenStreetMapLayerExtension.OpenStreetMapLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_PointCloudLayerExtension.PointCloudLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_PointCloudLayerExtension.PointCloudLayerProperties.html +2 -2
- package/docs/html/interfaces/mapping_RouteLayerExtension.RouteLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_SceneLayerExtension.SceneLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_StreamLayerExtension.StreamLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_SubtypeGroupLayerExtension.SubtypeGroupLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_SubtypeSublayerExtension.SubtypeSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_TileLayerExtension.TileLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_TileSublayerExtension.TileSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_VectorTileLayerExtension.VectorTileLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_WFSLayerExtension.WFSLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_WMSLayerExtension.WMSLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_WMSSublayerExtension.WMSSublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_WMTSLayerExtension.WMTSLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping_WebTileLayerExtension.WebTileLayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping__LayerExtension.LayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/mapping__SublayerExtension.SublayerExtensionProperties.html +2 -2
- package/docs/html/interfaces/support_ArcGISRequestHelper.ArcGISRequestHelperResponse.html +1 -1
- package/docs/html/interfaces/support_ArcGISRequestHelper.ArcGISRequestOptions.html +2 -2
- package/docs/html/interfaces/support_InitializableBase.InitializableBaseEvents.html +7 -0
- package/docs/html/interfaces/support_InitializableCollectionProxy.InitializableCollection.html +1 -1
- package/docs/html/interfaces/support_Settings.SettingsEvents.html +7 -0
- package/docs/html/interfaces/support_esri.ChangeEvent.html +5 -5
- package/docs/html/interfaces/support_esri.LayerWithSublayers.html +1 -1
- package/docs/html/interfaces/support_esri.SublayerLike.html +2 -2
- package/docs/html/interfaces/support_observableUtils.WatchEachOptions.html +3 -3
- package/docs/html/interfaces/support_observableUtils.WatchOptions.html +3 -3
- package/docs/html/interfaces/utilities_ObservableMap.MapAfterItemEvent.html +4 -0
- package/docs/html/interfaces/utilities_ObservableMap.MapEvents.html +10 -0
- package/docs/html/interfaces/utilities_ObservableSet.SetAfterItemEvent.html +4 -0
- package/docs/html/interfaces/utilities_ObservableSet.SetChangeEvent.html +10 -0
- package/docs/html/interfaces/utilities_ObservableSet.SetEvents.html +10 -0
- package/docs/html/interfaces/utilities__layers.LayerWithLegendEnabledProperty.html +1 -1
- package/docs/html/interfaces/utilities__layers.TimeAwareLayer.html +1 -1
- package/docs/html/interfaces/utilities_collection.AfterItemChangeEvent.html +1 -1
- package/docs/html/modules/data_FeatureSet.html +2 -1
- package/docs/html/modules/data_Schema.html +1 -0
- package/docs/html/modules/json_BasemapJson.html +1 -0
- package/docs/html/modules/mapping_MapExtension.html +2 -1
- package/docs/html/modules/support_InitializableBase.html +1 -0
- package/docs/html/modules/support_Settings.html +1 -0
- package/docs/html/modules/support_esri.html +1 -6
- package/docs/html/modules/support_observableUtils.html +2 -1
- package/docs/html/modules/utilities_ObservableMap.html +3 -1
- package/docs/html/modules/utilities_ObservableSet.html +3 -0
- package/docs/html/modules/utilities_basemaps.html +4 -1
- package/docs/html/types/json_BasemapLayerJson.BasemapLayerJson.html +1 -1
- package/docs/html/types/json_SymbolJson.ColorJson.html +1 -1
- package/docs/html/types/support_observableUtils.EventTarget.html +2 -0
- package/docs/html/types/support_observableUtils.WhenOptions.html +1 -1
- package/docs/html/variables/support_esri.Collection.html +1 -1
- package/docs/html/variables/version.version.html +1 -1
- package/json/BasemapJson.d.ts +14 -2
- package/json/BasemapJson.js +1 -1
- package/json/BasemapLayerJson.d.ts +2 -1
- package/json/SceneLayerJson.d.ts +11 -1
- package/json/SymbolJson.d.ts +1 -1
- package/layer-preset/LayerPreset.js +1 -1
- package/mapping/ArcGISSublayerExtension.d.ts +2 -2
- package/mapping/BasemapExtension.d.ts +2 -1
- package/mapping/BasemapExtension.js +1 -1
- package/mapping/BuildingComponentSublayerExtension.d.ts +2 -2
- package/mapping/BuildingSceneLayerExtension.d.ts +2 -2
- package/mapping/CSVLayerExtension.d.ts +1 -1
- package/mapping/FeatureLayerExtension.d.ts +1 -1
- package/mapping/FeatureLayerExtensionBase.d.ts +2 -2
- package/mapping/GeoJSONLayerExtension.d.ts +1 -1
- package/mapping/GroundExtension.d.ts +2 -1
- package/mapping/MapExtension.d.ts +24 -4
- package/mapping/MapExtension.js +1 -1
- package/mapping/SceneLayerExtension.d.ts +2 -2
- package/mapping/StreamLayerExtension.d.ts +2 -2
- package/mapping/SubtypeSublayerExtension.d.ts +3 -3
- package/mapping/WFSLayerExtension.d.ts +2 -2
- package/mapping/_LayerExtension.d.ts +6 -5
- package/mapping/_LayerExtension.js +1 -1
- package/mapping/_SublayerExtension.d.ts +4 -2
- package/mapping/support/_LayerExtensionCollection.d.ts +3 -9
- package/mapping/support/_LayerExtensionCollection.js +1 -1
- package/mapping/support/_SublayerExtensionCollection.d.ts +4 -9
- package/mapping/support/_SublayerExtensionCollection.js +1 -1
- package/mapping/support/featureService.js +1 -1
- package/package.json +2 -2
- package/portal/CSVLayer.d.ts +1 -1
- package/portal/ElevationInfo.d.ts +4 -3
- package/portal/ElevationInfo.js +1 -1
- package/portal/LabelingInfo.js +1 -1
- package/portal/LayerDefinition.js +1 -1
- package/portal/MapServiceLayer.js +1 -1
- package/portal/Slide.js +1 -1
- package/portal/SubtypeGroupLayer.d.ts +2 -2
- package/portal/Symbol.d.ts +1 -1
- package/portal/Symbol.js +1 -1
- package/portal/TiledMapServiceLayer.d.ts +1 -1
- package/portal/TiledMapServiceLayer.js +1 -1
- package/portal/WMSLayer.d.ts +4 -3
- package/portal/WMTSInfo.d.ts +2 -2
- package/portal/WebMap.js +1 -1
- package/support/ArcGISRequestHelper.d.ts +2 -2
- package/support/FormatSettings.d.ts +6 -1
- package/support/InitializableBase.d.ts +17 -2
- package/support/InitializableBase.js +1 -1
- package/support/Serializable.d.ts +1 -1
- package/support/Serializable.js +1 -1
- package/support/Settings.d.ts +19 -0
- package/support/_esriInternal.d.ts +1 -3
- package/support/_esriInternal.js +1 -1
- package/support/esri.d.ts +10 -7
- package/support/esri.js +1 -1
- package/support/observableUtils.d.ts +8 -8
- package/support/observableUtils.js +1 -1
- package/tasks/identify/ArcGISSublayerIdentifyProvider.d.ts +1 -1
- package/tasks/identify/BuildingComponentSublayerHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/CSVLayer3DHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/CSVLayerClientSideQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/FeatureLayer3DHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/FeatureLayerClientSideIdentifyProvider.d.ts +1 -1
- package/tasks/identify/FeatureLayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/GeoJSONLayer3DHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/GeoJSONLayerClientSideQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/GeoRSSLayerIdentifyProvider.d.ts +1 -1
- package/tasks/identify/GraphicsLayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/HitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/IdentifyProviderBase.d.ts +1 -1
- package/tasks/identify/IdentifyService.d.ts +1 -1
- package/tasks/identify/ImageryLayerIdentifyProvider.d.ts +1 -1
- package/tasks/identify/KMLLayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/MapNotesSublayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/PointCloudLayerHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/RouteLayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/SceneLayerHitTestIdentifyProvider.d.ts +1 -1
- package/tasks/identify/SceneLayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/SubtypeSublayerQueryIdentifyProvider.d.ts +1 -1
- package/tasks/identify/WMSLayerFeatureInfoIdentifyProvider.d.ts +1 -1
- package/tasks/identify/WMSSublayerIdentifyProvider.d.ts +1 -1
- package/tasks/query/QueryOptions.d.ts +1 -1
- package/tasks/query/SubtypeSublayerQueryProvider.d.ts +3 -2
- package/tasks/search/SearchOptions.d.ts +1 -1
- package/tasks/search/support/_querySearchProviderUtils.d.ts +1 -1
- package/utilities/CollectionProxy.d.ts +30 -22
- package/utilities/CollectionProxy.js +1 -1
- package/utilities/MapTransformCollection.js +1 -1
- package/utilities/ObservableMap.d.ts +30 -6
- package/utilities/ObservableMap.js +1 -1
- package/utilities/ObservableSet.d.ts +52 -7
- package/utilities/ObservableSet.js +1 -1
- package/utilities/ReadOnlyMap.d.ts +10 -8
- package/utilities/_ReferenceCountedHandle.d.ts +3 -2
- package/utilities/_geoJson.d.ts +1 -1
- package/utilities/_gml.d.ts +1 -1
- package/utilities/_layers.d.ts +1 -1
- package/utilities/_layers.js +1 -1
- package/utilities/_project.d.ts +1 -1
- package/utilities/_wkt.d.ts +1 -1
- package/utilities/basemaps.d.ts +20 -1
- package/utilities/basemaps.js +1 -1
- package/utilities/collection.d.ts +2 -1
- package/utilities/esri.d.ts +1 -1
- package/utilities/geometry.d.ts +1 -1
- package/utilities/query.d.ts +1 -1
- package/utilities/renderers.d.ts +8 -8
- package/utilities/symbol.d.ts +2 -2
- package/utilities/watch.d.ts +6 -6
- package/utilities/watch.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/docs/html/types/support_esri.BuildingComponentSublayerCapabilities.html +0 -1
- package/docs/html/types/support_esri.BuildingComponentSublayerCapabilitiesData.html +0 -1
- package/docs/html/types/support_esri.CollectionAfterChangesEventHandler.html +0 -1
- package/docs/html/types/support_esri.CollectionBeforeChangesEventHandler.html +0 -1
- package/docs/html/types/support_esri.FeatureLayerElevationInfo.html +0 -1
package/json/SceneLayerJson.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BasemapLayerJsonBase } from "./BasemapLayerJson";
|
|
1
2
|
import type { LayerDefinitionJson } from "./LayerDefinitionJson";
|
|
2
3
|
import type { OperationalLayerJsonBase } from "./OperationalLayerJson";
|
|
3
4
|
import type { PopupInfoJson } from "./PopupInfoJson";
|
|
@@ -8,8 +9,17 @@ import type { PopupInfoJson } from "./PopupInfoJson";
|
|
|
8
9
|
*
|
|
9
10
|
* See
|
|
10
11
|
* {@link https://developers.arcgis.com/web-scene-specification/objects/sceneLayer/}.
|
|
12
|
+
*
|
|
13
|
+
* Note: `isReference` is not part of the web scene layer spec, but we include
|
|
14
|
+
* BasemapLayerJsonBase to align with the existing basemap-layer typing pattern
|
|
15
|
+
* used across layer JSON types.
|
|
11
16
|
*/
|
|
12
|
-
export interface SceneLayerJson extends OperationalLayerJsonBase {
|
|
17
|
+
export interface SceneLayerJson extends OperationalLayerJsonBase, BasemapLayerJsonBase {
|
|
18
|
+
/**
|
|
19
|
+
* A sequence of custom parameters appended to the URL of all requests
|
|
20
|
+
* related to supporting ArcGIS layer types.
|
|
21
|
+
*/
|
|
22
|
+
customParameters?: Record<string, unknown> | null;
|
|
13
23
|
/**
|
|
14
24
|
* Indicates whether to allow a client to ignore popups defined by the
|
|
15
25
|
* service item.
|
package/json/SymbolJson.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export type Symbol3DJson = CIMSymbolJson | CIMSymbolReferenceJson | LabelSymbol3
|
|
|
22
22
|
* {@link https://developers.arcgis.com/web-map-specification/objects/color/}
|
|
23
23
|
* {@link https://developers.arcgis.com/web-scene-specification/objects/color/}.
|
|
24
24
|
*/
|
|
25
|
-
export type ColorJson = number[];
|
|
25
|
+
export type ColorJson = [number, number, number, number] | [number, number, number];
|
|
26
26
|
/**
|
|
27
27
|
* Font used for text symbols.
|
|
28
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;import{__decorate as i}from"tslib";import s from"@arcgis/core/core/Collection";import{EntityBase as t}from"../Entity.js";import{InvalidOperationError as a}from"../InvalidOperationError.js";import{ItemType as n}from"../ItemType.js";import{
|
|
1
|
+
var e;import{__decorate as i}from"tslib";import s from"@arcgis/core/core/Collection";import{EntityBase as t}from"../Entity.js";import{InvalidOperationError as a}from"../InvalidOperationError.js";import{ItemType as n}from"../ItemType.js";import{basemapToJson as r}from"../json/BasemapJson.js";import{serializable as o}from"../support/Serializable.js";import{watch as l}from"../support/observableUtils.js";import{ObservableMap as p}from"../utilities/ObservableMap.js";import{createFlattenedLayerXList as c,createRef as d,getBackingLayer as m,isIterable as y,isLayerRefEqual as f,isSublayerRefEqual as b,toMapExtension as u}from"../utilities/_layer-preset.js";import{basemapsAreEquivalent as x,createStandardBasemap as h}from"../utilities/basemaps.js";import{map as L}from"../utilities/iterable.js";import{getLogger as v}from"../utilities/log.js";import{LayerPresetSetting as E}from"./LayerPresetSettings.js";const S=v("layer-preset");let g=e=class extends t{icon;iconUrl;title;description;layers;basemap;basemapOptions;_itemType=n.LAYER_PRESET;static createFrom(i){const s=new e,t=u(i);t.basemapExtension?.basemap&&(s.basemap=r(t.basemapExtension.basemap));for(const e of t.basemapOptions.toArray())e.included&&e.basemap&&(s.basemapOptions=s.basemapOptions||[],s.basemapOptions.push(r(e.basemap)));const a=c(t);for(const e of a.toArray()){const i=w(e);if(i){const t=e.allSublayerExtensions;if(t.length>0){i.sublayers=new p;for(const e of t.toArray().filter((e=>!!e.sublayer))){const s=w(e);s&&i.sublayers.set(d(e.sublayer),s)}}s.layers=s.layers??new Map,s.layers.set(d(e.layer),i)}}return s}async applyTo(e){if(y(e)){for(const i of e)await this.applyTo(i);return}const i=u(e);if(this.basemap){const e="string"==typeof this.basemap?await h(this.basemap):this.basemap,s=i.basemapOptions.find((i=>x(i.basemap,e)));s&&(i.basemapExtension=s,s.included=!0)}if(this.basemapOptions){const e=new s;for(const s of await Promise.all(this.basemapOptions.map((async e=>"string"==typeof e?h(e):e)))){const t=i.basemapOptions.find((e=>x(e.basemap,s)));t&&(t.included=!0,e.add(t))}for(const s of i.basemapOptions.toArray())e.includes(s)||i.basemapExtension===s||(s.included=!1)}if(this.layers){const e=c(i);e.forEach((e=>e._resolveLayer()));for(const i of this.layers.keys()){const t=d(i),a=e.find((i=>{const s=d(i);return"string"==typeof s.id&&f(s,t,e.toArray())}));if(a){const t=this.layers.get(i);O(t,a),e.remove(a);const n=()=>{const e=new s(a.allSublayerExtensions.toArray());for(const i of t.sublayers.keys()){const s=d(i),a=e.find((e=>b(d(e),s)));a&&(O(t.sublayers.get(i),a),e.remove(a))}};a.layer.loaded?n():l(a.layer,"loaded",(()=>{try{n()}catch(e){S.error({message:`Error applying LayerPreset to sublayers of LayerExtension with ID '${a.id}' and title '${a.title}'.`,error:e})}}),{once:!0})}}}}_getSerializableProperties(){return{...super._getSerializableProperties(),title:"initial",iconUrl:"initial",description:"initial",layers:{serializeModes:["initial"],serialize:e=>{if(this.layers)return Array.from(L(this.layers.entries(),(i=>{let s={layer:i[0]};const t=i[1].toJSON(e);return s={...s,...t,sublayers:t?.sublayers},s})))},deserialize:e=>{this.layers=new Map;for(const i of e){if(!i.layer)throw new a("Cannot define a LayerPresetSetting that does not have layer reference.");this.layers.set(i.layer,new E(i))}},isDefault:e=>!e},icon:"initial",basemap:"initial",basemapOptions:{serializeModes:["initial"]}}}};g=e=i([o],g);export{g as LayerPreset};function w(e){const i=new E,s=m(e);if(i.visible=s.visible,i.opacity=s.opacity,"definitionExpression"in s&&(i.definitionExpression=s.definitionExpression),e.layerListSettings.included)return i.expanded=e.layerListSettings.expanded,i}function O(e,i){const s=m(i);void 0!==e.definitionExpression&&null!==e.definitionExpression&&"definitionExpression"in s&&(s.definitionExpression=e.definitionExpression),void 0!==e.visible&&null!==e.visible&&(s.visible=e.visible),void 0!==e.opacity&&null!==e.opacity&&(s.opacity=e.opacity),void 0!==e.maxScale&&null!==e.maxScale&&(s.maxScale=e.maxScale),void 0!==e.minScale&&null!==e.minScale&&(s.minScale=e.minScale),void 0!==e.includedInLayerList&&null!==e.includedInLayerList&&(i.layerListSettings.included=e.includedInLayerList),void 0!==e.expanded&&null!==e.expanded&&(i.layerListSettings.expanded=e.expanded),void 0!==e.childrenIncludedInLayerList&&null!==e.childrenIncludedInLayerList&&(i.layerListSettings.childrenIncluded=e.childrenIncludedInLayerList)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Collection from "@arcgis/core/core/Collection";
|
|
2
2
|
import type ArcGISSublayer from "@arcgis/core/layers/support/Sublayer";
|
|
3
|
-
import type
|
|
3
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
4
4
|
import type { Attachment } from "../data/Attachment.js";
|
|
5
5
|
import type { Feature } from "../data/Feature.js";
|
|
6
6
|
import type { FeatureSettings } from "../data/FeatureSettings.js";
|
|
@@ -75,7 +75,7 @@ export interface ArcGISSublayerExtensionCollection<S extends ArcGISSublayerExten
|
|
|
75
75
|
export declare abstract class ArcGISSublayerExtension<TProperties extends ArcGISSublayerExtensionProperties = ArcGISSublayerExtensionProperties> extends SublayerExtension<TProperties> {
|
|
76
76
|
get canToggleVisibility(): boolean;
|
|
77
77
|
get supportsSublayers(): boolean;
|
|
78
|
-
get renderer():
|
|
78
|
+
get renderer(): RendererUnion;
|
|
79
79
|
/**
|
|
80
80
|
* Whether or not the associate sublayer supports pagination. This affects
|
|
81
81
|
* if we can set maxResults as an option when querying the layer.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Basemap from "@arcgis/core/Basemap";
|
|
2
2
|
import Collection from "@arcgis/core/core/Collection";
|
|
3
|
+
import type { ResourceHandle } from "@arcgis/core/core/Handles.js";
|
|
3
4
|
import type { EntityBaseProperties } from "../Entity.js";
|
|
4
5
|
import { EntityBase } from "../Entity.js";
|
|
5
6
|
import type { TaskSettingsProperties } from "../data/TaskSettings.js";
|
|
@@ -132,7 +133,7 @@ export declare class BasemapExtension<T extends BasemapExtensionProperties = Bas
|
|
|
132
133
|
* A set of watch handles that get cleaned up when the class instance is
|
|
133
134
|
* destroyed.
|
|
134
135
|
*/
|
|
135
|
-
protected readonly _watchHandles: Map<string,
|
|
136
|
+
protected readonly _watchHandles: Map<string, ResourceHandle[]>;
|
|
136
137
|
private _iconUrl;
|
|
137
138
|
private _mapExtension;
|
|
138
139
|
private _basemap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;import{__decorate as s}from"tslib";import a from"@arcgis/core/Basemap";import t from"@arcgis/core/core/Collection";import{ArgumentError as i}from"../ArgumentError.js";import{EntityBase as r}from"../Entity.js";import{InvalidOperationError as n}from"../InvalidOperationError.js";import{ItemType as o}from"../ItemType.js";import{TaskSettings as p}from"../data/TaskSettings.js";import{applyJsonToBasemap as m,jsonToBasemap as
|
|
1
|
+
var e;import{__decorate as s}from"tslib";import a from"@arcgis/core/Basemap";import t from"@arcgis/core/core/Collection";import{ArgumentError as i}from"../ArgumentError.js";import{EntityBase as r}from"../Entity.js";import{InvalidOperationError as n}from"../InvalidOperationError.js";import{ItemType as o}from"../ItemType.js";import{TaskSettings as p}from"../data/TaskSettings.js";import{applyJsonToBasemap as m,jsonToBasemap as c,basemapToJson as h}from"../json/BasemapJson.js";import{}from"../json/BasemapLayerJson.js";import{serializable as l}from"../support/Serializable.js";import{notifyChange as d,onWatch as y,watch as _}from"../support/observableUtils.js";import{basemapsAreEquivalent as f,createStandardBasemap as b,getStandardBasemapId as E,getStandardBasemapThumbnailUrl as x}from"../utilities/basemaps.js";import{checkArg as u}from"../utilities/checkArg.js";import{load as L}from"../utilities/esri.js";import{find as B}from"../utilities/iterable.js";import{layersAreEquivalent as g}from"../utilities/layers.js";import{getLogger as w}from"../utilities/log.js";import{isBasemap as z}from"../utilities/mapping.js";import{onCollectionPropertyChange as P}from"../utilities/watch.js";import{_assignLayerExtensions as j}from"./_LayerExtension.js";import{LayerExtensionCollectionBase as M}from"./support/_LayerExtensionCollection.js";const S=w("BasemapExtension");export const defaultBasemapExtensionFactory={create:e=>new U(e)};let U=class extends r{static{e=this}get basemap(){return this._basemap}get mapExtension(){return this._mapExtension}get baseLayerExtensions(){return this._baseLayerExtensions}get referenceLayerExtensions(){return this._referenceLayerExtensions}get iconUrl(){return this._basemap?.thumbnailUrl||this._iconUrl}set iconUrl(e){this._iconUrl=e,this._basemap&&(this._basemap.thumbnailUrl=e)}static factory=defaultBasemapExtensionFactory;included=!0;description;onClick;isSeries;taskSettings;_itemType=o.BASEMAP_EXTENSION;_watchHandles=new Map;_iconUrl;_mapExtension;_basemap;_baseLayerExtensions;_referenceLayerExtensions;_deferredBasemapProperties;_createBackingBasemapPromise;constructor(e){super(e);const s=e||{};this._baseLayerExtensions=new k(this),this._referenceLayerExtensions=new v(this),this.taskSettings=this._createTaskSettings(),this.taskSettings.enableSearch=!1,this.taskSettings.enableQuery=!1,this.taskSettings.enableIdentify=!1;let{basemap:t}=s;!t&&s.baseMap&&(t=s.baseMap,w("geocortex.api.mapping.BasemapExtension").warn("BasemapExtension.properties 'baseMap' should be 'basemap'")),z(t)?this._setBasemap(t):t?this._deferredBasemapProperties=t:this._setBasemap(new a)}static create(s){if(!e.factory)throw new n("Cannot create BasemapExtension: no BasemapExtension factory has been registered.");return e.factory.create(s)}_setMapExtension(e){this.mapExtension!==e&&(this._mapExtension=e,d(this,"mapExtension"),this._baseLayerExtensions.onMapExtensionChanged(),this._referenceLayerExtensions.onMapExtensionChanged())}async _switchBasemap(e){if(e===this.basemap)return;u("newBasemap",e).isNotMissing().satisfies((e=>!this.basemap||f(this.basemap,e)),"Basemaps must have compatible layers."),this._deferredBasemapProperties=void 0;const s=new Map,a=new Map;if(this.basemap&&(this.basemap.baseLayers.forEach((e=>{s.set(e,this.baseLayerExtensions.forLayer(e))})),this.basemap.referenceLayers.forEach((e=>{a.set(e,this.referenceLayerExtensions.forLayer(e))}))),await L(this.basemap),this.basemap){const s=h(this.basemap);s.baseMapLayers?.length||delete s.baseMapLayers,await m(s,e)}this._setBasemap(e);const t=[];for(const e of this.basemap.baseLayers.toArray()){const a=B(s.entries(),(([s])=>g(s,e)));a&&t.push((async()=>{const s=a[1];await(s._switchLayer?.(e)),this._baseLayerExtensions._register(s)})())}for(const e of this.basemap.referenceLayers.toArray()){const s=B(a.entries(),(([s])=>g(s,e)));s&&t.push((async()=>{const a=s[1];await(a._switchLayer?.(e)),this._referenceLayerExtensions._register(a)})())}this.isInitialized&&t.push(this._initializeChildren()),await Promise.all(t)}async _createBackingBasemap(){if(this._deferredBasemapProperties)return this._createBackingBasemapPromise=this._createBackingBasemapPromise??(async()=>{if("string"==typeof this._deferredBasemapProperties)this._setBasemap(await b(this._deferredBasemapProperties));else{const e=await c(this._deferredBasemapProperties);this._setBasemap(e)}})(),this._createBackingBasemapPromise}_createTaskSettings(){return new p}_getSerializableProperties(){return{...super._getSerializableProperties(),description:"initial",included:{serializeModes:["initial"],default:!0},iconUrl:{serializeModes:["initial"]},onClick:"initial",isSeries:"initial",basemap:{serializeModes:["initial","project"],serialize:()=>this._serializeBasemap(),isDefault:e=>JSON.stringify(e)===JSON.stringify(new a),deserialize:e=>{if(z(e)){if(e!==this.basemap)throw new i("properties.basemap","Property 'basemap' is read-only.")}else if("string"==typeof e){if((!this._basemap||e!==this._basemap.id)&&this._deferredBasemapProperties!==e)throw new i("properties.basemap","Property 'basemap' is read-only.")}else if(this._basemap)return m(e,this.basemap)}},baseLayerExtensions:{serializeModes:["initial","project"],deserialize:e=>{j(this.baseLayerExtensions,e)}},referenceLayerExtensions:{serializeModes:["initial","project"],deserialize:e=>{j(this.referenceLayerExtensions,e)}},taskSettings:{serialize:!1}}}async _onInitialize(){await this._createBackingBasemap(),await L(this.basemap),this.basemap.baseLayers||(this.basemap.baseLayers=new t),this.basemap.referenceLayers||(this.basemap.referenceLayers=new t),this._baseLayerExtensions.onParentInitialized(),this._referenceLayerExtensions.onParentInitialized(),this.mapExtension&&this.basemap&&(this.mapExtension.map.basemap=this.basemap)}async _postInitialize(){await super._postInitialize(),this._deferredBasemapProperties=void 0,this._watchHandles.set("postInitialize",[P(this,"basemap.baseLayers",(async e=>{const s=(e.added??[]).map((e=>this.baseLayerExtensions.forLayer(e)));await Promise.all(s.map((e=>e.initialize())))})),P(this,"basemap.referenceLayers",(async e=>{const s=(e.added??[]).map((e=>this.referenceLayerExtensions.forLayer(e)));await Promise.all(s.map((e=>e.initialize())))}))])}_onBaseLayerAddedPostInitialize=async e=>this._onLayerAddedPostInitialize(e);_onReferenceLayerAddedPostInitialize=async e=>this._onLayerAddedPostInitialize(e);async _onDestroy(){for(const e of this._watchHandles.values())for(const s of e)s.remove();this._watchHandles.clear(),await super._onDestroy()}*_initializableChildCollections(){yield*super._initializableChildCollections(),yield this.baseLayerExtensions,yield this.referenceLayerExtensions}_onLayerAddedPostInitialize=async e=>{try{await e.initialize()}catch(s){S.error({message:`Error occurred while initializing layer extension for layer '${e.title??e.layer.id??e.id}'.`,error:s})}};_setBasemap(e){this._basemap=e;const s=!!this._iconUrl;if(this._iconUrl&&(this.basemap.thumbnailUrl=this._iconUrl,this._iconUrl=void 0),this._watchHandles.has("setBasemap")||this._watchHandles.set("setBasemap",[y(this,"iconUrl",(()=>_(this,"basemap.thumbnailUrl",(()=>d(this,"iconUrl")),{sync:!0})))]),!s){const e=E(this._basemap);if(e){const s=x(e);s&&this.iconUrl!==s&&(this.iconUrl=s)}}d(this,"basemap")}_serializeBasemap(){if(this._deferredBasemapProperties)return this._deferredBasemapProperties;const e=this.basemap?h(this.basemap):void 0;if(!e)return;e.baseMapLayers?.forEach((e=>{"WMS"!==e.layerType&&delete e.layers}));const s=this.baseLayerExtensions.filter((e=>e&&!e.layer));if(s.length>0){const a=s.toArray().map((e=>{const{layer:s}=e.toJSON();return s}));e.baseMapLayers.concat(a)}const a=this.referenceLayerExtensions.filter((e=>e&&!e.layer));if(a.length>0){const s=a.toArray().map((e=>{const{layer:s}=e.toJSON();return s.isReference=!0,s}));e.baseMapLayers.concat(s)}return e}};U=e=s([l],U);export{U as BasemapExtension};class k extends M{get _mapExtension(){return this._parent.mapExtension}constructor(e){super(e,"basemap.baseLayers")}add(e,s){return u("layerX",e).isNotMissing(),e.basemapExtension&&e.basemapExtension!==this._parent&&e.basemapExtension.baseLayerExtensions.remove(e),e._setBasemapExtension(this._parent),super.add(e,s)}_onAdded(e){super._onAdded(e),e._setBasemapExtension(this._parent)}_onRemoved(e){super._onRemoved(e),e._setBasemapExtension(void 0)}}class v extends M{get _mapExtension(){return this._parent.mapExtension}constructor(e){super(e,"basemap.referenceLayers")}add(e,s){return u("layerX",e).isNotMissing(),e.basemapExtension&&e.basemapExtension!==this._parent&&e.basemapExtension.referenceLayerExtensions.remove(e),e._setBasemapExtension(this._parent),super.add(e,s)}_onAdded(e){super._onAdded(e),e._setBasemapExtension(this._parent)}_onRemoved(e){super._onRemoved(e),e._setBasemapExtension(void 0)}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Collection from "@arcgis/core/core/Collection";
|
|
2
2
|
import type BuildingComponentSublayer from "@arcgis/core/layers/buildingSublayers/BuildingComponentSublayer";
|
|
3
3
|
import type Field from "@arcgis/core/layers/support/Field";
|
|
4
|
-
import type
|
|
4
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
5
5
|
import type { FeatureSettings } from "../data/FeatureSettings.js";
|
|
6
6
|
import type { QuerySourceCapabilities } from "../data/QuerySourceCapabilities.js";
|
|
7
7
|
import type { Schema } from "../data/Schema.js";
|
|
@@ -37,7 +37,7 @@ export declare class BuildingComponentSublayerExtension extends BuildingSublayer
|
|
|
37
37
|
*/
|
|
38
38
|
get enableClientSideData(): boolean;
|
|
39
39
|
set enableClientSideData(isEnabled: boolean);
|
|
40
|
-
get renderer():
|
|
40
|
+
get renderer(): RendererUnion | undefined;
|
|
41
41
|
get sublayer(): BuildingComponentSublayer;
|
|
42
42
|
get hasFeatures(): boolean;
|
|
43
43
|
get canChangeDefinitionExpression(): boolean;
|
|
@@ -18,11 +18,11 @@ import { SublayerExtensionCollectionBase } from "./support/_SublayerExtensionCol
|
|
|
18
18
|
*/
|
|
19
19
|
export interface BuildingSceneLayerExtensionProperties extends LayerExtensionProperties {
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* @inheritdoc
|
|
22
22
|
*/
|
|
23
23
|
layer?: BuildingSceneLayer | BuildingSceneLayerProperties;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* @inheritdoc
|
|
26
26
|
*/
|
|
27
27
|
sublayerExtensions?: (BuildingSublayerExtension | BuildingSublayerExtensionProperties)[];
|
|
28
28
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type CSVLayer from "@arcgis/core/layers/CSVLayer";
|
|
2
2
|
import type Layer from "@arcgis/core/layers/Layer";
|
|
3
|
-
import type { RendererUnion } from "@arcgis/core/
|
|
3
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
4
4
|
import type { FeatureSettings } from "../data/FeatureSettings.js";
|
|
5
5
|
import type { QuerySourceCapabilities } from "../data/QuerySourceCapabilities.js";
|
|
6
6
|
import type { Schema } from "../data/Schema.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Collection from "@arcgis/core/core/Collection";
|
|
2
2
|
import type FeatureLayer from "@arcgis/core/layers/FeatureLayer";
|
|
3
3
|
import type PortalItem from "@arcgis/core/portal/PortalItem";
|
|
4
|
-
import type { RendererUnion } from "@arcgis/core/
|
|
4
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
5
5
|
import type { Attachment, AttachmentProperties } from "../data/Attachment.js";
|
|
6
6
|
import type { Feature } from "../data/Feature.js";
|
|
7
7
|
import type { FeatureWriteOptions } from "../data/FeatureSource.js";
|
|
@@ -3,7 +3,7 @@ import type FeatureLayer from "@arcgis/core/layers/FeatureLayer";
|
|
|
3
3
|
import type Layer from "@arcgis/core/layers/Layer";
|
|
4
4
|
import type FeatureType from "@arcgis/core/layers/support/FeatureType";
|
|
5
5
|
import type Field from "@arcgis/core/layers/support/Field";
|
|
6
|
-
import type
|
|
6
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
7
7
|
import type { Feature } from "../data/Feature.js";
|
|
8
8
|
import type { FeatureSettings } from "../data/FeatureSettings.js";
|
|
9
9
|
import type { FeatureReadOptions } from "../data/FeatureSource.js";
|
|
@@ -36,7 +36,7 @@ export interface FeatureLayerBaseProperties extends FeatureLayerJson, Omit<Layer
|
|
|
36
36
|
export declare abstract class FeatureLayerExtensionBase<TProperties extends FeatureLayerExtensionBaseProperties = FeatureLayerExtensionBaseProperties> extends LayerExtension<TProperties> {
|
|
37
37
|
get hasFeatures(): boolean;
|
|
38
38
|
get layer(): FeatureLayer;
|
|
39
|
-
get renderer():
|
|
39
|
+
get renderer(): RendererUnion | undefined;
|
|
40
40
|
get canChangeDefinitionExpression(): boolean;
|
|
41
41
|
get canChangeRenderer(): boolean;
|
|
42
42
|
protected _getFeatures(ids: string[], options?: FeatureReadOptions): AsyncIterable<Feature>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type GeoJSONLayer from "@arcgis/core/layers/GeoJSONLayer";
|
|
2
2
|
import type Layer from "@arcgis/core/layers/Layer";
|
|
3
|
-
import type { RendererUnion } from "@arcgis/core/
|
|
3
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
4
4
|
import type { FeatureSettings } from "../data/FeatureSettings.js";
|
|
5
5
|
import type { QuerySourceCapabilities } from "../data/QuerySourceCapabilities.js";
|
|
6
6
|
import type { Schema } from "../data/Schema.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import EsriGround from "@arcgis/core/Ground";
|
|
2
2
|
import type Collection from "@arcgis/core/core/Collection";
|
|
3
|
+
import type { ResourceHandle } from "@arcgis/core/core/Handles.js";
|
|
3
4
|
import type { EntityBaseProperties } from "../Entity.js";
|
|
4
5
|
import { EntityBase } from "../Entity.js";
|
|
5
6
|
import type { TaskSettingsProperties } from "../data/TaskSettings.js";
|
|
@@ -85,7 +86,7 @@ export declare class GroundExtension extends EntityBase<GroundExtensionPropertie
|
|
|
85
86
|
* A set of watch handles that get cleaned up when the class instance is
|
|
86
87
|
* destroyed.
|
|
87
88
|
*/
|
|
88
|
-
protected readonly _watchHandles:
|
|
89
|
+
protected readonly _watchHandles: ResourceHandle[];
|
|
89
90
|
private _mapExtension;
|
|
90
91
|
private _ground;
|
|
91
92
|
private readonly _layerExtensions;
|
|
@@ -3,7 +3,6 @@ import type WebScene from "@arcgis/core/WebScene";
|
|
|
3
3
|
import Collection from "@arcgis/core/core/Collection";
|
|
4
4
|
import type SpatialReference from "@arcgis/core/geometry/SpatialReference";
|
|
5
5
|
import type Layer from "@arcgis/core/layers/Layer";
|
|
6
|
-
import type Sublayer from "@arcgis/core/layers/support/Sublayer.js";
|
|
7
6
|
import type PortalItem from "@arcgis/core/portal/PortalItem";
|
|
8
7
|
import type { EntityBaseProperties } from "../Entity.js";
|
|
9
8
|
import { EntityBase } from "../Entity.js";
|
|
@@ -20,9 +19,10 @@ import type { Action } from "../support/Action.js";
|
|
|
20
19
|
import type { ArcGISRequestHelper } from "../support/ArcGISRequestHelper.js";
|
|
21
20
|
import type { FormatSettingsProperties } from "../support/FormatSettings.js";
|
|
22
21
|
import { FormatSettings } from "../support/FormatSettings.js";
|
|
23
|
-
import type { InitializableBase } from "../support/InitializableBase.js";
|
|
22
|
+
import type { InitializableBase, InitializableBaseEvents } from "../support/InitializableBase.js";
|
|
24
23
|
import type { InitializableCollection } from "../support/InitializableCollectionProxy.js";
|
|
25
24
|
import type { PropertyDefs } from "../support/Serializable.js";
|
|
25
|
+
import type { SublayerLike } from "../support/esri.js";
|
|
26
26
|
import type { PortalItemLike } from "../utilities/portal.js";
|
|
27
27
|
import type { BasemapExtensionProperties } from "./BasemapExtension.js";
|
|
28
28
|
import { BasemapExtension } from "./BasemapExtension.js";
|
|
@@ -177,10 +177,32 @@ export interface TableExtensionCollection extends InitializableCollection<TableE
|
|
|
177
177
|
*/
|
|
178
178
|
forTable(table: Layer): TableExtension;
|
|
179
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* Events emitted by the {@link mapping/MapExtension!MapExtension} class.
|
|
182
|
+
*/
|
|
183
|
+
export interface MapExtensionEvents extends InitializableBaseEvents {
|
|
184
|
+
/**
|
|
185
|
+
* Emitted when the a layer or sublayer in the map has its definition
|
|
186
|
+
* expression changed. The event object will contain a reference to the
|
|
187
|
+
* layer or sublayer that triggered the change.
|
|
188
|
+
*/
|
|
189
|
+
"layer-definition-expression-change": Layer | SublayerLike;
|
|
190
|
+
/**
|
|
191
|
+
* Emitted when the visibility of a layer or sublayer in the map changes.
|
|
192
|
+
* The event object will contain a reference to the layer or sublayer that
|
|
193
|
+
* triggered the change.
|
|
194
|
+
*/
|
|
195
|
+
"layer-visibility-change": Layer | SublayerLike;
|
|
196
|
+
}
|
|
180
197
|
/**
|
|
181
198
|
* Extends the capabilities of an Esri Map object.
|
|
182
199
|
*/
|
|
183
200
|
export declare class MapExtension extends EntityBase<MapExtensionProperties> {
|
|
201
|
+
/**
|
|
202
|
+
* @deprecated Do not directly reference this property. Use EventNames and
|
|
203
|
+
* EventTypes helpers from @arcgis/core/Evented.
|
|
204
|
+
*/
|
|
205
|
+
"@eventTypes": MapExtensionEvents;
|
|
184
206
|
/**
|
|
185
207
|
* When present, {@link mapping/MapExtension!MapExtension.map} will be loaded
|
|
186
208
|
* from the given web map in Portal when the view mode is 2D. The web map
|
|
@@ -399,8 +421,6 @@ export declare class MapExtension extends EntityBase<MapExtensionProperties> {
|
|
|
399
421
|
* @param newMap The new map.
|
|
400
422
|
*/
|
|
401
423
|
switchMap(newMap: EsriMap): Promise<void>;
|
|
402
|
-
on(name: "layer-definition-expression-change", callback: (Layer: Layer | Sublayer) => void): IHandle;
|
|
403
|
-
on(name: "layer-visibility-change", callback: (Layer: Layer | Sublayer) => void): IHandle;
|
|
404
424
|
/**
|
|
405
425
|
* Updates the map that will load when the view mode is switched to MAP.
|
|
406
426
|
*
|
package/mapping/MapExtension.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import t from"@arcgis/core/core/Collection";import{ArgumentError as i}from"../ArgumentError.js";import{EntityBase as s}from"../Entity.js";import{InvalidOperationError as a}from"../InvalidOperationError.js";import{isBasemapExtension as n,isBookmark as o,isGroundExtension as r,isLayerPreset as p,isMenu as h,isTableExtension as m,ItemType as l}from"../ItemType.js";import{TableExtension as d}from"../data/TableExtension.js";import{layerToParentJsonCache as c}from"../json/LayerJson.js";import{applyJsonToWebMap as b}from"../json/WebMapJson.js";import{applyJsonToWebScene as _}from"../json/WebSceneJson.js";import{LayerPreset as f}from"../layer-preset/LayerPreset.js";import{Menu as E}from"../menus/Menu.js";import{DefaultArcGISRequestHelper as x}from"../support/ArcGISRequestHelper.js";import{FormatSettings as u}from"../support/FormatSettings.js";import{InitializableCollectionProxy as w}from"../support/InitializableCollectionProxy.js";import{ReadOnlyInitializableCollection as y}from"../support/ReadOnlyInitializableCollection.js";import{serializable as g}from"../support/Serializable.js";import{WellKnownBasemap as M}from"../support/esri.js";import{createIHandle as v,notifyChange as I,onWatch as S,watch as A,watchEvent as z}from"../support/observableUtils.js";import{ReadOnlyCollection as O}from"../utilities/ReadOnlyCollection.js";import T from"../utilities/_ReferenceCountedHandle.js";import{basemapsAreEquivalent as P,createStandardBasemap as V,getStandardBasemapId as L,isStandardBasemap as k}from"../utilities/basemaps.js";import{checkArg as B}from"../utilities/checkArg.js";import{compare as C}from"../utilities/collection.js";import{load as j}from"../utilities/esri.js";import{isGroupLayerExtension as R}from"../utilities/extensions.js";import{filter as H}from"../utilities/iterable.js";import{isWMTSLayer as N,layersAreEquivalent as W}from"../utilities/layers.js";import{getLogger as J}from"../utilities/log.js";import{getMapSpatialReference as F,isMap as q,isWebMap as G,isWebScene as D}from"../utilities/mapping.js";import{toPortalItem as U}from"../utilities/portal.js";import{parallelEach as $}from"../utilities/promise.js";import{onCollectionPropertyChange as X,onEach as Y}from"../utilities/watch.js";import{BasemapExtension as K}from"./BasemapExtension.js";import{Bookmark as Q}from"./Bookmark.js";import{GroundExtension as Z}from"./GroundExtension.js";import{MapConstraints as ee}from"./MapConstraints.js";import{_assignLayerExtensions as te}from"./_LayerExtension.js";import{LayerExtensionCollectionImpl as ie}from"./_LayerExtensionCollectionImpl.js";const se=J("MapExtension");let ae=class extends s{get webMap(){return this._webMap}get webScene(){return this._webScene}get map(){return this._currentMap}get viewMode(){return this.map?D(this.map)?"scene":"map":this.initialViewMode}get initialViewMode(){return this.webMap&&this.webScene?this._initialViewMode||"map":D(this.map)||this.webScene&&!this.webMap?"scene":"map"}set initialViewMode(e){this._initialViewMode=e}get requestHelper(){return this._requestHelper||(this._requestHelper=new x),this._requestHelper}set requestHelper(e){this._requestHelper=e}get basemapExtension(){return this._basemapExtension}set basemapExtension(e){const t=this._basemapExtension;if(t!==e)if(t&&t._setMapExtension(void 0),e){if(e._setMapExtension(this),this.isInitialized&&!e.basemap){if(e.isInitialized)throw e._setMapExtension(void 0),new a("Cannot set MapExtension.basemapExtension without a valid Esri Basemap object");e.initialize()}this._ensureIsBasemapOption(e),this.map&&e.basemap&&e.basemap!==this.map.basemap?this.map.basemap=e.basemap:this._basemapExtension=e}else this.map.basemap=void 0,this._basemapExtension=void 0}get groundExtension(){return this._groundExtension||(this.groundExtension=Z.create({ground:this.map?.ground})),this._groundExtension}set groundExtension(e){if(!e)throw new a("Cannot set map.ground to undefined");const t=this._groundExtension;t!==e&&(t&&t._setMapExtension(void 0),e._setMapExtension(this),e._resolveGround(),e.ground?(this._groundExtensions.set(e.ground,e),this.map&&e.ground!==this.map.ground?this.map.ground=e.ground:this._groundExtension=e):this._groundExtension=e)}get basemapOptions(){return this._basemapOptions}get bookmarks(){return this._bookmarks}get initialBasemapExtension(){return this._initialBasemapExtension}get initialLayerPreset(){return this._initialLayerPreset}set initialLayerPreset(e){if(!e)return void(this._initialLayerPreset=void 0);const t=p(e)?e:new f(e);this._initialLayerPreset=t}get _spatialReference(){return F(this.map)}get webMapItemTitle(){if(this._webMapItem)return this._webMapItem.title}get webSceneItemTitle(){if(this._webSceneItem)return this._webSceneItem.title}get title(){return this._title?this._title:this._webMapItem&&"map"===this.viewMode?this.webMapItemTitle:this._webSceneItem&&"scene"===this.viewMode?this.webSceneItemTitle:void 0}set title(e){this._title=e}formatSettings;constraints;onClick;onHover;onHoverEnd;onInitialized;onViewpointChanged;get contextMenu(){return this._contextMenu}set contextMenu(e){this._contextMenu=e,e&&this.isInitialized&&!e.isInitialized&&(async()=>{try{await e.initialize()}catch(e){e instanceof Error&&se.error({message:"An error occurred while initializing context menu.",error:e})}})()}isSwitchingMap=!1;_layerViews=new t;get _allLayerViews(){const e=i=>{const s=[i];return t.isCollection(i.sublayerViews)?s.push(...i.sublayerViews.toArray().flatMap(e)):t.isCollection(i.layerViews)&&s.push(...i.layerViews.toArray().flatMap(e)),s};return this._layerViews.toArray().flatMap(e)}get layerExtensions(){return this._layerExtensions}tableExtensions;allLayerExtensions;_itemType=l.MAP_EXTENSION;_map;_scene;_deserializedMapPromise;_deserializedViewMode;_deserializedViewModePromise;_deferredProperties;_currentMap;_requestHelper;_basemapExtension;_groundExtension;_basemapOptions;_groundExtensions;_bookmarks;_layerExtensions;_webMap;_webMapItem;_webScene;_webSceneItem;_title;_initialViewMode;_initialLayerPreset;_initialBasemapExtension;_skipBasemapOptions=!1;_createScenePromise;_createMapPromise;_contextMenu;constructor(e){super(e);let s={...e};this._basemapOptions=new ne(this),this._groundExtensions=new WeakMap,this._layerExtensions=this._createLayerExtensionCollection(),this.tableExtensions=this._createTableExtensionCollection(),this.formatSettings=this._createFormatSettings(),this._bookmarks=new t,this.constraints=new ee;const a=[],n=[];A(this,"_map",(e=>{if(e)a.push(Y(e.layers,"layerview-create",(e=>{this._layerViews.add(e.layerView)})),Y(e.layers,"layerview-destroy",(e=>{this._layerViews.remove(e.layerView)})));else for(const e of a)e.remove()}),{sync:!0}),A(this,"_scene",(e=>{if(e)n.push(Y(e.layers,"layerview-create",(e=>{this._layerViews.add(e.layerView)})),Y(e.layers,"layerview-destroy",(e=>{this._layerViews.remove(e.layerView)})));else for(const e of n)e.remove()}),{sync:!0});const{webMap:o,webScene:r,initialViewMode:p,map:h,basemapOptions:m}=s;if(this._webMap=o,this._webScene=r,this._webMapItem=pe(o),this._webSceneItem=pe(r),this.initialViewMode=p,D(h)&&r)throw new i("Cannot specify webScene property if map is initialized to a WebScene instance.");if(q(h)&&o)throw new i("Cannot specify webMap property if map is initialized to a 2D Map instance.");if(D(h)||G(h)||q(h))this.assignProperties({basemapOptions:m}),this._skipBasemapOptions=!!m;else{const{layerExtensions:e,tableExtensions:t,groundExtension:i,basemapOptions:a,basemapExtension:n,...o}=s;this._deferredProperties={layerExtensions:e,tableExtensions:t,groundExtension:i,basemapOptions:a,basemapExtension:n},s=o,a&&(this._skipBasemapOptions=!0)}this._initMapFromProperties(s),A(this,"map.basemap",(()=>this._onBasemapChange()),{sync:!0}),A(this,"map.ground",(()=>this._onGroundChange()),{sync:!0}),this.allLayerExtensions=new re(this),this.map?.basemap&&this._onBasemapChange()}getLayerExtensionsForView(e=this.viewMode){return(("map"===e?this._map:this._scene)?.layers.toArray()??[]).map((e=>this._layerExtensions._forLayer(e))).filter((e=>!e.dynamicallyAddedLayer))}getAllFeatureSources(e=()=>!0){const t=[],i=a=>{a.hasFeatures&&t.push(a);for(const t of a.sublayerExtensions.initializedItems.filter(e).toArray())s(t);if(R(a))for(const t of a.layerExtensions.initializedItems.filter(e).toArray())i(t)},s=i=>{t.push(i);for(const t of i.sublayerExtensions.initializedItems.filter(e).toArray())s(t)};for(const t of this.layerExtensions.initializedItems.filter(e).toArray())i(t);for(const i of this.tableExtensions.initializedItems.filter(e).toArray())t.push(i);if(this.basemapExtension){for(const t of this.basemapExtension.baseLayerExtensions.initializedItems.filter(e).toArray())i(t);for(const t of this.basemapExtension.referenceLayerExtensions.initializedItems.filter(e).toArray())i(t)}return t}isSupportedViewMode(e){return e===this.viewMode||!(!this.webMap&&!this.webScene)&&("scene"===e?!!this.webScene:!!this.webMap)}async switchViewMode(e){if(B("viewMode",e).isNotMissing().satisfies((e=>this.isSupportedViewMode(e)),"Unsupported view mode."),this.viewMode===e)return;let t;"scene"===e?(await this._createScene(),t=this._scene):(await this._createMap(),t=this._map),await this.switchMap(t),I(this,"viewMode"),I(this,"title")}async switchMap(e){if(B("newMap",e).isNotMissing(),e===this.map)return;if(!this.map)return void this._setMap(e);this.isSwitchingMap=!0,this.isInitialized&&await le(e),(!e.basemap||k(e.basemap))&&this.map?.basemap&&k(this.map.basemap)&&(e.basemap=this.map.basemap);const t=new Map(this.map.layers.map((e=>[e,this.layerExtensions.forLayer(e)]))),i=new Map(this.map.tables.map((e=>[e,this.tableExtensions.forTable(e)]))),{basemapExtension:s}=this;this._setMap(e),this._updateBookmarks();const a=[];for(const e of this.map.layers.toArray()){const i=[...H(t.entries(),(([t])=>W(t,e)))];if(1===i.length){const[t]=i;a.push((async()=>{const i=t[1];await i._switchLayer(e),this._layerExtensions._register(i)})())}else{const t=this._layerExtensions._forLayer(e);t&&t.layer!==e&&a.push(t._switchLayer(e))}}for(const e of this.map.tables.toArray()){const t=[...H(i.entries(),(([t])=>W(t,e)))];if(1===t.length){const[i]=t;a.push((async()=>{const t=i[1];await t._switchTable(e),this.tableExtensions.add(t)})())}else{const t=this.tableExtensions.forTable(e);t&&t.table!==e&&a.push(t._switchTable(e))}}this.map.basemap&&s&&P(this.map.basemap,s.basemap)&&a.push((async()=>{await s._switchBasemap(this.map.basemap),this.basemapExtension=s})()),await Promise.all(a),this.isInitialized&&await this._initializeChildren(),this.isSwitchingMap=!1}on(e,t){return super.on(e,t)}async setWebMap(e){if(!e&&this.webMap&&!this.webScene)throw new a("Cannot unset both webMap and webScene.");const t=this._map?.basemap;this._webMap=e,this._map=void 0,this._createMapPromise=void 0,this._webMapItem=pe(e),await j(this._webMapItem),"map"===this.viewMode&&(e?(this._basemapOptions.isExplicitlyModified||this._basemapOptions.removeAllInternal(),await this._createMap(),await this.switchMap(this._map),await this._createStandardBasemapOptions(),this._basemapOptions.reorderInternal(this.basemapExtension,0),this._initialBasemapExtension=this.basemapExtension):await this.switchViewMode("scene")),this._cleanPreviousBasemapOptions(t),I(this,"webMap"),I(this,"initialViewMode"),I(this,"title")}async setWebScene(e){if(!e&&this.webScene&&!this.webMap)throw new a("Cannot unset both webMap and webScene.");const t=this._scene?.basemap;this._webScene=e,this._scene=void 0,this._createScenePromise=void 0,this._webSceneItem=pe(e),await j(this._webSceneItem),"scene"===this.viewMode&&(e?(this._basemapOptions.isExplicitlyModified||this._basemapOptions.removeAllInternal(),await this._createScene(),await this.switchMap(this._scene),await this._createStandardBasemapOptions(),this._basemapOptions.reorderInternal(this.basemapExtension,0),this._initialBasemapExtension=this.basemapExtension):await this.switchViewMode("map")),this._cleanPreviousBasemapOptions(t),I(this,"webScene"),I(this,"initialViewMode"),I(this,"title")}getDefaults(){const e=super.getDefaults();return e.initialViewMode="map",e}async _createScene(){if(!this._scene&&this.webScene)return this._createScenePromise=this._createScenePromise??(async()=>{const e=(await import("@arcgis/core/WebScene")).default;he(this.webScene)?(this._webSceneItem.type="Web Scene",this._scene=new e({portalItem:this._webSceneItem})):this._scene=e.fromJSON(this.webScene)})()}async _createMap(){if(!this._map&&this.webMap)return this._createMapPromise=this._createMapPromise??(async()=>{const e=(await import("@arcgis/core/WebMap")).default;he(this.webMap)?(this._webMapItem.type="Web Map",this._map=new e({portalItem:this._webMapItem})):this._map=e.fromJSON(this.webMap)})()}_getSerializableProperties(){return{...super._getSerializableProperties(),layerExtensions:{serializeModes:["initial","project"],deserialize:e=>{if(this.map&&e){const t="map"===this.viewMode,i=(t?this._scene:this._map)?.layers.toArray()??[],s=e.filter((e=>!i.includes(e.layer)&&!i.some((t=>e.layer&&W(t,e.layer)))));te(this.layerExtensions,s)}},serialize:e=>{if(this._deferredProperties?.layerExtensions)return this._deferredProperties.layerExtensions;{const t="map"===this.viewMode,i=(t?this._map:this._scene)?.layers.toArray();let s=(t?this._scene:this._map)?.layers.toArray()??[];return s=s.filter((e=>!i.find((t=>W(t,e))))),this.layerExtensions.concat(s.map((e=>this._layerExtensions._forLayer(e)))).filter((t=>"initial"!==e||!t.dynamicallyAddedLayer)).toArray()}}},tableExtensions:{serializeModes:["initial","project"],deserialize:e=>{this.map?C(this.tableExtensions,e,{onNew:(e,t)=>{this.tableExtensions.add(m(e)?e:d.create(e),t)},onMatch:(e,t,i,s)=>{m(t)||e.assignProperties(t),i!==s&&this.tableExtensions.reorder(e,s)},equals:(e,t)=>m(t)?t===e:!!d._matchesRef(e,t.table)||e.id===t.id}):this._deferredProperties={...this._deferredProperties,tableExtensions:e}},serialize:()=>this._deferredProperties?.tableExtensions?this._deferredProperties?.tableExtensions:this.tableExtensions.toArray()},basemapExtension:{serializeModes:["project"],deserialize:e=>{if(this.map)if(e)if(n(e))this.basemapExtension=e;else{if(this.basemapExtension)return this.basemapExtension.assignPropertiesAsync(e);this.basemapExtension=K.create(e)}else this.basemapExtension=void 0;else this._deferredProperties={...this._deferredProperties,basemapExtension:e}},serialize:()=>this._deferredProperties?.basemapExtension?this._deferredProperties?.basemapExtension:this.basemapExtension},basemapOptions:{serializeModes:["initial"],deserialize:e=>{this._skipBasemapOptions?this._skipBasemapOptions=!1:(C(this.basemapOptions,e,{onNew:(e,t)=>{this.basemapOptions.add(n(e)?e:K.create(e),t)},onMatch:(e,t,i,s)=>{n(t)||e.assignProperties(t),i!==s&&this.basemapOptions.reorder(e,s)},onMissing:e=>{this.basemapOptions.remove(e)},equals:(e,t)=>{if(n(t))return t===e;if(e.id&&t.id)return e.id===t.id;{const i=e.toJSON();return P(i.basemap,t.basemap||t.baseMap)}}}),this.basemapExtension&&this._ensureIsBasemapOption(this.basemapExtension),this.isInitialized&&$(this.basemapOptions.toArray(),(e=>e._createBackingBasemap())))},serialize:()=>this._deferredProperties?.basemapOptions?this._deferredProperties?.basemapOptions:this.basemapOptions.toArray()},groundExtension:{serializeModes:["initial"],deserialize:e=>{if(this.map){if(!r(e))return this.groundExtension.assignPropertiesAsync(e);this.groundExtension=e}else this._deferredProperties={...this._deferredProperties,groundExtension:e}},serialize:()=>this._deferredProperties?.groundExtension?this._deferredProperties?.groundExtension:this.groundExtension},bookmarks:{serialize:()=>this.bookmarks.map((e=>e.toJSON())).toArray(),deserialize:e=>{this.bookmarks.addMany(e.map((e=>o(e)?e:new Q(e))))}},webMap:{serializeModes:["initial"],deserialize:!1},webScene:{serializeModes:["initial"],deserialize:!1},initialLayerPreset:"initial",initialViewMode:{serializeModes:["initial","project"],serialize:e=>"project"===e?this.viewMode:"scene"!==this.initialViewMode||!this.webScene&&this.webMap?"map":"scene",deserialize:e=>{this.viewMode!==e&&(this._deserializedViewMode=e),this._initialViewMode=e},isDefault:(e,t)=>"project"!==t&&"map"===e},formatSettings:"initial",constraints:"initial",title:"initial",onClick:"initial",onHover:"initial",onHoverEnd:"initial",onInitialized:"initial",onViewpointChanged:"initial",contextMenu:{serializeModes:["initial"],deserialize:e=>{e?h(e)?this.contextMenu=e:this.contextMenu?this.contextMenu.assignProperties(e):this.contextMenu=E.create(e):this.contextMenu=void 0}},map:{serializeModes:["project"],serialize:()=>{c.lookup=new WeakMap;const e=this.layerExtensions.toArray().filter((e=>e.layer)).map((e=>e._getProjectWebmapJSON())),t=this.tableExtensions.toArray().filter((e=>e.table)).map((e=>({id:e.table.id,title:e.table.title})));return c.lookup=void 0,e.length>0||t.length>0?{operationalLayers:e,tables:t}:{}},deserialize:e=>{if(!this.map)throw new i("Cannot specify JSON object for the 'map' property. It must be an ArcGIS API Map instance. To specify JSON, use 'webMap' or 'webScene' instead.");if(q(e)||G(e)||D(e)){if(e!==this.map)throw new i("properties.map","Property 'map' is read-only.")}else this._deserializedMapPromise=(async()=>{this._deserializedViewMode&&this.webMap&&this.webScene&&(this._deserializedViewModePromise=this.switchViewMode(this._deserializedViewMode),await this._deserializedViewModePromise,this._deserializedViewMode=void 0,this._deserializedViewModePromise=void 0),await this._applyMapProperties(e,this.map),this._deserializedMapPromise=void 0})()}},requestHelper:{serialize:!1}}}async _applyMapProperties(e,t,i){await $(this.basemapOptions.toArray(),(e=>e._createBackingBasemap()));let s=e;const a=this.basemapOptions.find((e=>P(e.basemap,s.baseMap)));a&&(t.basemap=a.basemap,s={...s,baseMap:{...s.baseMap,title:t.basemap.title}}),D(t)?await _(s,t,i):await b(s,t,i)}_createFormatSettings(){return new u}_createLayerExtensionCollection(){return new ie(this)}_createTableExtensionCollection(){return new oe(this)}async _onInitialize(){await super._onInitialize();const{basemapOptions:e,basemapExtension:t,webMap:i,webScene:s,...a}=this._deferredProperties??{};if(this.map||("scene"===this.initialViewMode?(await this._createScene(),this._setMap(this._scene)):(await this._createMap(),this._setMap(this._map))),this._webMapItem||this._webSceneItem?(await Promise.all([le(this.map),j(this._webMapItem),j(this._webSceneItem)]),me(this._webMapItem,"webMap","Web Map"),me(this._webSceneItem,"webScene","Web Scene")):await le(this.map),t&&(!n(t)&&t.basemap?this.basemapExtension=K.create(t):await this.assignPropertiesAsync({basemapExtension:t}),await this.basemapExtension._createBackingBasemap()),e){const t=e.find((e=>n(e)&&P(this.map.basemap,e.toJSON().basemap)));if(t){const e=t.toJSON().basemap?.id??t.basemap?.id,i=t.toJSON().basemap?.title;await t._switchBasemap(this.map.basemap),this.basemapExtension=t,e&&(this.map.basemap.id=e),i&&(this.map.basemap.title=i)}await this.assignPropertiesAsync({basemapOptions:e})}await this.assignPropertiesAsync(a),this._deferredProperties=void 0,this._initialBasemapExtension=this.basemapExtension,this._updateBookmarks();for(const e of this.layerExtensions.toArray())await e._createBackingLayer();await Promise.all(this.tableExtensions.map((e=>e._createBackingTable())).toArray())}async _postInitialize(){await super._postInitialize(),await this._createStandardBasemapOptions(),await $(this.basemapOptions.toArray(),(e=>e._createBackingBasemap())),this.initialLayerPreset&&await this.initialLayerPreset.applyTo(this)}*_initializableChildCollections(){yield*super._initializableChildCollections();const e=new t(this.layerExtensions.filter((e=>!!e.layer)));e.remove=e=>this.layerExtensions.remove(e);const i=new t(this.tableExtensions.filter((e=>!!e.table)));if(i.remove=e=>this.tableExtensions.remove(e),yield e,yield i,this.basemapExtension){const e=new t;e.add(this.basemapExtension),yield e}const s=new t;s.add(this.groundExtension),yield s}_initMapFromProperties(e){const t=e.map;q(t)||G(t)||D(t)?this._setMap(t):"scene"===this.initialViewMode?e.webScene&&!he(e.webScene)&&(this._deferredProperties={webScene:e.webScene,...this._deferredProperties}):e.webMap&&!he(e.webMap)&&(this._deferredProperties={webMap:e.webMap,...this._deferredProperties})}_setMap(e){D(e)?this._scene=e:this._map=e,this._currentMap=e,this.basemapExtension?.basemap&&!e.basemap&&(e.basemap=this.basemapExtension.basemap),this.groundExtension?.ground&&!e.ground&&(e.ground=this.groundExtension.ground),I(this,"map")}_onBasemapChange(){if(this._basemapExtension){if(this.basemapExtension.basemap==this.map.basemap)return;this._basemapExtension._setMapExtension(void 0)}if(this.map.basemap){let e=this.basemapOptions.find((e=>this.map.basemap===e.basemap));if(!e){const t=this.basemapOptions.find((e=>P(e.basemap,this.map.basemap)));t?(e=t,e._switchBasemap(this.map.basemap)):(e=K.create({basemap:this.map.basemap}),this._basemapOptions.addInternal(e,0))}e.mapExtension!==this&&e._setMapExtension(this),this._basemapExtension=e}else this._basemapExtension=void 0;I(this,"basemapExtension")}_onGroundChange(){if(this._groundExtension){if(this.map.ground&&this.groundExtension.ground===this.map.ground)return void(this._groundExtensions.has(this.map.ground)||this._groundExtensions.set(this.map.ground,this.groundExtension));this.groundExtension._setMapExtension(void 0)}this.map.ground&&!this._groundExtensions.has(this.map.ground)&&this._groundExtensions.set(this.map.ground,Z.create({ground:this.map.ground}));const e=this._groundExtensions.get(this.map.ground);e&&e.mapExtension!==this&&e._setMapExtension(this),this._groundExtension=e,I(this,"groundExtension")}async _createStandardBasemapOptions(){const e=this._spatialReference;!this._basemapOptions.isExplicitlyModified&&e?.isWebMercator&&await $([M.SATELLITE,M.HYBRID_VECTOR,M.STREETS_VECTOR,M.TOPO_VECTOR,M.STREETS_NAVIGATION_VECTOR,M.STREETS_NIGHT_VECTOR,M.TERRAIN_VECTOR,M.DARK_GRAY_VECTOR,M.GRAY_VECTOR,M.OCEANS_VECTOR,M.OPEN_STREET_MAP_VECTOR],(async e=>{const t=await V(e);P(this.map.basemap,t)?this._basemapOptions.addInternal(this.basemapExtension):this._basemapOptions.addInternal(K.create({basemap:t}),void 0,!1)}))}_ensureIsBasemapOption(e){const t=this.basemapOptions.findIndex((t=>t.basemap===e.basemap));t>=0?this._basemapOptions.getItemAt(t)!==e&&(this._basemapOptions.removeAtInternal(t),this._basemapOptions.addInternal(e,t)):this._basemapOptions.addInternal(e,0)}_cleanPreviousBasemapOptions(e){if(e&&!k(e))for(let t=this._basemapOptions.length-1;t>=0;t--){const i=this._basemapOptions.getItemAt(t),s=P(i.basemap,e),a=P(i.basemap,this._map?.basemap)||P(i.basemap,this._scene?.basemap);s&&!a&&this._basemapOptions.removeAtInternal(t)}}_updateBookmarks(){this.bookmarks.removeMany(this.bookmarks.filter((e=>"map"===e.source))),G(this.map)&&this.map.bookmarks?.length>0?this.map.bookmarks.forEach((e=>{this.bookmarks.add(new Q({source:"map",title:e.name,viewpoint:e.viewpoint}))})):D(this.map)&&this.map.presentation?.slides?.length>0&&this.map.presentation.slides.forEach((e=>{const t={source:"map",title:e.title.text,viewpoint:e.viewpoint},i=new Q(t);this.bookmarks.add(i)}))}};ae=e([g],ae);export{ae as MapExtension};class ne extends w{isExplicitlyModified=!1;_mapExtension;constructor(e){super(new t),this._mapExtension=e}add(e,t){return super.add(e,t),this.isExplicitlyModified=!0,1===this.length&&this._mapExtension.map&&!this._mapExtension.basemapExtension&&(this._mapExtension.basemapExtension=e),this}addMany(e,t){return super.addMany(e,t),this.isExplicitlyModified=!0,this}addInternal(e,t,i=!0){const s=e=>{const t="-vector";return e?.endsWith(t)?e.substring(0,e.length-7):e};let a;if(e.basemap){const t=s(e.basemap.id);if(a=k(e.basemap)?this.findIndex((e=>s(e.basemap?.id)===t)):this.findIndex((t=>P(t.basemap,e.basemap))),a>=0){if(!i)return;super.removeAt(a)}}super.add(e,t??(a>=0?a:void 0))}removeAt(e){const t=super.removeAt(e);return t&&(this.isExplicitlyModified=!0,t===this._mapExtension.basemapExtension&&(e<this.length?this._mapExtension.basemapExtension=this.getItemAt(e):this.length?this._mapExtension.basemapExtension=this.getItemAt(e-1):this._mapExtension.basemapExtension=void 0)),t}removeAll(){return this._mapExtension.basemapExtension=void 0,super.removeAll()}removeAtInternal(e){return super.removeAt(e)}removeAllInternal(){for(;this.length;)this.removeAtInternal(this.length-1)}reorder(e,t){return super.reorder(e,t),this.isExplicitlyModified=!0,e}reorderInternal(e,t){return super.reorder(e,t)}_itemIsInitialized(e){return super._itemIsInitialized(e)&&!!e.basemap}}class oe extends w{get _collection(){return this._tables.map((e=>this._forTable(e))).concat(Array.from(this._uninitializedTableExtensions))}get _tables(){return this._mapExtension.map?.tables??new O(new t)}_mapExtension;_tableExtensionMap=new WeakMap;_uninitializedTableExtensions=new Set;_onChangeMapTablesHandle=new T((()=>X(this._mapExtension,"map.tables",(e=>{const t={added:(e.added||[]).map((e=>this._forTable(e))),moved:(e.moved||[]).map((e=>this._forTable(e))),removed:(e.removed||[]).map((e=>this._forTable(e))),target:this};this.emit("change",t)}))));_onBeforeAddMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["before-add",e=>this.emit("before-add",{...e,item:this._forTable(e.item),target:this})])));_onBeforeRemoveMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["before-remove",e=>this.emit("before-remove",{...e,item:this._forTable(e.item),target:this})])));_onBeforeChangesMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["before-changes",e=>this.emit("before-changes",{...e,target:this})])));_onAfterAddMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["after-add",e=>this.emit("after-add",{...e,item:this._forTable(e.item),target:this})],(e=>{if(null!=e)for(const t of e)this.emit("after-add",{item:this._forTable(t),target:this})}))));_onAfterRemoveMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["after-remove",e=>this.emit("after-remove",{...e,item:this._forTable(e.item),target:this})],((e,t)=>{if(null!=t)for(const e of t)this.emit("after-remove",{item:this._forTable(e),target:this})}))));_onAfterChangesMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["after-changes",e=>this.emit("after-changes",{...e,target:this})],(()=>{this.emit("after-changes",{target:this})}))));constructor(e){super(),this._mapExtension=e,S(this,"length",(()=>A(this._mapExtension,"map.tables.length",(()=>I(this,"length")),{sync:!0})))}on(e,t){const i=[];return"change"===e?i.push(this._onChangeMapTablesHandle.add()):"before-add"===e?i.push(this._onBeforeAddMapTablesHandle.add()):"before-remove"===e?i.push(this._onBeforeRemoveMapTablesHandle.add()):"before-changes"===e?i.push(this._onBeforeChangesMapTablesHandle.add()):"after-add"===e?i.push(this._onAfterAddMapTablesHandle.add()):"after-remove"===e?i.push(this._onAfterRemoveMapTablesHandle.add()):"after-changes"===e&&i.push(this._onAfterChangesMapTablesHandle.add()),i.push(super.on(e,t)),v(i)}toJSON(){const e=[];return this.forEach((t=>{e.push(`item://${encodeURIComponent(l.TABLE_EXTENSION)}/${encodeURIComponent(t.id)}`)})),e}clone(){const e=new oe(this._mapExtension);return e._tableExtensionMap=this._tableExtensionMap,e}findById(e){return B("id",e).isNotMissing(),this.find((t=>t.id===e))}findByTableId(e){return B("id",e).isNotMissing(),this.find((t=>t._tableId===e))}forTable(e){if(B("table",e).isNotMissing(),this._tables.includes(e))return this._forTable(e)}add(e,t){if(B("tableX",e).isNotMissing(),e.mapExtension&&e.mapExtension.tableExtensions.remove(e),e._setMapExtension(this._mapExtension),e.table){const i=this._tableExtensionMap.get(e.table);if(this._tableExtensionMap.set(e.table,e),i&&i!==e&&this._onRemoved(i),this._tables.includes(e.table))if(void 0===t){const t={added:[e],moved:[],removed:i?[i]:[],target:this};i&&this.emit("after-remove",{item:i,target:this}),this.emit("after-add",{item:e,target:this}),this.emit("change",t)}else this._tables.reorder(e.table,t);else this._tables.add(e.table,t)}else{this._uninitializedTableExtensions.add(e);const t={added:[e],moved:[],removed:[],target:this};this.emit("after-add",{item:e,target:this}),this.emit("change",t)}return this._onAdded(e),this}removeAt(e){const t=this.getItemAt(e);if(void 0!==t){if(this._uninitializedTableExtensions.has(t)){this._uninitializedTableExtensions.delete(t);const e={added:[],moved:[],removed:[t],target:this};this.emit("after-remove",{item:t,target:this}),this.emit("change",e)}else this._tables.remove(t.table);return this._onRemoved(t),t}}reorder(e,t){if(e&&this._tables.includes(e.table))return this._tables.reorder(e.table,t),e}sort(e){return this._tables.sort(((t,i)=>e(this._forTable(t),this._forTable(i)))),this}_itemIsInitialized(e){return super._itemIsInitialized(e)&&!!e.table}_onAdded(e){}_onRemoved(e){e._setMapExtension(void 0)}_forTable(e){for(const e of this._uninitializedTableExtensions)e._resolveTable(),e.table&&(this._tableExtensionMap.set(e.table,e),this._uninitializedTableExtensions.delete(e));if(!this._tableExtensionMap.has(e)){const t=d.create({table:e});this._tableExtensionMap.set(e,t),t._setMapExtension(this._mapExtension),this._onAdded(t)}return this._tableExtensionMap.get(e)}}class re extends y{get _collection(){let e=this._mapExtension.layerExtensions.flatten((e=>R(e)?e.layerExtensions:[]));return this._mapExtension.basemapExtension&&(e=e.concat(this._mapExtension.basemapExtension.baseLayerExtensions.toArray()).concat(this._mapExtension.basemapExtension.referenceLayerExtensions.toArray())),e=e.concat(this._mapExtension.groundExtension.layerExtensions.toArray()),e}_mapExtension;_onChangeLayerExtensionsHandle=new T((()=>{const e=new WeakMap,i=new Set,s=a=>{const n=new t(a.added).flatten((e=>R(e)?e.layerExtensions:[])),o=new t(a.moved).flatten((e=>R(e)?e.layerExtensions:[])),r=new t(a.removed).flatten((e=>R(e)?e.layerExtensions:[]));for(const t of n)if(!e.has(t)&&R(t)){const a=t.layerExtensions.on("change",s);e.set(t,a),i.add(a)}for(const t of r){const s=e.get(t);s&&(s.remove(),e.delete(t),i.delete(s))}this.emit("change",{added:n.toArray(),moved:o.toArray(),removed:r.toArray(),target:this})};i.add(this._mapExtension.layerExtensions.on("change",s));const a=this._mapExtension.layerExtensions.flatten((e=>R(e)?e.layerExtensions:[]));for(const t of a)if(R(t)){const a=t.layerExtensions.on("change",s);e.set(t,a),i.add(a)}return i.add(X(this._mapExtension,"basemapExtension.baseLayerExtensions",(e=>{this.emit("change",{...e,target:this})}))),i.add(X(this._mapExtension,"basemapExtension.referenceLayerExtensions",(e=>{this.emit("change",{...e,target:this})}))),i.add(this._mapExtension.groundExtension.layerExtensions.on("change",(e=>{this.emit("change",{...e,target:this})}))),v(i)}));_onAfterAddLayerExtensionsHandle=new T((()=>{const e=new WeakMap,t=new Set,i=i=>{const s=e.get(i);s&&(s.remove(),e.delete(i),t.delete(s))},s=e=>{const t=e.item;if(R(t)){const e=t.layerExtensions.flatten((e=>R(e)?e.layerExtensions:[]));for(const t of e)i(t)}i(t)},a=i=>{this.emit("after-add",{...i,target:this});const n=i.item;if(R(n)){const o=n.layerExtensions.flatten((e=>R(e)?e.layerExtensions:[]));for(const n of o)if(this.emit("after-add",{...i,item:n,target:this}),!e.has(n)&&R(n)){const i=n.layerExtensions.on("after-add",a),o=n.layerExtensions.on("after-remove",s),r=v([i,o]);e.set(n,r),t.add(r)}}};t.add(this._mapExtension.layerExtensions.on("after-add",a)),t.add(this._mapExtension.layerExtensions.on("after-remove",s));const n=this._mapExtension.layerExtensions.flatten((e=>R(e)?e.layerExtensions:[]));for(const i of n)if(R(i)){const n=i.layerExtensions.on("after-add",a),o=i.layerExtensions.on("after-remove",s),r=v([n,o]);e.set(i,r),t.add(r)}return t.add(z(this._mapExtension,"basemapExtension.baseLayerExtensions",["after-add",e=>this.emit("after-add",{...e,target:this})])),t.add(z(this._mapExtension,"basemapExtension.referenceLayerExtensions",["after-add",e=>this.emit("after-add",{...e,target:this})])),t.add(this._mapExtension.groundExtension.layerExtensions.on("after-add",(e=>{this.emit("after-add",{...e,target:this})}))),v(t)}));_onAfterRemoveLayerExtensionsHandle=new T((()=>{const e=new WeakMap,t=new Set,i=i=>{const s=e.get(i);s&&(s.remove(),e.delete(i),t.delete(s))},s=e=>{this.emit("after-remove",{...e,target:this});const t=e.item;if(R(t)){const s=t.layerExtensions.flatten((e=>R(e)?e.layerExtensions:[]));for(const t of s)this.emit("after-remove",{...e,item:t,target:this}),i(t)}i(t)},a=i=>{const n=i.item;if(R(n)){const i=n.layerExtensions.on("after-add",a),o=n.layerExtensions.on("after-remove",s),r=v([i,o]);e.set(n,r),t.add(r)}};t.add(this._mapExtension.layerExtensions.on("after-remove",s)),t.add(this._mapExtension.layerExtensions.on("after-add",a));const n=this._mapExtension.layerExtensions.flatten((e=>R(e)?e.layerExtensions:[]));for(const i of n)if(R(i)){const n=i.layerExtensions.on("after-add",a),o=i.layerExtensions.on("after-remove",s),r=v([n,o]);e.set(i,r),t.add(r)}return t.add(z(this._mapExtension,"basemapExtension.baseLayerExtensions",["after-remove",e=>this.emit("after-remove",{...e,target:this})])),t.add(z(this._mapExtension,"basemapExtension.referenceLayerExtensions",["after-remove",e=>this.emit("after-remove",{...e,target:this})])),t.add(this._mapExtension.groundExtension.layerExtensions.on("after-remove",(e=>{this.emit("after-remove",{...e,target:this})}))),v(t)}));constructor(e){super(),this._mapExtension=e}on(e,t){const i=[];return"change"===e?i.push(this._onChangeLayerExtensionsHandle.add()):"after-add"===e?i.push(this._onAfterAddLayerExtensionsHandle.add()):"after-remove"===e&&i.push(this._onAfterRemoveLayerExtensionsHandle.add()),i.push(super.on(e,t)),v(i)}findById(e){return B("id",e).isNotMissing(),this.find((t=>t.id===e))}findByLayerId(e){return B("id",e).isNotMissing(),this.find((t=>t._layerId===e))}forLayer(e){return B("layer",e).isNotMissing(),this.findByLayerId(e.id)}_itemIsInitialized(e){return super._itemIsInitialized(e)&&!!e.layer}}function pe(e){if(!(null==e||"object"==typeof e&&e?.baseMap))return U(e)}function he(e){return"object"!=typeof e||e&&!e.baseMap}function me(e,t,i){if(e?.type&&e.type!==i)throw new Error(`Invalid portal item type "${e.type}" for property ${t}.`)}async function le(e){await j(e),e.basemap&&(await j(e.basemap),e.basemap.baseLayers.filter((e=>N(e))).map((e=>{const t=e;return t.activeLayer.imageFormat=t.activeLayer.imageFormat??(t.activeLayer.imageFormats?.length>0?t.activeLayer.imageFormats[0]:""),t.activeLayer.styleId=t.activeLayer.styleId??"",t})),e.basemap.id=L(e.basemap)??e.basemap.id)}
|
|
1
|
+
import{__decorate as e}from"tslib";import t,{}from"@arcgis/core/core/Collection";import{ArgumentError as i}from"../ArgumentError.js";import{EntityBase as s}from"../Entity.js";import{InvalidOperationError as a}from"../InvalidOperationError.js";import{isBasemapExtension as n,isBookmark as o,isGroundExtension as r,isLayerPreset as p,isMenu as m,isTableExtension as h,ItemType as l}from"../ItemType.js";import{TableExtension as d}from"../data/TableExtension.js";import{layerToParentJsonCache as c}from"../json/LayerJson.js";import{applyJsonToWebMap as b}from"../json/WebMapJson.js";import{applyJsonToWebScene as _}from"../json/WebSceneJson.js";import{LayerPreset as f}from"../layer-preset/LayerPreset.js";import{Menu as E}from"../menus/Menu.js";import{DefaultArcGISRequestHelper as x}from"../support/ArcGISRequestHelper.js";import{FormatSettings as u}from"../support/FormatSettings.js";import{InitializableCollectionProxy as w}from"../support/InitializableCollectionProxy.js";import{ReadOnlyInitializableCollection as y}from"../support/ReadOnlyInitializableCollection.js";import{serializable as M}from"../support/Serializable.js";import{WellKnownBasemap as g}from"../support/esri.js";import{createIHandle as v,notifyChange as I,onWatch as S,watch as A,watchEvent as z}from"../support/observableUtils.js";import{ReadOnlyCollection as O}from"../utilities/ReadOnlyCollection.js";import T from"../utilities/_ReferenceCountedHandle.js";import{basemapsAreEquivalent as P,createStandardBasemap as V,getStandardBasemapId as L,isStandardBasemap as k,isStandardBasemap2D as B}from"../utilities/basemaps.js";import{checkArg as C}from"../utilities/checkArg.js";import{compare as j}from"../utilities/collection.js";import{load as R}from"../utilities/esri.js";import{isGroupLayerExtension as H}from"../utilities/extensions.js";import{filter as N}from"../utilities/iterable.js";import{isWMTSLayer as W,layersAreEquivalent as J}from"../utilities/layers.js";import{getLogger as F}from"../utilities/log.js";import{getMapSpatialReference as q,isMap as G,isWebMap as D,isWebScene as U}from"../utilities/mapping.js";import{toPortalItem as $}from"../utilities/portal.js";import{parallelEach as X}from"../utilities/promise.js";import{onCollectionPropertyChange as Y,onEach as K}from"../utilities/watch.js";import{BasemapExtension as Q}from"./BasemapExtension.js";import{Bookmark as Z}from"./Bookmark.js";import{GroundExtension as ee}from"./GroundExtension.js";import{MapConstraints as te}from"./MapConstraints.js";import{_assignLayerExtensions as ie}from"./_LayerExtension.js";import{LayerExtensionCollectionImpl as se}from"./_LayerExtensionCollectionImpl.js";const ae=F("MapExtension");let ne=class extends s{get webMap(){return this._webMap}get webScene(){return this._webScene}get map(){return this._currentMap}get viewMode(){return this.map?U(this.map)?"scene":"map":this.initialViewMode}get initialViewMode(){return this.webMap&&this.webScene?this._initialViewMode||"map":U(this.map)||this.webScene&&!this.webMap?"scene":"map"}set initialViewMode(e){this._initialViewMode=e}get requestHelper(){return this._requestHelper||(this._requestHelper=new x),this._requestHelper}set requestHelper(e){this._requestHelper=e}get basemapExtension(){return this._basemapExtension}set basemapExtension(e){const t=this._basemapExtension;if(t!==e)if(t&&t._setMapExtension(void 0),e){if(e._setMapExtension(this),this.isInitialized&&!e.basemap){if(e.isInitialized)throw e._setMapExtension(void 0),new a("Cannot set MapExtension.basemapExtension without a valid Esri Basemap object");e.initialize()}this._ensureIsBasemapOption(e),this.map&&e.basemap&&e.basemap!==this.map.basemap?this.map.basemap=e.basemap:this._basemapExtension=e}else this.map.basemap=void 0,this._basemapExtension=void 0}get groundExtension(){return this._groundExtension||(this.groundExtension=ee.create({ground:this.map?.ground})),this._groundExtension}set groundExtension(e){if(!e)throw new a("Cannot set map.ground to undefined");const t=this._groundExtension;t!==e&&(t&&t._setMapExtension(void 0),e._setMapExtension(this),e._resolveGround(),e.ground?(this._groundExtensions.set(e.ground,e),this.map&&e.ground!==this.map.ground?this.map.ground=e.ground:this._groundExtension=e):this._groundExtension=e)}get basemapOptions(){return this._basemapOptions}get bookmarks(){return this._bookmarks}get initialBasemapExtension(){return this._initialBasemapExtension}get initialLayerPreset(){return this._initialLayerPreset}set initialLayerPreset(e){if(!e)return void(this._initialLayerPreset=void 0);const t=p(e)?e:new f(e);this._initialLayerPreset=t}get _spatialReference(){return q(this.map)}get webMapItemTitle(){if(this._webMapItem)return this._webMapItem.title}get webSceneItemTitle(){if(this._webSceneItem)return this._webSceneItem.title}get title(){return this._title?this._title:this._webMapItem&&"map"===this.viewMode?this.webMapItemTitle:this._webSceneItem&&"scene"===this.viewMode?this.webSceneItemTitle:void 0}set title(e){this._title=e}formatSettings;constraints;onClick;onHover;onHoverEnd;onInitialized;onViewpointChanged;get contextMenu(){return this._contextMenu}set contextMenu(e){this._contextMenu=e,e&&this.isInitialized&&!e.isInitialized&&(async()=>{try{await e.initialize()}catch(e){e instanceof Error&&ae.error({message:"An error occurred while initializing context menu.",error:e})}})()}isSwitchingMap=!1;_layerViews=new t;get _allLayerViews(){const e=i=>{const s=[i];return t.isCollection(i.sublayerViews)?s.push(...i.sublayerViews.toArray().flatMap(e)):t.isCollection(i.layerViews)&&s.push(...i.layerViews.toArray().flatMap(e)),s};return this._layerViews.toArray().flatMap(e)}get layerExtensions(){return this._layerExtensions}tableExtensions;allLayerExtensions;_itemType=l.MAP_EXTENSION;_map;_scene;_deserializedMapPromise;_deserializedViewMode;_deserializedViewModePromise;_deferredProperties;_currentMap;_requestHelper;_basemapExtension;_groundExtension;_basemapOptions;_groundExtensions;_bookmarks;_layerExtensions;_webMap;_webMapItem;_webScene;_webSceneItem;_title;_initialViewMode;_initialLayerPreset;_initialBasemapExtension;_skipBasemapOptions=!1;_createScenePromise;_createMapPromise;_contextMenu;constructor(e){super(e);let s={...e};this._basemapOptions=new oe(this),this._groundExtensions=new WeakMap,this._layerExtensions=this._createLayerExtensionCollection(),this.tableExtensions=this._createTableExtensionCollection(),this.formatSettings=this._createFormatSettings(),this._bookmarks=new t,this.constraints=new te;const a=[],n=[];A(this,"_map",(e=>{if(e)a.push(K(e.layers,"layerview-create",(e=>{this._layerViews.add(e.layerView)})),K(e.layers,"layerview-destroy",(e=>{this._layerViews.remove(e.layerView)})));else for(const e of a)e.remove()}),{sync:!0}),A(this,"_scene",(e=>{if(e)n.push(K(e.layers,"layerview-create",(e=>{this._layerViews.add(e.layerView)})),K(e.layers,"layerview-destroy",(e=>{this._layerViews.remove(e.layerView)})));else for(const e of n)e.remove()}),{sync:!0});const{webMap:o,webScene:r,initialViewMode:p,map:m,basemapOptions:h}=s;if(this._webMap=o,this._webScene=r,this._webMapItem=me(o),this._webSceneItem=me(r),this.initialViewMode=p,U(m)&&r)throw new i("Cannot specify webScene property if map is initialized to a WebScene instance.");if(G(m)&&o)throw new i("Cannot specify webMap property if map is initialized to a 2D Map instance.");if(U(m)||D(m)||G(m))this.assignProperties({basemapOptions:h}),this._skipBasemapOptions=!!h;else{const{layerExtensions:e,tableExtensions:t,groundExtension:i,basemapOptions:a,basemapExtension:n,...o}=s;this._deferredProperties={layerExtensions:e,tableExtensions:t,groundExtension:i,basemapOptions:a,basemapExtension:n},s=o,a&&(this._skipBasemapOptions=!0)}this._initMapFromProperties(s),A(this,"map.basemap",(()=>this._onBasemapChange()),{sync:!0}),A(this,"map.ground",(()=>this._onGroundChange()),{sync:!0}),this.allLayerExtensions=new pe(this),this.map?.basemap&&this._onBasemapChange()}getLayerExtensionsForView(e=this.viewMode){return(("map"===e?this._map:this._scene)?.layers.toArray()??[]).map((e=>this._layerExtensions._forLayer(e))).filter((e=>!e.dynamicallyAddedLayer))}getAllFeatureSources(e=()=>!0){const t=[],i=a=>{a.hasFeatures&&t.push(a);for(const t of a.sublayerExtensions.initializedItems.filter(e).toArray())s(t);if(H(a))for(const t of a.layerExtensions.initializedItems.filter(e).toArray())i(t)},s=i=>{t.push(i);for(const t of i.sublayerExtensions.initializedItems.filter(e).toArray())s(t)};for(const t of this.layerExtensions.initializedItems.filter(e).toArray())i(t);for(const i of this.tableExtensions.initializedItems.filter(e).toArray())t.push(i);if(this.basemapExtension){for(const t of this.basemapExtension.baseLayerExtensions.initializedItems.filter(e).toArray())i(t);for(const t of this.basemapExtension.referenceLayerExtensions.initializedItems.filter(e).toArray())i(t)}return t}isSupportedViewMode(e){return e===this.viewMode||!(!this.webMap&&!this.webScene)&&("scene"===e?!!this.webScene:!!this.webMap)}async switchViewMode(e){if(C("viewMode",e).isNotMissing().satisfies((e=>this.isSupportedViewMode(e)),"Unsupported view mode."),this.viewMode===e)return;let t;"scene"===e?(await this._createScene(),t=this._scene):(await this._createMap(),t=this._map),await this.switchMap(t),I(this,"viewMode"),I(this,"title")}async switchMap(e){if(C("newMap",e).isNotMissing(),e===this.map)return;if(!this.map)return void this._setMap(e);this.isSwitchingMap=!0,this.isInitialized&&await de(e),(!e.basemap||B(e.basemap))&&this.map?.basemap&&B(this.map.basemap)&&(e.basemap=this.map.basemap);const t=new Map(this.map.layers.map((e=>[e,this.layerExtensions.forLayer(e)]))),i=new Map(this.map.tables.map((e=>[e,this.tableExtensions.forTable(e)]))),{basemapExtension:s}=this;this._setMap(e),this._updateBookmarks();const a=[];for(const e of this.map.layers.toArray()){const i=[...N(t.entries(),(([t])=>J(t,e)))];if(1===i.length){const[t]=i;a.push((async()=>{const i=t[1];await i._switchLayer(e),this._layerExtensions._register(i)})())}else{const t=this._layerExtensions._forLayer(e);t&&t.layer!==e&&a.push(t._switchLayer(e))}}for(const e of this.map.tables.toArray()){const t=[...N(i.entries(),(([t])=>J(t,e)))];if(1===t.length){const[i]=t;a.push((async()=>{const t=i[1];await t._switchTable(e),this.tableExtensions.add(t)})())}else{const t=this.tableExtensions.forTable(e);t&&t.table!==e&&a.push(t._switchTable(e))}}this.map.basemap&&s&&P(this.map.basemap,s.basemap)&&a.push((async()=>{await s._switchBasemap(this.map.basemap),this.basemapExtension=s})()),await Promise.all(a),this.isInitialized&&await this._initializeChildren(),this.isSwitchingMap=!1}async setWebMap(e){if(!e&&this.webMap&&!this.webScene)throw new a("Cannot unset both webMap and webScene.");const t=this._map?.basemap;this._webMap=e,this._map=void 0,this._createMapPromise=void 0,this._webMapItem=me(e),await R(this._webMapItem),"map"===this.viewMode&&(e?(this._basemapOptions.isExplicitlyModified||this._basemapOptions.removeAllInternal(),await this._createMap(),await this.switchMap(this._map),await this._createStandardBasemapOptions(),this._basemapOptions.reorderInternal(this.basemapExtension,0),this._initialBasemapExtension=this.basemapExtension):await this.switchViewMode("scene")),this._cleanPreviousBasemapOptions(t),I(this,"webMap"),I(this,"initialViewMode"),I(this,"title")}async setWebScene(e){if(!e&&this.webScene&&!this.webMap)throw new a("Cannot unset both webMap and webScene.");const t=this._scene?.basemap;this._webScene=e,this._scene=void 0,this._createScenePromise=void 0,this._webSceneItem=me(e),await R(this._webSceneItem),"scene"===this.viewMode&&(e?(this._basemapOptions.isExplicitlyModified||this._basemapOptions.removeAllInternal(),await this._createScene(),await this.switchMap(this._scene),await this._createStandardBasemapOptions(),this._basemapOptions.reorderInternal(this.basemapExtension,0),this._initialBasemapExtension=this.basemapExtension):await this.switchViewMode("map")),this._cleanPreviousBasemapOptions(t),I(this,"webScene"),I(this,"initialViewMode"),I(this,"title")}getDefaults(){const e=super.getDefaults();return e.initialViewMode="map",e}async _createScene(){if(!this._scene&&this.webScene)return this._createScenePromise=this._createScenePromise??(async()=>{const e=(await import("@arcgis/core/WebScene")).default;he(this.webScene)?(this._webSceneItem.type="Web Scene",this._scene=new e({portalItem:this._webSceneItem})):this._scene=e.fromJSON(this.webScene)})()}async _createMap(){if(!this._map&&this.webMap)return this._createMapPromise=this._createMapPromise??(async()=>{const e=(await import("@arcgis/core/WebMap")).default;he(this.webMap)?(this._webMapItem.type="Web Map",this._map=new e({portalItem:this._webMapItem})):this._map=e.fromJSON(this.webMap)})()}_getSerializableProperties(){return{...super._getSerializableProperties(),layerExtensions:{serializeModes:["initial","project"],deserialize:e=>{if(this.map&&e){const t="map"===this.viewMode,i=(t?this._scene:this._map)?.layers.toArray()??[],s=e.filter((e=>!i.includes(e.layer)&&!i.some((t=>e.layer&&J(t,e.layer)))));ie(this.layerExtensions,s)}},serialize:e=>{if(this._deferredProperties?.layerExtensions)return this._deferredProperties.layerExtensions;{const t="map"===this.viewMode,i=(t?this._map:this._scene)?.layers.toArray();let s=(t?this._scene:this._map)?.layers.toArray()??[];return s=s.filter((e=>!i.find((t=>J(t,e))))),this.layerExtensions.concat(s.map((e=>this._layerExtensions._forLayer(e)))).filter((t=>"initial"!==e||!t.dynamicallyAddedLayer)).toArray()}}},tableExtensions:{serializeModes:["initial","project"],deserialize:e=>{this.map?j(this.tableExtensions,e,{onNew:(e,t)=>{this.tableExtensions.add(h(e)?e:d.create(e),t)},onMatch:(e,t,i,s)=>{h(t)||e.assignProperties(t),i!==s&&this.tableExtensions.reorder(e,s)},equals:(e,t)=>h(t)?t===e:!!d._matchesRef(e,t.table)||e.id===t.id}):this._deferredProperties={...this._deferredProperties,tableExtensions:e}},serialize:()=>this._deferredProperties?.tableExtensions?this._deferredProperties?.tableExtensions:this.tableExtensions.toArray()},basemapExtension:{serializeModes:["project"],deserialize:e=>{if(this.map)if(e)if(n(e))this.basemapExtension=e;else{if(this.basemapExtension)return this.basemapExtension.assignPropertiesAsync(e);this.basemapExtension=Q.create(e)}else this.basemapExtension=void 0;else this._deferredProperties={...this._deferredProperties,basemapExtension:e}},serialize:()=>this._deferredProperties?.basemapExtension?this._deferredProperties?.basemapExtension:this.basemapExtension},basemapOptions:{serializeModes:["initial"],deserialize:e=>{this._skipBasemapOptions?this._skipBasemapOptions=!1:(j(this.basemapOptions,e,{onNew:(e,t)=>{this.basemapOptions.add(n(e)?e:Q.create(e),t)},onMatch:(e,t,i,s)=>{n(t)||e.assignProperties(t),i!==s&&this.basemapOptions.reorder(e,s)},onMissing:e=>{this.basemapOptions.remove(e)},equals:(e,t)=>{if(n(t))return t===e;if(e.id&&t.id)return e.id===t.id;{const i=e.toJSON();return P(i.basemap,t.basemap||t.baseMap)}}}),this.basemapExtension&&this._ensureIsBasemapOption(this.basemapExtension),this.isInitialized&&X(this.basemapOptions.toArray(),(e=>e._createBackingBasemap())))},serialize:()=>this._deferredProperties?.basemapOptions?this._deferredProperties?.basemapOptions:this.basemapOptions.toArray()},groundExtension:{serializeModes:["initial"],deserialize:e=>{if(this.map){if(!r(e))return this.groundExtension.assignPropertiesAsync(e);this.groundExtension=e}else this._deferredProperties={...this._deferredProperties,groundExtension:e}},serialize:()=>this._deferredProperties?.groundExtension?this._deferredProperties?.groundExtension:this.groundExtension},bookmarks:{serialize:()=>this.bookmarks.map((e=>e.toJSON())).toArray(),deserialize:e=>{this.bookmarks.addMany(e.map((e=>o(e)?e:new Z(e))))}},webMap:{serializeModes:["initial"],deserialize:!1},webScene:{serializeModes:["initial"],deserialize:!1},initialLayerPreset:"initial",initialViewMode:{serializeModes:["initial","project"],serialize:e=>"project"===e?this.viewMode:"scene"!==this.initialViewMode||!this.webScene&&this.webMap?"map":"scene",deserialize:e=>{this.viewMode!==e&&(this._deserializedViewMode=e),this._initialViewMode=e},isDefault:(e,t)=>"project"!==t&&"map"===e},formatSettings:"initial",constraints:"initial",title:"initial",onClick:"initial",onHover:"initial",onHoverEnd:"initial",onInitialized:"initial",onViewpointChanged:"initial",contextMenu:{serializeModes:["initial"],deserialize:e=>{e?m(e)?this.contextMenu=e:this.contextMenu?this.contextMenu.assignProperties(e):this.contextMenu=E.create(e):this.contextMenu=void 0}},map:{serializeModes:["project"],serialize:()=>{c.lookup=new WeakMap;const e=this.layerExtensions.toArray().filter((e=>e.layer)).map((e=>e._getProjectWebmapJSON())),t=this.tableExtensions.toArray().filter((e=>e.table)).map((e=>({id:e.table.id,title:e.table.title})));return c.lookup=void 0,e.length>0||t.length>0?{operationalLayers:e,tables:t}:{}},deserialize:e=>{if(!this.map)throw new i("Cannot specify JSON object for the 'map' property. It must be an ArcGIS API Map instance. To specify JSON, use 'webMap' or 'webScene' instead.");if(G(e)||D(e)||U(e)){if(e!==this.map)throw new i("properties.map","Property 'map' is read-only.")}else this._deserializedMapPromise=(async()=>{this._deserializedViewMode&&this.webMap&&this.webScene&&(this._deserializedViewModePromise=this.switchViewMode(this._deserializedViewMode),await this._deserializedViewModePromise,this._deserializedViewMode=void 0,this._deserializedViewModePromise=void 0),await this._applyMapProperties(e,this.map),this._deserializedMapPromise=void 0})()}},requestHelper:{serialize:!1}}}async _applyMapProperties(e,t,i){await X(this.basemapOptions.toArray(),(e=>e._createBackingBasemap()));let s=e;const a=this.basemapOptions.find((e=>P(e.basemap,s.baseMap)));a&&(t.basemap=a.basemap,s={...s,baseMap:{...s.baseMap,title:t.basemap.title}}),U(t)?await _(s,t,i):await b(s,t,i)}_createFormatSettings(){return new u}_createLayerExtensionCollection(){return new se(this)}_createTableExtensionCollection(){return new re(this)}async _onInitialize(){await super._onInitialize();const{basemapOptions:e,basemapExtension:t,webMap:i,webScene:s,...a}=this._deferredProperties??{};if(this.map||("scene"===this.initialViewMode?(await this._createScene(),this._setMap(this._scene)):(await this._createMap(),this._setMap(this._map))),this._webMapItem||this._webSceneItem?(await Promise.all([de(this.map),R(this._webMapItem),R(this._webSceneItem)]),le(this._webMapItem,"webMap","Web Map"),le(this._webSceneItem,"webScene","Web Scene")):await de(this.map),t&&(!n(t)&&t.basemap?this.basemapExtension=Q.create(t):await this.assignPropertiesAsync({basemapExtension:t}),await this.basemapExtension._createBackingBasemap()),e){const t=e.find((e=>n(e)&&P(this.map.basemap,e.toJSON().basemap)));if(t){const e=t.toJSON().basemap?.id??t.basemap?.id,i=t.toJSON().basemap?.title;await t._switchBasemap(this.map.basemap),this.basemapExtension=t,e&&(this.map.basemap.id=e),i&&(this.map.basemap.title=i)}await this.assignPropertiesAsync({basemapOptions:e})}await this.assignPropertiesAsync(a),this._deferredProperties=void 0,this._initialBasemapExtension=this.basemapExtension,this._updateBookmarks();for(const e of this.layerExtensions.toArray())await e._createBackingLayer();await Promise.all(this.tableExtensions.map((e=>e._createBackingTable())).toArray())}async _postInitialize(){await super._postInitialize(),await this._createStandardBasemapOptions(),await X(this.basemapOptions.toArray(),(e=>e._createBackingBasemap())),this.initialLayerPreset&&await this.initialLayerPreset.applyTo(this)}*_initializableChildCollections(){yield*super._initializableChildCollections();const e=new t(this.layerExtensions.filter((e=>!!e.layer)));e.remove=e=>this.layerExtensions.remove(e);const i=new t(this.tableExtensions.filter((e=>!!e.table)));if(i.remove=e=>this.tableExtensions.remove(e),yield e,yield i,this.basemapExtension){const e=new t;e.add(this.basemapExtension),yield e}const s=new t;s.add(this.groundExtension),yield s}_initMapFromProperties(e){const t=e.map;G(t)||D(t)||U(t)?this._setMap(t):"scene"===this.initialViewMode?e.webScene&&!he(e.webScene)&&(this._deferredProperties={webScene:e.webScene,...this._deferredProperties}):e.webMap&&!he(e.webMap)&&(this._deferredProperties={webMap:e.webMap,...this._deferredProperties})}_setMap(e){U(e)?this._scene=e:this._map=e,this._currentMap=e,this.basemapExtension?.basemap&&!e.basemap&&(e.basemap=this.basemapExtension.basemap),this.groundExtension?.ground&&!e.ground&&(e.ground=this.groundExtension.ground),I(this,"map")}_onBasemapChange(){if(this._basemapExtension){if(this.basemapExtension.basemap==this.map.basemap)return;this._basemapExtension._setMapExtension(void 0)}if(this.map.basemap){let e=this.basemapOptions.find((e=>this.map.basemap===e.basemap));if(!e){const t=this.basemapOptions.find((e=>P(e.basemap,this.map.basemap)));t?(e=t,e._switchBasemap(this.map.basemap)):(e=Q.create({basemap:this.map.basemap}),this._basemapOptions.addInternal(e,0))}e.mapExtension!==this&&e._setMapExtension(this),this._basemapExtension=e}else this._basemapExtension=void 0;I(this,"basemapExtension")}_onGroundChange(){if(this._groundExtension){if(this.map.ground&&this.groundExtension.ground===this.map.ground)return void(this._groundExtensions.has(this.map.ground)||this._groundExtensions.set(this.map.ground,this.groundExtension));this.groundExtension._setMapExtension(void 0)}this.map.ground&&!this._groundExtensions.has(this.map.ground)&&this._groundExtensions.set(this.map.ground,ee.create({ground:this.map.ground}));const e=this._groundExtensions.get(this.map.ground);e&&e.mapExtension!==this&&e._setMapExtension(this),this._groundExtension=e,I(this,"groundExtension")}async _createStandardBasemapOptions(){const e=this._spatialReference;!this._basemapOptions.isExplicitlyModified&&e?.isWebMercator&&await X([g.SATELLITE,g.HYBRID_VECTOR,g.STREETS_VECTOR,g.TOPO_VECTOR,g.STREETS_NAVIGATION_VECTOR,g.STREETS_NIGHT_VECTOR,g.TERRAIN_VECTOR,g.DARK_GRAY_VECTOR,g.GRAY_VECTOR,g.OCEANS_VECTOR,g.OPEN_STREET_MAP_VECTOR],(async e=>{const t=await V(e);P(this.map.basemap,t)?this._basemapOptions.addInternal(this.basemapExtension):this._basemapOptions.addInternal(Q.create({basemap:t}),void 0,!1)}))}_ensureIsBasemapOption(e){const t=this.basemapOptions.findIndex((t=>t.basemap===e.basemap));t>=0?this._basemapOptions.getItemAt(t)!==e&&(this._basemapOptions.removeAtInternal(t),this._basemapOptions.addInternal(e,t)):this._basemapOptions.addInternal(e,0)}_cleanPreviousBasemapOptions(e){if(e&&!k(e))for(let t=this._basemapOptions.length-1;t>=0;t--){const i=this._basemapOptions.getItemAt(t),s=P(i.basemap,e),a=P(i.basemap,this._map?.basemap)||P(i.basemap,this._scene?.basemap);s&&!a&&this._basemapOptions.removeAtInternal(t)}}_updateBookmarks(){this.bookmarks.removeMany(this.bookmarks.filter((e=>"map"===e.source))),D(this.map)&&this.map.bookmarks?.length>0?this.map.bookmarks.forEach((e=>{this.bookmarks.add(new Z({source:"map",title:e.name,viewpoint:e.viewpoint}))})):U(this.map)&&this.map.presentation?.slides?.length>0&&this.map.presentation.slides.forEach((e=>{const t={source:"map",title:e.title.text,viewpoint:e.viewpoint},i=new Z(t);this.bookmarks.add(i)}))}};ne=e([M],ne);export{ne as MapExtension};class oe extends w{isExplicitlyModified=!1;_mapExtension;constructor(e){super(new t),this._mapExtension=e}add(e,t){return super.add(e,t),this.isExplicitlyModified=!0,1===this.length&&this._mapExtension.map&&!this._mapExtension.basemapExtension&&(this._mapExtension.basemapExtension=e),this}addMany(e,t){return super.addMany(e,t),this.isExplicitlyModified=!0,this}addInternal(e,t,i=!0){const s=e=>{const t="-vector";return e?.endsWith(t)?e.substring(0,e.length-7):e};let a;if(e.basemap){const t=s(e.basemap.id);if(a=k(e.basemap)?this.findIndex((e=>s(e.basemap?.id)===t)):this.findIndex((t=>P(t.basemap,e.basemap))),a>=0){if(!i)return;super.removeAt(a)}}super.add(e,t??(a>=0?a:void 0))}removeAt(e){const t=super.removeAt(e);return t&&(this.isExplicitlyModified=!0,t===this._mapExtension.basemapExtension&&(e<this.length?this._mapExtension.basemapExtension=this.getItemAt(e):this.length?this._mapExtension.basemapExtension=this.getItemAt(e-1):this._mapExtension.basemapExtension=void 0)),t}removeAll(){return this._mapExtension.basemapExtension=void 0,super.removeAll()}removeAtInternal(e){return super.removeAt(e)}removeAllInternal(){for(;this.length;)this.removeAtInternal(this.length-1)}reorder(e,t){return super.reorder(e,t),this.isExplicitlyModified=!0,e}reorderInternal(e,t){return super.reorder(e,t)}_itemIsInitialized(e){return super._itemIsInitialized(e)&&!!e.basemap}}class re extends w{get _collection(){return this._tables.map((e=>this._forTable(e))).concat(Array.from(this._uninitializedTableExtensions))}get _tables(){return this._mapExtension.map?.tables??new O(new t)}_mapExtension;_tableExtensionMap=new WeakMap;_uninitializedTableExtensions=new Set;_onChangeMapTablesHandle=new T((()=>Y(this._mapExtension,"map.tables",(e=>{const t={added:(e.added||[]).map((e=>this._forTable(e))),moved:(e.moved||[]).map((e=>this._forTable(e))),removed:(e.removed||[]).map((e=>this._forTable(e))),target:this};this.emit("change",t)}))));_onBeforeAddMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["before-add",e=>this.emit("before-add",{...e,item:this._forTable(e.item)})])));_onBeforeRemoveMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["before-remove",e=>this.emit("before-remove",{...e,item:this._forTable(e.item)})])));_onBeforeChangesMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["before-changes",e=>this.emit("before-changes",{...e})])));_onAfterAddMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["after-add",e=>this.emit("after-add",{...e,item:this._forTable(e.item)})],(e=>{if(null!=e)for(const t of e)this.emit("after-add",{item:this._forTable(t)})}))));_onAfterRemoveMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["after-remove",e=>this.emit("after-remove",{...e,item:this._forTable(e.item)})],((e,t)=>{if(null!=t)for(const e of t)this.emit("after-remove",{item:this._forTable(e)})}))));_onAfterChangesMapTablesHandle=new T((()=>z(this._mapExtension,"map.tables",["after-changes",e=>this.emit("after-changes",{...e,target:this})],(()=>{this.emit("after-changes",{target:this})}))));constructor(e){super(),this._mapExtension=e,S(this,"length",(()=>A(this._mapExtension,"map.tables.length",(()=>I(this,"length")),{sync:!0})))}on(e,t){const i=[];return"change"===e?i.push(this._onChangeMapTablesHandle.add()):"before-add"===e?i.push(this._onBeforeAddMapTablesHandle.add()):"before-remove"===e?i.push(this._onBeforeRemoveMapTablesHandle.add()):"before-changes"===e?i.push(this._onBeforeChangesMapTablesHandle.add()):"after-add"===e?i.push(this._onAfterAddMapTablesHandle.add()):"after-remove"===e?i.push(this._onAfterRemoveMapTablesHandle.add()):"after-changes"===e&&i.push(this._onAfterChangesMapTablesHandle.add()),i.push(super.on(e,t)),v(i)}toJSON(){const e=[];return this.forEach((t=>{e.push(`item://${encodeURIComponent(l.TABLE_EXTENSION)}/${encodeURIComponent(t.id)}`)})),e}clone(){const e=new re(this._mapExtension);return e._tableExtensionMap=this._tableExtensionMap,e}findById(e){return C("id",e).isNotMissing(),this.find((t=>t.id===e))}findByTableId(e){return C("id",e).isNotMissing(),this.find((t=>t._tableId===e))}forTable(e){if(C("table",e).isNotMissing(),this._tables.includes(e))return this._forTable(e)}add(e,t){if(C("tableX",e).isNotMissing(),e.mapExtension&&e.mapExtension.tableExtensions.remove(e),e._setMapExtension(this._mapExtension),e.table){const i=this._tableExtensionMap.get(e.table);if(this._tableExtensionMap.set(e.table,e),i&&i!==e&&this._onRemoved(i),this._tables.includes(e.table))if(void 0===t){const t={added:[e],moved:[],removed:i?[i]:[],target:this};i&&this.emit("after-remove",{item:i}),this.emit("after-add",{item:e}),this.emit("change",t)}else this._tables.reorder(e.table,t);else this._tables.add(e.table,t)}else{this._uninitializedTableExtensions.add(e);const t={added:[e],moved:[],removed:[],target:this};this.emit("after-add",{item:e}),this.emit("change",t)}return this._onAdded(e),this}removeAt(e){const t=this.getItemAt(e);if(void 0!==t){if(this._uninitializedTableExtensions.has(t)){this._uninitializedTableExtensions.delete(t);const e={added:[],moved:[],removed:[t],target:this};this.emit("after-remove",{item:t}),this.emit("change",e)}else this._tables.remove(t.table);return this._onRemoved(t),t}}reorder(e,t){if(e&&this._tables.includes(e.table))return this._tables.reorder(e.table,t),e}sort(e){return this._tables.sort(((t,i)=>e(this._forTable(t),this._forTable(i)))),this}_itemIsInitialized(e){return super._itemIsInitialized(e)&&!!e.table}_onAdded(e){}_onRemoved(e){e._setMapExtension(void 0)}_forTable(e){for(const e of this._uninitializedTableExtensions)e._resolveTable(),e.table&&(this._tableExtensionMap.set(e.table,e),this._uninitializedTableExtensions.delete(e));if(!this._tableExtensionMap.has(e)){const t=d.create({table:e});this._tableExtensionMap.set(e,t),t._setMapExtension(this._mapExtension),this._onAdded(t)}return this._tableExtensionMap.get(e)}}class pe extends y{get _collection(){let e=this._mapExtension.layerExtensions.flatten((e=>H(e)?e.layerExtensions:[]));return this._mapExtension.basemapExtension&&(e=e.concat(this._mapExtension.basemapExtension.baseLayerExtensions.toArray()).concat(this._mapExtension.basemapExtension.referenceLayerExtensions.toArray())),e=e.concat(this._mapExtension.groundExtension.layerExtensions.toArray()),e}_mapExtension;_onChangeLayerExtensionsHandle=new T((()=>{const e=new WeakMap,i=new Set,s=a=>{const n=new t(a.added).flatten((e=>H(e)?e.layerExtensions:[])),o=new t(a.moved).flatten((e=>H(e)?e.layerExtensions:[])),r=new t(a.removed).flatten((e=>H(e)?e.layerExtensions:[]));for(const t of n)if(!e.has(t)&&H(t)){const a=t.layerExtensions.on("change",s);e.set(t,a),i.add(a)}for(const t of r){const s=e.get(t);s&&(s.remove(),e.delete(t),i.delete(s))}this.emit("change",{added:n.toArray(),moved:o.toArray(),removed:r.toArray()})};i.add(this._mapExtension.layerExtensions.on("change",s));const a=this._mapExtension.layerExtensions.flatten((e=>H(e)?e.layerExtensions:[]));for(const t of a)if(H(t)){const a=t.layerExtensions.on("change",s);e.set(t,a),i.add(a)}return i.add(Y(this._mapExtension,"basemapExtension.baseLayerExtensions",(e=>{this.emit("change",{...e})}))),i.add(Y(this._mapExtension,"basemapExtension.referenceLayerExtensions",(e=>{this.emit("change",{...e})}))),i.add(this._mapExtension.groundExtension.layerExtensions.on("change",(e=>{this.emit("change",{...e})}))),v(i)}));_onAfterAddLayerExtensionsHandle=new T((()=>{const e=new WeakMap,t=new Set,i=i=>{const s=e.get(i);s&&(s.remove(),e.delete(i),t.delete(s))},s=e=>{const t=e.item;if(H(t)){const e=t.layerExtensions.flatten((e=>H(e)?e.layerExtensions:[]));for(const t of e)i(t)}i(t)},a=i=>{this.emit("after-add",{...i});const n=i.item;if(H(n)){const o=n.layerExtensions.flatten((e=>H(e)?e.layerExtensions:[]));for(const n of o)if(this.emit("after-add",{...i,item:n}),!e.has(n)&&H(n)){const i=n.layerExtensions.on("after-add",a),o=n.layerExtensions.on("after-remove",s),r=v([i,o]);e.set(n,r),t.add(r)}}};t.add(this._mapExtension.layerExtensions.on("after-add",a)),t.add(this._mapExtension.layerExtensions.on("after-remove",s));const n=this._mapExtension.layerExtensions.flatten((e=>H(e)?e.layerExtensions:[]));for(const i of n)if(H(i)){const n=i.layerExtensions.on("after-add",a),o=i.layerExtensions.on("after-remove",s),r=v([n,o]);e.set(i,r),t.add(r)}return t.add(z(this._mapExtension,"basemapExtension.baseLayerExtensions",["after-add",e=>this.emit("after-add",{...e})])),t.add(z(this._mapExtension,"basemapExtension.referenceLayerExtensions",["after-add",e=>this.emit("after-add",{...e})])),t.add(this._mapExtension.groundExtension.layerExtensions.on("after-add",(e=>{this.emit("after-add",{...e})}))),v(t)}));_onAfterRemoveLayerExtensionsHandle=new T((()=>{const e=new WeakMap,t=new Set,i=i=>{const s=e.get(i);s&&(s.remove(),e.delete(i),t.delete(s))},s=e=>{this.emit("after-remove",{...e});const t=e.item;if(H(t)){const s=t.layerExtensions.flatten((e=>H(e)?e.layerExtensions:[]));for(const t of s)this.emit("after-remove",{...e,item:t}),i(t)}i(t)},a=i=>{const n=i.item;if(H(n)){const i=n.layerExtensions.on("after-add",a),o=n.layerExtensions.on("after-remove",s),r=v([i,o]);e.set(n,r),t.add(r)}};t.add(this._mapExtension.layerExtensions.on("after-remove",s)),t.add(this._mapExtension.layerExtensions.on("after-add",a));const n=this._mapExtension.layerExtensions.flatten((e=>H(e)?e.layerExtensions:[]));for(const i of n)if(H(i)){const n=i.layerExtensions.on("after-add",a),o=i.layerExtensions.on("after-remove",s),r=v([n,o]);e.set(i,r),t.add(r)}return t.add(z(this._mapExtension,"basemapExtension.baseLayerExtensions",["after-remove",e=>this.emit("after-remove",{...e})])),t.add(z(this._mapExtension,"basemapExtension.referenceLayerExtensions",["after-remove",e=>this.emit("after-remove",{...e})])),t.add(this._mapExtension.groundExtension.layerExtensions.on("after-remove",(e=>{this.emit("after-remove",{...e})}))),v(t)}));constructor(e){super(),this._mapExtension=e}on(e,t){const i=[];return"change"===e?i.push(this._onChangeLayerExtensionsHandle.add()):"after-add"===e?i.push(this._onAfterAddLayerExtensionsHandle.add()):"after-remove"===e&&i.push(this._onAfterRemoveLayerExtensionsHandle.add()),i.push(super.on(e,t)),v(i)}findById(e){return C("id",e).isNotMissing(),this.find((t=>t.id===e))}findByLayerId(e){return C("id",e).isNotMissing(),this.find((t=>t._layerId===e))}forLayer(e){return C("layer",e).isNotMissing(),this.findByLayerId(e.id)}_itemIsInitialized(e){return super._itemIsInitialized(e)&&!!e.layer}}function me(e){if(!(null==e||"object"==typeof e&&e?.baseMap))return $(e)}function he(e){return"object"!=typeof e||e&&!e.baseMap}function le(e,t,i){if(e?.type&&e.type!==i)throw new Error(`Invalid portal item type "${e.type}" for property ${t}.`)}async function de(e){await R(e),e.basemap&&(await R(e.basemap),e.basemap.baseLayers.filter((e=>W(e))).map((e=>{const t=e;return t.activeLayer.imageFormat=t.activeLayer.imageFormat??(t.activeLayer.imageFormats?.length>0?t.activeLayer.imageFormats[0]:""),t.activeLayer.styleId=t.activeLayer.styleId??"",t})),e.basemap.id=L(e.basemap)??e.basemap.id)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Layer from "@arcgis/core/layers/Layer";
|
|
2
2
|
import type SceneLayer from "@arcgis/core/layers/SceneLayer";
|
|
3
3
|
import type PortalItem from "@arcgis/core/portal/PortalItem";
|
|
4
|
-
import type
|
|
4
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
5
5
|
import type { FeatureSettings } from "../data/FeatureSettings.js";
|
|
6
6
|
import type { QuerySourceCapabilities } from "../data/QuerySourceCapabilities.js";
|
|
7
7
|
import type { Schema } from "../data/Schema.js";
|
|
@@ -39,7 +39,7 @@ export declare class SceneLayerExtension extends LayerExtension<SceneLayerExtens
|
|
|
39
39
|
get enableClientSideData(): boolean;
|
|
40
40
|
set enableClientSideData(isEnabled: boolean);
|
|
41
41
|
private _enableClientSideData;
|
|
42
|
-
get renderer():
|
|
42
|
+
get renderer(): RendererUnion;
|
|
43
43
|
get hasFeatures(): boolean;
|
|
44
44
|
get canChangeLabels(): boolean;
|
|
45
45
|
get canChangeRenderer(): boolean;
|
|
@@ -3,7 +3,7 @@ import type Layer from "@arcgis/core/layers/Layer";
|
|
|
3
3
|
import type StreamLayer from "@arcgis/core/layers/StreamLayer";
|
|
4
4
|
import type Field from "@arcgis/core/layers/support/Field";
|
|
5
5
|
import type PortalItem from "@arcgis/core/portal/PortalItem";
|
|
6
|
-
import type
|
|
6
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
7
7
|
import type { FeatureSettings } from "../data/FeatureSettings.js";
|
|
8
8
|
import type { QuerySourceCapabilities } from "../data/QuerySourceCapabilities.js";
|
|
9
9
|
import type { Schema } from "../data/Schema.js";
|
|
@@ -27,7 +27,7 @@ export interface StreamLayerExtensionProperties extends LayerExtensionProperties
|
|
|
27
27
|
export declare class StreamLayerExtension extends LayerExtension<StreamLayerExtensionProperties> {
|
|
28
28
|
get layer(): StreamLayer;
|
|
29
29
|
get hasFeatures(): boolean;
|
|
30
|
-
get renderer():
|
|
30
|
+
get renderer(): RendererUnion;
|
|
31
31
|
get canChangeLabels(): boolean;
|
|
32
32
|
get canChangeRenderer(): boolean;
|
|
33
33
|
get canChangeDefinitionExpression(): boolean;
|
|
@@ -2,8 +2,8 @@ import Collection from "@arcgis/core/core/Collection";
|
|
|
2
2
|
import type FeatureTemplate from "@arcgis/core/layers/support/FeatureTemplate.js";
|
|
3
3
|
import type FeatureType from "@arcgis/core/layers/support/FeatureType.js";
|
|
4
4
|
import type Field from "@arcgis/core/layers/support/Field";
|
|
5
|
-
import type SubtypeSublayer from "@arcgis/core/layers/support/SubtypeSublayer";
|
|
6
|
-
import type
|
|
5
|
+
import type SubtypeSublayer from "@arcgis/core/layers/support/SubtypeSublayer.js";
|
|
6
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
7
7
|
import type { Attachment, AttachmentProperties } from "../data/Attachment.js";
|
|
8
8
|
import type { Feature } from "../data/Feature.js";
|
|
9
9
|
import type { FeatureSettings } from "../data/FeatureSettings.js";
|
|
@@ -68,7 +68,7 @@ export interface SubtypeSublayerExtensionCollection<S extends SubtypeSublayerExt
|
|
|
68
68
|
export declare class SubtypeSublayerExtension<TProperties extends SubtypeSublayerExtensionProperties = SubtypeSublayerExtensionProperties> extends SublayerExtension<TProperties> {
|
|
69
69
|
get supportsSublayers(): boolean;
|
|
70
70
|
get layerExtension(): SubtypeGroupLayerExtension;
|
|
71
|
-
get renderer():
|
|
71
|
+
get renderer(): RendererUnion | undefined;
|
|
72
72
|
get hasFeatures(): boolean;
|
|
73
73
|
get sublayer(): SubtypeSublayer;
|
|
74
74
|
get sublayerExtensions(): SubtypeSublayerExtensionCollection<this>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Layer from "@arcgis/core/layers/Layer";
|
|
2
2
|
import type WFSLayer from "@arcgis/core/layers/WFSLayer.js";
|
|
3
3
|
import type PortalItem from "@arcgis/core/portal/PortalItem.js";
|
|
4
|
-
import type
|
|
4
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
5
5
|
import type { Feature } from "../data/Feature.js";
|
|
6
6
|
import type { FeatureSettings } from "../data/FeatureSettings.js";
|
|
7
7
|
import type { FeatureReadOptions } from "../data/FeatureSource.js";
|
|
@@ -29,7 +29,7 @@ export interface WFSLayerExtensionProperties extends LayerExtensionProperties {
|
|
|
29
29
|
* Extends the capabilities of an Esri WFSLayer object.
|
|
30
30
|
*/
|
|
31
31
|
export declare class WFSLayerExtension extends LayerExtension<WFSLayerExtensionProperties> {
|
|
32
|
-
get renderer():
|
|
32
|
+
get renderer(): RendererUnion;
|
|
33
33
|
get hasFeatures(): boolean;
|
|
34
34
|
get layer(): WFSLayer;
|
|
35
35
|
get canChangeLabels(): boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import Collection from "@arcgis/core/core/Collection";
|
|
2
|
+
import type { ResourceHandle } from "@arcgis/core/core/Handles.js";
|
|
2
3
|
import type Extent from "@arcgis/core/geometry/Extent";
|
|
3
4
|
import type Layer from "@arcgis/core/layers/Layer";
|
|
4
5
|
import type PortalItem from "@arcgis/core/portal/PortalItem";
|
|
5
|
-
import type
|
|
6
|
+
import type { RendererUnion } from "@arcgis/core/renderers/types.js";
|
|
6
7
|
import type { Feature } from "../data/Feature.js";
|
|
7
8
|
import type { FeatureSet } from "../data/FeatureSet.js";
|
|
8
9
|
import type { FeatureReadOptions, FeatureWriteOptions } from "../data/FeatureSource.js";
|
|
@@ -142,7 +143,7 @@ export declare abstract class LayerExtension<TProperties extends LayerExtensionP
|
|
|
142
143
|
* The renderer, if any, that the ESRI layer uses to display data on the
|
|
143
144
|
* map.
|
|
144
145
|
*/
|
|
145
|
-
get renderer():
|
|
146
|
+
get renderer(): RendererUnion;
|
|
146
147
|
/**
|
|
147
148
|
* Indicates how to manage the visibility of the children layers or
|
|
148
149
|
* sublayers.
|
|
@@ -218,7 +219,7 @@ export declare abstract class LayerExtension<TProperties extends LayerExtensionP
|
|
|
218
219
|
* A clone of the initial renderer, if any, that the ESRI layer uses to
|
|
219
220
|
* display data on the map.
|
|
220
221
|
*/
|
|
221
|
-
get initialRenderer():
|
|
222
|
+
get initialRenderer(): RendererUnion | undefined;
|
|
222
223
|
/**
|
|
223
224
|
* Indicates the initial layer visibility.
|
|
224
225
|
*/
|
|
@@ -265,8 +266,8 @@ export declare abstract class LayerExtension<TProperties extends LayerExtensionP
|
|
|
265
266
|
* A set of watch handles that get cleaned up when the class instance is
|
|
266
267
|
* destroyed.
|
|
267
268
|
*/
|
|
268
|
-
protected readonly _watchHandles:
|
|
269
|
-
protected readonly _layerWatchHandles:
|
|
269
|
+
protected readonly _watchHandles: ResourceHandle[];
|
|
270
|
+
protected readonly _layerWatchHandles: ResourceHandle[];
|
|
270
271
|
private _mapExtension;
|
|
271
272
|
private _basemapExtension;
|
|
272
273
|
private _groundExtension;
|