I can\'t find any documentation or examples for setting a markers colour in version 3.0 API. you could do this with the 2.5, do any one know if marker colour is supported an
As stated in the example in the API Explorer, creating an H.map.Marker
without specifying an icon
results in a default image. If you need to have different colored icons, you will need to create them using SVG Graphics.
function addSVGMarkers(map){
var svgMarkup = ''
// Add the first marker
var parisIcon = new H.map.Icon(
svgMarkup.replace('${COLOR}', 'blue').replace('${TEXT}', 'P')),
parisMarker = new H.map.Marker({lat: 55.5607, lng: 12.9811 },
{icon: parisIcon});
map.addObject(parisMarker);
}
To update the color, just create a new H.map.Icon
replace the icon
attribute of the marker.