修改地图

This commit is contained in:
A1300399510 2023-08-03 19:30:32 +08:00
parent 355ec3c798
commit 4305fb7051

View File

@ -26,10 +26,10 @@ const props = defineProps({
})
let key = ref("MVNBZ-PEFWI-O4OGT-5ADVJ-7QAYJ-NBFY4")
let map
const initMap = () => {
let center = new TMap.LatLng(props.latlng['latitude'], props.latlng['longitude']);
let map = new TMap.Map("container", {
map = new TMap.Map("container", {
zoom: 15,
disableDefaultUI: true, //
zoomControl: false,
@ -60,7 +60,12 @@ loadScript(`https://map.qq.com/api/gljs?v=1.exp&key=${key.value}&callback=initMa
let show = ref(false) //
const showPop = () => show.value = !show.value
const showPop = () => {
show.value = !show.value
// if (!show.value) return
// map.addControl(TMap.constants.DEFAULT_CONTROL_ID.ZOOM);
// map.addControl(TMap.constants.DEFAULT_CONTROL_ID.ROTATION);
}
</script>
@ -84,7 +89,7 @@ const showPop = () => show.value = !show.value
height: calc(100% - 100px);
background: #fff;
border-radius: 20px;
padding: 20px;
padding: 8px;
max-width: 90vw;
// max-height: 85vh;