I assume you are using the "My Location" feature of Maps. Are you also
attempting to use the network location if you don't have GPS? I find it
works quite often. I use the code below in my OnCreate MapActivity and
it doesn't fail very often.
lm = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
if (lm != null)
{
Location loc = lm.getLastKnownLocation("gps");
if (loc == null)
loc = lm.getLastKnownLocation("network");
BUT, to just answer you question, you can use the "onTap" event of your
overlay, determine your Lat/Lons and then use the Geocoder to get your
address information. Really what you are doing is no different than the
hundreds of Overlay examples you will find.
On 28/08/2010 5:32 AM, Dirk Vranckaert wrote:
Hey all,
I've been working on an application lately that is using GMaps to
display a location that is stored in the devices database. However
when no location is available (no GPS signal is available) the user
can go through an edit wizard and at a certain point he can add a
location himself. I already have to code to display the stored
location, but is it possible to write something so the user get's to
see a map and when he clicks/touches on a certain area a map pointer
appears and the location is stored.
Is that possible in any way? Is there any good online documentation
available? I searched through this group and on Google but couldn't
find anything usefull.
Kind regards,
Dirk
--
Sincerely,
Brad Gies
-----------------------------------------------------------------------
Bistro Bot - Bistro Blurb
http://bgies.com
http://bistroblurb.com
http://ihottonight.com
http://forcethetruth.com
-----------------------------------------------------------------------
Everything in moderation, including abstinence
Never doubt that a small group of thoughtful, committed people can
change the world. Indeed. It is the only thing that ever has - Margaret Mead
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en