Template:Team:Aachen/MeetupMap1.js

From 2014.igem.org

(Difference between revisions)
 
Line 54: Line 54:
   google.maps.event.addListener(marker_couvenhalle, 'click', function() {
   google.maps.event.addListener(marker_couvenhalle, 'click', function() {
-
     iwcouven.open(map,marker);
+
     iwcouven.open(map,marker_couvenhalle);
   });
   });
   google.maps.event.addListener(marker_bus13, 'click', function() {
   google.maps.event.addListener(marker_bus13, 'click', function() {
-
     iw13.open(map,marker);
+
     iw13.open(map,marker_bus13);
   });
   });
   google.maps.event.addListener(marker_bus3, 'click', function() {
   google.maps.event.addListener(marker_bus3, 'click', function() {
-
     iw3.open(map,marker);
+
     iw3.open(map,marker_bus3);
   });
   });
   google.maps.event.addListener(marker_busx3, 'click', function() {
   google.maps.event.addListener(marker_busx3, 'click', function() {
-
     iwx3.open(map,marker);
+
     iwx3.open(map,marker_busx3);
   });
   });

Latest revision as of 21:27, 5 September 2014

function initialize() {

 var llcouven = new google.maps.LatLng(50.776525,6.07854);
 var ll13 = new google.maps.LatLng(50.777488,6.078368);
 var ll3 = new google.maps.LatLng(50.779944,6.075279);
 var llx3 = new google.maps.LatLng(50.779415,6.081802);

var llcenter = new google.maps.LatLng(50.778899,6.078283);

 var mapOptions = {
   zoom: 16,
   center: llcenter
 }
 var map = new google.maps.Map(document.getElementById('map-couvenhalle'), mapOptions);
 var marker_couvenhalle = new google.maps.Marker({
     position: llcouven,
     map: map,
     title: 'Couvenhalle'
 });
 var marker_bus13 = new google.maps.Marker({
     position: ll13,
     map: map,
     title: 'Bus Stop: Technische Hochschule'
 });
 var marker_bus3 = new google.maps.Marker({
     position: ll3,
     map: map,
     title: 'Bus Stop: Audimax'
 });
 var marker_busx3 = new google.maps.Marker({
     position: llx3,
     map: map,
     title: 'Bus Stop: Driescher Gässchen'
 });


var iwcouven = new google.maps.InfoWindow({

     content: 'Couvenhalle'
 });

var iw13 = new google.maps.InfoWindow({

     content: 'Bus Stop: Technische Hochschule'
 });

var iw3 = new google.maps.InfoWindow({

     content: 'Bus Stop: Audimax'
 });

var iwx3 = new google.maps.InfoWindow({

     content: 'Bus Stop: Driescher Gässchen'
 });
 google.maps.event.addListener(marker_couvenhalle, 'click', function() {
   iwcouven.open(map,marker_couvenhalle);
 });
 google.maps.event.addListener(marker_bus13, 'click', function() {
   iw13.open(map,marker_bus13);
 });
 google.maps.event.addListener(marker_bus3, 'click', function() {
   iw3.open(map,marker_bus3);
 });
 google.maps.event.addListener(marker_busx3, 'click', function() {
   iwx3.open(map,marker_busx3);
 });

}

google.maps.event.addDomListener(window, 'load', initialize);