Good day, I couldn't find any useful documentation about the Polygonzo utility so I spent a while disassembling the provided complex example and want to share my knowledge.
I created a simple "Hello World" page which you can find at http://eurobilltracker.com/example/PG/hello_world.html It generates a hundred rectangles and draws them on the map. The code should be mostly self-explanatory. Key concepts: - Source data must be a JSON encoded array. Each element must contain the following items: fillColor, fillOpacity, strokeColor, strokeOpacity, strokeWidth, shapes "shapes" itself is an array of points objects. Each element must be named "points" and contain an array of coordinate pairs. Example: var mytest = { "places": [ {"fillColor":color, "fillOpacity":"0.6", "strokeColor":"#000000", "strokeOpacity":"0", "strokeWidth":"0", "shapes":[{"points":[[y1,x1],[y2,x1],[y2,x2],[y1,x2]]}]} ] } - Feed the "places" array to the Polygonzo constructor. Example: gonzo = new PolyGonzo.GOverlay({ places: mytest.places, events: { } }); map.addOverlay( gonzo ); I discovered it's a bad idea to create a few hundred Polygonzo objects. ;-) Make sure to structure your source data accordingly instead. - Polygonzo doesn't work properly with IE8. You need to add the meta tag to enforce IE7 mode for the time being. <meta http-equiv="X-UA-Compatible" content="IE=7" /> Aside from that Polygonzo works smoothly with the latest browsers (tested FF, Chrome, Opera and IE). A good choice to render hundreds of shapes. Hope this helps someone, Marko -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
