I would like to add a marker with an base64 icon to google maps (with DevExtreme). I try it with the following code:
var img = "data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QAAAAAAAD5Q7t/AAAACW9GRnMAAAAAAAAA4ACEVEUiAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAOElEQVRYw+ 3VQQoAIAgAQf//6XqBhwgpdAa8LwgaAfC5dTlNAk4JKA3I9i1AwJwAd+BJwOhvCJTbFlpB273IBPcAAAAASUVORK5CYII=";
var sContent = "<div id=\"blub\" style=\"width:200px; height:100px;\">" + k.info.title + "</div>";
viewModel.mapMarkers.push({
title: 'test',
tooltip: { text: sContent, isShown: true },
location: mapPosition,
icon: {url: img},
clickAction: function () {
DevExpress.ui.notify("Marker 'C' clicked!", "info", 1000);
}
});
Markers are shown and everything else works fine, but my custom icon isn't shown (it shows still the standard google maps marker icon).
I also tried it with directly icon: img, but it doesn't work either.
Any help would be great! Thank you very much. Best Regards
Found the solution. Must be iconSrc instead of icon.