|
@@ -228,13 +228,9 @@ export default {
|
|
|
})
|
|
|
// 后续牧场栏舍图
|
|
|
var backgroundImageUrl = this.vLoUrl; // 示例图片链接
|
|
|
- // var backgroundImageUrl = '../../../assets/images/guiji.jpg'; // 示例图片链接
|
|
|
- // var backgroundImageUrl = 'https://amappc.cn-hangzhou.oss-pub.aliyun-inc.com/lbs/static/img/dongwuyuan.jpg'; // 示例图片链接
|
|
|
var imageLayer = new AMap.ImageLayer({
|
|
|
url: backgroundImageUrl,
|
|
|
bounds: new AMap.Bounds(
|
|
|
- // [116.327911, 39.939229],
|
|
|
- // [116.342659, 39.946275]
|
|
|
[113.2268105910612,40.88140752472374],
|
|
|
[113.210637000,40.8765545]
|
|
|
),//图片范围大小的经纬度,传入西南和东北的经纬度坐标
|
|
@@ -259,23 +255,7 @@ export default {
|
|
|
map: this.map,
|
|
|
icon: 'https://webapi.amap.com/theme/v1.3/markers/n/end.png', // 终点图标
|
|
|
});
|
|
|
- // 图片显示在地图底部
|
|
|
-
|
|
|
- // var that = this
|
|
|
- // that.map.on('complete', function() {
|
|
|
- // var container = that.map.getContainer();
|
|
|
- // container.style.backgroundImage = 'url(' + backgroundImageUrl + ')';
|
|
|
- // container.style.backgroundSize = 'cover'; // 使背景图片充满容器
|
|
|
- // container.style.backgroundPosition = 'center'; // 将背景图片居中
|
|
|
- // container.style.zIndex = 80;
|
|
|
- // });
|
|
|
- // 切片显示
|
|
|
- // const tileLayer = new AMap.TileLayer({
|
|
|
- // zIndex: 10,
|
|
|
- // tileUrl: backgroundImageUrl, // 图片URL
|
|
|
- // });
|
|
|
-
|
|
|
- // this.map.add(tileLayer)
|
|
|
+
|
|
|
this.drawPath();
|
|
|
},
|
|
|
drawPath() {
|