javascript - Openlayers 3 Is it possible to have multiple select interactions? -
i had reason use 2 different select interactions on same map, , surprised find event handler latest applied select interaction 1 fires.
both of these select interactions using default condition, click.
is there way make them both trigger??
hm, im using 2 select interactions , dont have problem. added 1 react on pointermove (like hover) , 1 click , both select interaction firing. aware 'name' them different. naming wrong, created/initialise 2 different vars
//select interaction working on click var selectclick = new ol.interaction.select({ condition: ol.events.condition.click, layers: [layer] }); // select interaction working on "pointermove" var selectpointermove = new ol.interaction.select({ condition: ol.events.condition.pointermove, layers: [layer] }); map.addinteraction(selectclick); map.addinteraction(selectpointermove);
Comments
Post a Comment