Re: [jQuery] googlemaps plugin with IE ?
Thanks very much, it works.. !! -- View this message in context: http://www.nabble.com/googlemaps-plugin-with-IE---tf2890722.html#a8076808 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] googlemaps plugin with IE ?
vince schreef: > 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 : > > > link = ' # '+element.name+' '; > $('p#location_list').append(link); > }); > > if think if you use function ForEach(array, fn) { for (var n = 0; n < array.length; n++) fn(array[n]); } you have to rewrite it like this ForEach(locations,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+'Latitude: '+element.latitude+'Longitude: '+element.longitude+''); }); -- David Duymelinck [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] googlemaps plugin with IE ?
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+'Latitude: '+element.latitude+'Longitude: '+element.longitude+''); }); link = ' # '+element.name+' '; $('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 discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] googlemaps plugin with IE ?
vince schreef: > > locations.forEach seems to cause problems with IE... > Is there a workaround ? > > thanks in advance > maybe this can help http://www.ejball.com/EdAtWork/CommentView,guid,c2d0f53f-afc7-4831-b60e-f4354ae3f7fa.aspx mozilla is a few versions of javascript ahead of IE, it works in javascript 1.6. so you can pray IE will adopt it soon :) -- David Duymelinck [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] googlemaps plugin with IE ?
Hi, I'm working on the plugin for jquery : http://olbertz.de/jquery/googlemap.html it's really great with firefox.. but it doesn't work in IE... I've made some tests and it seems that the problem comes from this foreach : 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+'Latitude: '+element.latitude+'Longitude: '+element.longitude+''); }); link = ' # '+element.name+' '; $('p#location_list').append(link); }); locations.forEach seems to cause problems with IE... Is there a workaround ? thanks in advance -- View this message in context: http://www.nabble.com/googlemaps-plugin-with-IE---tf2890722.html#a8075824 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/