I used this code in API 2 but I can not find equivalent code for API 3. I want to create different colors for markers depending on severity so they are not static values. I have problem how to create GICON, G_DEFAULT_ICON, GSize and addOverlay. If someone tell me how to convert this exact code I will be thankful. I do not want to use micons/color-dot.png because of the specific colors I am using.
var severity = parseFloat(markers[i].getAttribute("severity"));
var severityIcon = new GIcon(G_DEFAULT_ICON);
var color;
if (severity == 0) color = "66FF33";
else if (severity == 1) color = "990099";
else if (severity == 2) color = "00CCFF";
severityIcon.image = "http://www.googlemapsmarkers.com/v1/" + color;
severityIcon.iconSize = new GSize(15, 30);
markerOptions = { icon:severityIcon };
var marker = createMarker(point,label,alarm,markerOptions);
map.addOverlay(marker);