[OpenLayers-Users] source of an event in openlayers3

Dave Potts dave.potts at pinan.co.uk
Fri Jun 26 10:49:15 PDT 2015


On 26/06/15 07:24, Bart van den Eijnden wrote:
Thanks Bart, its not clear from the name of the group.

I will take the issue to stackoverflow

Dave.
> Hey Dave,
>
> this list is for OpenLayers 2 only. You can post to stackoverflow with 
> the ‘openlayers-3’ tag or use the ol3-dev Google Group for more 
> developer focussed questions.
>
> Best regards,
> Bart
>
> Bart van den Eijnden
> Front End Software Engineer | Boundless <http://boundlessgeo.com/>
> bartvde at boundlessgeo.com <mailto:bartvde at boundlessgeo.com>
> 1-877-673-6436 <tel:917-460-7207>
> @boundlessgeo <http://twitter.com/boundlessgeo/>
>
> <http://boundlessgeo.com>
>
>> On 26 Jun 2015, at 01:15, Dave Potts <dave.potts at pinan.co.uk 
>> <mailto:dave.potts at pinan.co.uk>> wrote:
>>
>> If I define a general purpose event listener in openlayers3 which is 
>> attached to two layers by saying something like
>>
>>
>> map.addInteraction(selectClick selectClickOn('select',function(e){
>>    console.log("Select items" + e.selected.length);
>> }
>>
>> Where
>> var selectClick= new ol.interaction.Select({
>>    condition:ol.events.condition.click
>> });
>>
>> When somebody select something the click handler will be invoke and 
>> the selected object may be accessed from e.selected, is there way 
>> within the event handler of finding out which layer the selected 
>> object comes from?
>>
>> Dave
>> _______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org <mailto:Users at lists.osgeo.org>
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20150626/d1ac07eb/attachment.html>


More information about the Users mailing list