I am using the gwt-earth classes to load a google earth instance /
plugin into a GWT project.  I noticed that the classes have a parseKml
method, but what I really would like is to use the fetchKml method
that is in the earth javascript api.  I have tried creating a
javascript native method to do this.  I do not get any errors, yet the
kml is not being shown and I am not sure if it is even being loaded.
Has anyone out there done this?  Any advice?

This is the method I am using.  It is inside the GoogleEarthWidget
class:

private native void jsFetchKml (String s, GEPlugin plugin) /*-{
        var ge;
        var instance = this;
        function initCB(obj) {
        ge = obj;

        function finished(object) {
        if (!object) {
        // wrap alerts in API callbacks and event handlers
        // in a setTimeout to prevent deadlock in some browsers
        setTimeout(function() {
        alert('Bad or null KML.');
        }, 0);
        plugin.getFeatures().appendChild(object);
        return;
        }

        }

        // fetch the KML
        var url = s;
        google.earth.fetchKml(plugin, url, finished);


    }-*/;

--~--~---------~--~----~------------~-------~--~----~
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