Hi all!
I have a small problem. When I select one of my entities in my 3D viewer, I do not get an infobox with the name and description. Cesium, however, can focus on the entity (see picture below), but does not show any information
I would like to get something like in this tutorial.
Basic set-up of my project:
-
I have a database of over 6 million buildings
-
I am serving this database through a WFS
This is how I insert my entities into the viewer after I get the WFS-response:
var geoJson = JSON.parse(xhr.responseText);
building = ;
for (var f = 0; f < geoJson.features.length; f++) {
var build = geoJson.features[f];
var coor = ;
for (var i = 0; i < build.geometry.coordinates[0][0].length; i++) {
var xy = [build.geometry.coordinates[0][0][i][0], build.geometry.coordinates[0][0][i][1]];
xy = proj4(that._srs, ‘EPSG:4326’).forward(xy); // changing sris
coor.push(xy[0]);
coor.push(xy[1]);
}
var height = build.geometry.coordinates[0][0][0][2];
building.push(viewer.entities.add({
id : id,
name : "Building "+ id,
description : "This is building "+ id,
polygon : {
hierarchy : Cesium.Cartesian3.fromDegreesArray(coor),
material : Cesium.Color.DARKORCHID.withAlpha(0.3),
outline : true,
outlineColor : Cesium.Color.BLACK,
extrudedHeight : height
}
}));
}
Does anyone know what is going wrong?
Do I have to enable something, or am I inserting the entities into the viewer in a wrong way?