Hey Guys,

thanks for your help!

Does that mean, when I upload my KML file to a real server it will
work?

Bye Thalles

On 22 Jun., 01:21, Eric Ayers <[email protected]> wrote:
> Hello Thales,
>
> Unfortunately, the problem is in your localhost URLs.  Because these
> classes require Google's servers to do their job, the GeoXmlOverlay
> classes require that the resources you are loading be visible from the
> internet.
>
> -Eric.
>
>
>
> On Fri, Jun 19, 2009 at 12:01 PM, Thalles<[email protected]> wrote:
>
> > 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);
> >                                        }
> >                                }
>
> >                        }
>
> >                });
>
> --
> Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/
--~--~---------~--~----~------------~-------~--~----~
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