private MapState currentMapState() {
        if (mapView == null) {
            return null;
        }
        final GeoPointImpl mapCenter = mapView.getMapViewCenter();

        if (mapCenter == null) {
            return null;
        }

        return new MapState(mapCenter.getCoords(), mapView.getMapZoomLevel(), followMyLocationSwitch, mapView.getCircles(), targetGeocode, lastNavTarget, mapOptions.isLiveEnabled, mapOptions.isStoredEnabled);
    }
Get the current map state from the map view if it exists or from the mapStateIntent field otherwise.

@return the current map state as an array of int, or null if no map state is available
main/src/main/java/cgeo/geocaching/maps/CGeoMap.java