Altitude constraint on web scene

667
2
Jump to solution
05-24-2019 12:38 AM
AxelLévy
New Contributor III

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

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
SaschaBrunnerCH
Esri Contributor

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.

View solution in original post

0 Kudos
2 Replies
SaschaBrunnerCH
Esri Contributor

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.

0 Kudos
AxelLévy
New Contributor III

hello Sascha, thanks for the information.

0 Kudos