Is there a relatively easy way to make sure a MyLocationOverlay gets
preserved with an orientation shift (or any other relevant
configuration change)?

The quick story is that I'm designing a somewhat simple app that maps
out the user's current location in relation to some non-moving final
destination.  I'm trying to make sure that if/when the user flips open
the phone (on the G1, at least; replace that with whatever would cause
an orientation change on any other device), the map view stays almost
the same as it was before, albeit rotated, with the same
MyLocationOverlay in place.  However, whenever I rebuild the Activity
from scratch, the blue dot has to find a fresh fix before it will
appear again (this makes sense; after all, it IS a new
MyLocationOverlay).  And I don't think I can preserve the old object,
as it takes the MapView as a part of its constructor so it knows where
to draw itself on updates, and destroying the Activity makes a new
MapView.

I already have it re-centering the map and zoom level on
reconstruction by passing such data back through the Bundle in
onSaveInstanceState.  But is there a kinda-sorta easy way to make sure
the overlay stays the way it was without having to get a new fix?
Hopefully without having the activity handle the orientation shift
itself?

Or am I going about this entirely wrong?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to