How to change the position of the Map controller (zoon in/out) in MapView in android other than the default position in the bottom ?
Asked
Active
Viewed 645 times
0
-
I'm going to assume that you're talking about the zoom controls. If that is the case, [check this out](http://stackoverflow.com/questions/263507/placing-zoom-controls-in-a-mapview/325159#325159). I understand that getZoomControls is deprecated, but I don't see any other way of getting the view associated with the zoom controls in the MapView API docs. – red_sky Sep 29 '11 at 20:36
-
I edited my comment with a little bit more information. – red_sky Sep 29 '11 at 20:38
1 Answers
0
zoomView = (LinearLayout) mapView.getZoomControls();
zoomView.setLayoutParams(new ViewGroup.LayoutParams
(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
zoomView.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL);
mapView.addView(zoomView);

Adham
- 63,550
- 98
- 229
- 344