One way would be to store the HTML in a marker Property rather than
holding it with Function Closure.
function createMarker(point,html) {
var marker = new GMarker(point);
marker.Html = html; // store the html in a Property
GEvent.addListener(marker,"click",function() {
marker.openInfoWindowHtml(marker.Html); // Use the stored html
});
gmarkers.push(marker);
}
Then at any time in your code you can change the stored information
gmarkers[3].Html = "New text for marker 3";
Javascript allows you to add your own Properties to Objects. I recommend
avoiding property names that start with lower case letters, because
there's a slight possibility that they might clash with a Property name
used in the Google code of some future API release.
--
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
-~----------~----~----~----~------~----~------~--~---