Contents

Annotation

An object for a Snapshot URL that describes annotation characteristics.

Declaration

object Annotation

Properties

NameTypeDescription
markerStylestring

The style of the annotation. Supported styles include dot, balloon, large, and img. If you use img, you must also specify imgIdx, and may specify offset.

pointstring

A single point that defines the location at which to place an annotation. Supported values include latitude and longitude coordinates, addresses, or the keyword center, which places an annotation on the map’s center point.

colorstring

The color of the annotation. Supported values are HTML color names or hexadecimal color codes. For example:

annotations=[{"point":"37.78,-122.42", "color":"449944"}]

If the annotation has an “img” markerStyle, the Maps Web Snapshots API ignores this parameter.

glyphColorstring

The tint color of the glyph. This property accepts a color name or a hexadecimal color value.

glyphImgIdxinteger

The zero-based index of the glyph image referenced in the array of images used for a specific annotation.

Don’t set the glyphText property when using this property. If the annotation has a “dot” or “img” markerStyle, the Maps Web Snapshots API ignores this parameter.

glyphTextstring

A single alphanumeric character from the set {a-z, A-Z, 0-9}, displayed inside the annotation. If the annotation has a “dot” or “img” markerStyle, the Maps Web Snapshots API ignores this parameter.

imgIdxinteger

The zero-based index of the image referenced in the array of images to use for this annotation. The Maps Web Snapshots API requires this property if markerStyle is img.

offsetstring

An optional offset in scale independent pixels of the image from the bottom center. Specify the offset as a comma-separated string with x and y values. X values move the element to the left or right with positive and negative values, respectively. Y values move the element up or down with positive and negative values, respectively. For example, the following value moves the element down 5 scale-independent pixels:

"offset": "0,-5"

The Maps Web Snapshots API ignores the offset property if markerStyle is dot, balloon, or large.

See Also

Essentials