Android Google Maps v2 - set zoom level for myLocation

前端 未结 13 1161
孤城傲影
孤城傲影 2020-12-05 01:39

Is it possible to change the zoom level for myLocation with the new Google Maps API v2?

If you set GoogleMap.setEnableMyLocation(true);, you get a butto

13条回答
  •  北荒
    北荒 (楼主)
    2020-12-05 02:08

    You can also use:

    mMap.animateCamera( CameraUpdateFactory.zoomTo( 17.0f ) );    
    

    To just change the zoom value to any desired value between minimum value=2.0 and maximum value=21.0.

    The API warns that not all locations have tiles at values at or near maximum zoom.

    See this for more information about zoom methods available in the CameraUpdateFactory.

提交回复
热议问题