Deep Map SDK Android

Getting started with Update

This tutorial demonstrates how to update a map using the Heidelberg Mobil Map Update Server. Updating your map will not require more than two simple steps:
  1. Check for updates: is a new version of the currently loaded map available on the update server?
  2. Update the map: If a new version is available, download & install it.

Precondition: Please note that in order to update a map, you'll need to have one installed. The "[1] Getting started with Map v2" tutorial gives more information on how to do this. 

1. Check for map updates using the checkForMapUpdate static method of our Deep Map™:

Android

// MapFragment.java
DeepMap.checkForMapUpdate(getContext(), new DeepMap.MapUpdateDelegate() {
    @Override
    public void onResult(boolean isUpdateAvailable, DeepMap deepMap) {
                if (isUpdateAvailable) {
                        Log.d("HDM", "Map Update is available");
                        Log.d("HDM", "New version of map " + deepMap);
                } else {                        
                        Log.d("HDM", "Map Update is not available");
                }
    }
});

2. Update the map:

Java

// MapFragment.java
DeepMap.installMapUpdate(getContext(), new DeepMap.MapInstallDelegate() {
    @Override
    public void onStart(DeepMap map) {
        Log.d("HDM", " started install Map Update");
    }

    @Override
    public void onFinish(DeepMap map) {
        Log.d("HDM", " finished install Map Update");
    }

    @Override
    public void onFailed(String error) {
        Log.d("HDM", " Failed install Map Update. " + error);
    }
});


Done! Your current map has been updated. 


Please note:

 a) Our Deep Map™ will try to check & download map data from http://update.deepmap.de/ based on the currently loaded map package (DeepMap.zip).
 b) The installMapUpdate() method downloads and installs the latest map data even if it has already been installed. To avoid unnecessary traffic, please check for map updates first (using the checkForMapUpdate() method).