uni-app 微信小程序地图max-scale动态赋值在vue3中,android微信某机型出现bug,自动缩放到最小且无法放大
uni-app 微信小程序地图max-scale动态赋值在vue3中,android微信某机型出现bug,自动缩放到最小且无法放大
| 开发环境 | 版本号 | 项目创建方式 |
|---|---|---|
| Windows | 17763.1 | CLI |
| 第三方开发者工具 | 3.7.3 | |
| 基础库 | 3.7.3 | |
| CLI | 3.0.0-3070320230222002 |
产品分类:uniapp/小程序/微信
示例代码:
<template>
<div class="container">
<map style="width: 100%; height: 100vh;" :latitude="state.latitude" :longitude="state.longitude"
:markers="state.markers"
:min-scale="3"
:max-scale="ps.maxScale"
:scale="16">
</map>
</div>
</template>
<script setup lang='ts'>
import { reactive, unref, onBeforeMount, onMounted } from 'vue'
const ps = reactive({
maxScale: 20
})
const state = reactive({
id: 0,
title: 'map',
latitude: 29.646893,
longitude: 106.571712,
markers: [{
id: 1,
latitude: 29.646893,
longitude: 106.571712,
iconPath: '/static/gdm-icon/point.png'
}, {
id: 2,
latitude: 29.629583,
longitude: 106.565392,
iconPath: '/static/gdm-icon/point.png'
}],
polyline: {
points: [{
id: 1,
latitude: 29.646893,
longitude: 106.571712,
iconPath: '/static/gdm-icon/point.png'
}, {
id: 2,
latitude: 29.629583,
longitude: 106.565392,
iconPath: '/static/gdm-icon/point.png'
}],
color: '#FE6550',
width: 4,
arrowLine: true
},
polygons: {
points: [
{latitude: 29.636637,longitude: 106.566919},
{latitude: 29.631137,longitude: 106.567435},
{latitude: 29.629553,longitude: 106.574862},
{latitude: 29.63571,longitude: 106.578026}
],
fillColor: '#FFD7AB'
}
})
</script>
<style lang="scss" scoped></style>
`更多关于uni-app 微信小程序地图max-scale动态赋值在vue3中,android微信某机型出现bug,自动缩放到最小且无法放大的实战教程也可以访问 https://www.itying.com/category-93-b0.html
1 回复


