function initialize() { var pyrmont = new google.maps.LatLng(53.780082, 20.491012); var map = new google.maps.Map(document.getElementById('map'), { center: pyrmont, zoom: 14, scrollwheel: false, styles: [ {stylers: [{saturation: -100}]} ] }); var markersInfo = [ { title: 'A.H.U. BARTEX', position: [53.780082, 20.491012], content: 'A.H.U. BARTEX
Olsztyn, ul. Kościuszki 43
NIP 739-010-40-81

tel. 535 25 00/07
mail: bartex@bartex.pl' }, { title: 'BARTEX CENTRUM KOPII', position: [53.778951, 20.478188], content: 'BARTEX CENTRUM KOPII
ul. 11 Listopada 7a, Olsztyn
(wzw. D.H. INKA)

tel: 527 74 21
mail: xero@bartex.pl' } ]; var markers = []; for(var i in markersInfo) { markers.push([ new google.maps.Marker({ id: i, title: markersInfo[i].title, map: map, position: new google.maps.LatLng(markersInfo[i].position[0], markersInfo[i].position[1]), animation: google.maps.Animation.DROP, icon: new google.maps.MarkerImage('http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|616161') }), new google.maps.InfoWindow({ content: markersInfo[i].content }) ]); } for(var m in markers){ markers[m][0].addListener('click', function() { markers[this.id][1].open(map, this); }); } } google.maps.event.addDomListener(window, 'load', initialize);