【类 型】:feat 添加全屏 跟随 控件

【原  因】:
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
tk 2024-07-24 16:42:52 +08:00
parent 747a2cf34e
commit 8cd9c2ba16

View File

@ -154,8 +154,21 @@ export default {
projection: 'globe' projection: 'globe'
}) })
// //
this.map.addControl(new mapboxgl.NavigationControl(), 'top-right') this.map.addControl(new mapboxgl.NavigationControl(), 'top-right')//
this.map.addControl(new mapboxgl.ScaleControl(), 'top-right') // this.map.addControl(new mapboxgl.ScaleControl(), 'top-right')//
this.map.addControl(new mapboxgl.FullscreenControl(), 'top-right')//
// Add geolocate control to the map.
this.map.addControl(
new mapboxgl.GeolocateControl({
positionOptions: {
enableHighAccuracy: true
},
// When active the map will receive updates to the device's location as it changes.
trackUserLocation: true,
// Draw an arrow next to the location dot to indicate which direction the device is heading.
showUserHeading: true
})
)
}, },
/** /**
* @description: 清除地图上的航线 * @description: 清除地图上的航线