android - Here-api offline maps installation -
in mapengine initialization want install packages stuck here installmappackages(list packageidlist) can find list packageidlist.
you should use maploader#getmappackages()
api retrieve root mappackage
object. can use mappackage#getid()
method find id's of countries/regions wish install. note mappackage
object not returned directly maploader#getmappackages()
call, instead through listener object. must provide own maploader.listener
implementation , set way of maploader#addlistener(maploader.listener listener)
method before calling getmappackages()
.
for example:
maploader.listener maploaderlistener = new maploader.listener() { public void onuninstallmappackagescomplete(mappackage rootmappackage, maploader.resultcode maploaderresultcode) { } public void onprogress(int progresspercentage) { } public void onperformmapdataupdatecomplete(mappackage rootmappackage, maploader.resultcode maploaderresultcode) { } public void oninstallationsize(long disksize, long networksize) { } public void oninstallmappackagescomplete(mappackage rootmappackage, maploader.resultcode maploaderresultcode) { } public void ongetmappackagescomplete(mappackage rootmappackage, maploader.resultcode maploaderresultcode) { // method called after maploader#getmappackages() // called // can use rootmappackage object find id's // pass installmappackages() } public void oncheckforupdatecomplete(boolean updateavailable, string currentmapversion,string newestmapversion, maploader.resultcode maploaderresultcode) { } }; maploader maploader = maploader.getinstance(); maploader.addlistener(maploaderlistener); maploader.getmappackages();
further details here:
- developer guide
https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics/maps-offline.html
- api reference
Comments
Post a Comment