1. A concise explanation of the problem you're experiencing.
I am a beginner with Cesium and hit a weird issue. Placed a 3d model in glb format on the map in 3d view and aligned it to the coordinates. In 3d view, the model lines up with the roads and the green select box is right at the center of the model. In 2d and 2.5d mode the model goes to the left a bit and when I try to select it the green select box is outside it.
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
exports.createModel = function createModel(viewer, longitude, latitude, heading, name, description, url) {
var position = Cesium.Cartesian3.fromDegrees(longitude, latitude, 0.0);
var heading = heading;
var pitch = 0;
var roll = 0;
var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);
var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, hpr);
var entity = viewer.entities.add({
name: name,
position: position,
orientation: orientation,
description: description,
model: {
uri: url,
scale: 1,
}
});
};
This is what I use to add the entity.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I just need a way to place an entity on the map and for it to stay there in all three view modes.
4. The Cesium version you're using, your operating system and browser.
Cesium 1.39, Ubuntu 17.10, Mozilla Quantum, Chrome (Version 62.0.3202.89 (Official Build) (64-bit))