var map; function initialize() { var myLatLng=new google.maps.LatLng(32.927514, 35.641408); var mapOptions = { zoom: 10, center: myLatLng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var image = 'https://www.zimmerland.co.il/webimages/waze_icon2.png'; var markers=new Array(); window.setTimeout(function(){markers[411].infowindow.open(map,markers[411]);},1000); } google.maps.event.addDomListener(window, 'load', initialize);