Passing a reactive variable to ol-geom-line-string
coordinate no longer stays in sync with variable.
#387
Labels
bug
Something isn't working
Describe the bug
I have a component that is making use of
<ol-geom-line-string>
e.g.<ol-geom-line-string :coordinates="coordinateArray"></ol-geom-line-string>
passing a ref containing an array of coordinate arrays to theol-geom-line-string
.In the initial versions of our app we had been using Vue3 OpenLayers version
4.0.2
and the reactivity worked as expected. On pushing a new coordinate to the refcoordinateArray
the new values were being reflected in the geom line being extended to match the values in the Vue ref. Now that is not the case.Affected version(s)
Please run
npm list --depth=0 vue vue3-openlayers ol ol-ext ol-contextmenu
and paste the output below:├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
To Reproduce
Steps to reproduce the behavior:
Create a geom-line-string element and pass :coordinate a array of coordinates that has a new coordinate pushed to it as some set interval.
On the map as the reactive variable
coordinateArray
has most coordinates pushed to it they should be shown on the map.Expected behavior
The expected behaviour is that when passed a reactive variable containing coordinates the reactive variable is updated (e.g. additional coordinates are pushed to the array) these updates should be reflected in the map with the geom-line growing, shrinking etc.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: