gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 05:11:40 24 4
gpt4 key购买 nike

如果我完全缩小 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com