Zn2O / gwt-google-apis

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

Add the Google Earth map type #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:
r290

Detailed description:

from jdc:

so i've been playing with the Google Earth Plugin since it was
released, and i was pleased to learn that including it in a Google
Maps application is a very simple process.  "okay", i thought, "but
what about GWT?"  gwt-maps-0.0.29 was great for getting my application
up and running with Google Maps, but does it expose the GEPlugin?
sadly, no, it does not.   but it was a simple enough process to check
out gwt-google-apis and add in the EarthMapType, recompile, and voila!
i've got Earth in my GWT map app!

sadly, once i go to Earth mode, my GroundOverlays do not appear.  i'm
debugging that issue now.

if you (like me) just can't wait for the next gwt-maps release in
order to start integrating GE into your GWT app, try these mods:

in com.google.gwt.maps.client.impl.MapTypeImpl, add:

 @Global("$wnd.G_SATELLITE_3D_MAP")
 JavaScriptObject getEarthMapType();

in com.google.gwt.maps.client.MapType

-add the following static field
 private static MapType earthMap;

-add the following static method
   /**
    * Returns a map type that shows Google Earth using the browser
plugin.
    *
    * @return a map type that shows Google Earth.
    */
   public static MapType getEarthMap() {
     initMapTypes();
     return earthMap;
   }

-add the following line to the static initMapTypes method (add it
before the mapTypesInitialized = true; line)
 earthMap = createPeer(MapTypeImpl.impl.getEarthMapType());

hope that gives some others some good ideas.
many thanks to the army of flying monkeys at google for making my job
oh-so-much easier.

links:

http://www.flickr.com/photos/bedtime/2556505087/sizes/o/

http://www.flickr.com/photos/bedtime/2556505333/sizes/o/

Workaround if you have one:
none.

Links to the relevant GWT Developer Forum posts:

Original issue reported on code.google.com by galgwt.reviews@gmail.com on 8 Jun 2008 at 12:34

GoogleCodeExporter commented 9 years ago
Requested CLA from jdc.

Original comment by galgwt.reviews@gmail.com on 8 Jun 2008 at 12:39

GoogleCodeExporter commented 9 years ago
submitted CLA via email, attached it here, too.
next is to submit svn diffs?
i've continued working on exposing GE...i may need to back out some of my 
changes in
order to submit this simpler code change (please advise).

Original comment by jesse.cr...@gmail.com on 11 Jun 2008 at 10:08

Attachments:

GoogleCodeExporter commented 9 years ago
An svn diff would be great.

Original comment by ericzun...@gmail.com on 11 Jun 2008 at 11:09

GoogleCodeExporter commented 9 years ago
here's the svn diff (finally!)

Original comment by jesse.cr...@gmail.com on 12 Jun 2008 at 3:57

Attachments:

GoogleCodeExporter commented 9 years ago
dagnabit, i had the wrong files in the inital patch.
sorry about that.
be sure to use this -corrected.patch instead

Original comment by jesse.cr...@gmail.com on 12 Jun 2008 at 4:02

Attachments:

GoogleCodeExporter commented 9 years ago
I've got your patch - next time make your patch relative to the root of the 
project
(in the subversion 'trunk' directory).   I took a look and added it to the 
demo. 
Further follow ups will go to google-web-toolkit-contributors to review the 
patch.

Original comment by galgwt.reviews@gmail.com on 12 Jun 2008 at 5:17

GoogleCodeExporter commented 9 years ago
-path-corrected.patch

Original comment by jesse.cr...@gmail.com on 12 Jun 2008 at 5:24

Attachments:

GoogleCodeExporter commented 9 years ago
I'm not sure if this is the proper place to ask question, if not please point 
me to
the right place. Anyways, I'm using  r029 now and would be interested in 
checking out
this  new change. I can access and download the code but when I did 
jar cf gwt-maps.jar maps (name src of directory) and substitute this new jar 
for the
old one I get errors.

Original comment by mquan...@gmail.com on 14 Jun 2008 at 7:58

GoogleCodeExporter commented 9 years ago
This patch is not yet committed. I will update the issue when it passes review 
with
the SVN revision number that contains the update.  In the meantime, discussion 
of
this patch should be directed to the google-web-toolkit-contributors google 
group.

Original comment by ericzun...@gmail.com on 15 Jun 2008 at 9:10

GoogleCodeExporter commented 9 years ago
The MapType for GoogleEarth is in (will be released in Maps 1.0RC1) and a method
to retrieve the Google Earth plugin object was committed as r803.

Original comment by galgwt.reviews@gmail.com on 18 Sep 2008 at 8:25

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 13 Oct 2008 at 8:54

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 11 Dec 2008 at 3:08

GoogleCodeExporter commented 9 years ago

Original comment by zundel@google.com on 21 Dec 2009 at 1:57