Address Marker Color From Recordset?
I'd like different color address markers (pins) on the map. I'm trying to pull the image file name from the data recordset. I created the map using the color Pacifica. Then replaced "pacifica" in the code with the recordset binding. Pins are shown on the map but only in one color. Help! Here's my code:
var icon_0 = new GIcon();
icon_0.image = 'google_javascript/images/traditionalflat_<?php echo $row_rsMap['proptype']; ?>.png';
icon_0.shadow = 'google_javascript/images/traditionalflat_shadow.png';
icon_0.iconSize = new GSize(34,35);
icon_0.shadowSize = new GSize(34,35);
icon_0.iconAnchor = new GPoint(9,33);
icon_0.infoWindowAnchor = new GPoint(19,0);
icon_0.printImage = 'google_javascript/images/traditionalflat_<?php echo $row_rsMap['proptype']; ?>.gif';
icon_0.mozPrintImage = 'google_javascript/images/traditionalflat_<?php echo $row_rsMap['proptype']; ?>_mozprint.png';
icon_0.printShadow = 'google_javascript/images/traditionalflat_shadow.gif';
icon_0.transparent = 'google_javascript/images/traditionalflat_<?php echo $row_rsMap['proptype']; ?>_transparent.png';
<?php $rsMap_id = 0; ?>
<?php do { ?>
var address_0_<?php echo $rsMap_id; ?> = {
street: '<?php echo str_replace("'", "\'", "".$row_rsMap['address'] .""); ?>',
city: '<?php echo str_replace("'", "\'", "".$row_rsMap['city'] .""); ?>',
state: '',
zip: '',
country: '',
infowindow: 'custom',
infowindowtext: '<span style="font: 10px Verdana, Arial, Helvetica, sans-serif; color: black;"><?php echo str_replace("'", "\'", "Property ID: ".$row_rsMap['propertyid'] ."<br />Type: ".$row_rsPropCat['propcategory'] ."<br />Location: ".$row_rsMap['city'] .", ".$row_rsMap['state'] ."<br />Status: ".$row_rsMap['status'] ."<br />Loan Amount: ".$row_rsMap['loanamt'] ."<br />".$row_rsMap['sqftunits'] ."<br />Call 480-634-8596 to speak to an ORION <br />representative regarding this opportunity."); ?></span>',
full: '<?php echo str_replace("'", "\'", "".$row_rsMap['address'] .""); ?>, <?php echo str_replace("'", "\'", "".$row_rsMap['city'] .""); ?>',
isdefault: true,
addressType: 'address',
loop: 'rsMap',
latitude: '',
longitude: '',
markerStyle: 'Google Traditional (flat)',
markerColor: '<?php echo $row_rsMap['proptype']; ?>'
};
Thanks, Gary