uniapp微信小程序 map地图markers图标不显示,markers图标真机调试不显示 举例: 预期效果如下,蓝色为用户位置,红色为店铺位置均为自定义图标 实际发布后手机上的效果 (此处忽略位置
<template> <map style="width: 100%; height: 240px;" :latitude="params.lat" :longitude="params.lon" :markers="covers" /></template><script lang="ts" setup>//地图标记点配置const covers = Reactive([ { id: 1, iconPath: '../../static/image/map-store-red.svg', latitude: 0, longitude: 0, width: 24, height: 32 }, { id: 2, iconPath: '../../static/image/map-owner-blue.svg', latitude: 0, longitude: 0, width: 24, height: 32, },])</script>
/static/xxx
开始引入,不要使用 …/…/ (目前不清楚为啥知道的补充告知)//地图标记点配置const covers = reactive([ { id: 1, iconPath: '/static/image/map-store-red.png', latitude: 0, longitude: 0, width: 24, height: 32 }, { id: 2, iconPath: '/static/image/map-owner-blue.png', latitude: 0, longitude: 0, width: 24, height: 32, },])
--结束END--
本文标题: uniapp微信小程序 map地图markers图标不显示,markers图标真机调试不显示
本文链接: https://www.lsjlt.com/news/394071.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0