<!--
{
  "availability" : [
    "MapKit JS: 5.74.1 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/MapFeatureAnnotationGlyphImage/getImageUrl",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "instm/mapkit.MapFeatureAnnotationGlyphImage/getImageUrl"
  },
  "title" : "getImageUrl(scale, callback)"
}
-->

# getImageUrl(scale, callback)

Returns the image URL of the map feature.

```
getImageUrl(
    scale: number | undefined,
    callback: (url: string | null) => void,
): void;
```

## Discussion

The method returns the URL as the first argument of `callback`. The URL is a `blob:` URL. To avoid a memory leak, you need to revoke it with `URL.revokeObjectURL()` when you no longer need it.

---

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)