---
title: toCoordinateRegion()
framework: mapkitjs
role: symbol
role_heading: Instance Method
path: mapkitjs/maprect/tocoordinateregion
---

# toCoordinateRegion()

Returns the region that corresponds to a map rectangle.

## Declaration

```data
toCoordinateRegion(): CoordinateRegion;
```

## Return Value

Return Value A CoordinateRegion object that corresponds to a map rectangle.

## Discussion

Discussion It’s often easier to work with a map rectangle than a CoordinateRegion. The following example demonstrates how to convert a MapRect instance to a CoordinateRegion and back again: const mapRect = new mapkit.MapRect(0.1, 0.2, 0.3, 0.4);

// Return a coordinate region with center (33.841220320476786, -90) and span (106.57400641480324, 108). const coordinateRegion = mapRect.toCoordinateRegion();

// Return the same map rectangle as mapRect, plus or minus any floating point inaccuracies. const newMapRect = coordinateRegion.toMapRect();

## See Also

### Working with map rectangles

- [copy()](mapkitjs/maprect/copy.md)
- [equals(anotherRect)](mapkitjs/maprect/equals.md)
- [scale(scaleFactor, scaleCenter)](mapkitjs/maprect/scale.md)
