[EMAIL PROTECTED] wrote:
> How do I get my GPS coordinates are now coming from?

Start with LocationManager:

http://code.google.com/android/reference/android/location/LocationManager.html

To find a LocationProvider, use one of the getProviders() methods on 
LocationManager. Then, given the name of the provider you want to use, 
call getCurrentLocation() or getLastKnownLocation().

> Map display and there, and I want to show my position.

Maps are handled by MapView and MapActivity:

http://code.google.com/android/reference/com/google/android/maps/MapView.html
http://code.google.com/android/reference/com/google/android/maps/MapActivity.html

MapView has toggleShowMyLocation(), which is supposed to show your 
location on the map. However, for the emulator, you have no control over 
which of the fake location providers is used. The "Mapping with MapView 
and MapActivity" chapter of _The Busy Coder's Guide to Android 
Development_ (http://commonsware.com/Android/) has a section on how to 
implement show-my-location yourself, using layers, so you can control 
which location provider is used for the location.

Another good example for dealing with maps and locations is the 
TrackBuilder utility profiled at:

http://www.anddev.org/trackbuilder_for_mock_location_providers-t384.html

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Warescription: All titles, revisions, & ebook formats, just $35/year

--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to