---
title: "new MapSize(width, height)"
framework: mapkitjs
role: symbol
role_heading: Constructor
path: mapkitjs/mapsize/mapsizeconstructor
---

# new MapSize(width, height)

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

## Declaration

```data
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

Discussion The following example demonstrates how to create a mapkit.MapSize instance from map units: const mapSize = new mapkit.MapSize(0.3, 0.4); const width = mapSize.width; // 0.3 const height = mapSize.height; // 0.4

## See Also

### Creating a map size

- [MapSizeData](mapkitjs/mapsizedata.md)
