简体   繁体   中英

Incorrect boundingBox on NMAMapView for certain zoom levels with 3D projection

If I zoom my NMAMapView completely out so that you can see the earth globe ( NMAMapViewMinimumZoomLevel ) a call to NMAMapView s boundingBox property does return the following coordinates for all the top* / bottom* properties:

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>

// ...

This is also the case for some zoom levels above. This does not seem correct to me, is this a bug in Here SDK?

Edit : This seems to be only a problem with the 3D projection, in the 2D projection at the lowest zoom level we do get valid coordinates

Following the update in the question (valid Bounding box in 2D Projection) and comments from @dashchak ,this is expected behavior,The bounding box is a rectangle which would be capped to a value different from the bounds of a rectangle.

From 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM