ghettovoice / vuelayers

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

Features hiding randomly #388

Closed RaminMT closed 3 years ago

RaminMT commented 3 years ago

Hi, In 3 separate pages I have maps and in all of them I have an issue, the problem is that features hiding randomly, I don't know why and how this happen, even there is no error, it doesn't have a certain circumstances, just sometimes it starts to not show them, in one of the maps I have line string as well as point, and randomly it hides line string or points or both, The only way I can make them visible is to reload the page and sometimes many times in a row

ghettovoice commented 3 years ago

Hello @RaminMT ,

I need to know which VueLayers version do you using, because there are a lot of changes between v0.11 and v0.12. Especially to fix issues like this one.

RaminMT commented 3 years ago

Hello again I'm currently using v0.11.27 v0.12 is published & stable?

ghettovoice commented 3 years ago

v0.12 currently is published under next tag: npm install vuelayers@next. It is relatively stable.

I'm currently using v0.11.27

Ok. I will try to reproduce and fix

ghettovoice commented 3 years ago

@RaminMT can you provide some basic example of your map/layers setup? I found a bug when vector source is used with draw interaction. Do you have draw interaction enabled on these maps? Anyway can't find similar setup to your app.

aditgege commented 3 years ago

hi , i have the same problem i am using version 0.11.28, I don't know why sometimes the point doesn't appear, I have to reload several times for the point to appear. This is an example of the map / layers setup that I used, have I missed anything? https://codesandbox.io/s/wizardly-worker-hsj79?file=/src/App.vue

ghettovoice commented 3 years ago

@aditgege nice! Thanks for demo. I will try to understand what's wrong

UPD @aditgege in your demo you have osm layer over features layer. you should add vl-layer-tile for osm layer before other vector layers or set :z-index="...." to order layers correctly

<vl-layer-vector id="features" :z-index="1">
  ....
</vl-layer-vector>
<vl-layer-tile id="osm">
  ....
</vl-layer-tile>
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.