From 568e4e8e1b90a6deccfa32d73b41c3720c870d4f Mon Sep 17 00:00:00 2001 From: arihant1456 Date: Sat, 15 Jun 2019 15:56:15 +0530 Subject: [PATCH 1/3] popup in map should autoclose within 2 secs or so #31 --- arduino.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arduino.html b/arduino.html index 5d8e853..9bee3e9 100644 --- a/arduino.html +++ b/arduino.html @@ -776,8 +776,27 @@ ); marker.bindPopup(popup); + mymap.on('popupopen', function() { + setTimeout(function() { + marker.closePopup(); + }, 2000); + }); + + marker.openPopup(); marker.on("mouseover", function(e) { this.openPopup(); }); + + $(document).click(function(e){ + if ($(e.target).is('#map,#map *')) { + return; + } + else + { + //Perform your event operations + marker.closePopup(); + } + }); + From d8223f289b5534dee3e3d5b96b995e3956f89e3b Mon Sep 17 00:00:00 2001 From: arihant1456 Date: Sat, 15 Jun 2019 16:01:35 +0530 Subject: [PATCH 2/3] popup in map should autoclose within 2 secs or so #31 --- arduino.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arduino.html b/arduino.html index 9bee3e9..bf0c04e 100644 --- a/arduino.html +++ b/arduino.html @@ -779,7 +779,7 @@ mymap.on('popupopen', function() { setTimeout(function() { marker.closePopup(); - }, 2000); + }, 2000); }); marker.openPopup(); From 1aba7d684ab32a686b595c39032e9885a4ea21ca Mon Sep 17 00:00:00 2001 From: arihant1456 Date: Sat, 15 Jun 2019 16:05:38 +0530 Subject: [PATCH 3/3] popup in map should autoclose within 2 secs or so #31 --- arduino.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arduino.html b/arduino.html index bf0c04e..6e612e1 100644 --- a/arduino.html +++ b/arduino.html @@ -788,15 +788,13 @@ }); $(document).click(function(e){ - if ($(e.target).is('#map,#map *')) { + if ($(e.target).is('#map,#map *')){ return; } - else - { + else{ //Perform your event operations marker.closePopup(); } }); -