Changing google-maps polygon color/fill on click

Kaspar Vesth is almost there. Yes, you have to call setOptions. But keep in mind that you don’t have to pass in all the options every time, it’s enough to pass in only the ones you want to change. E.g.:

myPolygon.setOptions({strokeWeight: 2.0, fillColor: 'green'});
// polygon is clicked
myPolygon.setOptions({strokeWeight: 6.0});

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)