From 8540b2c73c25feb10c1bc7508e68c47cda1fbd8a Mon Sep 17 00:00:00 2001 From: labcode-de Date: Sun, 4 Jun 2017 23:36:58 +0200 Subject: [PATCH] Add Popups --- index.php | 2 +- js/comunitychoose.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 7e9b3a2..3898da8 100644 --- a/index.php +++ b/index.php @@ -76,7 +76,7 @@ if (count($community) == 1) { diff --git a/js/comunitychoose.js b/js/comunitychoose.js index 50d3414..34bd11e 100644 --- a/js/comunitychoose.js +++ b/js/comunitychoose.js @@ -23,6 +23,13 @@ $(document).ready(function() { } }).addTo(map) community.on('click', mapChangeCommunity); + community.bindPopup(i.name) + community.on('mouseover', function (e) { + this.openPopup(); + }); + community.on('mouseout', function (e) { + this.closePopup(); + }); }) }) }); \ No newline at end of file