Model shifts during change from 3d to 2d view

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))

I can supply screenshots if needed

Hi Andrei,

Sorry for the delay, but can you please provide screenshots? I’m not sure what you mean by the “green select box”. Can you provide a sandcastle example?

Thanks,

Gabby

Models are still not perfect in 2D mode - more discussion here: https://github.com/AnalyticalGraphicsInc/cesium/issues/5112

Hi,

Sorry for the late response, its indeed the same issue as the one presented on github ( https://github.com/AnalyticalGraphicsInc/cesium/issues/5112 ).

Fortunately the requirements allowed me to use 3d view and building were where they should be.

Thanks for all the help