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?

Replies

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.