aboutsummaryrefslogtreecommitdiffstats
path: root/src/popover.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/popover.js')
-rw-r--r--src/popover.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/popover.js b/src/popover.js
index 74e79d6..7080711 100644
--- a/src/popover.js
+++ b/src/popover.js
@@ -23,6 +23,7 @@ import VectorTileLayer from 'ol/layer/VectorTile.js';
import { Popover } from 'bootstrap';
+import { map } from './map.js';
/* return an <a> tag with the given URL and optional text */
const reURL = new RegExp('^https?://', 'i');
@@ -989,13 +990,13 @@ const formatFeaturePropertiesToHTML = function(properties) {
/* Initialize popup overlay with the give map and HTML element */
let popupOverlay = null;
-export const initPopupOverLay = function(map, element) {
+(function() {
popupOverlay = new Overlay({
stopEvent: true,
- element: element,
+ element: document.getElementById('popup'),
});
map.addOverlay(popupOverlay);
-};
+})();
let featureOverlayLayer = null;
let overlayAttributes = [],
@@ -1023,7 +1024,7 @@ export const disposePopover = function() {
};
/* Initialize popover on the given map */
-export const initPopover = function(map) {
+(function() {
featureOverlayLayer = new VectorTileLayer({
zIndex: 65535,
declutter: false,
@@ -1344,4 +1345,4 @@ export const initPopover = function(map) {
document.body.classList.remove('inprogress');
});
});
-};
+})();