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

# glyphImage

The image to display in the marker balloon.

```
get glyphImage():
    | ImageSource
    | ImageHashObject
    | ImageDelegate
    | Promise<ImageSource>
    | null;
set glyphImage(
    value:
        | ImageSource
        | ImageHashObject
        | ImageDelegate
        | Promise<ImageSource>
        | null,
);
```

## Discussion

Glyph image values can be object literals that contain absolute or relative URLs to standard, `@2x`, and `@3x` 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). See [`ImageSource`](/documentation/MapKitJS/ImageSource) for cross-origin requirements.

The framework requires at least one image at 20 x 20 pixels. Create glyph images as template images — a monochrome image with opacity, if needed — so that MapKit JS can apply the [`glyphColor`](/documentation/MapKitJS/MarkerAnnotation/glyphColor) to tint the image.

If you set [`glyphImage`](/documentation/MapKitJS/MarkerAnnotationConstructorOptions/glyphImage) to `null` or `undefined`, MapKit JS uses the default glyph image of a pin. If you specify both a [`glyphImage`](/documentation/MapKitJS/MarkerAnnotation/glyphImage) and [`glyphText`](/documentation/MapKitJS/MarkerAnnotation/glyphText), MapKit JS ignores the glyph image, and the framework displays glyph text.

---

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)