I am trying to render KML layers on a google map in GWT. I have set up the geoxml.js file in my host html as :
But I am always getting : javascript exception, the last line above.
-- <script type="text/javascript" src="geoxml3.js"></script>public final native JavaScriptObject createKmlParser(JavaScriptObject mapId) /*-{ var myParser = new $wnd.geoXML3.parser({ map : mapId }); return myParser; }-*/;
public final native void showKml(JavaScriptObject parser, String kml) /*-{ parser.parseKmlString(kml); }-*/;
public final native void hideKml(JavaScriptObject parser) /*-{ parser.hideDocument(); }-*/;
public void setupKmlLayer(final MapWidget mapWidget) { final JavaScriptObject jsoParser = createKmlParser(mapWidget.getJso()); try { showKml(jsoParser, "cta.kml"); } catch (final JavaScriptException jse) { Window.alert("javascript exception"); } }Where should I put this cta.kml so that it gets picked up correctly??
Is there a better way to apply layers using local KML files.
Thanks
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment