Hi Marko, Both Michael and me created this small library a year ago for a project we were working on based on Google Maps. I have to give the credit here to the awesome skills from Michael to make that happen. Since then, we never found the time to make the modifications to make the library easily reusable for other common scenarios.
To Davepar's question, Polygonzo uses canvas and vml to render complex polygons on top of Google Maps. Another more popular library called excanvas can do that too. However, polygonzo uses some tricks to optimize the rendering performance specially on the VML part which is used by IE. Besides the obvious lack of documentation there were other essential improvements in the wish list like decoupling the polygonzo class from the polymap/testmap classes or using GeoJSON as the format for the source data. Maybe we'll find the time and energy to do some of those things someday. In the meantime, as Davepar says, feel free to become a member in the project. Just let me know. Thanks, Ernest On Nov 8, 9:40 am, Davepar <[email protected]> wrote: > 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 isPolygonzodoing? 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=.
