function initialize() { var mapOptions = { zoom: 15, center: new google.maps.LatLng(48.176231411426590,16.411793231964110), mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); var transitLayer = new google.maps.TransitLayer(); transitLayer.setMap(map); setMarkers(map, beaches); } var beaches = [ ['1 BR - from EUR 0,-/wk',48.176231411426590,16.411793231964110,'
Apartment Sedlitz
Apartment Sedlitz
','mm_20_red'], ['St. Stephen Cathedral',48.208695107793640,16.372128725051880,'
St. Stephen Cathedral
St. Stephen Cathedral
','mm_20_blue'], ['Giant Ferris Wheel',48.216509356334576,16.395485401153564,'
Giant Ferris Wheel
Giant Ferris Wheel
','mm_20_blue'], ['UN Vienna',48.234564072790700,16.415934562683105,'
UN Vienna
UN Vienna
','mm_20_blue'], ['Vienna Opera',48.202839001844630,16.368534564971924,'
Vienna Opera
Vienna Opera
','mm_20_blue'], ['Sch%F6nbrunn Palace',48.184801708052850,16.311607360839843,'
Schönbrunn Palace
Schönbrunn Palace
','mm_20_blue'], ['Vienna Rathaus',48.210832884392396,16.357505321502686,'
Vienna Rathaus
Vienna Rathaus
','mm_20_blue'], ['University of Vienna',48.213392379115630,16.360037326812744,'
University of Vienna
University of Vienna
','mm_20_blue'], ['Vienna Tourism',48.221899277382136,16.375894546508790,'
Vienna Tourism
Vienna Tourism
','mm_20_blue'], ['Reed Messe',48.217338611893666,16.408134698867798,'
Reed Messe
Reed Messe
','mm_20_blue'], ['Subway',48.169462869278600,16.421170234680100,'
Subway
Subway
','23'], ['Subway',48.174671720892500,16.414604187011700,'
Subway
Subway
','23'], ['Subway',48.180309277148800,16.412158012390100,'
Subway
Subway
','23'], ['Subway',48.185202287867300,16.417608261108300,'
Subway
Subway
','23'], ]; function setMarkers(map, locations) { var shadow = new google.maps.MarkerImage('http://viennasapartments.com/images/mm_20_shadow.png', new google.maps.Size(22, 20), new google.maps.Point(0,0), new google.maps.Point(6, 20)); for (var i = 0; i < locations.length; i++) { var beach = locations[i]; var myLatLng = new google.maps.LatLng(beach[1], beach[2]); var image = new google.maps.MarkerImage('http://viennasapartments.com/images/'+beach[4]+'.png', new google.maps.Size(12, 20), new google.maps.Point(0,0), new google.maps.Point(6, 20)); var aptMarker = new google.maps.Marker({ position: myLatLng, map: map, shadow: shadow, icon: image, title: beach[0], content: beach[3] }); var infowindow = new google.maps.InfoWindow({ //content: beach[0] }); google.maps.event.addListener(aptMarker, 'click', function() { infowindow.setContent(this.content); infowindow.open(map,this); }); } } google.maps.event.addDomListener(window, 'load', initialize);