此处 Api:如何在不收到错误请求的情况下请求 Safety_Alerts 层的 PDE 数据?

HERE Api: How do I request PDE data for Safety_Alerts layer without getting Bad Request?

我正在创建一个 Android 应用程序来访问 HERE 平台数据扩展 Api (= PDE)。因此,我首先加载以我当前位置为中心的地图。到目前为止效果很好。然后我尝试从层 "SAFETY_ALERTS" 的 PDE 加载数据,但我在那里收到 400 错误消息 "tilexy lists 992 tiles but the limit is 64 tiles"。

我不确定这个 "tilexy" 来自哪里。我已经研究了尽可能多的 PDE 文档,但我找不到答案。


Set<String> layers = new HashSet<>(Arrays.asList("SAFETY_ALERTS"));
        GeoBoundingBox bbox = map.getBoundingBox();
        final PlatformDataRequest request = PlatformDataRequest.createBoundingBoxRequest(layers, bbox);
        request.execute(new PlatformDataRequest.Listener<PlatformDataResult>() {
            @Override
            public void onCompleted(PlatformDataResult platformDataResult, PlatformDataRequest.Error error) {
                if (error == null) {                    
                    //do something
                } else {
                    //show error --> Here is where I get
                }

我希望得到一个 PlatformDataItemCollection,它是一个 PlatformDataItems 列表(它们实现了 Map)。相反,我收到了 400 错误。

有人知道这个错误是从哪里来的,可以帮我改正错误吗?

根据错误消息,建议检查 API 调用,因为似乎在其余调用的 tilexy 参数中传递了超过 64 个坐标。 tilexy 是一个字符串,它以逗号分隔的 tilex,tiley 对序列传递,用于请求的图块。 "tile" 资源中描述了 tilex 和 tiley 值。

更多参考请参考以下文档

developer.here.com/documentation/platform-data/topics/example-tiles.html

快乐编码..!!