import Map from '@arcgis/core/Map' import MapView from '@arcgis/core/views/MapView' import SceneView from '@arcgis/core/views/SceneView' import dojoConfig from '../../config/tsconfig.json' class InitMap{ constructor(options) { this.m_map = options.m_map; this.m_view = options.m_view; this.m_spatialReference = options.m_spatialReference; this.intMap() } intMap(){ this.m_map = new Map({}); this.m_map.ground.navigationConstraint = { type: "none" }; this.m_view = new SceneView({ container:"viewDiv", map:this.m_map, logo:false, viewingMode:"global", scale:dojoConfig["scale"], spatialReference:this.m_spatialReference, qualityProfile:"high", environment: { starsEnabled: false, atmosphereEnabled: true, //大气层 weather: { type: "sunny", cloudCover: 0.7, precipitation: 0.3 }, atmosphere: { quality: "high" }, lighting: { date: new Date().setHours(-3), directShadowsEnabled: true, cameraTrackingEnabled: true } } }); this.m_view.constraints = { collision: { enabled: false } }; this.m_view.ui.empty("top-left"); this.m_view.ui.remove("attribution"); } } export default InitMap