> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/mapbox-search-js/llms.txt)

# Minimap

**Minimap** provides a UI that allows users confirm a physical location on a map, reducing delivery errors in both shipping and local dispatching contexts.

This page includes reference documentation for the Minimap component and types in the **Mapbox Search JS React** framework.

## Components

### AddressMinimap

`AddressMinimap` is a React component that displays a marker for confirmation purposes.

Optionally, this marker is editable. When editable, the marker can be moved around the map and the updated location is sent back to the Mapbox Contribute workflow.

The goal of `AddressMinimap` is to reduce delivery or geolocation error in shipping and local dispatching contexts.

`AddressMinimap` expands to fill its container, and is hidden unless [AddressMinimapProps#feature](#addressminimapprops#feature) and [AddressMinimapProps#show](#addressminimapprops#show) are truthy.

#### Props

<table class="table table--fixed table--compact" style="width:100%;table-layout:fixed"><colgroup><col width="28%"><col></colgroup><thead><tr class="bg-gray-faint"><th style="border-top-left-radius:4px">Name</th><th style="border-top-right-radius:4px">Description</th></tr></thead><tbody><tr><td><strong>canAdjustMarker</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;</td><td><span>If <code>true</code> , the marker can be moved around the map. Defaults to <code>false</code> .<p>When editable, the marker can be moved around the map and the updated location can be referenced from the <a href="#addressminimapprops#onsavemarkerlocation">AddressMinimapProps#onSaveMarkerLocation</a> callback.</p></span></td></tr><tr><td><strong>keepMarkerCentered</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;</td><td><span>If <code>true</code> , the map when panned moves around the marker, keeping the marker centered. Defaults to <code>false</code> .</span></td></tr><tr><td><strong>markerAnchor</strong>&nbsp;<span><a href="/mapbox-search-js/api/web/minimap/#anchor">Anchor</a></span>&nbsp;</td><td><span>The anchor of the marker, relative to center of the expanded size. Defaults to <code>'bottom'</code> .</span></td></tr><tr><td><strong>onSaveMarkerLocation</strong>&nbsp;<span>function (coordinate: [<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>]): void</span>&nbsp;</td><td><span>A client-defined callback that is triggered when the "Save" button is clicked in the editing interface, and gives access to the adjusted marker coordinate.</span></td></tr><tr><td><strong>show</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;</td><td><span>Must be <code>true</code> for the minimap to be shown, in addition to <a href="#addressminimapprops#feature">AddressMinimapProps#feature</a> being present.</span></td></tr><tr><td><strong>accessToken</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>The <a href="https://docs.mapbox.com/help/glossary/access-token/">Mapbox access token</a> to use for all requests.<p>If not explicitly set on the component, this will reference the value in the global config object.</p></span></td></tr><tr><td><strong>feature</strong>&nbsp;<span>GeoJSON.Feature&lt;GeoJSON.Point&gt;</span>&nbsp;</td><td><span>A <a href="https://docs.mapbox.com/help/glossary/geojson/">GeoJSON</a> Feature representing a <a href="https://geojson.org/geojson-spec.html#point">Point</a> geometry.<p>The minimap is hidden unless <a href="#addressminimapprops#feature">AddressMinimapProps#feature</a> is truthy.</p></span></td></tr><tr><td><strong>satelliteToggle</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;</td><td><span>If <code>true</code> , the map will have an image toggle between Map and Satellite styles.</span></td></tr><tr><td><strong>theme</strong>&nbsp;<span><a href="/mapbox-search-js/api/web/theming/#theme">Theme</a></span>&nbsp;</td><td><span>The <a href="/mapbox-search-js/api/web/theming/#theme">Theme</a> to use for styling interface buttons.<p><code>theme.cssText</code> selectors may target: <code>.MapboxAddressMinimap</code>, <code>.MinimapImageContainer</code>, <code>.MinimapImage</code>, <code>.MinimapInnerFrame</code>, <code>.MinimapMarker</code>, <code>.MinimapAttribution</code>, <code>.MinimapAttributionLogo</code>, <code>.MinimapAttributionText</code>, <code>.MinimapStyleToggle</code>, <code>.MinimapFooter</code>, <code>.MinimapEditButtons</code>, <code>.Button</code>, <code>.ButtonPrimary</code>, <code>.MinimapButtonAdjust</code>, <code>.MinimapButtonSave</code>, <code>.MinimapButtonCancel</code>.</p></span></td></tr><tr><td><strong>mapStyleMode</strong>&nbsp;<span>MapStyleMode</span>&nbsp;</td><td><span>The map style to use, either <code>'default'</code> or <code>'satellite'</code> . The default map style is configurable with <a href="#addressminimapprops#defaultmapstyle">AddressMinimapProps#defaultMapStyle</a> .</span></td></tr><tr><td><strong>defaultMapStyle</strong>&nbsp;<span>[<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>]</span>&nbsp;</td><td><span>The map style to use for the default map style. Defaults to <code>['mapbox', 'streets-v11']</code> .</span></td></tr><tr><td><strong>footer</strong>&nbsp;<span>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</span>&nbsp;</td><td><span>Custom footer text appearing below the map, when marker adjustment is enabled. If <code>true</code> or left undefined, the default footer text will be used. If <code>false</code> , the footer will not be shown.</span></td></tr><tr><td><strong>adjustBtnText</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>Custom adjust button text appearing on the map. If not provided, the default text will be used.</span></td></tr><tr><td><strong>cancelBtnText</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>Custom cancel button text appearing on the map, when marker adjustment is enabled. If not provided, the default text will be used.</span></td></tr><tr><td><strong>saveBtnText</strong>&nbsp;<span><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>&nbsp;</td><td><span>Custom save button text appearing on the map, when marker adjustment is enabled. If not provided, the default text will be used.</span></td></tr></tbody></table>

#### Import[​](#import)

```javascript
import { AddressMinimap } from '@mapbox/search-js-react'
```

#### Example

```js
export function Component() {
  return (
    <AddressMinimap
       accessToken={'YOUR_MAPBOX_ACCESS_TOKEN'}
       canAdjustMarker={true}>
    </AddressMinimap>
  );
}
```

Was this section on AddressMinimap helpful?[Yes](null)[No](null)