On May 27, 2:37 am, Ben Appleton <[email protected]> wrote:

> I suggest just passing the LatLng coordinates to google.maps.Polyline
> or google.maps.Polygon.  If the performance turns out to be poor, then
> I'd suggest using the Ramer-Douglas-Peucker algorithm to remove
> unnecessary vertices on the server before sending the coordinates to
> the client.
>
> Ben

Unless I'm missing something, the purpose - or one of the purposes -
of encoding at v2 was that you would (in effect) run R-D-P on the
polyline at the various zoom levels, and then pass the polyline and
zoom levels to the API. At that point, the API would render only the
points in the polyline needed at the current zoom level. What you're
suggesting is that the server remove unnecessary vertices and then
send the polyline to the client, but then this would have to be
repeated as the user zoom in and out, generating a lot more network
traffic and server overhead than before. Furthermore, the encoded
points and levels were pretty compact compared to sending JSON arrays
of lat/lng. I'm failing to see how this is better - can you help
explain this to me?

Thanks,
Herb.

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

Reply via email to