I'd like to recenter a MapKit map in an IPad application by code. It is nothing more, that panning the map to the given center at the original zoom level. No zoom in, no zoom out, just pan. It works, but sometimes (20-30% of the time) it changes the zoom level, it zooms out. I don't want this, just recenter the map. The map view is behaving correctly as in it is accurately displaying a region of the map using the Mercator projection. The distance between two meridians of longitude is larger as you get closer to the equator. Depending on where you're panning from, the map view may have to adjust the zoom level to accommodate the region you have supplied. For solutions, I would check out this category on MKMapView written by Troy Brant. It allows you to change the position of the map view whilst keeping a consistent zoom scale and does all the nerdy math stuff for you. Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 23, 2016 @ 1:12 pm