3737import com .esri .arcgisruntime .mapping .GeoElement ;
3838import com .esri .arcgisruntime .mapping .Surface ;
3939import com .esri .arcgisruntime .mapping .Viewpoint ;
40+ import com .esri .arcgisruntime .mapping .view .Camera ;
4041import com .esri .arcgisruntime .mapping .view .IdentifyLayerResult ;
4142import com .esri .arcgisruntime .mapping .view .SceneView ;
4243
@@ -68,6 +69,10 @@ public void start(Stage stage) throws Exception {
6869 sceneView = new SceneView ();
6970 sceneView .setArcGISScene (scene );
7071
72+ // set the initial viewpoint
73+ Camera camera = new Camera (48.378 , -4.494 , 200 , 345 , 65 , 0 );
74+ sceneView .setViewpointCamera (camera );
75+
7176 // add the scene view to the stack pane
7277 stackPane .getChildren ().add (sceneView );
7378
@@ -77,15 +82,14 @@ public void start(Stage stage) throws Exception {
7782 surface .getElevationSources ().add (new ArcGISTiledElevationSource (elevationService ));
7883 scene .setBaseSurface (surface );
7984
80- // add a scene layer of Harvard buildings to the scene
81- final String buildings = "https ://tiles.arcgis.com/tiles/N82JbI5EYtAkuUKU /arcgis/rest/services/Buildings_Harvard /SceneServer" ;
85+ // add a scene layer of buildings in Brest, France
86+ final String buildings = "http ://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx /arcgis/rest/services/Buildings_Brest /SceneServer/layers/0 " ;
8287 ArcGISSceneLayer sceneLayer = new ArcGISSceneLayer (buildings );
8388 scene .getOperationalLayers ().add (sceneLayer );
8489
8590 // zoom to the layer's extent when loaded
8691 sceneLayer .addDoneLoadingListener (() -> {
8792 if (sceneLayer .getLoadStatus () == LoadStatus .LOADED ) {
88- sceneView .setViewpoint (new Viewpoint (sceneLayer .getFullExtent ()));
8993
9094 // when the scene is clicked, identify the clicked feature and select it
9195 sceneView .setOnMouseClicked (e -> {
0 commit comments