Android 的 Here Maps SDK 中供离线使用的图层下载
Layer download for offline use in Here Maps SDK for Android
我已将 CLE2 层上传到(HERE 业务管理员平台 -HERE Platform for Business Admin),我想在我的 Android 应用程序中下载它以供离线使用,我正在使用此代码下载图层:
CLE2DataManager.getInstance().newDownloadLayerTask("MYLAYER").start(new CLE2Task.Callback<CLE2OperationResult>() {
@Override
public void onTaskFinished(CLE2OperationResult result, CLE2Error error) {
if (error.getErrorCode() == CLE2ErrorCode.NONE) {
// download succeeded
} else {
// handle download error
}
}});
我在上传后用层 ID 替换了 MYLAYER
然后我在调试时得到层不存在错误,如下所示
我该如何解决这个错误?我错过了什么吗?提前致谢
请检查 APP_ID 和 APP_CODE 是否与您在 Android 和 HERE 平台之间使用的相同。
图层 id 区分大小写。
您似乎正在将图层上传到测试环境 (https://enterprise.cit.here.com/) while the SDK tries to download the layer from the Production environment (https://enterprise.here.com/). Try uploading your layer to the Production environment (https://enterprise.here.com/),然后尝试通过 SDK 下载它。
我已将 CLE2 层上传到(HERE 业务管理员平台 -HERE Platform for Business Admin),我想在我的 Android 应用程序中下载它以供离线使用,我正在使用此代码下载图层:
CLE2DataManager.getInstance().newDownloadLayerTask("MYLAYER").start(new CLE2Task.Callback<CLE2OperationResult>() {
@Override
public void onTaskFinished(CLE2OperationResult result, CLE2Error error) {
if (error.getErrorCode() == CLE2ErrorCode.NONE) {
// download succeeded
} else {
// handle download error
}
}});
我在上传后用层 ID 替换了 MYLAYER
然后我在调试时得到层不存在错误,如下所示
我该如何解决这个错误?我错过了什么吗?提前致谢
请检查 APP_ID 和 APP_CODE 是否与您在 Android 和 HERE 平台之间使用的相同。 图层 id 区分大小写。
您似乎正在将图层上传到测试环境 (https://enterprise.cit.here.com/) while the SDK tries to download the layer from the Production environment (https://enterprise.here.com/). Try uploading your layer to the Production environment (https://enterprise.here.com/),然后尝试通过 SDK 下载它。