Use a createMarker() function to create your markers. Use that function
to hold Function Closure on any variables that you might want to use in
the callback function.
function createMarker(point, foo) {
var thismarker = new GMarker(point);
var bar = ...;
GEvent.addListener(thismarker, "click", function() {
change_row_style(thismarker, foo, bar, point);
});
}
var marker37 = createMarker(new GLatLng(...), "baz");
Any local variables of the createMarker() function [like "thismarker"
and "bar"] and its parameters [like "point" and "foo"] are held with
Function Closure and can be passed to change_row_style().
More information than you probably want to know about Function Closure
here: http://econym.org.uk/gmap/closure.htm
--
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
-~----------~----~----~----~------~----~------~--~---