1

我在我的应用程序中实现了 Skobbler SDK 来导航离线地图。当用户离线时,我在尝试从地址获取坐标时遇到问题。即使我已经安装了相对于我尝试导航的城市的包,当我开始多步骤搜索时,它也会返回空结果,而无法理解我做错了什么,因为无法管理最终的错误消息. 这是我在 Skobbler 文档中报告的代码:

private void searchAtCurrentLevel(long parentId, SKSearchManager.SKListLevel level) {
// get a search manager object
SKSearchManager mgr = new SKSearchManager(this);
// get a multi-step search object
SKMultiStepSearchSettings searchSettings = new SKMultiStepSearchSettings();
// set the offline package in which to search
searchSettings.setOfflinePackageCode(code);
// set list level of the search
searchSettings.setListLevel(level);
// set maximum number of results to be received
searchSettings.setMaxSearchResultsNumber(20);
// set the id of the parent in which to search
searchSettings.setParentIndex(parentId);
// set a filter for the results
searchSettings.setSearchTerm("");
// initiate the search
mgr.multistepSearch(searchSettings);
}

其中“代码”相对于我所在城市的代码(例如伦敦的 GBCITY04),而 parentId 为 -1,如 Skobbler 的 Android“操作方法”中所示。我还尝试输入所有不同的 listLevel 值,但没有任何改变。

在我的应用程序中,我避免下载“Maps.json”文件,因为我只需要管理 2 个城市,米兰和伦敦,所以我只下载米兰和伦敦的具有相关城市代码(ITCITY01 和 GBCITY04)的地图。这可能是我的问题的原因吗?

提前感谢您的支持。

4

0 回答 0