|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
pkvasan Smarty n00b
Joined: 20 May 2008 Posts: 1
|
Posted: Tue May 20, 2008 5:35 am Post subject: GoogleMap.Class.Api - $map->addMarkerIcon |
|
|
Hi
iam using GoogleMapAPI.clss.php in one of my application to show some markers from my database(mysql)
i wanted to show different color markers for different points, how do i do that
ho do i use addMarkerIcon() function along with addMarkerByCoords()
Thanks |
|
Back to top |
|
eatc7402 Smarty Rookie
Joined: 18 Feb 2008 Posts: 23
|
Posted: Mon Jun 02, 2008 9:03 pm Post subject: |
|
|
I do it a lot, for example...
Code: | switch ($Placemarker_type) {
case "2-2_alarm":
echo "<b>Do a 2-2 set of icons</b><br>" ;
$map1->addMarkerIcon($two_two_icon,$shadow_icon,20,0,23,10);
$map1->addMarkerByCoords($Lon,$Lat,$Address_to_print, $Address_to_print_HTML);
break;
case "3-3_alarm":
echo "<b>Do a 3-3 set of icons</b><br>" ;
$map1->addMarkerIcon($three_three_icon,$shadow_icon,20,0,23,10);
$map1->addMarkerByCoords($Lon,$Lat,$Address_to_print, $Address_to_print_HTML);
break;
case "4-4_alarm":
echo "<b>Do a 4-4 set of icons</b><br>" ;
$map1->addMarkerIcon($four_four_icon,$shadow_icon,20,09,23,10);
$map1->addMarkerByCoords($Lon,$Lat,$Address_to_print, $Address_to_print_HTML);
break;
case "5-5_alarm":
echo "<b>Do a 5-5 set of icons</b><br>" ;
$map1->addMarkerIcon($five_five_icon,$shadow_icon,20,0,23,10);
$map1->addMarkerByCoords($Lon,$Lat,$Address_to_print, $Address_to_print_HTML);
break;
|
You must equate the $ICONS .jpgs with a full qualfied url on your website.
You can see an example here...
http://www.extraalarm.org/mult_alarm_data/mpls/mpls_extra_alarms_2007_make.php |
|
Back to top |
|
|
|
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
|