Change polygon fillColor with javascript (google maps) -


i'm trying change google maps polygon fillcolor on click. here code => https://jsfiddle.net/nw6j52f6/

Аnd here problem part of code. function should change design of polygons:

function polyopt(i) { setoptions({     strokecolor: '#ff0000', strokeopacity: 0.8,     strokeweight: 3, fillcolor: '#ff0000', fillopacity: 0.35 }); } 

but console return error:

map-array.html:56 uncaught referenceerror: setoptions not defined @ polyopt (map-array.html:56) @ htmlinputelement.onclick (map-array.html:69) 

i'm using google maps api https://developers.google.com/maps/documentation/javascript/reference#polygonoptions

but don't understand why console show error.

if polygon i must use i.setoptions

function polyopt(i) {    i.setoptions({     strokecolor: '#ff0000', strokeopacity: 0.8,     strokeweight: 3, fillcolor: '#ff0000', fillopacity: 0.35 }); 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -