How to zoom out MKMapView completely to view whole world on screen for tvOS?

Hi,


I am trying to zoom out MKMApView completely to view the Whole World but Map zooms out to a certain extent and fails to zoom out further. I have tried all the ways that we have for zooming that includes MKMapRect, MKCoordinateRegion, Using altitude property of MKCamera and changed map types to SatelliteFlyover and HybridFlyover none of them achieves my expectation. This same behaviour happens in iOS and macOS as well. Does Apple allows us to achieve Zoom Level 0 in Maps or Is there any approach to achieve the expected?

Set the visible map rect to MKMapRectWorld.

Thank you for the response Edford, As per your statement setting visible rect to MKMapRectWorld will provide a spherical view of whole world only if we use Flyover map types(SatelliteFlyover & HybridFlyover). Setting visible rect to MKMapRectWorld to other map types(Standard,Satellite,Hybrid and Muted Standard) will zoom out map only to a certain extent which I stated in my previous statement. I am trying to display a flatter map (Mercator Projection) where user can able to view entire coordinates of the Map without scrolling on screen. Is there any limitation to achieve expected or there any approach that Apple uses to achieve Flat Map with Zoom Level 0 in MKMapView?

To display the map as a Mercator rectangle, set the type of the map to any of the types other than the flyover maps. Setting the `visibleMapRect` to MKMapRectWorld does not guarantee the entire Mercator map will be visible without scrolling.

Ok Edford, your recent statement made me to understand showing entire view of Mercator map is not achievable using MKMapView. I have an alternative approach to use MKMapSnapshotter where I can use MKMapRectWorld to specify entire Mercator rectangle and get an image that captures the entire Mercator map(though they were not fully visible on screen), so that I can use the snapshot image to simulate like a Mercator map with existing annotations. I made an attempt on this and got the same result as MKMapView. Is it possible using MKMapSnapshotter or any other way to suggest?

I've been looking into this, and I see the problems you are encountering. Please file a bug report.

Hi DTS,

I understand you are saying the expected behavior of what was described doesn't, but shouldn't, it work after you force the aspect ratio of the Mercator projection to not be 1:1, via

https://developer.apple.com/documentation/mapkit/mkmapview/maprectthatfits(_:)

TIA, -BenC

(Here's the text from the page I think is relevant)

Return Value MapKit centers the map rectangle on the same point of the map, and adjusts the width and height to fit in the map view’s frame.

Discussion Returns a map rectangle with the same aspect ratio as the map view’s frame, centered at the same location as the specified map rectangle.

How to zoom out MKMapView completely to view whole world on screen for tvOS?
 
 
Q