如何使用vue2-google-maps显示Google Maps

我想在我的应用程序中使用vue2-google-maps,但该地图未显示。我对documentation进行了仔细的操作,但我唯一看到的是空白的白页而不是Google地图。控制台中没有错误。

这是我的代码:

<template>
  <gmap-map :center="{
      lat: 47.2736,lng: 16.0843
    }"></gmap-map>
</template>

<script>
export default {
  data: () => {
    return {}
  }
</script>

如您所见,这是最简单的实现,但是我所看到的只是一张空白的白页。我检查了页面,可以看到vue-map容器和所有元素,但地图未显示在应用程序中。

如何使用vue2-google-maps显示Google Maps

qwedqw 回答:如何使用vue2-google-maps显示Google Maps

好像我只需要添加zoom道具:

<template>
  <gmap-map :center="{
      lat: 47.2736,lng: 16.0843
    }" 
    :zoom="7"></gmap-map>
</template>
本文链接:https://www.f2er.com/3168013.html

大家都在问