Open Lumysia opened 2 years ago
在局部导入的情况下,地图标注失败
<template> <baidu-map class="map" ref="map" :apiKey="'z7ngXdkrDCY1oFfaFLxyvL6UtiXu0f88'" :center="point" :enableMapClick="true" :enableWheelZoom="true" :mapType="BMapGLConstant.MapTypeId.BMAP_NORMAL_MAP" > <bm-marker :point="point" :show="isShowMaker"> <bm-marker-icon :size="[23, 25]" :anchor="[10, 15]" :imageOffset="[0, 0]"></bm-marker-icon> </bm-marker> </baidu-map> </template> <script setup> import { BaiduMap, BMapGLConstant } from "baidu-map-vue3"; import { ref } from "vue"; const point = ref({ lng: 116.403963, lat: 39.915119, }); const isShowMaker = ref(true); const isShowLabel = ref(true); </script> <style> .map { width: 100%; height: 500px; } </style>
baidumap-localimport-demo.zip
问题描述
在局部导入的情况下,地图标注失败
代码
问题 Demo 链接
baidumap-localimport-demo.zip