[OpenLayers-Users] Select feature on multiple layers works just for one layer

Diego Pasqualin dpasqualin at gmail.com
Tue Dec 6 15:00:20 EST 2011


No clue about what is wrong here? Something to check?

2011/12/5 Diego Pasqualin <dpasqualin at gmail.com>

> Oh, I forgot to put this part of the code, which is run just after the
> previous code:
> ---------------------------8<-------------------------------
> ---------------------------------------
>         entities.layer_office.events.on({
>             'featureselected': function (e) {onFeatureSelect(e.feature,
> entity.map, control)},
>             'featureunselected': function (evt)
> {onFeatureUnselect(evt.feature, entity.map) }
>         });
> ... the same for suburbs.suburbs_layer...
> ---------------------------8<-------------------------------
> ---------------------------------------
>
> So, I create the control with the layers I want, and after that I use the
> layers.events.on to run something when the a feature is selected.
> This is practically the same I saw in some examples. What could be wrong?
>
> 2011/12/3 emmexx <emmexx at tiscalinet.it>
>
>> Il 12/02/2011 01:45 AM, Diego Pasqualin scrisse:
>>
>> > Any suggestion about what I might be doing wrong?
>>
>> Try using eventListeners instead of OnSelect?
>> Or layer.events.on().
>>
>> Bye
>>        maxx
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111207/a48d128b/attachment.html


More information about the Users mailing list