aboutsummaryrefslogtreecommitdiffstats
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/index.html b/index.html
index a5b9696..3ef1da3 100644
--- a/index.html
+++ b/index.html
@@ -40,6 +40,17 @@
zoom: 16
})
});
+
+ var select_click = new ol.interaction.Select({
+ condition: ol.events.condition.click
+ });
+ select_click.on('select', function(e) {
+ if (e.selected.length) {
+ var feature = e.selected[0];
+ }
+ });
+
+ map.addInteraction(select_click);
</script>
</body>
</html>