Hi Guys,

I have a problem with the GeoXmlOverlay function from the Google Maps
API. I always get the failure message that the KML file couldn't be
loaded.

It works in general with the Google sample KML file from this address:
http://mapgadgets.googlepages.com/cta.kml. But as soon as I put the
same file on my server, it doesn't work anymore. My own KML or KMZ
files don't work either.

Below is my code. Thanks in advance.
Thalles

CODE:
-------------------------------------------------------------------------------------
        toogleButtonKMLTracks.addClickHandler(new ClickHandler()
                {
                        @Override
                        public void onClick(ClickEvent event)
                        {
                                if(toogleButtonKMLTracks.isDown())
                                {
                                         
GeoXmlOverlay.load("http://localhost:8080/KMLServlet/kml?
mode=TrackOverview&kmlMode=kmz", new GeoXmlLoadCallback()
                                         {
                                                 
//http://mapgadgets.googlepages.com/cta.kml
                                                  @Override
                                                  public void onFailure(String 
url, Throwable e) {
                                                    StringBuffer message = new 
StringBuffer("KML File " +
url
                                                        + " failed to load");
                                                    if (e != null) {
                                                      
message.append(e.toString());
                                                    }
                                                    
Window.alert(message.toString());
                                                  }

                                                  @Override
                                                  public void onSuccess(String 
url, GeoXmlOverlay
overlay)
                                                  {
                                                    geoXml = overlay;
                                                    map.addOverlay(geoXml);
                                                  }
                                                });
                                }
                                else
                                {
                                        if(geoXml != null)
                                        {
                                                map.removeOverlay(geoXml);
                                        }
                                }

                        }

                });

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to