Instance Method

setCenterCoordinate:animated:

Changes the center coordinate of the map and optionally animates the change.

Declaration

- (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated;

Parameters

coordinate

The new center coordinate for the map.

animated

Specify YES if you want the map view to scroll to the new location or NO if you want the map to display the new location immediately.

Discussion

Changing the center coordinate centers the map on the new coordinate without changing the current zoom level. It also updates the value in the region property to reflect the new center coordinate and the new span values needed to maintain the current zoom level.

See Also

Manipulating the Visible Portion of the Map

region

The area currently displayed by the map view.

- setRegion:animated:

Changes the currently visible region and optionally animates the change.

centerCoordinate

The map coordinate at the center of the map view.

- showAnnotations:animated:

Sets the visible region so that the map displays the specified annotations.

visibleMapRect

The area currently displayed by the map view.

- setVisibleMapRect:animated:

Changes the currently visible portion of the map and optionally animates the change.

- setVisibleMapRect:edgePadding:animated:

Changes the currently visible portion of the map, allowing you to specify additional space around the edges.