I have a map view that zooms and places markers. I to get the users location on start up. How would I go about doing this? Thanks in advance.
Asked
Active
Viewed 380 times
2 Answers
0
By on startup - I assume its application start up. Just register a LocationListener before you have your map view displayed. The callback to the LocationListener should give you the current co-ordinates. You can now use these co-ordinates to place markers.

advantej
- 20,155
- 4
- 34
- 39
-1
GeoPoint geoPoint = new GeoPoint((int) (your_location_variable.getLatitude() * 1E6),(int) (your_location_variable.getLongitude() * 1E6));
mapController.animateTo(geoPoint);

Siddiqui
- 7,662
- 17
- 81
- 129