0

I am integrating google maps functionality using vue2-google-maps. I am able to show default marker in my application but when I tried it for custom market it shows nothing on the map.

Following is my code.

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

Can anyone solve my problem why I am not able to see custom marker on map?

iPhone
  • 4,092
  • 3
  • 34
  • 58

1 Answers1

1

Try change :icon="{url:'../assets/markerIcon.png'}" to :icon="{url:require('../assets/markerIcon.png')}

Babaikawow
  • 69
  • 6