9aa4e12e by 杨威

gis前端工具条等功能实现

1 parent 1f374220
......@@ -37,8 +37,9 @@
MapView,
esriMap
]) => {
//
var map = new esriMap();
var map = new esriMap({
basemap:"osm"
});
//108.95 34.27
var view = new MapView({
container: self.viewId,
......
......@@ -98,11 +98,9 @@ export default {
var view = maps[this.viewId];
view.ui.remove('zoom');
loadModules([
"esri/layers/MapImageLayer",
"esri/geometry/Extent"
"esri/layers/MapImageLayer"
]).then(([
MapImageLayer,
Extent
MapImageLayer
])=>{
var mapImageLayer = new MapImageLayer({
url:self.layerUrl,
......@@ -122,13 +120,6 @@ export default {
}]
});
view.map.add(mapImageLayer,1);
mapImageLayer.when(function () {
var extent = new Extent(JSON.parse(JSON.stringify(mapImageLayer.fullExtent)))
extent.spatialReference = view.spatialReference;
view.center = extent.center;
view.zoom = 15;
// view.extent = mapImageLayer.fullExtent;
});
var query = self.$route.query;
if(query && JSON.stringify(query) != "{}"){
self.addGeoByBsm(query.bsm,query.type,self.viewId);
......