Migration Guide - Android SDK 2.3.x to 3.0.0¶
The DeepMap SDK for Android v3.0.0 is a major version upgrade. It features: * Improved main programming model * Improved handling of map state, resulting in less time to initially load maps * A robust mechanism for updating and storing map data
Migration Guide from 2.3.x to 3.0.0¶
The DeepMap SDK v3.0.0 now uses the ‘androidx’ library, instead of the support library.
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
api 'com.google.code.gson:gson:2.8.6'
implementation 'com.squareup.okhttp:okhttp:2.7.5'
To initialize the DeepMap SDK, call MapSDK.init from onCreate in our Application class.
Class Names Updates¶
This SDK version features a new, comprehensive organization of model classes. For this reason, ensure you rename and re-import the following classes:
Table
old v2.3.7 |
new v3.0.0 |
---|---|
com.hdm_i.dm.android.utils.DeepMap |
com.hdm_i.dm.android.deepmap.DeepMap |
com.hdm_i.dm.android.mapsdk.HDMVec3 |
com.hdm_i.dm.android.mapsdk.types.MapCoordinate |
com.hdm_i.dm.android.mapsdk.HDMFeature |
com.hdm_i.dm.android.mapsdk.types.Feature |
com.hdm_i.dm.android.routing.Router.Point |
com.hdm_i.dm.android.routing.datatypes.Point |
com.hdm_i.dm.android.mapsdk.MapView.HDMUserTrackingMode |
com.hdm_i.dm.android.mapsdk.HDMUserTrackingMode |
Life Cycle of Map Updates¶
The DeepMap SDK now uses Application.ActivityLifecycleCallbacks. This streamlines state handling and the life cycle of map updates. Delete MapView.setUseMultiInstance(true); * You can delete any direct calls with mapview.onResume/onPause/lowMemory/onCreate etc. This is no longer necessary, as the SDK performs this operation automatically. * You can load new map data into the engine by calling MapSDK.loadDeepMap(context).
Introduction of a New Mechanism for Updating/Installing Map Data¶
Table
old v2.3.7 |
new v3.0.0 |
---|---|
DeepMap.checkForMapUpdate |
MapSDKUtil.checkForMapUpdate |
DeepMap.MapUpdateDelegate |
MapSDK.MapUpdateDelegate |
DeepMap.getLatestDeepMap |
MapSDKUtil.getLatestDeepMap |
DeepMap.setLatestDeepMap |
MapSDKUtil.setLatestDeepMap |
DeepMap.getInstalledMaps |
MapSDKUtil.getInstalledMaps |
DeepMap.getMapsRootFolder(getContext()) |
new MapSDKPaths(getContext()).getMapsRootFolder() |
DeepMap.MapInstallDelegate |
MapSDK.MapInstallDelegate |
DeepMap.MapUpdateDelegate |
MapSDK.MapUpdateDelegate |
DeepMap.installMapUpdate |
MapSDKUtil.installMapUpdate |
DeepMap.checkForMapUpdate |
MapSDKUtil.checkForMapUpdate |