Now Available: Image Annotations on Maps Web Snapshots

Available today, you can now use custom images for annotations on Maps Web Snapshots.

The full list of available annotation styles for Maps Web Snapshots is now:
  • dot (a small circle)

  • balloon (default balloon-style annotation)

  • large (a selected balloon)

  • *NEW* img (your own custom image)

To use:
  1. Specify the images that you want to use in the imgs array. Each item in imgs should be an Image JSON object, which lets you specify parameters like url, height, and width.

  2. Set markerstyle=img on your Annotation object. Use imgIdx to choose an image within imgs for this annotation.

To get the full story on creating static map images to use on websites, in email, and more, check out the Maps Web Snapshots documentation.

Accepted Reply

This issue should now be resolved. Thank you for bringing it up. There have been no changes to the api.

Replies

I was using this custom image for annotation feature and at a sudden it stopped working. Did anything change on API? I looked through the docs and it has no changes.
Custom image annotation are also not working for me.

Setting the markerStyle to 'img':
Code Block
{
point,
color: config.strokeColor,
markerStyle: 'img',
imgIdx: 0,
},

...and even with rendering the image array with a valid PNG:
Code Block
[
{
url: config.logo.url,
height: config.logo.height,
width: config.logo.width,
},
])

...it just ends up defaulting back to the balloon.
  • This example may be of use. Both annotation & imgs are arrays. Check that images are served over https.

    { "annotation": [ {"markerStyle":"img","imgIdx":0,"point":"33.098,-116.66"} ], "imgs": [{"height":25,"width":25,"url":"https://serve/skateboarding.png"} ] }
Add a Comment
This issue should now be resolved. Thank you for bringing it up. There have been no changes to the api.