---
title: equals(anotherRect)
framework: mapkitjs
role: symbol
role_heading: Instance Method
path: mapkitjs/maprect/equals
---

# equals(anotherRect)

Compares whether two map rectangles are equal.

## Declaration

```data
equals(anotherRect: MapRect): boolean;
```

## Parameters

- `anotherRect`: The map rectangle to use for comparison.

## Return Value

Return Value Returns true if a rectangle exactly matches anotherRect. Returns false if the origin point or size values are different.

## See Also

### Working with map rectangles

- [copy()](mapkitjs/maprect/copy.md)
- [scale(scaleFactor, scaleCenter)](mapkitjs/maprect/scale.md)
- [toCoordinateRegion()](mapkitjs/maprect/tocoordinateregion.md)
