Instance Method

point(for:)

Converts the specified map coordinate to a point in the coordinate space of the image.

Declaration

iOS, Mac Catalyst, tvOS
func point(for coordinate: CLLocationCoordinate2D) -> CGPoint
macOS
func point(for coordinate: CLLocationCoordinate2D) -> NSPoint

Parameters

coordinate

A map coordinate that you want to convert.

Return Value

The point in the image’s coordinate space that corresponds to the map location.

Discussion

If you want to display additional views or content on top of the image, you can use this method to find an appropriate point at which to draw those items.