HERE Navigate SDK Loads an Older Online Map Version Instead of the Latest Available Map Content

HERE Navigate SDK Loads an Older Online Map Version Instead of the Latest Available Map Content

Symptoms / Triggers
=======================

You may encounter one or more of the following situations:

The application displays older map content than expected.
Recent map updates are not visible in the app.
Different HERE SDK versions appear to use different Online Content Map (OCM) versions.
The online map version loaded by the SDK matches the version listed in the SDK release notes rather than the latest available map version.

For example, HERE SDK 4.22.0 is associated with OCM version 164 (and version 84 for Japan), while HERE SDK 4.21.0 is associated with OCM version 150. By default, the SDK uses the online map version corresponding to the SDK release

Quick Answer
================

To load the most recent streaming map content, configure the SDK to use CatalogVersionHint.latest(true) before initializing SDKNativeEngine. This instructs the SDK to retrieve the latest available catalog version instead of the version associated with the SDK release.

Step-by-Step Details
========================

### 1. Create a Catalog Configuration for the Latest Map Version

Create a helper method that configures both the default OCM catalog and the Japan OCM catalog to use the latest available version.

private List getDefaultCatalogConfiguration() {<br /><br />List catalogConfigurations = new ArrayList<>();<br /><br />// We want to start with the latest catalog version.<br /><br />boolean ignoreCachedData = true;<br /><br />CatalogVersionHint versionHint = CatalogVersionHint.latest(ignoreCachedData);<br /><br />// An OCM catalog is required.<br /><br />String defaultOCMHRN = "hrn:here:data::olp-here:ocm";<br /><br />DesiredCatalog defaultOCMCatalog =<br /><br />new DesiredCatalog(defaultOCMHRN, versionHint);<br /><br />catalogConfigurations.add(<br /><br />new CatalogConfiguration(defaultOCMCatalog));<br /><br />// Japan catalog.<br /><br />String japanOCMHRN = "hrn:here:data::olp-here:ocm-japan";<br /><br />DesiredCatalog japanOCMCatalog =<br /><br />new DesiredCatalog(japanOCMHRN, versionHint);<br /><br />catalogConfigurations.add(<br /><br />new CatalogConfiguration(japanOCMCatalog));<br /><br />return catalogConfigurations;<br /><br />}

### 2. Apply the Catalog Configuration During SDK Initialization

Configure the SDK options before creating the SDKNativeEngine.

private void initializeHERESDK() {<br /><br />String accessKeyID = "HERE_ACCESS_KEY_ID";<br /><br />String accessKeySecret = "HERE_ACCESS_KEY_SECRET";<br /><br />AuthenticationMode authenticationMode =<br /><br />AuthenticationMode.withKeySecret(<br /><br />accessKeyID,<br /><br />accessKeySecret);<br /><br />SDKOptions options = new SDKOptions(authenticationMode);<br /><br />// Load the latest available map version.<br /><br />options.catalogConfigurations =<br /><br />getDefaultCatalogConfiguration();<br /><br />try {<br /><br />Context context = this;<br /><br />SDKNativeEngine.makeSharedInstance(context, options);<br /><br />} catch (InstantiationErrorException e) {<br /><br />throw new RuntimeException(<br /><br />"Initialization of HERE SDK failed: "<br /><br />+ e.error.name());<br /><br />}<br /><br />}

### Verify the Result

After applying this configuration, the SDK requests the latest available online catalog version. As a result, even older HERE SDK releases can load the freshest available streaming map content.

### Notes

CatalogVersionHint.latest(true) requests the latest catalog version and ignores cached catalog information.
The default OCM catalog HRN is hrn:here:data::olp-here:ocm.
The Japan OCM catalog HRN is hrn:here:data::olp-here:ocm-japan.
Access to the rich Japan map requires appropriate HERE credentials. If access is unavailable, the SDK falls back to the Japan base map.

As a result, legacy version of SDK can load freshest version now:



Related Links / Documentation
=================================

HERE Navigate SDK Documentation
HERE SDK Catalog Configuration Documentation
CatalogVersionHint API Documentation
Online Content Map (OCM) Documentation
* HERE SDK Release Notes

Searchable Tags / Keywords
==============================

HERE SDK, Navigate SDK, OCM, Online Content Map, latest map version, freshest map data, streaming map, CatalogVersionHint.latest, CatalogConfiguration, DesiredCatalog, SDKNativeEngine, online map updates, OCM catalog, ocm-japan, legacy SDK.


Did this page help you?