Nice work Marko. Maybe you could write to one of the project owners and ask for permission to update the project wiki and add your example?
What exactly is Polygonzo doing? It looks like it is creating an image on the client from the JS data and then overlaying the image on Google Maps? Dave On Nov 8, 5:31 am, Marko <[email protected]> wrote: > Good day, > > I couldn't find any useful documentation about thePolygonzoutility > 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 > athttp://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 thePolygonzoconstructor. > > Example: > > gonzo = newPolyGonzo.GOverlay({ > places: mytest.places, > events: { }}); > > map.addOverlay( gonzo ); > > I discovered it's a bad idea to create a few hundredPolygonzo > objects. ;-) Make sure to structure your source data accordingly > instead. > > -Polygonzodoesn'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 thatPolygonzoworks 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.
