xkjyeah / vue-google-maps

Google maps component for vue with 2-way data binding
https://xkjyeah.github.io/vue-google-maps/
1.88k stars 474 forks source link

How can I update markers on hover? #791

Open lafllamme opened 1 year ago

lafllamme commented 1 year ago

I got this initial styles:

clusterStyles: [
                    {
                        textColor: '#000',
                        url: getBase64Icon('house'),
                        anchorText: [ 0, 0],
                        anchorIcon: [ 0, 0 ],
                        origin: [ 0, 0 ],
                        backgroundPosition: '-16.5 -16.5',

                    }
                ],

I apply them like this, whereas my 'url' is a base64 string of an icon

<gmap-cluster
                            :zoomOnClick="true"

                            :minimumClusterSize="2"
                            :gridSize="25"
                            :enableRetinaIcons="true"
                            :styles="clusterStyles"

                        >

How could I update the styles for the hovered Cluster? So I can add a @mouseover or something on the cluster component. I can't find anything regarding redrawing / repainting cluster in the documentation.

lafllamme commented 1 year ago

I tried to use an event handler from with a @mouseover(event) to get the current cluster hovered -

that's what I receive: 2023-01-30 um 10 26 29

I can't find any way to identify the hovered cluster or to distinguish between all, since there is no unique identifier or so.