Creating Multiple Polygons on Googlemaps and toggling visibility of each polygon


#1

Hi !

I am a new member of the forum.
I am currently working on an application in which I want to display multiple polygons on googlemaps and want to toggle the visibility of each polygon.

I am able to display the polygons by manually entering the latitude and longitudes but I want to make the code object oriented . Would like to know how the code can be improved.
Link to my code : https://jsfiddle.net/hvwyq7hn/1/

Any help will be highly appreciated.
Thanks in advance.