Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

局部导入-地图标注失败 #17

Open
Misakaou opened this issue Apr 21, 2022 · 0 comments
Open

局部导入-地图标注失败 #17

Misakaou opened this issue Apr 21, 2022 · 0 comments

Comments

@Misakaou
Copy link

问题描述

在局部导入的情况下,地图标注失败

代码

<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>

问题 Demo 链接

baidumap-localimport-demo.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant