From 16450111b1e19db5ec6e18e9b7885ecf757dabf4 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Wed, 4 Mar 2015 00:17:01 +0100 Subject: [PATCH] Popup Window on map --- index.php | 2 +- js/crep.js | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index edd8302..18a34a2 100755 --- a/index.php +++ b/index.php @@ -37,7 +37,7 @@ if (isset($_GET['c'])) { - + diff --git a/js/crep.js b/js/crep.js index 2679c65..1357e12 100755 --- a/js/crep.js +++ b/js/crep.js @@ -51,7 +51,7 @@ function loadDoc(location, callback) { dynamiseLinks(mainContainer) pageSpecific(location) mainContainer.animate({ - height: "toggle", + // height: "toggle", opacity: 1 }) console.debug(callback) @@ -60,7 +60,7 @@ function loadDoc(location, callback) { } var mainContainer = $("#mainContainer") mainContainer.animate({ - height: "toggle", + // height: "toggle", opacity: 0 }, 'fast', events) $.get(location + '?c', function (data) { @@ -91,8 +91,21 @@ function initializeMap() { } var map = new google.maps.Map(mapCanvas, mapOptions) var marker = new google.maps.Marker({ - position: polytechPos, + place: { + location: polytechPos, + query: "Polytech Lille" + }, + attribution: { + source: "Coupe de Robotique des Écoles Primaires", + webUrl: window.location.host + }, map: map, title: "Polytech Lille" - }); + }) + var infowindow = new google.maps.InfoWindow({ + content: "Polytech Lille
Lieux des évènements de la Coupe de Robotique des Écoles Primaires" + }) + marker.addListener('click', function () { + infowindow.open(map, this) + }) } \ No newline at end of file -- libgit2 0.21.2