Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Populate the addMarkerByAddress dynamically

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
rts5678
Smarty n00b


Joined: 08 Aug 2006
Posts: 2

PostPosted: Tue Aug 08, 2006 5:34 pm    Post subject: Populate the addMarkerByAddress dynamically Reply with quote

Hi, I am using the GoogleMapAPI to display maps/directions on an automotive website. However, I am having problems putting data dynamically in the

$map->addMarkerByAddress(populate address dynamically here);

Is there a way I can populate this address dynamically?

Are there any other ways to display map or populate address using pre-existing variables like $address, $state, $zipcode already in my code?

Any help will be appreciated.

Thanks,


Last edited by rts5678 on Wed May 05, 2010 11:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
giggler
Smarty n00b


Joined: 08 May 2007
Posts: 4

PostPosted: Sat May 26, 2007 12:03 am    Post subject: Reply with quote

You first have to connect to DB like usual and set SELECT and all that stuff, then where you have the $map...well this is what I have and it worked for me:

while ($currentrecord < $howmanyrecords)
{
$TITLE = mysql_result($result,$currentrecord,"TITLE");
$IMAGE = mysql_result($result,$currentrecord,"IMAGE");
$OWNER_ADDRESS = mysql_result($result,$currentrecord,"OWNER_ADDRESS");
$OWNER_CITY = mysql_result($result,$currentrecord,"OWNER_CITY");
$OWNER_STATE = mysql_result($result,$currentrecord,"OWNER_STATE");
$OWNER_ZIPCODE = mysql_result($result,$currentrecord,"OWNER_ZIPCODE");
$OWNER_TELEPHONE = mysql_result($result,$currentrecord,"OWNER_TELEPHONE");
$URL = mysql_result($result,$currentrecord,"URL");
// create some map markers
$map->addMarkerByAddress("$OWNER_ADDRESS $OWNER_CITY $OWNER_STATE $OWNER_ZIPCODE","$TITLE","<b>$TITLE</b>");
$currentrecord++;
}
_________________
http://www.tagacloud.com/?id=3072
http://www.linkwebdirectory.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP