How to display Import External Buildings by json url format?

Hello!

I’m challenging myself to put an external building on Cesium’s terrain. The external building uses the json format, and uses the URL below.

Summary

https://xdworld.vworld.kr/TDServer/services/facility_LOD4/vworld_3d_facility.json

Buildings were imported in other versions (1.53), but in the latest version (1.87.1) the textures of buildings are not imported.

versions (1.53) Sample Image

version (1.87.1) Sample Image

Latitude and longitude are shown below.
Cesium.Cartesian3.fromDegrees(126.9754, 37.5601, 400);

How do I solve this problem?

@ameba413

Welcome to the community! :grinning: :rocket:

Can you please share some more information on how you are importing your building into CesiumJS? It is concerning that you are only experiencing this issue when using the most recent version of CesiumJS. I am looking forward to learning more.

-Sam

Hi @sam.rothstein

I am trying to load a 3D Tileset using a provided function of Cesium as belows.

var tileset = new Cesium.Cesium3DTileset({
url: “https://xdworld.vworld.kr/TDServer/services/facility_LOD4/Seoul-202107/Jung-gu/tileset.json”,
//https://xdworld.vworld.kr/TDServer/services/facility_LOD4/vworld_3d_facility.json
});

tileset.readyPromise.then(function (tileset){
Viewer.scene.primitives.add(tileset);
}).otherwise(function (error){
console.log(error);
});

Some 3D tiles has a texture, But almost texture didn’t displayed as belows.

Structure of 3D Tileset as belows from root.

“root”:
{
“boundingVolume”:{“region”:[2.2158979363822473,0.6552726683313002,2.217035506655808,0.6557577620404037,10.05119991279948,279.9920043948327]},
“geometricError”:82.0,
“refine”:“ADD”,
“content”:null,
“children”:[
{
“boundingVolume”:{“region”:[2.2158979363822473,0.6553904894366749,2.2164505290151104,0.6555489668258889,23.565156935197713,279.9920043948327]},
“geometricError”:40.0,
“refine”:“REPLACE”,
“content”:null,
“children”:[
{
“boundingVolume”:{“region”:[2.2159623905372396,0.6554351661077936,2.216153353091036,0.6554794716750965,26.353885649693552,176.90185546797468]},
“geometricError”:20.0,
“refine”:“REPLACE”,
“content”:null,
“children”:[
{
“boundingVolume”:{“region”:[2.2159623905372396,0.6554471317600152,2.2160111200965504,0.6554754166078003,29.28800010610775,96.39745330912893]},
“geometricError”:10.0,
“refine”:“REPLACE”,
“content”:{“uri”:“B_0_8_4.b3dm”},
“children”:[
{
“boundingVolume”:{“region”:[2.2159623905372396,0.6554471345118262,2.215991667577641,0.655473789578686,34.68430328368638,96.39745330859027]},
“geometricError”:5.0,
“refine”:“REPLACE”,
“content”:{“uri”:“B_1_10_4.b3dm”},
“children”:[
{
“boundingVolume”:{“region”:[2.2159660570390636,0.6554471362581817,2.2159780675761014,0.6554567910624978,36.001819611162794,93.6025390625474]},
“geometricError”:0.0,
“refine”:“REPLACE”,
“content”:{“uri”:“B_2_10_4.b3dm”},
“children”:
},

Thank you.

@ameba413

Understood :+1:

Are you still facing issues when importing your data into CesiumJS version 1.87.1?

-Sam

@sam.rothstein

Yes, i did not solved.

And i have another question on json parser.
If i install cesium by npm, Json schema also installed?
Or, do i must be setup for Json schema?

Thank you.

@ameba413

I recommend that you install jsonschema separately. It looks like the command npm i jsonschema will do the trick. You can check your package.json file to confirm that you have the correct version of jsonschema installed. For more context, please see the jsonschema npm website:

-Sam

@sam.rothstein

I checked my package.json.
And i already had version of 1.4.0.
It is my package.json as belows. Am i missing something?

Summary

{

“name”: “cesium-webpack-example”,

“version”: “1.0.0”,

“description”: “The minimal recomended setup for an app using Cesium with Webpack.”,

“main”: “index.js”,

“keywords”: [

"cesium",

"webpack",

"example"

],

“author”: {

"name": "Cesium GS, Inc.",

"url": "https://cesium.com"

},

“homepage”: “https://cesiumjs.org”,

“license”: “Apache-2.0”,

“dependencies”: {

"3d-tiles-renderer": "^0.3.3",

"ajax": "0.0.4",

"cesium": "^1.87.1",

"jsonschema": "^1.4.0",

"olcs": "^2.13.0",

"three": "^0.134.0"

},

“devDependencies”: {

"copy-webpack-plugin": "^6.0.3",

"css-loader": "^3.2.0",

"html-webpack-plugin": "^3.2.0",

"strip-pragma-loader": "^1.0.0",

"style-loader": "^1.0.0",

"uglifyjs-webpack-plugin": "^2.2.0",

"url-loader": "^2.2.0",

"webpack": "^4.41.2",

"webpack-cli": "^3.3.9",

"webpack-dev-server": "^3.9.0"

},

“scripts”: {

"build": "node_modules/.bin/webpack --config webpack.config.js",

"start": "node_modules/.bin/webpack-dev-server --config webpack.config.js",

"release": "node_modules/.bin/webpack --config webpack.release.config.js",

"serve-release": "node_modules/.bin/webpack-dev-server --config webpack.release.config.js --content-base /dist"

}

}

Thank you.

@ameba413

You may need to modify your package configuration. For instance, if you are using webpack, you may need to add a JSON loader. This seems more like a development setup-related question. While I can try to help you out, it’s possible that a more general web-dev community forum might have more expertise in this area.

-Sam