ToastFreeware
/
philipp
/
winterrodeln
/
mediawiki_extensions
/
wrmap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11a383d
)
Popup works again.
author
Philipp Spitzer
<philipp@spitzer.priv.at>
Sat, 2 Jan 2021 14:21:33 +0000
(15:21 +0100)
committer
Philipp Spitzer
<philipp@spitzer.priv.at>
Sat, 2 Jan 2021 14:21:33 +0000
(15:21 +0100)
wrmap.js
patch
|
blob
|
history
diff --git
a/wrmap.js
b/wrmap.js
index 72d48ad1b9bb1403efb5c7b16b8b24598d62aa80..878b70982faa1cec46f186d855b6d901e2ca8a63 100644
(file)
--- a/
wrmap.js
+++ b/
wrmap.js
@@
-384,8
+384,12
@@
function init_wrmap(i, jq_map) {
});
map.addInteraction(select_click);
select_click.on('select', function(event) {
- popup_content.innerHTML = '<p>You clicked</p>';
- popup_overlay.setPosition(event.coordinate);
+ if (event.selected.length > 0) {
+ let feature = event.selected[0];
+ let coordinates = feature.getGeometry().getCoordinates();
+ popup_content.innerHTML = '<p>You clicked</p>';
+ popup_overlay.setPosition(coordinates);
+ }
});
/*