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 API 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 API for JavaScript View
.
It is created by a map widget using a map DataSource
.
Constructors
new 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 | |
number | The maximum layer index in 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
jimuMapTools: JimuMapTool[]
The created map tools (ArcGIS JavaScript API widgets) for this view.
status
status: JimuMapViewStatus
The status of the JimuMapView
instance. JimuMapViewStatus
enumeration members include "LOADING"
, "LOADED"
and "FAILED"
.
view
view: MapView | SceneView
The view
is the ArcGIS API for JavaScript View
, including aMapView
or aSceneView
. In the ArcGIS API 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 |
---|---|---|
| void | Clear the selected features. |
| void | Destroy the |
| void | Draw data on the map, using a dedicated |
| Promise<Graphic[]> | Draw the features in a |
| Return all child JimuLayerViews. | |
| Return all parent JimuLayerViews. | |
| Promise<Graphic[]> | Update the drawn |
| Promise<JimuMapView> | Resolve the JimuMapView when it is loaded. |
destroy
destroy(): void
Destroy the JimuMapView
instance and the ArcGIS API for Javascript View
at the same time.
Returns
void
drawDataOnMap
drawDataOnMap(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
drawDataRecordSet(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
getChildJimuLayerViews(jimuLayerViewId: any): JimuLayerView[]
Return all child JimuLayerViews.
Parameters
Parameter | Type |
---|---|
jimu | any |
Returns
JimuLayerView[]
getParentJimuLayerViews
getParentJimuLayerViews(jimuLayerViewId: string): JimuLayerView[]
Return all parent JimuLayerViews.
Parameters
Parameter | Type |
---|---|
jimu | string |
Returns
JimuLayerView[]
updateDrawnDataRecordSet
updateDrawnDataRecordSet(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
whenJimuMapViewLoaded(): Promise<JimuMapView>
Resolve the JimuMapView when it is loaded.
Returns
Promise<JimuMapView>
dataSourceId: string
The id of the
DataSource
selected to create the map.