vue+esriLoader只加载出来一半图层,如何解决?
具体代码如下:
view: any;
options = {
// 可以使用自定义资源加载
url: 'http://localhost/arcgis_js_api/library/3.11/3.11/init.js'
}
mapServiceUrl = "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer";
mounted() {
loadModules([
'esri/map',
'esri/layers/ArcGISTiledMapServiceLayer',
"dojo/domReady!"
], this.options)
.then(([
Map, Tiled,
Point, Graphic,
Color,
]) => {
this.view = new Map(this.$el, {
center: [160, 40],
zoom: 4,
logo: false,
slider: false,
});
// 中国蓝色底图服务
const serviceLayer = new Tiled(this.mapServiceUrl);
this.view.addLayer(serviceLayer);
}).catch((e)=> {
console.log(e);
});
}
view: any;
options = {
// 可以使用自定义资源加载
url: 'http://localhost/arcgis_js_api/library/3.11/3.11/init.js'
}
mapServiceUrl = "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer";
mounted() {
loadModules([
'esri/map',
'esri/layers/ArcGISTiledMapServiceLayer',
"dojo/domReady!"
], this.options)
.then(([
Map, Tiled,
Point, Graphic,
Color,
]) => {
this.view = new Map(this.$el, {
center: [160, 40],
zoom: 4,
logo: false,
slider: false,
});
// 中国蓝色底图服务
const serviceLayer = new Tiled(this.mapServiceUrl);
this.view.addLayer(serviceLayer);
}).catch((e)=> {
console.log(e);
});
}
1 个回复
atlas1563
赞同来自:
要回复问题请先登录或注册