Instance Method

convertCoordinate:toPointToView:

Converts a map coordinate to a point in the specified view.

Declaration

iOS, tvOS
- (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view;
macOS
- (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(NSView *)view;

Parameters

coordinate

The map coordinate for which you want to find the corresponding point.

view

The view in whose coordinate system you want to locate the specified map coordinate. If this parameter is nil, the returned point is specified in the window’s coordinate system. If view is not nil, it must belong to the same window as the map view.

Return Value

The point (in the appropriate view or window coordinate system) corresponding to the specified latitude and longitude value.

See Also

Converting Map Coordinates

convertPoint:toCoordinateFromView:

Converts a point in the specified view’s coordinate system to a map coordinate.

convertRegion:toRectToView:

Converts a map region to a rectangle in the specified view.

convertRect:toRegionFromView:

Converts a rectangle in the specified view’s coordinate system to a map region.