jmorley | 11 Jun 2012 02:23
Picon
Picon
Favicon
Gravatar

Re: GWT SelectFeature.select() method no longer available?


jamarks wrote
> 
> I want to programmatically select features using GWT.  It appears there
> had been a SelectFeature.select(VectorFeature) method, but that maybe it
> no longer exists.  I haven't been able to find any discussion confirming
> or refuting this.  
> 
> If there is a supported way of programmatically selecting a feature, I'd
> love to hear about it.
> 
> Jett
> 

I haven't found any reply to this, or confirmation on the web of whether
SelectFeatures.select() should work in v2.11. In an experiment it didn't
seem to work but this was in the middle of a complex application and maybe I
had something else wrong.

What's the best way of programmatically selecting a feature in a layer,
please?

Thanks,
Jeremy

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GWT-SelectFeature-select-method-no-longer-available-tp3969860p4980263.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Jorge Gaspar Sanz Salinas | 11 Jun 2012 11:47
Favicon
Gravatar

Re: GWT SelectFeature.select() method no longer available?

On 11 June 2012 02:23, jmorley <jeremy.morley@...> wrote:
>
> jamarks wrote
>>
>> I want to programmatically select features using GWT.  It appears there
>> had been a SelectFeature.select(VectorFeature) method, but that maybe it
>> no longer exists.  I haven't been able to find any discussion confirming
>> or refuting this.
>>
>> If there is a supported way of programmatically selecting a feature, I'd
>> love to hear about it.
>>
>> Jett
>>
>
> I haven't found any reply to this, or confirmation on the web of whether
> SelectFeatures.select() should work in v2.11. In an experiment it didn't
> seem to work but this was in the middle of a complex application and maybe I
> had something else wrong.
>
> What's the best way of programmatically selecting a feature in a layer,
> please?
>
> Thanks,
> Jeremy
>
>

Hi Jeremy, I've tried this on the Select example[1],

(Continue reading)

Jorge Gaspar Sanz Salinas | 11 Jun 2012 11:58
Favicon
Gravatar

Re: GWT SelectFeature.select() method no longer available?

On 11 June 2012 11:47, Jorge Gaspar Sanz Salinas <jsanz@...> wrote:
> On 11 June 2012 02:23, jmorley <jeremy.morley@...> wrote:
>>
>> jamarks wrote
>>>
>>> I want to programmatically select features using GWT.  It appears there
>>> had been a SelectFeature.select(VectorFeature) method, but that maybe it
>>> no longer exists.  I haven't been able to find any discussion confirming
>>> or refuting this.
>>>
>>> If there is a supported way of programmatically selecting a feature, I'd
>>> love to hear about it.
>>>
>>> Jett
>>>
>>
>> I haven't found any reply to this, or confirmation on the web of whether
>> SelectFeatures.select() should work in v2.11. In an experiment it didn't
>> seem to work but this was in the middle of a complex application and maybe I
>> had something else wrong.
>>
>> What's the best way of programmatically selecting a feature in a layer,
>> please?
>>
>> Thanks,
>> Jeremy
>>
>>
>
> Hi Jeremy, I've tried this on the Select example[1],
(Continue reading)

jmorley | 17 Jun 2012 00:41
Picon
Picon
Favicon
Gravatar

Re: GWT SelectFeature.select() method no longer available?

Thanks Jorge.

The example you give works fine for me, but it doesn't translate onto the
site I'm working on.

As far as I can see, when I do the programmatic selection, the feature in
the layer becomes selected (it appears in the selected property for the
layer). However the feature itself doesn't seem to be redrawn with the
"selected" style. This style is definitely defined as manual selection with
a mouse click on a feature toggles the style between the "default" and
"selected" styles. I've tried adding a layer redraw but this doesn't help.

It's quite a complex site so it's difficult to extract example code.

Does it matter that my vector layer is from WFS rather than sketched
vectors?

I'll try putting a test app together to share but any ideas in the meantime
would be welcome.

Jeremy

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GWT-SelectFeature-select-method-no-longer-available-tp3969860p4981911.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
jmorley | 17 Jun 2012 01:54
Picon
Picon
Favicon
Gravatar

Re: GWT SelectFeature.select() method no longer available?


Got it - it was my problem. The features were being selected but all of them
were buried under other features and so the selection couldn't be seen until
I turned down the opacity of the stack of features.

On a separate question though: when I have multiple overlapping features in
a layer with an associated selectfeature control and I click on a point,
only one feature seems to be selected (even when the "multiple" option has
been set for the control) rather than all the features in the layer
overlapping the point of the click. Can this behaviour be easily changed to
select -all- the features at the point?

Thanks.
Jeremy Morley

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GWT-SelectFeature-select-method-no-longer-available-tp3969860p4981915.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

Gmane