Update scenelayer URL
package com.esri.samples.scene.scene_layer;
+import javafx.application.Application;
+import javafx.scene.Scene;
+import javafx.scene.layout.StackPane;
+import javafx.stage.Stage;
+
import com.esri.arcgisruntime.layers.ArcGISSceneLayer;
import com.esri.arcgisruntime.mapping.ArcGISScene;
import com.esri.arcgisruntime.mapping.ArcGISTiledElevationSource;
@@ -24,18 +29,9 @@ import com.esri.arcgisruntime.mapping.Surface;
import com.esri.arcgisruntime.mapping.view.Camera;
import com.esri.arcgisruntime.mapping.view.SceneView;
-import javafx.application.Application;
-import javafx.scene.Scene;
-import javafx.scene.layout.StackPane;
-import javafx.stage.Stage;
-
public class SceneLayerSample extends Application {
private SceneView sceneView;
- private static final String LOCAL_ELEVATION_IMAGE_SERVICE = "http://scene.arcgis" +
- ".com/arcgis/rest/services/BREST_DTM_1M/ImageServer";
- private static final String BUILDINGS = "http://scene.arcgis" +
- ".com/arcgis/rest/services/Hosted/Buildings_Brest/SceneServer/layers/0";
@Override
public void start(Stage stage) throws Exception {
@@ -64,11 +60,13 @@ public class SceneLayerSample extends Application {
// add base surface for elevation data
Surface surface = new Surface();
- surface.getElevationSources().add(new ArcGISTiledElevationSource(LOCAL_ELEVATION_IMAGE_SERVICE));
+ final String localEvelationImageService = "http://scene.arcgis.com/arcgis/rest/services/BREST_DTM_1M/ImageServer";
+ surface.getElevationSources().add(new ArcGISTiledElevationSource(localEvelationImageService));
scene.setBaseSurface(surface);
// add a scene layer
- ArcGISSceneLayer sceneLayer = new ArcGISSceneLayer(BUILDINGS);
+ final String buildings = "http://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Brest/SceneServer/layers/0";
+ ArcGISSceneLayer sceneLayer = new ArcGISSceneLayer(buildings);
scene.getOperationalLayers().add(sceneLayer);
// add a camera and initial camera position (Brest, France)
