There's been a fair amount of discussion in the Google Maps API
discussion group concerning the possiblity of a bug that
causes encoded polylines to disappear inexplicably. See:
http://groups.google.com/group/Google-Maps-API/search?group=Google-Maps-API&q=disappearing+encoded+polyline for example. It turns out, that Google's own encoders will generate polylines which disappear - at least when using Firefox 1.5 on Mac OS 10.4. The problem does not seem to affect Safari but, then, I can barely tolerate Google Maps in Safari!
We can get Google to generate an encoded polyline for us
in two ways - via a directions search in the main Google
Maps web page and via an API call to GGeoXml. Generating
a disappearing encoded polyline via a directions search is
fairly simple; many short polylines will sporadically
disappear when the zoom is too far out - even as a result of
zooming in. Here's a concrete example:
This should generate a short path just to the NorthWest of Asheville NC. The zoom level is set fairly far out at zoom level 6. The path appears as just a blue dot at this level, but it is plainly visible. Zoom in once and it disappears. Zoom in again and it reappears. As I understand the encoded polyline documentation, zooming in should only result in more points being plotted. The line should not disppear when we zoom in.
We can create a similar behavior within the API using
GGeoXml. The map below shows the exact same path generated
by the above direction search. I used the
option in the query string to generate the KML file and then
placed that in the map using GGeoXml. I removed the markers
from the KML file so we could see the path better. The
behavior is identical.