Hi,

I had the same problem and I thank you: this solution worked for me.

But knowing that my KML-file go through Google servers, I wonder if it
should be not better to use json to communicate between the client and
the server.

I am designing an application which each time the user move the view
on the map (zoom or pan the map), the client retrieve information
relating to the new view from the server. The aim is to avoid to have
to load a huge kml-file when the application start.

What do you think? KML or JSON?
Julien



On 22 juin, 20:15, Enea <[email protected]> wrote:
> to try it,
>
> you can open up the 8080 port of your router for you lan ip (as you
> make for xmule and so...)
>
> then you have to know your external public ip
>
> http://www.myip.ma/
>
> then, as the url insert the ip instead of localhost.
>
> "http://xx.xxx.xxx.xx:8080/KMLServlet/kml?
> mode=TrackOverview&kmlMode=kmz"
>
> Regards
>
> On 22 Giu, 15:37, Thalles <[email protected]> wrote:
>
> > 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