JimuMapViewComponent
constant
VariableJimuMapViewComponent: ConnectedComponent<typeof_JimuMapViewComponent, JimuMapViewComponentProps> = ...A React component that makes it easy to use the JimuMapView instance from the map widget.
In most cases, you can pass in useMapWidgetId , and use onViewsCreate , onActiveViewChange to get callback from the JimuMapViewComponent .
import { JimuMapViewComponent } from 'jimu-arcgis'
const onActiveViewChange = (activeView: JimuMapView) => {
// current active JimuMapView is changed
if (activeView) {
activeView.whenJimuMapViewLoaded().then(() => {
// do something with activeView
})
}
}
<JimuMapViewComponent useMapWidgetId={mapWidgetId} onActiveViewChange={onActiveViewChange} />