Code example for LatLng

0
    private CameraUpdate getCameraUpdateFromLocation(Location location) {
        return CameraUpdateFactory.newLatLngZoom(locationToLatLng(location), ZOOM_LEVEL);
    } 
 
    private LatLng locationToLatLng(Location location) {
        return location == null ? new LatLng(LONDON_LAT, LONDON_LONG) : new LatLng(location.getLatitude(), location.getLongitude());
    } 
 
    @Override 
    public void onInfoWindowClick(Marker marker) {
        new AlertDialog.Builder(getActivity()).setTitle(marker.getTitle()).setMessage(marker.getSnippet()).show();
    } 
 
}