更新记录
1.0.0(2024-08-22)
平台兼容性
App |
快应用 |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
HBuilderX 4.23,Android:支持,iOS:不确定,HarmonyNext:不确定 |
× |
× |
× |
× |
× |
× |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
× |
× |
× |
× |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
× |
× |
× |
× |
× |
× |
× |
× |
× |
x-tencent-u【腾讯地图】
<template>
<view>
<x-tencent-u ref="xTencentU" style="height: 300px;"></x-tencent-u>
<view class="cell">
<button class="cell-btn" @click="setTrafficEnabled">开启路况</button>
<button class="cell-btn" @click="setMapType">切换地图类型</button>
</view>
<view class="cell">
<button class="cell-btn" @click="drawPointMarker">绘制点标记</button>
<button class="cell-btn" @click="drawWireMarker">绘制线</button>
</view>
</view>
</template>
<script setup>
const xTencentU = ref<XTencentUElement | null>(null)
const trafficEnabled = ref(true)
const setMapType = () => {
xTencentU.value?.setMapType("MAP_TYPE_DARK")
}
const setTrafficEnabled = () => {
if(trafficEnabled.value){
xTencentU.value?.setTrafficEnabled(true)
trafficEnabled.value = false
}else{
xTencentU.value?.setTrafficEnabled(false)
trafficEnabled.value = true
}
}
const drawPointMarker = () => {
let latLng = new Map<string,number>()
latLng.set("latitude",40.011313)
latLng.set("longitude",116.391907)
xTencentU.value?.drawPointMarker(latLng)
}
const drawWireMarker = () => {
xTencentU.value?.drawWireMarker([{latitude:40.011313,longitude:116.391907},{latitude:40.011111,longitude:116.391907},{latitude:40.022222,longitude:116.391907}])
}
</script>
X插件系列
x-base-s【基础插件】安卓好用的基础工具
x-sms【短信插件】为X系列插件打造完美轮子
x-tencent-u【腾讯地图】
x-tencent-s【腾讯定位】保活和持久,保姆和小白式的完美解决方案
x-gaode-s【高德定位】保姆和小白式完美解决方案
x-icon-u【图标组件】
x-short-video-u是一个高性能,高度配置的短视频组件
x-im-sdk 为即时通讯量身打造, 适配Android,iOS,Web