vue-google-maps icon indicating copy to clipboard operation
vue-google-maps copied to clipboard

Define anchor to custom marker icon

Open zecka opened this issue 5 years ago • 2 comments

Hello I have following code to display my marker. But by default the anchor of marker is bottom center, any way to set anchor in the center of marker ?

<gmap-marker
    v-if="user.position"
    :position="user.position"
    @click="handleMarkerClick(user.position)"
    :icon="{ url: require('../assets/markers/marker-user.svg') }"
/>

zecka avatar Oct 10 '19 13:10 zecka

Have you tried adding other attributes alongside url?

(you'll have to check the format the google map methods return)

	  size: ..,
	  origin: ..,
	  anchor: ..,
	  scaledSize: ..

wrabit avatar Oct 18 '19 08:10 wrabit

See #143 for a way to do this, which worked for me. @zecka

kps1ny avatar Mar 29 '21 15:03 kps1ny