I file this issue on http://code.google.com/p/gwt-google-apis as issue
# 278.
I am new on this subject. I tried to follow your suggestion by doing
the following:
…
private static native JavaScriptObject createLayer(String name) /*-{
return new GLayer(name);
}-*/;
…
…
Overlay wikipediaLayer = new ConcreteOverlay(createLayer
("org.wikipedia.en"));
map.addOverlay(wikipediaLayer);
…
Also, my *.gwt.xml has the following:
…
<script src="http://maps.google.com/maps?
gwt=1&file=api&v=2&key=XXX />
…
Then, I got the the following runtime error:
"com.google.gwt.core.client.JavaScriptException: (TypeError): 'GLayer'
is undefined
number: -2146823279"
Thanks in advance for your help.
On Jun 8, 11:09 am, Eric Ayers <[email protected]> wrote:
> It is not implemented at the moment. Would you mind filing an issue
> on the gwt-google-apis issue tracker?
>
> http://code.google.com/p/gwt-google-apis
>
> --
>
> A workaround is to create the GLayer instance in JSNI and use
> ConcreteOverlay to wrap it.
>
> private static native JavaScriptOjbect createLayer(String name) /*-{
> return new GLayer(name);
>
> }-*/;
>
> Overlay layer = new ConcreteOverlay(createLayer("org.wikipedia.en"));
> map.addOverlay(layer);
>
> Regards,
> -Eric.
>
>
>
> On Mon, Jun 8, 2009 at 1:46 PM, Pion<[email protected]> wrote:
>
> >http://code.google.com/apis/maps/documentation/overlays.html#Layers
> > shows the following sample javascript code;
>
> > function initialize() {
> > if (GBrowserIsCompatible()) {
> > var map = new GMap2(document.getElementById("map_canvas"));
> > map.setCenter(new GLatLng(40.730885,-73.997383), 15);
> > var myLayer = new GLayer("org.wikipedia.en");
> > map.addOverlay(myLayer);
> > }
> > }
>
> > I can not find the equivalent of GLayer() class on gwt-maps-1.0.4/gwt-
> > maps-1.0.4/doc/javadoc/index-all.html.
>
> > Please advise how to convert the above javascript code to the
> > equivalent GWT Java code.
>
> > Thanks in advance for your help.
>
> --
> 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
-~----------~----~----~----~------~----~------~--~---