• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps elusive map zoom controls

drake

Newbie
I don't think this has been asked on this forum yet, but if it has, I apologize, but has anyone else had trouble with bringing up the zoom controls?

I have tried the walkthrough for them on the mapview tutorial on Android.com and things like

mMyMapView.setBuiltInZoomControls(true);
mMapView.getZoomControls().setEnabled(true);

(yes, i know getZoomControls() is depreciated)

I know through a little if statement that the controls are not visible.

does anyone have any ideas? i mean, i see in the depreciation message in eclipse that in a map view they should be visible by default, but they're clearly not. this isn't a huge deal, but its aggravating that something that should just work isn't....
 
mMyMapView.setBuiltInZoomControls(true); is what you need codeside, but check you xml for the following properties as well

android:enabled="true"
android:clickable="true"
 
i have both of those lines in my layout xml file. even using the Maps demo code i do not get the zoom controls.

any idea why the sample code would not do this?
 
Back
Top Bottom