Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

GoogleMap.Class.Api - $map->addMarkerIcon

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
pkvasan
Smarty n00b


Joined: 20 May 2008
Posts: 1

PostPosted: Tue May 20, 2008 5:35 am    Post subject: GoogleMap.Class.Api - $map->addMarkerIcon Reply with quote

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
View user's profile Send private message Send e-mail
eatc7402
Smarty Rookie


Joined: 18 Feb 2008
Posts: 23

PostPosted: Mon Jun 02, 2008 9:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    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