Hi all,
i've a big Speed Problem with redrawing / setFillStyles on
GPolygons.fromEncoded.
I'am adding GPolygons via addOverlay(polygon) to the Google Map.
The Polygons were created by using GPolygon.fromEncoded(); to speed up
polygon/polyline creation by creating them on the server.
I registered a mouseover event listener on the polygon(s), to change
the color if you enter the polygon with the mousepointer.
....
GEvent.addListener(polygon, "mouseover", function(){
this.setFillStyle({color:'#FF0000']);
});
...
On the mouseout event i set the fillstyle to the origin style. So if
the mousepointer enter the polygon, it will change his color.
Changing the color works, but is very slow for big polygons.
The polyline contains about 1500 points. They are encoded by the
server.
Calling setFillstyle on this polygon, lets the polygon disappear and
than it is shown with the new fill color. But from disappearing until
redraw there is a lag from about 1 second. - which is very very much.
If you move the mouse from one polygon to another than both will
disappear than one will appear with its origin fillcolor (mouseout)
and than the other polygon appears with his new hover Color
(onmouseover). This looks very very bad.
This was very very quick without any recognizable lag when you use
GPolygon without fromEncoded. But than the Polygon needs to load very
long on first time. Because the data to send for a Polygon with 1500
Points is about 10 times bigger if it is not encoded. And on the
client side you have to create GPoints for all the 1500 Points to
create the GPolyline. This needs long time.
I hope someone can help me to solve this problem. I already searched
for a solution for a few days, but did not find anything.
Thank you very much
Alex (cp9)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---