On Jul 16, 2:37 am, William <[email protected]> wrote: > On Jul 16, 3:31 am, Michael <[email protected]> wrote: > > > I've run into this problem as well. I connected 25 points and two > > points did not get lines. Any news on a solution? > > what were the coordinates of points you were using? > > to better illustrate the problem I've taken the original example and > added tile coordinates, so you can see where the polylines are being > clipped on tile boundaries. The V3 polys are tesselated into tiles, I > think for performance reasons, and also for browsers where CANVAS must > be used. So I've put another overlay of the complete polyline as a > single element in red, so it's clear where the line should be: > > http://www.william-map.com/20100716/1/map.htm > > ...
I suspect it is caused by "off-tile" verticies too distant from the visible tile. It happens at deep zoom levels where the pixel distance between verticies is large. To maintain continuity of the poly, every tile must have every vertex represented in its path. Fortunately, many "off-tile" vertices can be relocated. If both neighbors of an "off-tile" vertex are also "off- tile", the vertex can be moved to one of eight tiles adjacent to the visible tile. Consecutive vertices moved to the same tile can be summarized & reduced. The only "off-tile" vertices which cannot be relocated are the ones with one or both of its neighbors "on-tile". If the "off-tile" vertex is too distant from its "on-tile" neighbor, it causes strange behavior which is different in CANVAS & SVG. To avoid the issue, the transitional "off-tile" vertex must be moved to an equivalent "off- tile" location in one of eight tiles adjacent to the visible tile. It must be on the interpolation line connecting the "off-tile" vertex to its "on-tile" vertex neighbor. If both neighbors are "on-tile", it may not be feasible to move the "off-tile" vertex to a single equivalent vertex on both interpolation lines. The single "off-tile" vertex must be split into two "off-tile" vertices, one on each of the corresponding interpolation lines. It is a bit ugly but the use of tiles really helps dragging / panning / zooming performance. -- 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.
