Contents

Padding

The values that define content padding within the map view frame.

Declaration

class Padding

Overview

Use padding to define edge insets on the map. MapKit JS then uses these insets when it positions items on the map, such as the map controls or annotations. For example, if you want to add your own control on top of the map and ensure that the map doesn’t position annotations underneath it, you can add padding to the map and then position your control within the padded area.

You can use a Padding object when setting the map’s padding property or as an option of showItems(items, options). Positive values add padding to the inside edges of the map. MapKit JS clips negative values to 0.

Topics

Creating padding

Controlling the map’s padding

Variables

Instance Methods

See Also

Map view customization