function initialize() { var mapOptions = { zoom: 15, center: new google.maps.LatLng(48.216128680642350,16.310091912746430), 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.216128680642350,16.310091912746430,'
Apartment Degen Blume
Apartment Degen Blume
','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'], ['Tramway Station',48.223636226514756,16.315051317214966,'
Tramway Station
Tramway Station
','27'], ['Police',48.222628374319235,16.314568519592285,'
Police
Police
','19'], ['S-Bahn',48.223321721576720,16.314976215362550,'
S-Bahn
S-Bahn
','32'], ['ATM',48.223807773848286,16.314182281494140,'
ATM
ATM
','2'], ['Trafik',48.223135876841376,16.317304372787476,'
Trafik
Trafik
','26'], ['Subway Station',48.211862417203214,16.311264038085938,'
Subway Station
Subway Station
','23'], ['Bus Station',48.221155873734340,16.320855617523193,'
Bus Station
Bus Station
','33'], ['ATM',48.221170170060134,16.321585178375244,'
ATM
ATM
','2'], ['ATM',48.221170170060134,16.321585178375244,'
ATM
ATM
','2'], ['Supermarket',48.222771333285250,16.313281059265137,'
Supermarket
Supermarket
','24'], ['Supermarket',48.222671262050966,16.318838596343994,'
Supermarket
Supermarket
','24'], ['Pizzeria',48.222213791060030,16.316564083099365,'
Pizzeria
','22'], ['Restaurant',48.222971475166870,16.316049098968506,'
Restaurant
','22'], ['Beisl',48.222914291851970,16.318109035491943,'
Beisl
','5'], ['Gas Station',48.223285982256925,16.315641403198242,'
Gas Station
','31'], ['Subway',48.204471874541300,16.308679210585900,'
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);