<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/Map/padding",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "instp/mapkit.Map/padding"
  },
  "title" : "padding"
}
-->

# padding

The map’s inset margins.

```
get padding(): Padding;
set padding(padding: PaddingData);
```

## Discussion

The padding affects the map’s controls layout. The map computes the region it draws to fit within the inset frame that the padding specifies.

MapKit JS computes the [`visibleMapRect`](/documentation/MapKitJS/Map/visibleMapRect) to fit within the inset frame with the constraint that the entire, noninset frame needs to be able to contain map data as well. Using the [`showItems(items, options)`](/documentation/MapKitJS/Map/showItems) method ensures that all annotations and overlays are visible within the inset frame. The map modifies the region when displaying an annotation’s callout to ensure it’s entirely visible within the inset frame.

---

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)