Hiren Patel
Hiren Patel

Reputation: 52800

How can set zoom level in google map v2 for current place(pin) in android?

I set up google map v2 perfectly, But i don't know how to set the zoom level for current place(current pin). If you have any idea than please share with me. Thanks.

Upvotes: 0

Views: 447

Answers (2)

baloo
baloo

Reputation: 217

In my case I am getting the geopoints from an array, you can try something similar or modify the code and then setting the zoom level using mapcontroller

private MapController mapController;
GeoPoint[] mallCoords;

mallCoords = new GeoPoint[24];

mallCoords[0] = new GeoPoint(28701067, 77116834);//this is just an example

mapController.animateTo(mallCoords[0]);
mapController.setZoom(15);

Upvotes: 1

Amalan Dhananjayan
Amalan Dhananjayan

Reputation: 2287

GoogleMap theMap;

//in the below function pass your LatLang and the zoom level 
theMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Your Pin LatLangPoint, 14));

Upvotes: 1

Related Questions