Hello friends,
I am having a hard time handling this.
I have a google api class downloaded from somewhere and it works fine on a page which has to call the map only once. it shows properly.
the problem occurs when I have to call the map in a loop. I need this map to appear in a loop where it has to print it several times on the page. in that case, it just loads it once on first record, but doesn't load it in the rest of the records.
I call the map class like this which works for single placement
$map = new GoogleMapAPI('map');
$map->setAPIKey('MYAPIKEY');
$ven_name = 'PLACENAME';
$mapaddress = 'MYADDRESS';
$map->addMarkerByAddress($ven_name.' '.$mapaddress,'<b>'.$ven_name.'</b>'.$mapaddress);
$map->printHeaderJS();
$map->printMapJS();
$map->printMap();
so when I call the whole code above in a WHILE or FOR loop, it doesn't load except the first record.
the class code is really the base code which I never modify or touch. but if the class is needed for better understanding, let me know, I can post it too.
Thanks a lot for helping out.