This is my first time working with the Google Maps API. I have a styled map with multiple polygons that each need their own infobox. The infoboxes need to be styled. My problem is that I can’t get the infoboxes to work at all. I’ve been looking for a solution for days now, I’ve even tried this http://google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.1.9/examples/infobox-basic.html I must obviously be doing something wrong.
Here’s my code: http://pastebin.com/M23PPXpn
I noticed that attaching an Infobox to a polygon results in this error in infobox.js
It could be because a polygon represents an area, while a marker represents a point. I suggest creating a single invisible marker somewhere inside your polygons to anchor each infobox.
With this idea, I added a infobox to the Australia polygon. The click listener is still created for the polygon, but it opens the infobox tied to the invisible marker.