iphone - Setting the zoom level for a MKMapView -


i have map shows correctly, thing want set zoom level when loads. there way this?

thanks

i found myself solution, simple , trick. use mkcoordinateregionmakewithdistance in order set distance in meters vertically , horizontally desired zoom. , of course when update location you'll right coordinates, or can specify directly in cllocationcoordinate2d @ startup, if that's need do:

cllocationcoordinate2d nolocation; mkcoordinateregion viewregion = mkcoordinateregionmakewithdistance(nolocation, 500, 500); mkcoordinateregion adjustedregion = [self.mapview regionthatfits:viewregion];           [self.mapview setregion:adjustedregion animated:yes]; self.mapview.showsuserlocation = yes; 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -