ghettovoice / vuelayers

Web map Vue components with the power of OpenLayers
https://vuelayers.github.io/
MIT License
681 stars 230 forks source link

rc14 toggle declutter on layer removes style on layer #383

Closed aliciahogue closed 3 years ago

aliciahogue commented 3 years ago

<vl-layer-vector-image :declutter="cfg.declutter" ref="labelLayer" :min-zoom="7" v-bind="pointsLayer" @mounted="setContextMenu" :id="${value.id}-labels`" :update-while-interacting="true">

  <vl-style-func ref="labelStyle" :func="vesselLabelStyle"></vl-style-func>
</vl-layer-vector-image>`

if I add a watcher with this code, things work correctly

`mapVm.$map.once('rendercomplete', e => { this.$refs.labelStyle.scheduleRemount(); });

    mapVm.$map.renderSync();`

Initial declutterd labels initial-view

after toggle declutter off toggle-declutter-off

ghettovoice commented 3 years ago

Hello @aliciahogue , thanks for report!

Can you try to temporarily switch to the dev tag and try with it?

npm install vuelayers@dev
ghettovoice commented 3 years ago

Also change in vl-style-func component props: :func is renamed to the :function