--- title: Migrate to the Polaris map marker component description: >- Learn how to migrate the MapMarker component to Polaris web components in checkout and customer account UI extensions. source_url: html: >- https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/map-marker md: >- https://shopify.dev/docs/apps/build/checkout/migrate-to-web-components/map-marker.md --- # Migrate to the Polaris map marker component The Polaris map marker component displays a marker on a map. It replaces the previous [`MapMarker`](https://shopify.dev/docs/api/checkout-ui-extensions/2025-07/ui-components/media-and-visuals/mapmarker) component and is available as [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#map%20marker) in API versions 2025-10 and newer. Use it as a child of [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map). *** ## Updated properties The following properties are different in the Polaris map marker component. ### on​Press The previous `MapMarker` `onPress` prop is now called [`onClick`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#mapmarker-events-propertydetail-click). The handler now receives an `Event` instead of being called with no arguments. ### block​Size and inline​Size The [`blockSize`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#mapmarker-propertydetail-blocksize) and [`inlineSize`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#mapmarker-propertydetail-inlinesize) props now take string units with a unit suffix instead of a plain number. | Previous value | New value | | - | - | | `32` | `"32px"` | *** ## New properties The Polaris map marker component introduces the following new properties: | New prop | Type | Description | | - | - | - | | [`command`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#mapmarker-propertydetail-command) | `'--auto'`, `'--show'`, `'--hide'`, `'--toggle'` | Sets the action to run on the target component when the marker is activated. | | [`commandFor`](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/map#mapmarker-propertydetail-commandfor) | `string` | Sets the ID of the target component for the command. | *** ## Removed properties ### icon The previous `MapMarker` `icon` prop (a URL to an image) has been replaced by a `graphic` slot. Place any `HTMLElement` inside the marker with `slot="graphic"` — for example, an [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/media-and-visuals/image) to render an image from a URL. ## Migrating icon to the graphic slot ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, Map, MapMarker, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( ); } ``` ### overlay The previous `MapMarker` `overlay` prop has been replaced with the [`command`](#new-properties) and [`commandFor`](#new-properties) pattern. To open a popover when the marker is activated, target a sibling [``](https://shopify.dev/docs/api/checkout-ui-extensions/latest/web-components/overlays/popover) by ID. ## Migrating overlay to command and commandFor ##### Latest (Preact) ```tsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default function extension() { render(, document.body); } function Extension() { return ( 620 King Street West, Toronto ); } ``` ##### Pre-Polaris (2025-07) ```tsx import { reactExtension, Map, MapMarker, MapPopover, Text, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => , ); function Extension() { return ( 620 King Street West, Toronto } /> ); } ``` ***