---
title: "distance(to:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mkmappoint/distance(to:)"
---

# distance(to:)

Returns the number of meters between two map points.

## Declaration

```swift
func distance(to b: MKMapPoint) -> CLLocationDistance
```

## Parameters

- `b`: The second map point.

## Return Value

Return Value The number of meters between the specified map points.

## Discussion

Discussion This distance reflects the actual distance between the two points on the surface of the globe, taking into account the curvature of the Earth.

## See Also

### Getting the distance between points

- [MKMetersPerMapPointAtLatitude(_:)](mapkit/mkmeterspermappointatlatitude(_:).md)
- [MKMapPointsPerMeterAtLatitude(_:)](mapkit/mkmappointspermeteratlatitude(_:).md)
