Hi all
I have to block the minimum altitude of a web scene (in WAB 3D)
I put a constraint on Sceneview in the WebSceneloader.js file and it works great for global scenes.
var sceneView = new SceneView({
map: scene,
container: mapDivId,
constraints: { altitude: {min: 150, max: 10000000},
collision: {
enabled: false
},
tilt: {
max: 179.99
}
But it doesn't work for local scenes.
I found, I think the appropriate line (122) in the same file :
_handleLocalScene: function(sceneView){
try{
if(sceneView.viewingMode && sceneView.viewingMode.toLowerCase() === 'local'){
lang.setObject("constraints.collision.enabled", false, sceneView);
lang.setObject("constraints.tilt.max", 179.99, sceneView);
The constraint on the camera works well so I added in the same way the constraint on the altitude but it doesn't work :
lang.setObject("constraints.altitude.min", 150, sceneView);
Can u help me ?
Thanks
Solved! Go to Solution.
Hi Alex,
As you detected it is not possible to set the altitude constraints in a local-scene. We enhance the doc to cover this. As a solution use global-scene to set the altitude constraint. In the future we would support other constraints to fulfill requirements to set the minimal distance to the ground.
Hi Alex,
As you detected it is not possible to set the altitude constraints in a local-scene. We enhance the doc to cover this. As a solution use global-scene to set the altitude constraint. In the future we would support other constraints to fulfill requirements to set the minimal distance to the ground.
hello Sascha, thanks for the information.