I have mapkit view and i need to fix zoom step. User must only increase or decrease by 4 times. How i can do it in MapKit?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The map doesn’t provide a method to restrict the zoom increment. I should also say that the default implementation of the map view on the iPhone leads to better user experience I think. I personally dislike apps that limit my capabilities for no good reason.
To answer your question though, you can manually control your zooming, by disabling
MKMapView.zoomEnabledproperty. Then you can expose a zoom buttons that change the shown map region, usingsetRegion:animated:.Here is a sample code on how to zoom the map: