I want to show a location on a map based on latitude and longitude coordinates. When I press a button I want to send the coordinates to Google Maps (or other app) and pinpoint that location. Any ideas of how I can achieve that?
Asked
Active
Viewed 1.6k times
1
-
What do you mean by finding location? You want to animate to a certain location? – Carnal Oct 18 '12 at 12:09
-
search in google maps for "32.297581,-64.775734" – PKeidel Oct 18 '12 at 12:10
-
want to know the location name or showing marker on that location?? – Lokesh Oct 18 '12 at 12:10
-
This is a good start: http://stackoverflow.com/a/8428414/469983 – Adinia Oct 18 '12 at 12:26
3 Answers
2
Here is the nice example:
http://mobiforge.com/developing/story/using-google-maps-android
http://saigeethamn.blogspot.in/2009/10/google-maps-on-android-android.html
Hope this will helps you..

Lokesh
- 5,180
- 4
- 27
- 42
1
If you want to animate to a specific point on a google map you need to define a MapView. Then create a MapController and animate to a specific GeoPoint:
MapController mapController = mapView.getController();
double lat = latitude * 1e6;
double lon = longitude * 1e6;
GeoPoint startpoint = new GeoPoint((int) lat, (int) lon);
mapController.animateTo(startpoint);
Try this tutorial :MapView Tutorial

fabzy
- 353
- 3
- 10
1
I've found a simple solution. I start the google maps app via an intent
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?q=" + serviceActivity.Latitude.toString() + "," + serviceActivity.Longitude.toString()));
startActivity(intent);

Roman Marius
- 456
- 3
- 9
- 21