更新记录

1.0.7(2026-10-21) 下载此版本

解决了一些已知问题。

1.0.6(2026-10-21) 下载此版本

x地图b


平台兼容性

uni-app(4.31)

Vue2 Vue3 Chrome Safari app-vue app-nvue Android iOS 鸿蒙
- √ √ √ √ × √ √ ×
微信小程序 支付宝小程序 抖音小程序 百度小程序 快手小程序 京东小程序 鸿蒙元服务 QQ小程序 飞书小程序 小红书小程序 快应用-华为 快应用-联盟
√ × × × × × × × × × × ×

sa-bmap

地图组件以及chooseLocation、getLocation,传参与uni官方保持一致,多传一个key

import saBmap from '@/uni_modules/sa-bmap/components/sa-bmap/sa-bmap.vue';
<saBmap ref="mapRef" @markertap="handleMarkerTap" :scale="scale" :markers="markers" :longitude="longitude"
    :latitude="latitude" :showLocation="true" mapKey="你的key" class="map">
</saBmap>

import {
    getLocation,
    chooseLocation,
    openLocation
} from "@/uni_modules/sa-bmap"

getLocation({
    key: "你的key",
    type: "gcj02",
    success: (res) => {
        console.log("getLocation:", res)
        // 更新地图中心
        longitude.value = res.longitude
        latitude.value = res.latitude
        // 添加定位图标
        markers.value = [{
            id: 'location-marker',
            longitude: res.longitude,
            latitude: res.latitude,
            width: 40,
            height: 40
        }]
    }
})

chooseLocation({
    key: "你的key",
    complete(e) {
        console.log("chooseLocation:", e)
    }
})
openLocation({
    latitude: 23.121664,
    longitude: 113.758869,
    name: "测试name",
    address: "测试address",
    key: "你的key",
    complete(e) {
        console.log("openLocation:", e)
    }
})

隐私、权限声明

1. 本插件需要申请的系统权限列表:

所需定位权限由宿主应用在 manifest.json 中配置

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

不采集

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

无

许可协议

MIT协议