close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Address Marker Color From Recordset?

Thread began 8/10/2009 3:32 pm by Web Studio West | Last modified 8/14/2009 4:09 pm by Web Studio West | 3050 views | 8 replies

Web Studio West

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

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...