Thanks for the answer bratliff, Sounds really interesting. How the click/rollover support is possible technically? I thought that you can only do that by manually going through all the points with a sophisticated algorithm on click/ mouseover/out which is very slow.
On Jan 6, 4:00 pm, bratliff <[email protected]> wrote: > On Jan 6, 1:12 pm, Vladimir Agafonkin <[email protected]> wrote: > > > bratliff, awesome work! > > > Canvas is great for really big polylines and polygons with lots of > > points, but mapping libraries usually use SVG because you can add > > listeners on mouse events (click, mouseover/out/move) for the > > elements, and in Canvas you can't do that so you can only use it for > > visual purposes, without interaction. But it's true that SVG is > > considerably slower, taking into account that the lib needs to perform > > clip rect for polylines and polygons manually (with a separate > > algorithm for each) on every drag/zoom. > > Thanks Vladimir, > > I am planning to add "click" / "rollover" support without requiring > individual event listeners for every poly. It will facilitate hits on > multiple polys (state / county / township / city / zip code). It will > also allow clicking on a naked map to load the corresponding poly. > > I guess the choice of SVG or CANVAS ought to be optional. In a prior > version, it was. I will add it. > > An unobfuscated copy of the source code lives at: > > http://www.polyarc.us/cluster.js > > You can change the rendering engine priority in lines 21-42. I did > not use "else ifs" because it is executed just once. > > If you can provide any insight on why it it is failing in Internet > Explorer at line 397 in the API, it will be greatly appreciated. I > suspect it is a naming conflict. > > Thanks again, > > Berry
-- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
