Open Ghostff opened 4 years ago
Am trying to change the the stroke color of a polygon on mouseover. The issue is, I don't know/cant find an appropriated documentation on how to access the setOptions method from events.
mouseover
setOptions
Initially created: https://stackoverflow.com/questions/63785165/change-polygon-option-on-event-vue-google-map
<GmapMap ref="google_map" :center="{ lat: 0, lng: -0 }"> <gmap-polygon v-for="(polygon, i) in polygons" ref="google_map_polygon" :key="`polygon-${i}`" :paths="polygon.vertices" :options="polygonOptions" @mouseover="polygonHover" /> </GmapMap>
Js
export default { data: () => ({ polygons: [], polygonOptions: { strokeColor: 'transparent', } }), ... methods: { polygonHover (event) { // Change strokeColor here. } } }
@Ghostff sir, can you give me sample action in method plygonHover for change color or strokeweight? cz iam try but still not working :(
Am trying to change the the stroke color of a polygon on
mouseover
. The issue is, I don't know/cant find an appropriated documentation on how to access thesetOptions
method from events.Initially created: https://stackoverflow.com/questions/63785165/change-polygon-option-on-event-vue-google-map
Js