terriajs icon indicating copy to clipboard operation
terriajs copied to clipboard

Leaflet rendering issue on multiple geojsons with same source

Open zoran995 opened this issue 3 years ago • 3 comments

When having multiple GeoJSON items with the same URL, there is a rendering issue in Leaflet that GeoJson will be visible on the map when hidden or removed. Sometimes it happens that it doesn't render anything when only one item is shown. Everything works correctly in Cesium viewer Steps to reproduce:

  • open http://ci.terria.io/next/#clean&https://gist.githubusercontent.com/zoran995/a8f0df9fdd22551e59d3270986051576/raw/f29c43bb69b0eff2b311337797609d05063a6217/simple.json
  • change to leaflet viewer
  • hide both layers
  • show first layer (nothing renders - if the order of removing was the first layer and the second layer)
  • show the second layer - the first one is rendered on the map
  • try hiding or removing layers (points are rendered no matter what you do)

image image

Haven't checked with other layer types. I was sure that something similar was happening with GeoJSON layers (and resolved) but can't find it anywhere edit: I was thinking that this is similar to #4342 but it is not

zoran995 avatar Mar 17 '21 23:03 zoran995

I can confirm similar behavior with multiple CZML datasources, it seems related to visualizers not being deleted correctly when disabling a catalog item. They seem to add up when enabling it again.

image

himby avatar Mar 15 '22 11:03 himby

Still been struggling with this issue: Using entities.id check instead of contains when adding datasources to leaflet and removing the raiseToTop re stacking seems to fix the problem.

Maybe others can confirm my findings.

(Leaflet.ts)

image

himby avatar Sep 12 '22 11:09 himby

This might be related to

  • https://github.com/TerriaJS/terriajs/issues/6399
  • https://github.com/TerriaJS/terriajs/issues/6344

nf-s avatar Sep 13 '22 01:09 nf-s