cosmoscout / cosmoscout-vr

:milky_way: A virtual universe which lets you explore, analyze and present huge planetary datasets and large simulation data in real-time.
Other
347 stars 27 forks source link

"Tile loading failed" due to incomplete check #331

Closed michaelschleiss closed 1 year ago

michaelschleiss commented 1 year ago

The variable fail will evaulate to True in my case because contentType is "image/png; mode=8bit" instead of plain "image/png".

https://github.com/cosmoscout/cosmoscout-vr/blob/ff5d1d3280c6c0a9e19c2fa466de2fe8aa702083/plugins/csp-lod-bodies/src/TileSourceWebMapService.cpp#L406-L407

I followed the Documentation here to setup the Map Server.

Schneegans commented 1 year ago

Hey there, thanks for the report! I guess that the easiest fix would be to check whether the content type contains image/png or image/tiff. Like this:

fail = !cs::utils::contains(contentType, "image/png") && !cs::utils::contains(contentType, "image/tiff");

I assume that you compiled CosmoScout VR from source, so you could directly try this. You will need to add this to the beginning of the file:

#include "../../../src/cs-utils/utils.hpp"

Can you confirm that this works?

michaelschleiss commented 1 year ago

Works fine for me!