再 VUE页面的 mounted中初始化地图
const url = "https://iserver.supermap.io/iserver/services/map-world/rest/maps/World";
map = new window.SuperMap.Map("map");
//control = new SuperMap.Control.MousePosition(); //该控件显示鼠标移动时,所在点的地理坐标。
//map.addControl(control); //添加控件
// 创建图层对象
layer = new window.SuperMap.Layer.TiledDynamicRESTLayer("World", url, { transparent: true, cacheEnabled: true }, { maxResolution: "auto" });
layer.events.on({ "layerInitialized": this.addLayer });
页面运行报 Error in mounted hook: "TypeError: window.SuperMap.Map is not a constructor"