Commit 16450111b1e19db5ec6e18e9b7885ecf757dabf4

Authored by Geoffrey PREUD'HOMME
1 parent ae5ad01d

Popup Window on map

Showing 2 changed files with 18 additions and 5 deletions   Show diff stats
@@ -37,7 +37,7 @@ if (isset($_GET['c'])) { @@ -37,7 +37,7 @@ if (isset($_GET['c'])) {
37 <link rel="stylesheet" href="css/crep.css"> 37 <link rel="stylesheet" href="css/crep.css">
38 <script type="text/javascript" src="js/jquery.min.js"></script> 38 <script type="text/javascript" src="js/jquery.min.js"></script>
39 <script type="text/javascript" src="js/bootstrap.min.js"></script> 39 <script type="text/javascript" src="js/bootstrap.min.js"></script>
40 - <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js"></script> 40 + <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script>
41 <!-- <script type="text/javascript" src="js/whirlpool.min.js"></script> --> 41 <!-- <script type="text/javascript" src="js/whirlpool.min.js"></script> -->
42 <script type="text/javascript" src="js/crep.js"></script> 42 <script type="text/javascript" src="js/crep.js"></script>
43 <!-- <script type="text/javascript" src="js/base64.js"></script> --> 43 <!-- <script type="text/javascript" src="js/base64.js"></script> -->
@@ -51,7 +51,7 @@ function loadDoc(location, callback) { @@ -51,7 +51,7 @@ function loadDoc(location, callback) {
51 dynamiseLinks(mainContainer) 51 dynamiseLinks(mainContainer)
52 pageSpecific(location) 52 pageSpecific(location)
53 mainContainer.animate({ 53 mainContainer.animate({
54 - height: "toggle", 54 + // height: "toggle",
55 opacity: 1 55 opacity: 1
56 }) 56 })
57 console.debug(callback) 57 console.debug(callback)
@@ -60,7 +60,7 @@ function loadDoc(location, callback) { @@ -60,7 +60,7 @@ function loadDoc(location, callback) {
60 } 60 }
61 var mainContainer = $("#mainContainer") 61 var mainContainer = $("#mainContainer")
62 mainContainer.animate({ 62 mainContainer.animate({
63 - height: "toggle", 63 + // height: "toggle",
64 opacity: 0 64 opacity: 0
65 }, 'fast', events) 65 }, 'fast', events)
66 $.get(location + '?c', function (data) { 66 $.get(location + '?c', function (data) {
@@ -91,8 +91,21 @@ function initializeMap() { @@ -91,8 +91,21 @@ function initializeMap() {
91 } 91 }
92 var map = new google.maps.Map(mapCanvas, mapOptions) 92 var map = new google.maps.Map(mapCanvas, mapOptions)
93 var marker = new google.maps.Marker({ 93 var marker = new google.maps.Marker({
94 - position: polytechPos, 94 + place: {
  95 + location: polytechPos,
  96 + query: "Polytech Lille"
  97 + },
  98 + attribution: {
  99 + source: "Coupe de Robotique des Écoles Primaires",
  100 + webUrl: window.location.host
  101 + },
95 map: map, 102 map: map,
96 title: "Polytech Lille" 103 title: "Polytech Lille"
97 - }); 104 + })
  105 + var infowindow = new google.maps.InfoWindow({
  106 + content: "<strong>Polytech Lille</strong><br/>Lieux des évènements de la Coupe de Robotique des Écoles Primaires"
  107 + })
  108 + marker.addListener('click', function () {
  109 + infowindow.open(map, this)
  110 + })
98 } 111 }
99 \ No newline at end of file 112 \ No newline at end of file