Code example for GoogleMap

Methods: animateCamera, getMyLocation

0
        return mMap.getMyLocation();
    } 
 
    @Override 
    public void onMyLocationClickIgnored(AddressView sender) {
        LatLng latLng = Utils.locationToLatLng(mMap.getMyLocation());
        CameraUpdate update = CameraUpdateFactory.newLatLng(latLng);
        mMap.animateCamera(update);
    } 
 
    @Override 
    public void onMyLocationChange(Location newLocation) {
        mAddressView.setLocation(newLocation, false);
    } 
 
    @Override 
    public void setAddressView(AddressView addressView) {
        // We don't need to do anything here because we already have the fragment 
        // Ideally we would do something like "isPaused = addressFragment != null" 
        // and then don't call addressFragment.setLocation() when paused, but that's 
        // not really necessary because the fragment is clever enough to ignore