Web Developer Work - I
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
621 B

// MapViewManager.ts
import { JimuMapView } from 'jimu-arcgis';
class MapViewManager {
private static instance: MapViewManager;
private mapView: JimuMapView | null = null;
private constructor() { }
static getInstance(): MapViewManager {
if (!MapViewManager.instance) {
MapViewManager.instance = new MapViewManager();
}
return MapViewManager.instance;
}
setMapView(view: JimuMapView) {
this.mapView = view;
}
getMapView(): JimuMapView | null {
return this.mapView;
}
}
export const mapViewManager = MapViewManager.getInstance();