You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to force the selection of a specified feature by one of its properties but I am coming up empty on how to do this. The closest thing I could find was this issue, which I have tried to replicate, but it does not seem to work.
I've tried to make a minimal example here. In the above issue, this code snippet is what seems to make it work:
I have added refs to my <ol-interaction-select> and <ol-source-vector> components, and gotten them in the script via useTemplateRef. It seems though, that vectorLayer.value.layer.features does not exist:
Here is a minimal version of the code that I am using. How can I look up the feature I want from the existing vector layer and then force it to be the selected one?
This is working on the assumption that selectInteractionTemplateRef and vectorLayerTemplateRef are the ref values for the <ol-interaction-select> and the <ol-vector-layer> components, respectively.
It seems that the solution posted by the user in the previous issue that I mentioned in my post is not correct, at least for my case. They were using:
I'm trying to force the selection of a specified feature by one of its properties but I am coming up empty on how to do this. The closest thing I could find was this issue, which I have tried to replicate, but it does not seem to work.
I've tried to make a minimal example here. In the above issue, this code snippet is what seems to make it work:
I have added refs to my
<ol-interaction-select> and <ol-source-vector>
components, and gotten them in the script viauseTemplateRef
. It seems though, thatvectorLayer.value.layer.features
does not exist:Here is a minimal version of the code that I am using. How can I look up the feature I want from the existing vector layer and then force it to be the selected one?
The text was updated successfully, but these errors were encountered: