The v2 encoding scheme did 2 things: 1 - Compress the coordinates to reduce bandwidth 2 - Optionally, include precomputed levels of detail, which the JS would use to render quickly.
Regarding 1: there are open-source libraries to encode and decode polylines to reduce bandwidth which you can use. Regarding 2: V3 computes these levels in JS, so you do not need to compute them in your server. Perhaps I confused the issue to mention running RDP in your server. I mentioned this only as a first pass culling, to throw out vertices that users will never notice at any zoom level. This effectively removes duplicate and redundant vertices to reduce bandwidth. Don't try it unless you find it necessary. On 28 May 2010 07:47, "SpoilsportMotors" <[email protected]> wrote: On May 27, 2:37 am, Ben Appleton <[email protected]> wrote: > I suggest just passing the LatLng c... 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 AP... -- 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.
