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

# selectedGlyphImage

The image to display in the balloon when the user selects the marker.

```
selectedGlyphImage?:
    | ImageDelegate
    | ImageHashObject
    | ImageSource
    | Promise<ImageSource>
    | null;
```

## Discussion

Provide glyph images as object literals containing absolute or relative URLs to standard, 2x, and 3x Retina display assets, an [`ImageDelegate`](/documentation/MapKitJS/ImageDelegate), an [`ImageSource`](/documentation/MapKitJS/ImageSource) such as an `HTMLCanvasElement` or `ImageBitmap`, or a `Promise` that resolves to an [`ImageSource`](/documentation/MapKitJS/ImageSource). The framework requires at least one image. MapKit JS displays the selected glyph image in the balloon when the marker is in the selected state. If you specify an image for this property, also specify an image in the [`glyphImage`](/documentation/MapKitJS/MarkerAnnotation/glyphImage) property.

Set the size of the selected glyph image to 40 x 40 pixels. MapKit JS scales glyph images to fit in the balloon. If you don’t set [`selectedGlyphImage`](/documentation/MapKitJS/MarkerAnnotationConstructorOptions/selectedGlyphImage), the framework uses [`glyphImage`](/documentation/MapKitJS/MarkerAnnotationConstructorOptions/glyphImage) when the user selects the marker. The default image is a pin.

---

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)