Reputation: 14370
I have a map, in that map i have placed a zoomcontrol like this
View zoomView = mapView.getZoomControls();
zoomLayout.addView(zoomView, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
mapView.displayZoomControls(true);
In xml it is used like this
<LinearLayout
android:id="@+id/layout_zoom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
Now i need to rotate this zoom in vertical format... how to do it?
Upvotes: 0
Views: 1376
Reputation: 1760
With the new API you can zoom controlling the camera:
googleMap.animateCamera(
CameraUpdateFactory.newLatLngZoom(
cluster.getPosition(),
(float) Math.floor(googleMap.getCameraPosition().zoom + 1)),
300,
null);
Upvotes: 0
Reputation: 2946
Best thing to do is create a vertical linear layout with 2 image button elements(one for zoom in and one for zoom out), you will have to create your own images if you want them to look like the android ones, then just call mapView.getController().zoomIn() or zoomOut().
Upvotes: 1