1

I am using HERE-Android-SDK to build a simple navigation solution with offline maps. While using the offline mode for the search addresses and calculation of a route, I can see that there are results returned from the address-search, which are not included in the installed offline map datasets. Is there anything additional which I need to do, in order to get only search results which are located inside the offline-map data installed on my device?

I am using the following code snippets.

  • download offline maps for a specific country:
mapsLoader.selectDataGroup(MapPackage.SelectableDataGroup.TruckAttributes)
mapsLoader.installMapPackages(listOf(mapPackageId))
  • search request for addresses:
val term = "New York"
val center = GeoCoordinate(lastWayPoint.latitude, lastWayPoint.longitude)
val request = SearchRequest(term)
request.connectivity = Request.Connectivity.OFFLINE
request.locale = Locale.GERMAN
request.setSearchCenter(center)
request.collectionSize = 5
request.execute { data, error -> 
  if (error != ErrorCode.NONE) return
  // handle search results here
}

Thanks for all of your help in advance!

  • Welcome to stackoverflow. Which offline-map data did you install? What results did you get when you execute the search request? – Mathias Feb 28 '22 at 09:40
  • You seem to use the Premium SDK, I would suggest to migrate to the 4.x Navigate Edition, Offline Maps are easier to use and explained here: https://developer.here.com/documentation/android-sdk-navigate/dev_guide/topics/offline-maps.html – Nusatad Mar 07 '22 at 08:26
  • Yep, this is the premium SDK - is there no option without migrate to the 4.x version? – Andreas Fink Mar 10 '22 at 07:24

0 Answers0