Commit 16450111b1e19db5ec6e18e9b7885ecf757dabf4
1 parent
ae5ad01d
Popup Window on map
Showing
2 changed files
with
18 additions
and
5 deletions
Show diff stats
index.php
... | ... | @@ -37,7 +37,7 @@ if (isset($_GET['c'])) { |
37 | 37 | <link rel="stylesheet" href="css/crep.css"> |
38 | 38 | <script type="text/javascript" src="js/jquery.min.js"></script> |
39 | 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 | 41 | <!-- <script type="text/javascript" src="js/whirlpool.min.js"></script> --> |
42 | 42 | <script type="text/javascript" src="js/crep.js"></script> |
43 | 43 | <!-- <script type="text/javascript" src="js/base64.js"></script> --> | ... | ... |
js/crep.js
... | ... | @@ -51,7 +51,7 @@ function loadDoc(location, callback) { |
51 | 51 | dynamiseLinks(mainContainer) |
52 | 52 | pageSpecific(location) |
53 | 53 | mainContainer.animate({ |
54 | - height: "toggle", | |
54 | + // height: "toggle", | |
55 | 55 | opacity: 1 |
56 | 56 | }) |
57 | 57 | console.debug(callback) |
... | ... | @@ -60,7 +60,7 @@ function loadDoc(location, callback) { |
60 | 60 | } |
61 | 61 | var mainContainer = $("#mainContainer") |
62 | 62 | mainContainer.animate({ |
63 | - height: "toggle", | |
63 | + // height: "toggle", | |
64 | 64 | opacity: 0 |
65 | 65 | }, 'fast', events) |
66 | 66 | $.get(location + '?c', function (data) { |
... | ... | @@ -91,8 +91,21 @@ function initializeMap() { |
91 | 91 | } |
92 | 92 | var map = new google.maps.Map(mapCanvas, mapOptions) |
93 | 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 | 102 | map: map, |
96 | 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 | 112 | \ No newline at end of file | ... | ... |