|
|
|
@ -115,45 +115,55 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
var layer = new AMap.createDefaultLayer({
|
|
|
|
|
zooms:[14,18], //可见级别
|
|
|
|
|
visible:true, //是否可见
|
|
|
|
|
opacity:1, //透明度
|
|
|
|
|
zIndex:10, //叠加层级
|
|
|
|
|
mapStyle: 'amap://styles/d02b66b0a7f190d5a1556a3f59c86518',
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
var layer = new AMap.createDefaultLayer({
|
|
|
|
|
zooms:[14,18], //可见级别
|
|
|
|
|
visible:true, //是否可见
|
|
|
|
|
opacity:1, //透明度
|
|
|
|
|
zIndex:10, //叠加层级
|
|
|
|
|
// skyColor: '#032f58',
|
|
|
|
|
mapStyle: 'amap://styles/d02b66b0a7f190d5a1556a3f59c86518',
|
|
|
|
|
})
|
|
|
|
|
var map = new AMap.Map('container',{
|
|
|
|
|
zoom: 16, //设置地图显示的缩放级别
|
|
|
|
|
zooms: this.zooms,
|
|
|
|
|
center: this.center,//设置地图中心点坐标
|
|
|
|
|
mapStyle: 'amap://styles/d02b66b0a7f190d5a1556a3f59c86518', //设置地图的显示样式
|
|
|
|
|
// skyColor: '#032f58',
|
|
|
|
|
layers: [
|
|
|
|
|
// 高德默认标准图层
|
|
|
|
|
// new AMap.TileLayer.Satellite(),
|
|
|
|
|
layer,
|
|
|
|
|
// 楼块图层
|
|
|
|
|
new AMap.Buildings({
|
|
|
|
|
zooms: [14, 18],
|
|
|
|
|
zIndex: 11,
|
|
|
|
|
wallColor: 'rgba(24,79,129,1)',
|
|
|
|
|
roofColor: 'rgba(24,79,129,1)',
|
|
|
|
|
// heightFactor: 2//2倍于默认高度,3D下有效
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
resizeEnable: true,
|
|
|
|
|
rotateEnable:false,
|
|
|
|
|
pitchEnable:false,
|
|
|
|
|
pitch: 55,
|
|
|
|
|
rotation: 25,
|
|
|
|
|
viewMode: '3D', //设置地图模式
|
|
|
|
|
lang:'zh_cn', //设置地图语言类型
|
|
|
|
|
buildingAnimation:true,
|
|
|
|
|
// expandZoomRange:true,
|
|
|
|
|
});
|
|
|
|
|
this.layers.layer = new AMap.OverlayGroup(); // 点位
|
|
|
|
|
map.add(this.layers.layer);
|
|
|
|
|
// console.log(map.getLayers());
|
|
|
|
|
map.getLayers().forEach((m)=>{
|
|
|
|
|
if(m.CLASS_NAME == 'AMap.SkyLayer') {
|
|
|
|
|
map.remove(m)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.map = map;
|
|
|
|
|
this.init(this.map);
|
|
|
|
|
})
|
|
|
|
|
var map = new AMap.Map('container',{
|
|
|
|
|
zoom: 16, //设置地图显示的缩放级别
|
|
|
|
|
zooms: this.zooms,
|
|
|
|
|
center: this.center,//设置地图中心点坐标
|
|
|
|
|
mapStyle: 'amap://styles/d02b66b0a7f190d5a1556a3f59c86518', //设置地图的显示样式
|
|
|
|
|
layers: [
|
|
|
|
|
// 高德默认标准图层
|
|
|
|
|
// new AMap.TileLayer.Satellite(),
|
|
|
|
|
layer,
|
|
|
|
|
// 楼块图层
|
|
|
|
|
new AMap.Buildings({
|
|
|
|
|
zooms: [14, 18],
|
|
|
|
|
zIndex: 11,
|
|
|
|
|
wallColor: 'rgba(24,79,129,1)',
|
|
|
|
|
roofColor: 'rgba(24,79,129,1)',
|
|
|
|
|
// heightFactor: 2//2倍于默认高度,3D下有效
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
resizeEnable: true,
|
|
|
|
|
rotateEnable:false,
|
|
|
|
|
pitchEnable:false,
|
|
|
|
|
pitch: 55,
|
|
|
|
|
rotation: 25,
|
|
|
|
|
viewMode: '3D', //设置地图模式
|
|
|
|
|
lang:'zh_cn', //设置地图语言类型
|
|
|
|
|
buildingAnimation:true,
|
|
|
|
|
// expandZoomRange:true,
|
|
|
|
|
});
|
|
|
|
|
this.layers.layer = new AMap.OverlayGroup(); // 点位
|
|
|
|
|
map.add(this.layers.layer);
|
|
|
|
|
this.map = map;
|
|
|
|
|
this.init(this.map);
|
|
|
|
|
// let data = await reportList();
|
|
|
|
|
// listJbmap({isStatus:1,pageNum:1,pageSize:50}).then(data=>{
|
|
|
|
|
// let arr = []
|
|
|
|
@ -263,9 +273,6 @@ export default {
|
|
|
|
|
// this.pointList = arr;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
aaaa(){
|
|
|
|
|
console.log(1111111);
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
@ -275,8 +282,9 @@ export default {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: $ScreenHeight;
|
|
|
|
|
#container{
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background-color: rgb(26, 61, 106,0.3);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|