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:
eb87fe1
)
Use "Select" interaction for selecting features.
author
Philipp Spitzer
<philipp@spitzer.priv.at>
Sat, 2 Jan 2021 13:53:19 +0000
(14:53 +0100)
committer
Philipp Spitzer
<philipp@spitzer.priv.at>
Sat, 2 Jan 2021 13:53:19 +0000
(14:53 +0100)
wrmap.js
patch
|
blob
|
history
diff --git
a/wrmap.js
b/wrmap.js
index b52b51119844b60adbb27fcc08ae8ce1bd10c560..1aa99268cb58375d07c1d417f118218dbbc6675e 100644
(file)
--- a/
wrmap.js
+++ b/
wrmap.js
@@
-363,7
+363,12
@@
function init_wrmap(i, jq_map) {
style: style_function_selected,
});
map.addInteraction(select_hover);
- map.on('singleclick', function(event) {
+
+ var select_click = new ol.interaction.Select({
+ condition: ol.events.condition.click,
+ });
+ map.addInteraction(select_click);
+ select_click.on('select', function(event) {
popup_content.innerHTML = '<p>You clicked</p>';
popup_overlay.setPosition(event.coordinate);
});