map.getEarthInstance doesn't return anything, so you can't write

   var ge= map.getEarthInstance(function(earth) {

It's written in such a way that it doesn't care whether the Earth code
has already been fetched. If it hasn't previously been fetched, then
map.getEarthInstance() fetches it. But that means that is has to be
asynchronous. And that means that it can't return the value that it will
obtain when the reply comes back.

You can do this:

map.getEarthInstance(function(ge) {
 var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
 lookAt.setLatitude(39.917);
 lookAt.setLongitude(116.397);
 ge.getView().setAbstractView(lookAt);
});

But you don't seem to be able to do it until after the initial animation
(the one that spins the Earth to where your GMap2() was centred) has
finished.


-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to