Reputation: 513
I want to add buttons on map in ios sdk Mapview 1> Zoom in button 2> Zoom out button Please specify any demo or any code related to this one.
Upvotes: 2
Views: 3379
Reputation: 2363
for zoom in
-(void)zoomInMap
{
region.span.latitudeDelta = region.span.latitudeDelta/2 ;
region.span.longitudeDelta = region.span.longitudeDelta/2;
region.center.latitude = mapView.centerCoordinate.latitude ;
region.center.longitude = mapView.centerCoordinate.longitude ;
[mapView setRegion:region animated:YES];
}
similarly for zoom out.
Upvotes: 5