---
title: "convert(_:toPointTo:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkmapview/convert(_:topointto:)"
---

# convert(_:toPointTo:)

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

## Declaration

```swift
func convert(_ coordinate: CLLocationCoordinate2D, toPointTo view: UIView?) -> CGPoint
```

```swift
func convert(_ coordinate: CLLocationCoordinate2D, toPointTo view: NSView?) -> CGPoint
```

## Parameters

- `coordinate`: The map coordinate that you want to find the corresponding point for.
- `view`: The view where you want to locate the specified map coordinate. If this parameter is nil, the method specifies the returned point in the window’s coordinate system. If view isn’t nil, the point belongs to the same window as the map view.

## Return Value

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

- [convert(_:toCoordinateFrom:)](mapkit/mkmapview/convert(_:tocoordinatefrom:).md)
- [convert(_:toRectTo:)](mapkit/mkmapview/convert(_:torectto:).md)
- [convert(_:toRegionFrom:)](mapkit/mkmapview/convert(_:toregionfrom:).md)
