Open vsigno opened 8 months ago
Have you checked with the Cesium team if that is the expected response? This seems more like an issue with their API, than with loaders/deck. Also, is there a reason why you don't just use the Google endpoint directly?
If you just want to normalize the response, you could try using dataTransform
Thanks, I agree with you that this is an API issue rather than a loaderGL issue. I have just posed a question on the Cesium community regarding the endpoint response. I’m using Cesium instead of Google to avoid registering for an additional service, as the visualization I’m creating utilizes other assets from Cesium. Of course, you are right, the easiest workaround would be to use Google directly.
I’ll have a look at the dataTransform
to see if I can access the URL. However, I’m not sure it will work, as I need the Cesium loader to perform the authentication (and get the Google URL with the appended Token), but the same loader needs to be disabled in order to correctly load the Google tiles.
Update from the Cesium Team, the response from the endpoint is as expected. Cesium uses both internal and external assets, and the two different responses reflect that difference. So the issue still really lies with the CesiumIonLoader
that, at the moment, cannot handle the external assets. I'll have a look to the ion.ts.
@vsigno could you try and open an PR in the loaders.gl repo? There is a function for parsing the metadata which I think could be modified here
Description
I’m trying to load Google 3DTiles as a
MapBoxLayer
usingTile3DLayer
andCesiumIonLoader
.using:
output this error:
Looking at the Cesium endpoint API, I can see that the result is of type
3DTiles
, however is not formatted as the usual Cesium asset, but the URL is nested in a options objectthe usual Cesium asset response is this:
Changing the
data
to that URL, and removing theLoader
andload options
makes everything work as expected.I suspect the issue lies with Deck.gl’s
Tile3DLayer
, and not with the Loader.gl’sCesiumIonLoader
(well, the issue is actually the response from Cesium). A solution would be for theTile3DLayer
to check ifurl
exists in the response, if not look atoptions.url
and ignoreCesiumIonLoader
.Flavors
Expected Behavior
Tile3DLayer
should handle the Cesium response and visualise the Google 3D tiles.Steps to Reproduce
JS
HTML
CSS
Environment
Logs
No response