Maps API for JavaScript Developer's Guide

Class Summary

This class provides a visual representation of a

[ For full details, see the Class Details ]

Class Description

This class provides a visual representation of a

An instance of DomIcon needs to be created with a DOM element. The DOM element works as a template for the visual representation of the marker, which allows a single DomIcon to be reused in multiple DomMarkers. The provided DOM node is cloned and rendered every time the marker reaches (is visible within) the map view port, therefore any previously attached event listeners do not execute. If listeners for the DOM node are needed, please add them in the onAttach callback where the currently displayed clone reference is available. The cloned node listeners can be removed in the onDetach callback.

The onAttach and onDetach callbacks can be provided to the icon by using


var domElement = document.createElement('div'); = '20px'; = '20px'; = 'blue';

function changeOpacity(evt) { = 0.8;

var domIcon = new, {
  onAttach: function(clonedElement, domIcon, domMarker) {
  clonedElement.addEventListener('mouseover', changeOpacity);
  onDetach: function(clonedElement, domIcon, domMarker) {
  clonedElement.removeEventListener('mouseover', changeOpacity);

Constructor Details, opt_options)

{!(Element | string)}
The element or markup to use for this icon
{} [optional]
An object containing configuration properties
if invalid element is specified.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on