3

I have already developed an Android Here map which has a simple map view but I need to add offline support to the app, how can I add it to my app in order to let the user download a specific country or area?

Note that I implemented my app using the tutorial in the link below: https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics/maps.html

Ziad Ahmad
  • 95
  • 13
  • Related answer : http://stackoverflow.com/questions/35271228/here-api-offline-maps-installation/35333711#35333711 – AndrewJC Dec 28 '16 at 19:30

1 Answers1

3

See the Offline Maps section of the mobile sdk documentation.

In particular, you might want to use the following methods of the MapLoader class:

installMapPackages(List<Integer> packageIdList) - To download and install new country or region data

uninstallMapPackages(List<Integer> packageIdList) - To uninstall and delete country or region data that is no longer desired

Michel
  • 26,600
  • 6
  • 64
  • 69
  • I added this method and listener for progress and completion called (MapLoader.Listener) and it triggers correctly for download completion but when I added `int mapPackageID; mapPackages.add(mapPackageID); mapLoader.installMapPackages(mapPackages);` How can I know what the package ID for specific country? – Ziad Ahmad Dec 29 '16 at 12:27
  • As mentioned in Andrew's answer, you should use mapLoader.getMapPackages(); to get mapping between Package Titles (country name) and Pakcage Id –  Jan 05 '17 at 14:21
  • Is there a way to delete route or bounding box based downloaded data? – Nishant Tanwar Dec 17 '19 at 11:08