JimuMapView
Class
JimuMapView
is the view
for developers to develop the map-related functions.
For example, developers can use the view
property of the JimuMapView
instance to get the original
ArcGIS Maps SDK for JavaScript View
,
then use the original view
to develop the map-related functions. At the same time, JimuMapView
also provides
properties such as isActive
and status
to indicate the current status in the map widget.
JimuMapView
is a wrapper class for the ArcGIS Maps SDK for JavaScript View
.
It is created by a map widget using a map DataSource
.
Constructors
constructor
Class Constructornew JimuMapView(options: JimuMapViewConstructorOptions): JimuMapView
Parameters
Parameter | Type |
---|---|
options | JimuMapViewConstructorOptions |
Returns
JimuMapView
Properties
Property | Type | Notes |
---|---|---|
string | The id of the | |
string | The id of the | |
boolean | The | |
{ [jimuLayerViewId: string]: JimuLayerView } | The union for all | |
The created map tools (ArcGIS JavaScript API widgets) for this view. | ||
string | The id of the widget creating the | |
The status of the | ||
MapView | SceneView | The |
isActive
isActive: boolean
The isActive
property indicates whether the map in the map widget is accessible.
For example, for a single-source map, there is a single JimuMapView
instance, therefore, the isActive
is always true.
With a multi-source map, there are two JimuMapView
instances. In the multi-source map, the property isActive
is true for the top JimuMapView
instance,
and false for the one beneath. Upon clicking the switch map tool, the isActive
properties will switch.
jimuLayerViews
jimuLayerViews: { [jimuLayerViewId: string]: JimuLayerView }
The union for all JimuLayerView
instances and the layer view object wrapper.
Type declaration
- [jimuLayerViewId: string]: JimuLayerView
jimuMapTools
Class PropertyjimuMapTools: JimuMapTool[]
The created map tools (ArcGIS JavaScript API widgets) for this view.
status
Class Propertystatus: JimuMapViewStatus
The status of the JimuMapView
instance. JimuMapViewStatus
enumeration members include "LOADING"
, "LOADED"
and "FAILED"
.
view
Class Propertyview: MapView | SceneView
The view
is the ArcGIS Maps SDK for JavaScript View
, including aMapView
or aSceneView
. In the ArcGIS Maps SDK for JavaScript,
the MapView
and SceneView
are part of the __esri
namespace types. Thus, their types are __esri.MapView
and __esri.SceneView
.
Methods
Method | Returns | Notes |
---|---|---|
addOrRemoveDataOnMap(newAddToMapDatas) | void | add layers according to the corresponding types of data source |
void | Clear the selected features. | |
destroy() | void | Destroy the |
drawDataOnMap(newShowOnMapDatas) | void | Draw data on the map, using a dedicated |
drawDataRecordSet(dataSet, targetLayerId, title?, symbolOption?) | Promise<Graphic[]> | Draw the features in a |
getChildJimuLayerViews(jimuLayerViewId) | Return all child JimuLayerViews. | |
getParentJimuLayerViews(jimuLayerViewId) | Return all parent JimuLayerViews. | |
updateDrawnDataRecordSet(dataSet, targetLayerId, title?, symbolOption?) | Promise<Graphic[]> | Update the drawn |
Promise<JimuMapView> | Resolve the JimuMapView when it is loaded. |
addOrRemoveDataOnMap
Class MethodaddOrRemoveDataOnMap(newAddToMapDatas: AddToMapDatas): void
add layers according to the corresponding types of data source
Parameters
Parameter | Type |
---|---|
new | AddToMapDatas |
Returns
void
clearSelectedFeatures
Class MethodclearSelectedFeatures(): void
Clear the selected features.
Returns
void
destroy
Class Methoddestroy(): void
Destroy the JimuMapView
instance and the ArcGIS Maps SDK for JavaScript View
at the same time.
Returns
void
drawDataOnMap
Class MethoddrawDataOnMap(newShowOnMapDatas: ShowOnMapDatas): void
Draw data on the map, using a dedicated GraphicsLayer
for every data entry. This will clear the layers drawn previously.
Parameters
Parameter | Type |
---|---|
new | ShowOnMapDatas |
Returns
void
drawDataRecordSet
Class MethoddrawDataRecordSet(dataSet: DataRecordSet, targetLayerId: string, title?: string, symbolOption?: SymbolOption): Promise<Graphic[]>
Draw the features in a GraphicsLayer
.
Parameters
Parameter | Type |
---|---|
data | DataRecordSet |
target | string |
title | string |
symbol | SymbolOption |
Returns
Promise<Graphic[]>
getChildJimuLayerViews
Class MethodgetChildJimuLayerViews(jimuLayerViewId: any): JimuLayerView[]
Return all child JimuLayerViews.
Parameters
Parameter | Type |
---|---|
jimu | any |
Returns
JimuLayerView[]
getParentJimuLayerViews
Class MethodgetParentJimuLayerViews(jimuLayerViewId: string): JimuLayerView[]
Return all parent JimuLayerViews.
Parameters
Parameter | Type |
---|---|
jimu | string |
Returns
JimuLayerView[]
updateDrawnDataRecordSet
Class MethodupdateDrawnDataRecordSet(dataSet: DataRecordSet, targetLayerId: string, title?: string, symbolOption?: SymbolOption): Promise<Graphic[]>
Update the drawn GraphicsLayer
.
Parameters
Parameter | Type |
---|---|
data | DataRecordSet |
target | string |
title | string |
symbol | SymbolOption |
Returns
Promise<Graphic[]>
whenJimuMapViewLoaded
Class MethodwhenJimuMapViewLoaded(): Promise<JimuMapView>
Resolve the JimuMapView when it is loaded.
Returns
Promise<JimuMapView>
dataSourceId: string
The id of the
DataSource
selected to create the map.