AnsweredAssumed Answered

Altitude constraint on web scene

Question asked by levyax on May 24, 2019
Latest reply on Jun 3, 2019 by levyax

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

Outcomes