Issue
I'm trying to create a MapView with built-in zoom controllers, here's the code:
MapView mMapView;
mMapView=new MapView(this, GMAPS_API_KEY);
mMapView.setBuiltInZoomControls(true);
mMapView.setSatellite(false);
mMapView.getController().setZoom(16);
someView.addView(mMapView);
The map works fine; I've also added a MyLocationOverlay on it and it works fine. However, the zoom controls do NOT show up. The call to setBuiltInZoomControls(true) is completely ignored. No error message is logged.
What may I be missing that is needed to have setBuiltInZoomControls work as expected?
Yes, my activity extends MapActivity.
Solution
Try
mMapView.setClickable(true);
I just ran into this myself and it's how I eventually solved it (though I did it with an XML attribute instead of within the Activity code).
Answered By - MaximumGoat
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.