网站表格布局,网站概要设计模板,网站域名解析ip地址,阿里云怎么创建网站首先在百度地图开发者平台注册微信小程序开发密钥下载百度地图SDK-bmap-wx.min.js,下载地址在项目入口index.html页面进行引入页面中进行调用#xff0c;代码示例如下map idmap longitude108.95 latitude34.34 scale3 :m…首先在百度地图开发者平台注册微信小程序开发密钥下载百度地图SDK-bmap-wx.min.js,下载地址在项目入口index.html页面进行引入页面中进行调用代码示例如下map idmap longitude108.95 latitude34.34 scale3 :markersmarkers markertaponMarkerTap styleheight: 98vh;width: 100%; /map
import {ledgerList,
} from /api/postList.jsonLoad() {this.getledgerList()},methods: {getledgerList(){ledgerList().then(res {if (res.code 200) {const deviceLocation res.datathis.markers deviceLocation.map(item ({id: item.id,latitude: item.positionLat,longitude: item.positionLng,title: item.deviceNo,label: {content: item.deviceNo, // 替换为实际设备号color: #FF2400,fontSize: 16,borderWidth: 1,borderColor: #FFFFFF,anchorX: -70,anchorY: 0},width: 30,height: 30,iconPath: /static/images/map.png // 设备图标路径}));// console.log(this.markers,this.markers)utils.showToast(请求成功)} else {utils.showToast(res.message)}})}}展示效果如下