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.
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.
> 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.
> 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.
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 <dualrud...@gmail.com> 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 <marko.schi...@googlemail.com> 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.
> > 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.
> > Aside from thatPolygonzoworks smoothly with the latest browsers
> > (tested FF, Chrome, Opera and IE). A good choice to render hundreds of
> > shapes.