Javascript API SceneView - Difficulties with Underground Navigation

577
2
10-17-2019 11:06 AM
Arne_Gelfert
Occasional Contributor III

So I have been wanting to experiment with 3D using the Javascript API. As a scenario, I've chosen to visualize subsurface wellbores/boreholes. After creating a 3D feature class and publishing it as a map service, I bring it into my map and show it in a SceneView. So far so good. The features below the surface look great but navigation is really touchy and it's easy to pan 1000s of miles. from you where want to be.

Right now, I've kept it as simple as below. Experiments with other constraints have not been fruitful.

var map = new Map({
   basemap: "topo",
   ground: "world-elevation"
});

map.ground.navigationConstraint = {
   type: "none"
};

var view = new SceneView({
   container: "viewDiv",
   map: map,
   center: {
   x: <x>,
   y: <y>,
   },
   zoom : 12,
   viewingMode: "local",
});‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I heard someone mention that this is common and that it helps to add some kind of background so the panning tool doesn't grab the horizon and take you to Neverland... something like that. Does thing ring a bell, is this a common back?

0 Kudos
2 Replies
RalucaNicola1
Esri Contributor

Hi Arne, navigating underground can be tricky and even more so if you try to pan against the horizon. So adding features in the background is a good advice. However, which API version are you using? We did make some improvements in navigation to make it a bit more stable a couple of releases ago. And just out of curiosity, is navigation in your scene more difficult than in this sample? Local scene 

Arne_Gelfert
Occasional Contributor III

Raluca, thanks for hearing my plea!

  • I've looked at the Kansas example before, and it is actually a very similar scenario (same industry, same kind of data) to mine. The main difference is that I was working with an extremely limited data set just to see how to set it up.
  • I have been using 4.12.
  • Yes, navigation is more or less impossible.
  • What do you mean by "adding features in the background" specifically? Use a larger data set so that there are features in the background? Ignoring all the detail for popups and renderers, the only piece of interest in the code is the definition of a clippingArea around an extent. Dos that do more than keep the visualization clipped a geographic extent?

 // The clipping extent for the scene
 var kansasExtent = {
 // autocasts as new Extent()
 xmax: -10834217,
 xmin: -10932882,
 ymax: 4493918,
 ymin: 4432667,
 spatialReference: {
 // autocasts as new SpatialReference()
 wkid: 3857
 }


// Use the exent defined in clippingArea to define the bounds of the scene
 clippingArea: kansasExtent,
 extent: kansasExtent,
 // Turns off atmosphere and stars settings
 environment: {
 atmosphere: null,
 starsEnabled: false
 }
0 Kudos