hello,
when loading 6000+ markers on a map, each one has a click-listener
with individual data (i.e. a numeric id and a string), what would be
the best approach, performance-wise:
to assign the data within the listener individualy, e.g.
var id = ...
var title = ...
google.maps.event.addListener(Marker, 'click', function() {
alert("data: " + id + ", " + title);
});
or register the data as a property in the marker and assign the
listener like this:
Marker.id = ...
Maker.title = ...
google.maps.event.addListener(Marker, 'click', function() {
alert("data: " + this.id + ", " + this.title);
});
does it make a difference?
thx, uno
--
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.