0

I'm trying to set the 3D Camera of the SceneView in the Java SDK and I cannot find a "field of view" / "angle of view" member. I was wondering how the camera's field of view is being set, since I need a way to change it according to the horizontal and vertical field of views. Code snippet:

// set title, size, and add JavaFX scene to stage
...

// create a scene and add a basemap to it
scene = new ArcGISScene();
scene.setBasemap(Basemap.createImagery());

// add the SceneView to the stack pane
sceneView = new SceneView();
sceneView.setArcGISScene(scene);
sceneView.setMinSize(WIDTH, HEIGHT); // WIDTH = 480, HEIGHT = 270
sceneView.setMaxSize(WIDTH, HEIGHT);
Camera camera = new Camera(lat, lon, alt, yaw, pitch, roll); // Defined above...
sceneView.setViewpointCamera(camera);

What I want is the ability to control how much is visibile on the rendered map (i.e., control the vertical and horizontal field of view of the Camera). I've gone through every member and method of SceneView, Scene and Camera but couldn't find anything. The current situation is the map is rendered with the given width and height but ESRI/ArcGIS must use a field of view somewhere to determine what or how much is visible.

The same field exists on the JavaScript API ('fov' memeber of the Camera class). I've done research on that field and came to a conclusion it's probably the horizontal field of view, but it's still unclear to me. Anyway, I need the same field for the Java runtime SDK.

I would really appreciate your help!

  • Provide some code of what you have tried to do. – David Baak Oct 23 '18 at 14:13
  • The code is really simple: - Create a SceneView with elevation source as the Surface - Create a Camera with (lon, lat, altitude) as well as heading, pitch and roll. What is missing is setting the field of view of the camera. How do ESRI determine what is visible when they render the SceneView? I either need this information or a way to set it. –  Oct 23 '18 at 14:16
  • @Sapir, the request is to [edit] your question and tell us what you want to do, show a [mcve] and tell us what results you get. What have you tried? What research have you done? –  Oct 23 '18 at 15:06
  • @jdv I've edited my question, could you please take a look? thx! –  Oct 23 '18 at 15:22
  • I bet you'd get some better results over on GIS.SE. e.g.: https://gis.stackexchange.com/questions/57197/how-can-i-use-field-of-view-in-arcgis (I found this with a simple web search, BTW. There are others.) –  Oct 23 '18 at 15:25

0 Answers0