Code example for GoogleMap

Methods: animateCamera, getUiSettings, moveCamera

0
 
    protected void updateMarker(LatLng point, boolean center) {
        if (map != null) {
            if (updatableMarker == null) {
                CameraUpdate p = CameraUpdateFactory.newLatLng(point);
                map.moveCamera(p);
 
                updatableMarker = createUpdatableMarker(point);
 
            } else { 
                updatableMarker.update(point);
            } 
            if (center) {
                CameraUpdate c = CameraUpdateFactory.newLatLng(point);
                map.moveCamera(c);
            } 
            CameraUpdate zoom = CameraUpdateFactory.zoomTo(15);
            map.animateCamera(zoom);
            map.getUiSettings().setZoomControlsEnabled(false);
        } 
 
    } 
 
    /* Override this to set a custom marker */