thanks for the link ...
But i wonder how i can rewrite the code with this ForEach function.. it's
not the same syntax ? sorry but i'm not very good with javascript.
here is the code :
locations.forEach(function(element, index, array) {
var marker = new GMarker(new GLatLng(element.latitude,
element.longitude), {title: element.name});
map.addOverlay(marker);
GEvent.addListener(marker, 'click', function() {
marker.openInfoWindowHtml('Name: '+element.name+'<br />Latitude:
'+element.latitude+'<br />Longitude: '+element.longitude+'');
});
link = ' # '+element.name+' <br />';
$('p#location_list').append(link);
});
how can i rewrite this to use the ForEach function u've suggested ?
--
View this message in context:
http://www.nabble.com/googlemaps-plugin-with-IE---tf2890722.html#a8076079
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/