Vuejs2 vue2谷歌地图在vue.js中添加cusome标记

Vuejs2 vue2谷歌地图在vue.js中添加cusome标记,vuejs2,vue2-google-maps,Vuejs2,Vue2 Google Maps,我正在使用vue2谷歌地图集成谷歌地图功能。我可以在我的应用程序中显示默认标记,但当我为自定义市场尝试它时,它在地图上什么也没有显示 下面是我的代码 <gmap-map :center="center" :zoom="17" style="width:100%; height: 350px;" > <gmap-marker :key="index" v-for=

我正在使用vue2谷歌地图集成谷歌地图功能。我可以在我的应用程序中显示默认标记,但当我为自定义市场尝试它时,它在地图上什么也没有显示

下面是我的代码

<gmap-map
        :center="center"
        :zoom="17"
        style="width:100%;  height: 350px;"
      >
        <gmap-marker
          :key="index"
          v-for="(m, index) in markers"
          :position="m.position"
          :icon="{url:'../assets/markerIcon.png'}"
          @click="center=m.position"></gmap-marker>
      </gmap-map>

有人能解决我为什么不能在地图上看到自定义标记的问题吗?

尝试将
:icon=“{url:'../assets/markerIcon.png'}”更改为
:icon=“{url:require('../assets/markerIcon.png')}