<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/MapSize/MapSizeConstructor",
  "metadataVersion" : "0.1.0",
  "role" : "Constructor",
  "symbol" : {
    "kind" : "Constructor",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "instctr/mapkit.MapSize/MapSizeConstructor"
  },
  "title" : "new MapSize(width, height)"
}
-->

# new MapSize(width, height)

Creates an object containing the width and height of a projected coordinate span.

```
constructor(width?: number, height?: number);
```

## Parameters

`width`

The distance in map units along the east-west axis of the map projection.

`height`

The distance in map units along the north-south axis of the map projection.

## Discussion

The following example demonstrates how to create a `mapkit.MapSize` instance from map units:

```javascript
const mapSize = new mapkit.MapSize(0.3, 0.4);
const width = mapSize.width; // 0.3
const height = mapSize.height; // 0.4
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)