On 9 juin, 03:13, William <[email protected]> wrote:
> The original boundary has a point about every 100 metres, and it's
> around 1000km in length, so approximately 10000 points in the
> polygon.  10000 is too many points if you want the map to load
> quickly, especially if the boundary is being drawn twice (20000 points
> for the browser to draw).
>
> 100 metres is approximately 0.001 degrees, so by reducing the points
> using the douglas algorithm with 0.001 degrees as the tolerance
> produces a polygon with around 1500 points.
>
> Using the Encoding form 
> onhttp://facstaff.unca.edu/mcmcclur/googlemaps/encodepolyline/
> produces an encoded polygon of approximately 10KB in size.
>
> Encoded polygons will be quicker to load than KML.  You could load
> them using an ajax query for JSON data.
>
> Including the outer boundary, the total size of the following map is
> around 12KB and loads quickly:
>
> http://www.william-map.com/20100609/2/map.htm
>
> ...

Thanks.
I didn't know that possibility of using encoded polygons but it looks
very interesting, and it is in fact much quicker that kml and more
flexible too.

II have to say I find your invert function in 
http://www.william-map.com/20100607/1/states.htm
is quite nice, more precisely when you zoom out but I don't really
understand your code and more specifically what makes possible to fill
any place except the area determined by the polygon (the encoded one
in my case). Could you give me hand to realize that ?

Thanks a lot William.

-- 
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.

Reply via email to