yugalatea / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

GLayer() equivalent on GWT Google Maps 1.0 Library #278

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release: GWT Google Maps 1.0 Library 

Detailed description:
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. 

Workaround if you have one:
Eric suggested the following but I have not tried it yet
-- 

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. 

Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/ 

Links to the relevant GWT Developer Forum posts:

Group: Google Web Toolkit
Subject: GLayer() equivalent on GWT Google Maps 1.0 Library 
Link:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/809c78e8f
a6c1a88/1e6e3d15fb616446#1e6e3d15fb616446

Original issue reported on code.google.com by onlee2...@gmail.com on 8 Jun 2009 at 7:12

GoogleCodeExporter commented 9 years ago

Original comment by zundel@google.com on 7 May 2010 at 3:51

GoogleCodeExporter commented 9 years ago
This patch implements GLayer support and adds a demo to the "Maps Overlay" 
section of HelloMaps sample.

Review up at http://gwt-code-reviews.appspot.com/1371809

If you want to patch this in to your app, you can probably get by with just 
adding the Layer.java file to your project.

Original comment by zundel@google.com on 5 Mar 2011 at 5:24

Attachments:

GoogleCodeExporter commented 9 years ago
Committed as r1875

Original comment by zundel@google.com on 7 Mar 2011 at 8:24

GoogleCodeExporter commented 9 years ago

Original comment by zundel@google.com on 28 Oct 2011 at 3:43