
该接口用于获取马来西亚槟城指定版本和细节层级的3D Tiles数据,返回JSON格式的瓦片集描述文件。
无
返回值为:tileset.json ,一个 JSON 格式的文件,通常用于定义三维瓦片集(Tileset)的结构和属性。
属性详情:
asset:规范版本和工具信息。
properties:瓦片集的全局属性(如坐标系、单位、扩展字段)
boundingVolume:瓦片的物理/地理范围,用于空间查询和裁剪。
geometricError:控制瓦片渲染细节的误差值(值越大,加载的瓦片越粗糙)。
refine:瓦片细化策略,参数:ADD:叠加子瓦片到父瓦片(渐进增强),REPLACE:用子瓦片替换父瓦片。
content.uri:指向瓦片数据文件(如 .b3dm(瓦片压缩模型)、.glb(瓦片压缩模型))。
children:子瓦片集合(递归结构)
请求示例
https://api.open.geovisearth.com/pj/getfile/46/brainsim-3dtiles/teidstMiuY78/V3/lod/bm/tileset.json?token=您的token返回示例
{
"asset": {
"version": "1.0"
},
"geometricError": 9783.93962050256,
"root": {
"boundingVolume": {
"box": [
-1137128.504131025,
6246277.041641551,
596073.9835138442,
8330.644713346024,
4140.580324682044,
-1324.630873599288,
2244.9674651120595,
-4587.973064932114,
-222.586279571097,
-1090.8670671130824,
-174.48026118563322,
-7405.8937456769045
]
},
"refine": "ADD",
"geometricError": 9783.93962050256,
"children": [
{
"boundingVolume": {
"box": [
-1132979.8274247425,
6248206.267598067,
598647.1223176696,
601.6844920676451,
109.10273489562661,
0,
-10.30851095204885,
56.84982307813712,
-608.7605990652988,
-54.307323087353666,
299.49637961529874,
28.888439651805367
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25511-7698/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1134203.2566002551,
6248019.810490996,
598279.1870918891,
601.6632263955755,
109.2199467115409,
0,
-10.313243444052581,
56.81287632871572,
-608.7639680938148,
-54.36596768506824,
299.4874517738563,
28.870685422579772
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25512-7698/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1134220.834943213,
6248213.183109304,
596236.2845246105,
601.6635229541315,
109.2183130378271,
0,
-10.277875933867616,
56.618921047741736,
-608.7826359235972,
-54.366821612810924,
299.49678321852065,
28.7721086919363
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25512-7700/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1135383.6755128626,
6247886.940462525,
597432.5333434552,
601.6428316897486,
109.33223601823123,
0,
-10.309237669086002,
56.73055971120227,
-608.7717125244417,
-54.422553806828375,
299.48110980432176,
28.829831713279166
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25513-7699/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1135389.3779009832,
6247534.049999317,
601076.388606629,
601.6416486818879,
109.33874577543521,
0,
-10.372729463436743,
57.07643719025856,
-608.738303014974,
-54.42280728523568,
299.4640853868484,
29.00565978759653
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25513-7696/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1132521.1683742001,
6250534.309524948,
598032.0443953731,
2707.4817271770517,
491.50513814158325,
0,
-46.54142780024571,
256.37588612470773,
-2739.3685229135003,
-434.93034158236327,
2395.8365051514716,
231.6143230828303
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25512-7697/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1135418.5928261594,
6247997.279159641,
596219.1824910392,
601.6425798632483,
109.3336217816838,
0,
-10.28843185039881,
56.615326377655315,
-608.7827919263295,
-54.424234082713525,
299.48643488631365,
28.77128347323393
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25513-7700/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1136544.9323374154,
6247438.449016338,
599892.876500567,
601.6217678493688,
109.44808452506435,
0,
-10.362659235590497,
56.96217888133824,
-608.7491767773184,
-54.47820320956965,
299.4595388893507,
28.94855147214859
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25514-7697/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1136571.0240193843,
6247556.034772671,
598626.0648299383,
601.6216881450878,
109.44852264813885,
0,
-10.340818800902035,
56.8418898060561,
-608.7607919258669,
-54.47946075446019,
299.46521300888253,
28.887423605251275
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25514-7698/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1136648.8573594429,
6247887.586734443,
595031.3060727002,
601.621391123246,
109.45015531891984,
0,
-10.278879032808574,
56.50054570399389,
-608.7936167022328,
-54.483211049745776,
299.4812125126636,
28.713964455558088
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25514-7701/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1137611.1694421582,
6247275.568462697,
599570.6131352226,
601.603175909222,
109.55023273523027,
0,
-10.366758974207006,
56.92982084156459,
-608.7521339295031,
-54.52931276092203,
299.45173933499274,
28.9330010225432
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25515-7697/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1137780.8318429051,
6247330.475866314,
598681.4659073567,
601.6004658060411,
109.5651144222459,
0,
-10.35279249979329,
56.84514476265048,
-608.7602844804966,
-54.53745040294802,
299.45439969006924,
28.890096900280835
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25515-7698/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1137360.5328737402,
6245278.930288782,
594842.7066274977,
4812.810065595616,
876.4861076545731,
0,
-82.31982231882849,
452.02047812746446,
-4870.345938289883,
-490.84413436252896,
2695.239057262451,
258.4435408094483
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25515-7701/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1140656.530875757,
6244450.245324078,
597214.3793412052,
2707.1084534871106,
493.5569114862374,
0,
-82.73744610501096,
453.80630796222755,
-4870.172786901472,
-491.35778272187326,
2695.046460371889,
259.473909310362
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25516-7699/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1138551.086806812,
6244938.571506116,
596128.4485366654,
4812.63982862353,
877.4203692395284,
0,
-82.58568031862177,
452.98143091873857,
-4870.252154977098,
-491.35787178706846,
2695.091824594498,
259.00212866690606
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25516-7700/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1139486.6562310075,
6244659.624445936,
597254.4993733823,
4812.505634801286,
878.1561019635485,
0,
-82.81105060406215,
453.82437901958133,
-4870.16985199852,
-491.7615737008912,
2694.971132265186,
259.491338402135
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25517-7699/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1133016.3843454707,
6248317.267230637,
597426.3695537068,
601.6842143205382,
109.10426661630626,
0,
-10.287635663355628,
56.73387644032762,
-608.7717688698427,
-54.30908198989395,
299.50173665046464,
28.82953426387733
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25511-7699/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1134205.4732322758,
6248099.730455534,
597445.0428806338,
601.6634343973411,
109.21880087970999,
0,
-10.298757179706021,
56.73369021502713,
-608.7715981807497,
-54.366078730572426,
299.49130900803664,
28.830435328230877
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25512-7699/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1134217.940584038,
6248328.323166419,
595042.0424287595,
601.6639256160755,
109.21609482424718,
0,
-10.257082568024472,
56.5055596721054,
-608.7935189698887,
-54.366689309382444,
299.50233768448646,
28.714482481254713
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25512-7701/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1135420.8040683689,
6247765.961278704,
598617.9782842924,
601.6418302879779,
109.33774647457031,
0,
-10.330212996945741,
56.843024985818545,
-608.7608659944435,
-54.42432705963195,
299.47527546641044,
28.887033380483437
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25513-7698/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1135349.1996809142,
6247657.591324953,
599875.0130942999,
601.6427096830027,
109.33290740531648,
0,
-10.35144590644413,
56.962465483536874,
-608.7493407389352,
-54.420888014955864,
299.4700434270274,
28.94768948602448
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25513-7697/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1136334.5335366097,
6247360.715378792,
601091.9514300387,
601.625095694934,
109.42979021485394,
0,
-10.38163540397087,
57.076344395075715,
-608.73815989573,
-54.46811138823789,
299.4557758169114,
29.00641068439127
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25514-7696/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1135458.563759011,
6248104.503379687,
595026.313576826,
601.6422328492275,
109.33553131805468,
0,
-10.268028094069612,
56.50202889218056,
-608.7936621602856,
-54.4261564132098,
299.4916096816701,
28.71372350407297
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25513-7701/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1136576.03733024,
6247668.79780568,
597446.4881884211,
601.6219509922964,
109.44707780762546,
0,
-10.320307463432515,
56.72991582200139,
-608.7715849652433,
-54.47970744802288,
299.4706532227347,
28.830505091444127
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25514-7699/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1136597.4207108398,
6247781.4334623525,
596234.8801451516,
601.6219358551635,
109.44716101521757,
0,
-10.29938718142805,
56.61487421634499,
-608.782648732337,
-54.480738977133015,
299.47608824394564,
28.772040937538343
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25514-7700/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1134143.0534639151,
6246187.620227439,
591465.6561521034,
2707.29787603649,
492.516816185517,
0,
-46.16041185448583,
253.73749862694328,
-2739.6206127829405,
-490.3488866133405,
2695.381062369889,
257.90211676532203
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25514-7702/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1137804.4289328854,
6247445.3201856995,
597445.3005015283,
601.6004202915893,
109.56536433284211,
0,
-10.331440746226942,
56.727772804792465,
-608.7715958231956,
-54.53858815897152,
299.4599411806297,
28.8304477735126
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25515-7699/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1137368.6942538815,
6245166.732528152,
595996.0038564071,
4812.806181272384,
876.5074363154491,
0,
-82.48142404048137,
452.8964513192237,
-4870.26182494131,
-490.8476013686975,
2695.1903338784623,
258.94458908405227
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25515-7700/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1137350.0465850784,
6247877.29346778,
593806.9796409621,
601.6094661402277,
109.51568383969267,
0,
-10.263871929849808,
56.38317997710035,
-608.8047508890539,
-54.516827539492716,
299.4807534572129,
28.654886369179906
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25515-7702/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1138968.278480209,
6247123.4024526235,
598585.1778254437,
601.5796580707752,
109.67930411820927,
0,
-10.361915531824648,
56.83403676481223,
-608.7611664092353,
-54.59436889086174,
299.4444761844701,
28.88545061303656
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25516-7698/tileset.json"
}
},
{
"boundingVolume": {
"box": [
-1139562.6727264023,
6244555.451662874,
598191.6576813798,
4812.492701757252,
878.2269751853062,
0,
-82.94767635733638,
454.53521512838483,
-4870.101235662875,
-491.79433319372583,
2694.925920216688,
259.89848441263416
]
},
"geometricError": 9783.93962050256,
"content": {
"uri": "14-25517-7698/tileset.json"
}
}
]
}
}<!DOCTYPE html>
<html>
<head>
<title>孪生模型展示Demo</title>
<meta charset="utf-8">
<script src="https://cesium.com/downloads/cesiumjs/releases/1.129/Build/Cesium/Cesium.js"></script>
<link href="https://cesium.com/downloads/cesiumjs/releases/1.129/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
<link rel="icon" href="https://geovisearth.com/logo.png" type="image/x-icon">
<style>
/* 暗黑模式全局设置 */
:root {
--dark-bg: #1a1a1a;
--dark-panel: #252525;
--dark-text: #e0e0e0;
--dark-hover: #333333;
--dark-active: #3d3d3d;
--dark-border: #3a3a3a;
--primary-color: #4a8cff;
--primary-hover: #5d9bff;
--tag-bg: #b8eee7;
--disabled-bg: #3a3a3a;
--disabled-text: #777777;
}
body {
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
height: 100vh;
font-family: 'Segoe UI', 'PingFang SC', sans-serif;
}
.content-container {
display: flex;
flex: 1;
overflow: hidden;
}
/* 去除Cesium logo */
.cesium-widget-credits {
display: none !important;
}
/* 3D视图容器 */
#cesium-container {
flex: 1;
position: relative;
}
</style>
</head>
<body>
<!-- 内容容器 -->
<div class="content-container">
<div id="cesium-container"></div>
</div>
<script>
//#region 1、初始化Cesium Viewer
const viewer = new Cesium.Viewer('cesium-container', {
geocoder: false, // 隐藏搜索
homeButton: false, // 隐藏主页
sceneModePicker: false, // 隐藏二三维转换
baseLayerPicker: false, // 隐藏图层选择控件
navigationHelpButton: false, // 隐藏帮助按钮
animation: false, // 隐藏时钟
timeline: false, // 隐藏时间轴
fullscreenButton: false, // 隐藏全屏
vrButton: false, // 隐藏双屏模式
infoBox: false, // 隐藏点击 entity 信息框
selectionIndicator: false, // 隐藏点击 entity 绿框
shouldAnimate: true,
});
if (!viewer.scene.context.webgl2) {
console.error("WebGL 2.0 not supported");
}
// 最远可视距离(单位:米)
viewer.scene.screenSpaceCameraController.maximumZoomDistance = 20000000;
viewer.scene.fxaa = true; //开启抗锯齿
viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin);
viewer.imageryLayers.remove(viewer.imageryLayers.get(0));
//#endregion
//#region 2、加载星图地球影像和地形
// 注册开放平台账号获取的token:
// 参考地址:https://open.geovisearth.com
let token = '您的token';
// 星图影像
var geovisMap = new Cesium.UrlTemplateImageryProvider({
url: "https://api.open.geovisearth.com/pj/base/v1/img/{z}/{x}/{y}?format=webp&tmsIds=w&token=" + token,
maximumLevel: 18,
});
viewer.imageryLayers.addImageryProvider(geovisMap);
// 星图影像注记
var geovisCia = new Cesium.UrlTemplateImageryProvider({
url: "https://api.open.geovisearth.com/pj/base/v1/cia/{z}/{x}/{y}?format=webp&tmsIds=w&token=" + token,
maximumLevel: 18,
});
viewer.imageryLayers.addImageryProvider(geovisCia);
(async function () {
const terrainProvider = await Cesium.CesiumTerrainProvider.fromUrl(
"https://api.open.geovisearth.com/pj/base/v1/terrain?token=" + token,
{
requestWaterMask: true,
requestVertexNormals: true,
}
);
viewer.terrainProvider = terrainProvider;
})();
//#endregion
//#region 3、加载3D Tiles模型
let tileset;
// 加载3DTiles模型
loadCityModel();
// 加载城市模型函数
async function loadCityModel() {
try {
// 加载3DTiles模型
let tileset = await Cesium.Cesium3DTileset.fromUrl("https://api.open.geovisearth.com/pj/getfile/46/brainsim-3dtiles/999999/V1/lod/b/tileset.json?token=" + token);
tileset.maximumScreenSpaceError = 80;
viewer.scene.primitives.add(tileset);
// 定位到模型
await viewer.zoomTo(tileset);
} catch (error) {
console.error(`加载失败: ${error}`);
alert(`加载失败: ${error.message}`);
}
}
//#endregion
</script>
</body>
</html>