Code to generate this page:

<?php
include_once("../include/GoogleMap.php");
include_once("../include/JSMin.php");

$MAP_OBJECT = new GoogleMapAPI(); $MAP_OBJECT->_minify_js = isset($_REQUEST["min"])?FALSE:TRUE;
$MAP_OBJECT->setDSN("mysql://user:[email protected]/db_name");

$marker_web_location = "http://www.bradwedell.com/phpgooglemapapi/demos/img/";
$default_icon = $marker_web_location."triangle_icon.png";
$blue_icon = $marker_web_location."blue_triangle_icon.png";
$green_icon = $marker_web_location."green_triangle_icon.png";
$yellow_icon = $marker_web_location."yellow_triangle_icon.png";

//SET THE DEFAULT ICON TO USE IN PLACE OF THE DEFAULT GOOGLE PIN
$default_icon_key = $MAP_OBJECT->setMarkerIcon($default_icon);

//ADD THE CUSTOM ICONS TO THE OBJECT WITH CUSTOM ANCHOR & INFO WINDOW ANCHOR X & Y positions.
$blue_icon_key = $MAP_OBJECT->addIcon($blue_icon,$shadow="", 11, 11, 11, 11);
$green_icon_key = $MAP_OBJECT->addIcon($green_icon);
$yellow_icon_key = $MAP_OBJECT->addIcon($yellow_icon);

//Add two markers with the default icon and store their keys (will update one of the marker's icons later)
$default_marker_1 = $MAP_OBJECT->addMarkerByAddress("Denver,CO","Default Marker1","Default Marker1");
$default_marker_2 = $MAP_OBJECT->addMarkerByAddress("Littleton,CO","Default Marker2","This is default marker 2 that was originally initialized with the 'custom' default icon and was changed to a different icon after the marker was already created.");

//Add markers with the custom icons. Note: we still use the filename ( and would use the shadow filename as well if defined) - the keys you see above ($blue_icon_key)are generated by calling the getIconKey function using the filename and shadow filename (if present). The getIconKey function is also called by the addMarkerBy functions, hence the reason that you just need to use the filename. An important thing to note, you cannot have two different "icons" with the same filenames, the class/function just won't let it happen. The other reason that i used filename instead of icon key here is for ambiguity's sake: if an icon has not already been defined with custom x/y positions above, the addMarkerBy... functions will create a new icon using default/calculated XY values.
$blue_marker = $MAP_OBJECT->addMarkerByAddress("Boulder,CO","Blue Marker","Blue Marker",$tooltip="", $blue_icon);
$green_marker = $MAP_OBJECT->addMarkerByAddress("Arvada,CO","Green Marker","Green Marker",$tooltip="", $green_icon);
$yellow_marker = $MAP_OBJECT->addMarkerByAddress("Lakewood,CO","yellow Marker","yellow Marker",$tooltip="", $yellow_icon);

//Update default_marker_2 : this may not be a typical use case, but updating a marker's icon is now possible.
$MAP_OBJECT->updateMarkerIconKey($default_marker_2, $blue_icon_key);


?>
<html>
<head>
<?=$MAP_OBJECT->getHeaderJS();?>
<?=$MAP_OBJECT->getMapJS();?>
</head>
<body>
<?=$MAP_OBJECT->printOnLoad();?>
<?=$MAP_OBJECT->printMap();?>
<?=$MAP_OBJECT->printSidebar();?>
</body>
</html>