1. Check out our companion app, Forums for Android! Download from Google Play

elusive map zoom controls

Discussion in 'Application Development' started by drake, Dec 11, 2009.

  1. drake

    drake Member
    Thread Starter
    15

    Dec 7, 2009
    10
    0
    15
    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....
     

    Advertisement

  2. JoshKraker

    JoshKraker Member
    15

    Dec 3, 2009
    21
    0
    15
    Software Engineer, AmTrust Financial Services Inc.
    Bath, OH, USA
    mMyMapView.setBuiltInZoomControls(true); is what you need codeside, but check you xml for the following properties as well

    android:enabled="true"
    android:clickable="true"
     
  3. drake

    drake Member
    Thread Starter
    15

    Dec 7, 2009
    10
    0
    15
    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?
     

Share This Page

Loading...