|
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 |
eatc7402 Smarty Rookie
Joined: 18 Feb 2008 Posts: 23
|
Posted: Fri Feb 29, 2008 9:41 pm Post subject: addMarkerIcon() - Confused about proper way to use? |
|
|
Heres a small portion of code I use inside a loop
of database records. It works FINE.
Code: |
if ($Add_placemark == TRUE) {
$map1->addMarkerByCoords($Lon,$Lat,$Address_to_print, $Address_to_print_HTML);
} ;
|
It adds each icon, just like clockwork. BUT...
I wanted to different colored icons and shadow icons
for certain cases. Just as a test i added this code..
Code: |
$n_s_icon = "http://maps.google.com/mapfiles/kml/paddle/red-circle.png/red-circle.png" ;
$e_w_icon = "http://maps.google.com/mapfiles/kml/paddle/red-circle.png/blu-circle.png" ;
$shadow_icon ="http://maps.google.com/mapfiles/kml/paddle/red-circle.png/ylw-circle.png" ;
if ($Add_placemark == TRUE) {
$map1->addMarkerIcon($n_s_icon,$shadow_icon,$Lon,$Lat,10,10);
$map1->addMarkerByCoords($Lon,$Lat,$Address_to_print, $Address_to_print_HTML);
} ; |
But this code does not work.f I comment out the
addMarkerByCoords()
it still does not work.
Is the addMarkerIcon supposed to REPLACE the
addMarkerByCoords()?? And if so how do you still
use the customizable HTML for the placemark
baloon.
The bottom line is I would like to just change the
icons for certain records, but can't seem to figure out the proper way to use the function.
eatc7402 |
|
Back to top |
|
eatc7402 Smarty Rookie
Joined: 18 Feb 2008 Posts: 23
|
Posted: Fri Feb 29, 2008 11:14 pm Post subject: |
|
|
Well, I think I have it figured iout - partially.
I was confusing the X-Y coords of the ICON with
the X-Y coords of the icons placement. I changed this
Code: | $map1->addMarkerIcon($n_s_icon,$shadow_icon,$lat,$lon,10,10);
|
to this
Code: | $map1->addMarkerIcon($n_s_icon,$shadow_icon,0,0,10,10);
|
and that seems to work.
Can I get an explanation of the SHADOW ICON
though. Is it indeed an offset icon to act as a SHADOW....
or (as I was hoping) a ROLLOVER ICON that would
appear as you moved your mouse over it. Because I
cannot seem to get it to 'switch' icons on a rollover.
Is there another parameter that must be set in
order for a 'rollover' to occur??
eatc7402 |
|
Back to top |
|
eatc7402 Smarty Rookie
Joined: 18 Feb 2008 Posts: 23
|
Posted: Sat Mar 01, 2008 9:28 pm Post subject: |
|
|
I cannot get the 'shadow icon' to ever 'show up',
or do whatever its supposed to do.
I have no clue what its supposed to do. I assume its
worth the processing time needed to load it. But I
also assume it is supposed to be visible under SOME
condition.
QUESTIONS.
1. What is the intended purpose of the SHADOW
ICON?
2. WHEN is the shadow icon supposed to show up?
The function IS WORKING because I can see the icon
it generate, including CHANGING it and viewing
a differnet icon. It's the extra shadow icon
that does not seem to be getting generated.
Thanks.
eatc7402 |
|
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
|