Reputation: 43
I want to search for center the location in my Android application,
I am using Android Google Maps v2.
I know that I can get the lat and long for screen top, left after using Projection.fromScreenLocation
, but how can I determine the center location?
Upvotes: 4
Views: 5250
Reputation: 766
Mr.Lee, Korean.
First, you will have to read this Android official guide
Second, please get the sample code refered to that document above from Here in the Android Guide
Third, You can find what you want to know in the sample code as follows;
private void setUpMap() {
mMap.setMyLocationEnabled(true); // if "false", MyLocation Button disappears.
}
Finally, please read this good tutorial and you will get a good help.
For more information about Google Maps API ve, please contact me who live in Seoul.
Upvotes: -2
Reputation: 7322
try to use googleMap.getCameraPosition().target
for more info see http://developer.android.com/reference/com/google/android/gms/maps/model/CameraPosition.html#target
Upvotes: 9