Android - 这里是高级Sdk离线地图

时间:2016-12-16 13:13:50

标签: android dictionary sdk offline

我已多次重读文档。但我无法做到这一点我只是想请求你的帮助。

https://developer.here.com/mobile-sdks/documentation/android-hybrid-plus/topics/maps-offline.html

我实现了监听器并以:

开头
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) {   // İ put break point and look inside of rootMapPackage to get ids
  }
  public void onCheckForUpdateComplete(boolean updateAvailable,
    String currentMapVersion,String newestMapVersion,
          MapLoader.ResultCode mapLoaderResultCode) {
  }
};

MapLoader mapLoader = MapLoader.getInstance();
mapLoader.addListener(mapLoaderListener);
mapLoader.getMapPackages(); //after this code executed i look inside the
                            //variables in rootMapPackage and i get ids .

mapLoader.installMapPackages(idlist);

在installationMapPackages程序进入

之后
public void onInstallMapPackagesComplete(MapPackage rootMapPackage,
                                        MapLoader.ResultCode mapLoaderResultCode)

根据文档,我认为我应该设法下载并安装地图包以供离线使用,但没有任何反应。安装过程最多需要20秒。所以我觉得没有任何反应。我在互联网上搜索问题,但每个人只是直接向人们提供了这个文档页面,但显然这还不够(至少我没有做到)。流程应该如何?

谢谢

0 个答案:

没有答案