Map link:
http://www.mappingsupport.com/p/gmap4.php?q=mymap,109834417853835431586.00047bf3d013cf15e19f5&ll=47.349233,-121.081009&z=14

The above map uses GGeoXml to read a small KML file that contains a
network link pointing to a Google MyMap file.  The data from the MyMap
file is displayed on the map.

Two days ago this map worked fine.  Yesterday it did not work.  Today
it does work.  The map code and data file have not changed during this
period.

I traced yesterday’s problem to code that listens (line 475) for the
event “load”.  My understanding is that this event is fired when the
KML file has finished loading and is available for processing.  When
this “load” event fires, then the code uses gotoDefaultViewport to set
the ‘real’ map center and zoom.  (A temporary center was previously
set at 0,0.)  Yesterday the code execution was getting to the
gotoDefaultViewport statement, however the map center and zoom were
never actually getting set.  I inserted hasLoaded() into my test code
and it returned ‘true’.

I am aware that this page:
http://code.google.com/apis/kml/documentation/mapsSupport.html
cautions GGeoXml users against listening for “addoverlay” events.
For that reason, my code listens for a “load” event instead of an
“addoverlay” event.

The KML file in question has three markers and one polyline with ~150
points.

Questions:

1.  Is listening for the “load” event the correct way to detect when a
KML file that is accessed via GGeoXml is available for processing by
gotoDefaultViewport?

2.  Is listening for “load” subject to the same problems described
above for the “addoverlay” event?  If so, what is the recommended
technique for detecting when a KML file that is accessed via GGeoXml
is available for processing by gotoDefaultViewport?

3.  If I am already using the recommended technique for detecting when
a KML file is available for processing, can anyone shed light on why
this technique did not work yesterday?

Dear Google - Where you fiddling with something recently that would
explain this off-again on-again behavior of my code (which has not
changed)?  If so, then please feel welcome to include the above map
link in your test suite.  The Gmap4 app and related data file will be
around for a good long time.

Thanks.

--

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