vue-google-maps
vue-google-maps copied to clipboard
Define anchor to custom marker icon
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') }"
/>
Have you tried adding other attributes alongside url?
(you'll have to check the format the google map methods return)
size: ..,
origin: ..,
anchor: ..,
scaledSize: ..
See #143 for a way to do this, which worked for me. @zecka