CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.85k stars 3.47k forks source link

Issues displaying MultiLineString in GeoJSON with both MultiPolygon and MultiLineString #11760

Open Southjor opened 9 months ago

Southjor commented 9 months ago

What happened?

添加同时包含 MultiPolygon 和 MultiLineString 的 geoJson 数据,并且数据量较大时,则不会显示 MultiLineString 数据,同时这个 dataSource 删除后也不能重新载入显示。

另外示例里还有一个 MultiPolygon 数据,删除后再添加,也不能正常显示。

但是添加只包含一个 MultiPolygon 的数据,一切正常。

以下是 sandcastle 测试地址:MultiPolygon 和 MultiLineString 的 geoJson 数据

Reproduction steps

1.添加 geojson数据 2.geojson数据地址:https://openlayers.vip/examples/resources/test_geojson100.json 3.删除geojson数据 4.再次添加geojson数据 5.不能显示geojson数据 ...

Sandcastle example

https://sandcastle.cesium.com/#c=zVZbbxNHFP4rUz/AGqLd8EjjRG1BqlQhFSmoL3WFlvXY2Xa8Y+3MmobIkgWFJNQhaQUCjNsmbUAVVeMUicbk+mPqWa+f+As9s7Nery8UWpCajRRrZs53Lt858+1a1GEclW18FbtoGjn4KjqHme0V9c/CPS2bssL1Oepw03awm01NoIVKeirryD/jlPzf2aoGR9sv9+vhYm/Vf/5t0LwnVr/r3IHdmnhy3f+xIRq/tlvVduspKmD6CaMO8u9t+ytb3cWatFmr+ff/FLWbYu03VPQIt0uUzBfASnxfUxsEwjPu2k4B7LNOu3VXOfCbd4PDG2Kz3ql/I31UH8K5OhK314ODg/Z+3W8sd+9vdX9+8Ff1ukxSrD71Hxx2NndRHKb5IvhjA5Dt1kp01A/YPw2qtYH9nWdQr1h6JPZ2ZRXSbdN/tgHxlJMw1W61HhwtRjTr2OE2tzFD/s4eJKjICsHN9t5jBQOyRGNbPDpst25HKZ8yIsoNBDWJm49ViVkn7zkWt6EEQs3ceZObmueSCZQnZiGNFiQEwWOFnc7B8Sz1XAtfdGnRZhiaHjX8Y9WV87GFLv1JX6rZ0skIXOdz2NHiDLS+QSK0fKLa++dMN3O5pP1U0lxlGzM1nYgc86eXTeJhNoKjRKZe0GI7gp0CnxsMkKcu0sqmi2xwPjkFPxk0BIDN06eHypCPnUex78/tL3Q5QXIkQlM08AyvJViTjUEnTqD3xtVkqXvGkhHS6YVRR31OY6wkNAmbGkVVXp8hzJcaSZhksfZEXcnO7pG/9bw3ccOQJOsnFeBCfEcU6ORoNoPrSpLmypjRuUZp8RIdmpjQWHW2oq7HrOnkLJNxSAf4uEQpuWK6H3mcUwfETCytdx9uRnWAkvUnN+7emEl1cZGW8YeEaL2Yw9QPWkQZAZNSEBrLg4LWYxGO2we3JMthUmLtjri1ojQh1qDX1RNJSOjx5f6SCndRBertLr9NobGmZFNznJfY+4ZBS9gh5jx24QbaJQN/bRZLBDPDxUy5MTi0/jKo/JegJ5ejsnW5yKaG6HkzvU9SFqnk77+IViuW2FfxGMv84Py+Oaeagg9Pc/p/pXTy7Nl3xSYMWnDj4C05iqf1eNF0ZnLyXdEU7PwEL+Lg8IX8xAi34VPGX9+J39r/+Ib/z8QmvwiOK7cTiLseTjCc0D1J0g8br1a/VlUsLaqr/C+FLrr/x0LhRocsNZHKMD5P8EzvLfaBXSxRlyP4mtJ0HeDg0AQnxhXP+gpz3WKsl0/GSEIzObuM7Nz0mO9wZBGTMTjJe4TM2tdwNjWTMcB+BCpLhMH5tIxdKEuazZ2ZuaA2dV3PGLAcj+SqDUOe/wY

Environment

Browser: Google Chrome CesiumJS Version:1.113.0 Operating System:114.0.5735.110(正式版本) (64 位)

ggetz commented 9 months ago

Translation via Google Translate

What happened? When adding geoJson data that contains both MultiPolygon and MultiLineString, and the amount of data is large, the MultiLineString data will not be displayed, and the dataSource cannot be reloaded for display after being deleted.

In addition, there is a MultiPolygon data in the example. Even if it is deleted and then added, it will not be displayed normally.

But adding data containing only one MultiPolygon everything works fine.

The following is the sandcastle test address: geoJson data of MultiPolygon and MultiLineString

Reproduction steps

  1. Add geojson data
  2. geojson data address: https://openlayers.vip/examples/resources/test_geojson100.json
  3. Delete geojson data
  4. Add geojson data again
  5. Unable to display geojson data ...
ggetz commented 9 months ago

Thanks for the report @Southjor. I can reproduce the issue.