Add SelectEvent to Select interaction

Fixes
This commit is contained in:
Björn Harrtell
2015-02-25 19:21:36 +01:00
parent 927a0a4627
commit e4b1d6e1de
3 changed files with 63 additions and 0 deletions

View File

@@ -61,6 +61,11 @@ var changeInteraction = function() {
}
if (select !== null) {
map.addInteraction(select);
select.on('select', function(e) {
$('#status').html(' ' + e.target.getFeatures().getLength() +
' selected features (last operation selected ' + e.selected.length +
' and deselected ' + e.deselected.length + ' features)');
});
}
};