Android Google Maps API V2 Zoom to Current Location

前端 未结 9 1749
时光说笑
时光说笑 2020-11-28 04:37

I\'m trying to mess around with the Maps API V2 to get more familiar with it, and I\'m trying to start the map centered at the user\'s current location. Using the map.

9条回答
  •  时光取名叫无心
    2020-11-28 05:30

    This is working Current Location with zoom for Google Map V2

     double lat= location.getLatitude();
     double lng = location.getLongitude();
     LatLng ll = new LatLng(lat, lng);
     googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(ll, 20));
    

提交回复
热议问题