Android Google Maps v2 - set zoom level for myLocation

前端 未结 13 1141
孤城傲影
孤城傲影 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:24

    I tried with "mMap.animateCamera( CameraUpdateFactory.zoomTo( 17.0f ) );" but it didn't work for me. So I used this animation for zooming in on start.

    LatLng loc = new LatLng(33.8688, 151.2093);
    mMap.addMarker(new MarkerOptions().position(loc).title("Sydney"));
    mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(loc, 18), 5000, null);
    

提交回复
热议问题