---
title: "scale(scaleFactor, scaleCenter)"
framework: mapkitjs
role: symbol
role_heading: Instance Method
path: mapkitjs/maprect/scale
---

# scale(scaleFactor, scaleCenter)

Returns a scaled map rectangle for a map location.

## Declaration

```data
scale(scaleFactor: number, scaleCenter?: MapPointData): MapRect;
```

## Parameters

- `scaleFactor`: The scale factor.
- `scaleCenter`: The center map point for scaling.

## Discussion

Discussion The following example demonstrates scaling a mapkit.MapRect instance first with a common center, and then with a common origin: const mapRect = new mapkit.MapRect(0.1, 0.2, 0.3, 0.4);

// Scale a MapRect to be 2x the width and 2x the height of mapRect // and have the same center. const scaledRect = mapRect.scale(2);

// Same scale but this time mapRect and scaledRectAroundOrigin // have the same origin rather than the same center. const scaledRectAroundOrigin = mapRect.scale(2, new mapkit.MapPoint(mapRect.minX(), mapRect.maxX()));

## See Also

### Working with map rectangles

- [copy()](mapkitjs/maprect/copy.md)
- [equals(anotherRect)](mapkitjs/maprect/equals.md)
- [toCoordinateRegion()](mapkitjs/maprect/tocoordinateregion.md)
