summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-09-17 14:22:20 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-09-17 14:22:20 +0100
commit51840747236ae5b43e05cb3fd9bc3a16e16a20fb (patch)
treeba836fb5cbc6200b399857c138bd865337f23ac9 /src
parent7ce760afa408e690e862a3bcfdfdefcde3675224 (diff)
downloadleaflet-soton-51840747236ae5b43e05cb3fd9bc3a16e16a20fb.tar
leaflet-soton-51840747236ae5b43e05cb3fd9bc3a16e16a20fb.tar.gz
Fix show and close info
Also modify the full example such that this cannot happen again.
Diffstat (limited to 'src')
-rw-r--r--src/leaflet-soton.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js
index 4f08e9f..90ba947 100644
--- a/src/leaflet-soton.js
+++ b/src/leaflet-soton.js
@@ -952,6 +952,8 @@ SELECT * WHERE {\
},
showInfo: function(content, latlng, options) {
+ var map = this;
+
options = options || {};
options.maxWidth = map.getContainer().offsetWidth;
@@ -966,6 +968,8 @@ SELECT * WHERE {\
popup.openOn(map);
},
closeInfo: function() {
+ var map = this;
+
if (map._popup) {
map.closePopup(map._popup);
}