ios - 对于 3D 投影的某些缩放级别,NMAMapView 上的边界框不正确

标签 ios here-api here-ios

如果我完全缩小 NMAMapView 以便您可以看到地球 (NMAMapViewMinimumZoomLevel),则调用 NMAMapView 的boundingBox 属性会执行此操作返回所有顶部*/底部*属性的以下坐标:

po self.hereMapView.boundingBox?.topRight
▿ Optional<NMAGeoCoordinates>
  - some : <NMAGeoCoordinates: 0x2828bde00; latitude = -90.000000; longitude = 0.000000; altitude = -340282346638528859811704183484516925440.000000>

self.hereMapView.boundingBox?.topLeft
▿ Optional<NMAGeoCoordinates>
  - some : <NMAGeoCoordinates: 0x2828bca20; latitude = -90.000000; longitude = 0.000000; altitude = -340282346638528859811704183484516925440.000000>

// ...

上述某些缩放级别也是如此。这对我来说似乎不正确,这是 Here SDK 中的错误吗?

编辑:这似乎只是 3D 投影的问题,在最低缩放级别的 2D 投影中我们确实获得了有效坐标

最佳答案

根据问题中的更新(2D 投影中的有效边界框)和 @dashchak 的评论,这是预期的行为,边界框是一个矩形,其上限为与矩形边界不同的值。

来自Documentation :

The boundingBox of the map is the smallest possible NMAGeoBoundingBox which contains all of the map area currently visible on the screen. If the map is in 2D view (zero tilt), the boundingBox should (nearly) exactly coincide with the bounds of the screen rect. If the map is in 3D view, the visible screen area is a trapezoid in geographical space (the visible area is wider at the top of the screen than at the bottom due to perspective). Thus, the bounding box will contain some area that is not actually visible on the screen in this case.

关于ios - 对于 3D 投影的某些缩放级别,NMAMapView 上的边界框不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59624640/

相关文章:

ios - 如何将自动布局与容器转换一起使用?

ios - Storyboard中的自定义segue

ios - 无法将类型 '__NSArrayI' (0x10df73c08) 的值转换为 'NSDictionary' (0x10df74108)

android - 如何在Here Map中实现当前位置蓝色图标

ios - 这里 iOS SDK : Places API make*Request always returns nil

ios - 如何初始化从 NSString 到 NSArray 的字典

java - 如果不在函数中传递 View,则无法获取 PositioningManager 的实例

javascript - 有没有办法在基本 map 中禁用 3D 建筑物 View ? Javascript 这里有 map

ios - 支持 HERE map 室内 3D 场馆路线导航吗?

ios - NMACoreRouter calculateRouteWithStops 无回调(快速)