On Jun 24, 11:55 am, Niko <[email protected]> wrote: > But how did they manage to get the polygon region in gray before the > mouseover, then transparent when the mouse is passing above the region > without previously loading the polygon object?
I didn't study their (big) scripts in detail, but most likely they are doint this: http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/examplePolygons.html Notice the first example, with the Pentagon. They have one big poligon covering the entire map, and they combine it with the polygon for the region where the mouse is, using encoded polygons, so that it becomes transparent where the two polygons overlap. > The problem with tiles is that i need a new tile for each zoom level > isnt it? > Do you know a good way to generate these tiles? I only have a > coordinates list fo each area... Custom tiles require either some tool, or good knowledge of server side programming to write your own tool. I wrote my own script to create them, so I don't know what other toolare available out there. > As you said, javascript is good at number crunching, but even with a > point-in-polygon analysis on mousemove with polygons having a thousand > vertex? Simplify! Use a Douglas-Peucker algorithm to reduce the number of points. At the zoom level where you can see more than one province there's no need for so many points. I wrote a point-in-polygon routine for the state of California, to detect what county the mouse was on, and it worked fine in Javascript, even in Internet Explorer!! ;-) -- Marcelo - http://maps.forum.nu -- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
