Each time you go round the loop, you create a new empty customIcons[]
array.
var customIcons = [];
customIcons["<?php echo $name;?>"] = iconR;
So the last time round the loop, you destroy the previous contents, and
add a single entry. For anything other than that last $name
customIcons[type]
is void so
{icon: customIcons[type]}
gives the default icon.
Try moving this line
var customIcons = [];
before
while($row=mysql_fetch_assoc($result))
so that it only gets created once.
--
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---