openlayers / ol-cesium

OpenLayers - Cesium integration
http://openlayers.org/ol-cesium/
BSD 2-Clause "Simplified" License
1k stars 326 forks source link

3DTiles not displayed #1121

Closed ghschier closed 11 months ago

ghschier commented 11 months ago

I try to show 3DTiles (buildings) in OL-Cesium with the following code:

const ol3d = new OLCesium({
  map: ol2d,
  ...
});
const scene = ol3d.getCesiumScene();

Cesium.Cesium3DTileset.fromUrl("http://localhost/ol-cesium/hoppegarten/tileset.json", {
  "debugShowBoundingVolume": true
})
.then(tileset =>  scene.primitives.add(tileset) )
.catch(err => console.error(err));

In the browser the tileset.json is loaded. The b3dm-file should be loaded, when I zoom to the position, but it isn't. At https://sandcastle.cesium.com it works as expected. Is there something wrong? Thank you.

Versions: "cesium": 1.110.0 "ol": 8.1.0 "olcs": 2.16.0

gberaudo commented 11 months ago

Hi @ghschier, loading and rendering 3dtilesets is directly done by Cesium. OL-Cesium is not involved in this process so I don't know how to help you.

I advice you try with a locally running Cesium.