I'm loading markers via the ajax php/mysql tutorial.  When creating my 
markers in the download xml for loop, I'm assigning some custom variable to 
each marker.  Is it possible to update these custom variables in the marker 
objects?

I've tried something like this:

for (i=0;i<markers.length;i++){
if (markers[i].myID == thisID){
var mynewIcon = 'http://www.mydomain.com/newIcon.jpg';
markers[i].setIcon(mynewIcon);
markers[i].otherVariable = newValue;    
// I also tried markers[i].setOptions(otherVariable = newValue;
}
}

When my code executes, the new icon is displayed but the otherVariable value 
is not updated for that marker.  Does anybody know if it is possible to 
dynamically update a custom variable in a marker object?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to