3dcitydb / 3dcitydb-web-map

Cesium-based 3D viewer and JavaScript API for the 3D City Database
Apache License 2.0
377 stars 125 forks source link

3DcityDB vektors in the code #23

Closed Abelon38 closed 5 years ago

Abelon38 commented 6 years ago

HI!

I hope you are doing great! I have made som changes in the CSS code on 3dcity webmap and I am very exited about the results. See my 3D webmap here: https://3d.sokigo.com/demo

I would like to add exported (från 3DcityDB) collada objects direct in the default map. Using the Cesium exemples for Json and KML does´nt work for me.

My JSON sample:

viewer.dataSources.add(Cesium.GeoJsonDataSource.load('data/stockholm/lod1_collada_MasterJSON.json', { name: "lod1", maxSizeOfCachedTiles: 400, maxCountOfVisibleTiles: 400 }));

Can you provide examples code on how to archive this?

Regards! Abel

yaozhihang commented 6 years ago

Hi Abel,

it is impossible to load the "xxx_MasterJSON.json" directly into Cesium using its default APIs, because the KML/glTF data exported from the 3DCityDB is based on a specific tiling-implmentation which is encoded in a JSON file and can only be parsed using our 3dcitydb-web-map. Examples of loading the "xxx_MasterJSON.json" into a 3dcitydb-web-map can be found below: https://github.com/3dcitydb/3dcitydb-web-map/blob/master/examples/kmlManhattanExample/index.html

Regards

Zhihang

Son-HNguyen commented 5 years ago

Closed. Feel free to reopen if you still have any issues.