Contents

ImageAnnotation

A customized annotation with image resources that you provide.

Declaration

class ImageAnnotation extends Annotation

Mentioned in

Overview

There are times when you want to customize the look of an annotation. To do this, use an ImageAnnotation object, which lets you specify your own image resources by providing a URL to your asset (such as a PNG or JPEG image), an ImageSource like an HTMLCanvasElement or ImageBitmap, or a Promise that resolves to an ImageSource.

To make your image look crisp on Retina displays, provide URLs to the Retina versions of your asset, or use an ImageDelegate to dynamically return the appropriate image. You may want to define the anchor of your asset with anchorOffset.

The shape of your icon might affect the placement of the callout. You can modify the position of the callout with calloutOffset.

Topics

Creating an image annotation

Setting the image

See Also

Annotations