Closed GoogleCodeExporter closed 9 years ago
this should be marked as an Enhancement.
Original comment by jesse.cr...@gmail.com
on 12 Jun 2008 at 5:56
Original comment by galgwt.reviews@gmail.com
on 12 Jun 2008 at 7:54
w/r/t the use of a timer to detect when the load is complete: See the
Directions
class for how we've handled similar situations in the past.
What we've done is to use a static method to initiate the load, and when the
load
completes, pass back the instance in the callback. I am willing to bet there
is a
"load" event that fires when the Earth instance is ready (the Maps team isn't
really
great about documenting all these niceties).
Original comment by galgwt.reviews@gmail.com
on 14 Jun 2008 at 10:57
Since the Earth instance intializing works, the getEarthInstanceCallback has
yet to
benefit from other Callback patterns in gwt-maps and I've pushed forward to
other
problems.
The current sticky wicket is what to do with the ge constants
(ALTITUDE_ABSOLUTE,
ALTITUDE_CLAMP_TO_GROUND, etc.) and how to properly expose them. It would
appear
that the constants are part of the ge object itself (see
http://code.google.com/apis/earth/documentation/advanced.html#ground_overlay,
specifically this line:
var center = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
I don't see a clear pattern to follow anywhere else in the gwt-maps code base.
Most
constants and enums are static classes (MapPaneType is an actual enum, but it
uses
static JavaScript constants from the $wnd object) but I'm not sure how to handle
constants that are fields of an instance (not static).
The quick-and-dirty workaround i'm going to try is creating public final ints or
strings on the Earth java object using the values panned out of the JavaScript
ge
object. I'll try changing method signatures that use the *Enum objects listed
in the
Earth API Reference to use plain ints and Strings.
Original comment by jesse.cr...@gmail.com
on 16 Jun 2008 at 9:27
Peeking under the skirts and using the constants directly should be a last
resort.
Take a look at MapType.java. You could use that pattern, and just change the
getters from static to class members. Or, we could create static members, but
lazy
init them after the getEarthInstanceCallback() is invoked. My preference is
for
getters().
Original comment by ericzun...@gmail.com
on 16 Jun 2008 at 11:07
The attached patch updates the MapWidget to return a JavaScriptObject. There is
no
wrapping attempted for the GEPlugin object. Any work you do with maps must be
done in JavaScript in a JSNI method (or write your own bindings)
The patch adds a demo of using the plugin that sets a marker using JSNI.
Original comment by galgwt.reviews@gmail.com
on 18 Sep 2008 at 6:43
Attachments:
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
Original comment by galgwt.reviews@gmail.com
on 13 Oct 2008 at 8:54
Original comment by galgwt.reviews@gmail.com
on 11 Dec 2008 at 3:08
Original comment by zundel@google.com
on 21 Dec 2009 at 1:57
Original issue reported on code.google.com by
jesse.cr...@gmail.com
on 12 Jun 2008 at 5:51