Android MapView - custom Zoom buttons

后端 未结 2 582
时光取名叫无心
时光取名叫无心 2021-01-13 09:57

do you know, if there is a way how to make custom zoom buttons in Android\'s mapView? Or there are only prepreared zoom controls?

Thanks

Hmyzak

2条回答
  •  萌比男神i
    2021-01-13 10:39

    Rather than mapView.getController().setZoom() you should use mapView.getController().zoomIn() and mapView.getController().zoomOut(). It gives you animated zoom like google maps default zooming controls and also you don't need to take care of zoom level by yourself.

    This has been discussed here

提交回复
热议问题