openlayers 3 - Openlayers3 clicking outside feature deselects all features -


i continue using default toggle options of interaction.select, user can have 1 feature selected @ time. however, when user clicks outside of feature, not want remove selected feature. there way achieve this? thank in advance.

i able solve problem following...

var select = new ol.interaction.select({             style: vm.selectedfeaturestyle,             condition: function (event) {                 if (event.type === 'singleclick') {                     return vm.map.foreachfeatureatpixel(event.pixel, function () {                         return true;                     });                 }                 return false;             }         }); 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -