Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

oo7ml

macrumors 6502
Original poster
Jan 20, 2010
259
0
Hi,

I'm hoping someone here can help settle an argument i am having with a friend.

He is saying it is not possible to control the zoom level of maps (apple) in iOS development.

For example, when an app displays a map with a pointer / marker, it is not possible to control what level zoom the app displays the map at. I find this very hard to believe.

Can anyone confirm this? Thanks in advance.
 

dantastic

macrumors 6502a
Jan 21, 2011
572
678
Hi,

I'm hoping someone here can help settle an argument i am having with a friend.

He is saying it is not possible to control the zoom level of maps (apple) in iOS development.

For example, when an app displays a map with a pointer / marker, it is not possible to control what level zoom the app displays the map at. I find this very hard to believe.

Can anyone confirm this? Thanks in advance.

And between you noone thought of checking the documentation?
https://developer.apple.com/library/ios/documentation/MapKit/Reference/MKMapView_Class/MKMapView/MKMapView.html

When you initialize a map view, you should specify the initial region for that map to display. You do this by setting the region property of the map. A region is defined by a center point and a horizontal and vertical distance, referred to as the span. The span defines how much of the map at the given point should be visible and is also how you set the zoom level. Specifying a large span results in the user seeing a wide geographical area and corresponds to a low zoom level. Specifying a small span results in the user seeing a more narrow geographical area and corresponds to a higher zoom level.

In addition to setting the span programmatically, the MKMapView class supports many standard interactions for changing the position and zoom level of the map. In particular, map views support flick and pinch gestures for scrolling around the map and zooming in and out. Support for these gestures is enabled by default but can also be disabled using the scrollEnabled and zoomEnabled properties.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.