How to load KML files with the GWT Google Maps API?

286 views
Skip to first unread message

Eric

unread,
Feb 6, 2008, 11:08:46 PM2/6/08
to Google Web Toolkit
Hey Everyone,

I'm new to GWT and the GWT Google Maps API. I hope this is the correct
group to post this question in, if not please forgive me.

How do you use the GWT Google Maps API to load a KML file into a GMap2
object as an overlay? With the Javascript API you can load the KML
files into GGeoXML objects and then add them to the map. Is there a
similar way to do this with the GWT API? Any help is appreciated.
Thanks!

--Eric

Sumit Chandel

unread,
Feb 8, 2008, 2:25:45 PM2/8/08
to Google-We...@googlegroups.com
Hi Eric,

Have you taken a look at the KmlOverlayDemo in the HelloMaps sample in the Google API Libraries for GWT project? I'm not sure if GWT Google Maps API supports KML overlay, but the GALGWT libraries should have what you're looking for. You can check out the project details and download the latest distribution at the link below:

Google API Libraries for GWT:
http://code.google.com/p/gwt-google-apis/

Latest GALGWT milestone:
http://gwt-google-apis.googlecode.com/files/gwt-google-apis-r41.zip

If you're already knee deep in GWT Google Maps API and it would be too much of a hassle to switch to GALGWT, you could always interact with the JS API directly using the JavaScript Native Interface (JSNI). Using JSNI allows you to write native JavaScript methods that can directly access other JS objects and perform lower level operations, although the latter situation is uncommon. You can read up more details on using JSNI at the link below:

http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.JavaScriptNativeInterface.html

Hope that helps,
-Sumit Chandel

Matt

unread,
Mar 13, 2008, 6:22:05 PM3/13/08
to Google Web Toolkit
Seems like everything works in HelloMaps except the KMLOverlayDemo.
At least that is what I am encountering using Netbeans 6 and Firefox
on Mac. It also looks like there have been some updates in the source
code to the KMLOverlayDemo.java file.

Is there a later .zip for the gwt apis with the map fixes?

Thanks, matt

On Feb 8, 12:25 pm, "Sumit Chandel" <sumitchan...@google.com> wrote:
> Hi Eric,
>
> Have you taken a look at the KmlOverlayDemo in the HelloMaps sample in the
> Google API Libraries for GWT project? I'm not sure if GWT Google Maps API
> supports KML overlay, but the GALGWT libraries should have what you're
> looking for. You can check out the project details and download the latest
> distribution at the link below:
>
> Google API Libraries for GWT:http://code.google.com/p/gwt-google-apis/
>
> Latest GALGWT milestone:http://gwt-google-apis.googlecode.com/files/gwt-google-apis-r41.zip
>
> If you're already knee deep in GWT Google Maps API and it would be too much
> of a hassle to switch to GALGWT, you could always interact with the JS API
> directly using the JavaScript Native Interface (JSNI). Using JSNI allows you
> to write native JavaScript methods that can directly access other JS objects
> and perform lower level operations, although the latter situation is
> uncommon. You can read up more details on using JSNI at the link below:
>
> http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.De...
>
> Hope that helps,
> -Sumit Chandel
>

ericz...@gmail.com

unread,
Apr 5, 2008, 11:32:42 AM4/5/08
to Google Web Toolkit
Hi Matt,

We are getting ready for a milestone release of the gwt-google-apis
code. I'm running the HelloMaps demo now and it is working for me.
That demo does make a connection out to a google server, so if you are
behind a firewall, it won't work.

-Eric.

If you are grabbing the project from Subversion, I did make a change
on March 7 to correct issue 57 -

On Mar 13, 6:22 pm, Matt <matthew.l...@gmail.com> wrote:
> Seems like everything works in HelloMaps except the KMLOverlayDemo.
> At least that is what I am encountering using Netbeans 6 and Firefox
> on Mac. It also looks like there have been some updates in the source
> code to the KMLOverlayDemo.java file.
>
> Is there a later .zip for the gwt apis with the map fixes?
>
> Thanks, matt
>
> On Feb 8, 12:25 pm, "Sumit Chandel" <sumitchan...@google.com> wrote:
>
> > Hi Eric,
>
> > Have you taken a look at the KmlOverlayDemo in the HelloMaps sample in the
> > Google API Libraries for GWT project? I'm not sure if GWT Google Maps API
> > supports KML overlay, but theGALGWTlibraries should have what you're
> > looking for. You can check out the project details and download the latest
> > distribution at the link below:
>
> > Google API Libraries for GWT:http://code.google.com/p/gwt-google-apis/
>
> > LatestGALGWTmilestone:http://gwt-google-apis.googlecode.com/files/gwt-google-apis-r41.zip
>
> > If you're already knee deep in GWT Google Maps API and it would be too much
> > of a hassle to switch toGALGWT, you could always interact with the JS API
Reply all
Reply to author
Forward
0 new messages