Create a gist now

Instantly share code, notes, and snippets.

cesium code for schependomlaan conversion on experimentalserver
var viewer = new Cesium.Viewer('cesiumContainer');
function loadScript(url, callback) {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
script.onreadystatechange = callback;
script.onload = callback;
head.appendChild(script);
}
var scene = viewer.scene;
var location = Cesium.Cartesian3.fromDegrees(5.8327135, 51.8414786, 0);
var camera = viewer.camera;
var address = "https://thisisanexperimentalserver.com";
var username = "zaanbrug@logic-labs.nl";
var password = "zaanbrug";
loadScript(address + "/apps/cesiumloader/js/cesiumloader.js", function () {
var loader = new BimServerCesiumLoader();
loader.init(address, username, password, function(){
var roid = 131075;
var query = {
type: "IfcProduct",
includeAllSubtypes: true,
include: {
type: "IfcProduct",
field: "geometry",
include: {
type: "GeometryInfo",
field: "data"
}
}
};
loader.loadGltf(roid, query, function(url){
var entity = viewer.entities.add({
position : location,
model : {
uri : url,
scale: 0.001
}
});
viewer.trackedEntity = entity;
});
});
});
@jlxgit
jlxgit commented Nov 24, 2016

The path https://thisisanexperimentalserver.com/apps/cesiumloader/js/cesiumloader.js reports a 404 error. how can i get it. thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment