Skip to content

Commit 2682176

Browse files
committed
Merge branch 'dev' into 100.3.0
2 parents e071cab + fb57b06 commit 2682176

File tree

10 files changed

+19
-17
lines changed

10 files changed

+19
-17
lines changed
-33.6 KB
Loading
-93.4 KB
Loading

src/main/java/com/esri/samples/featurelayers/feature_layer_extrusion/FeatureLayerExtrusionSample.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public void start(Stage stage) throws Exception {
7777
SimpleLineSymbol lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.SOLID, 0xFF000000, 1.0f);
7878
SimpleFillSymbol fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, 0xFF0000FF, lineSymbol);
7979
final SimpleRenderer renderer = new SimpleRenderer(fillSymbol);
80-
// need to set an extrusion type, BASE HEIGHT extrudes each point from feature individually
81-
renderer.getSceneProperties().setExtrusionMode(Renderer.SceneProperties.ExtrusionMode.BASE_HEIGHT);
80+
// set the extrusion mode to absolute height
81+
renderer.getSceneProperties().setExtrusionMode(Renderer.SceneProperties.ExtrusionMode.ABSOLUTE_HEIGHT);
8282
statesFeatureLayer.setRenderer(renderer);
8383

8484
// set camera to focus on state features
@@ -98,13 +98,13 @@ public void start(Stage stage) throws Exception {
9898
Button extrusionButton = new Button("Population Density");
9999
extrusionButton.setOnAction(v -> {
100100
if (showTotalPopulation) {
101-
// some feature's population is really big of need to sink it down
101+
// scale down outlier populations
102102
renderer.getSceneProperties().setExtrusionExpression("[POP2007]/ 10");
103103
extrusionButton.setText("Population Density");
104104
showTotalPopulation = false;
105105
} else {
106-
// density of population is a small value to need to increase it
107-
renderer.getSceneProperties().setExtrusionExpression("[POP07_SQMI] * 5000");
106+
// scale up density
107+
renderer.getSceneProperties().setExtrusionExpression("[POP07_SQMI] * 5000 + 100000");
108108
extrusionButton.setText("Total Population");
109109
showTotalPopulation = true;
110110
}
-13.7 KB
Loading

src/main/java/com/esri/samples/scene/extrude_graphics/ExtrudeGraphicsSample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void start(Stage stage) throws Exception {
9090
// set renderer with extrusion property
9191
SimpleRenderer renderer = new SimpleRenderer();
9292
SceneProperties renderProperties = renderer.getSceneProperties();
93-
renderProperties.setExtrusionMode(SceneProperties.ExtrusionMode.BASE_HEIGHT);
93+
renderProperties.setExtrusionMode(SceneProperties.ExtrusionMode.ABSOLUTE_HEIGHT);
9494
renderProperties.setExtrusionExpression("[HEIGHT]");
9595
graphicsOverlay.setRenderer(renderer);
9696

src/main/java/com/esri/samples/scene/extrude_graphics/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
<ol>
1717
<li>Create a <code>GraphicsOverlay</code> and <code>SimpleRenderer</code>.</li>
1818
<li>Get the renderer's <code>SceneProperties</code> using <code>Renderer.getSceneProperties()</code>.</li>
19-
<li>Set the extrusion mode for the renderer with <code>SceneProperties.setExtrusionMode(ExtrusionMode)</code>.
20-
<ul><li>BASE_HEIGHT, graphic is extruded to various z-values</li></ul></li>
19+
<li>Set the extrusion mode for the renderer with <code>SceneProperties.setExtrusionMode(ExtrusionMode)</code>.</li>
2120
<li>Specify the attribute name of the graphic that the extrusion mode will use, <code>SceneProperties
2221
.setExtrusionExpression("[HEIGHT]")</code>.</li>
2322
<li>Set the renderer on the graphics overlay, <code>GraphicsOverlay.setRenderer(Renderer)</code>.</li>
Binary file not shown.

src/main/java/com/esri/samples/scene/scene_layer_select/README.md renamed to src/main/java/com/esri/samples/scene/scene_layer_selection/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<h1>Scene Layer Select</h1>
1+
<h1>Scene Layer Selection</h1>
22

33
<p>This sample demonstrates how to select geoelements in a scene layer.</p>
44

5-
<p><img src="SceneLayerSelect.png"></p>
5+
<p><img src="SceneLayerSelection.png"></p>
66

77
<h2>How to use the sample</h2>
88

453 KB
Loading

src/main/java/com/esri/samples/scene/scene_layer_select/SceneLayerSelectSample.java renamed to src/main/java/com/esri/samples/scene/scene_layer_selection/SceneLayerSelectionSample.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* the License.
1515
*/
1616

17-
package com.esri.samples.scene.scene_layer_select;
17+
package com.esri.samples.scene.scene_layer_selection;
1818

1919
import java.util.List;
2020
import java.util.concurrent.ExecutionException;
@@ -36,11 +36,11 @@
3636
import com.esri.arcgisruntime.mapping.Basemap;
3737
import com.esri.arcgisruntime.mapping.GeoElement;
3838
import com.esri.arcgisruntime.mapping.Surface;
39-
import com.esri.arcgisruntime.mapping.Viewpoint;
39+
import com.esri.arcgisruntime.mapping.view.Camera;
4040
import com.esri.arcgisruntime.mapping.view.IdentifyLayerResult;
4141
import com.esri.arcgisruntime.mapping.view.SceneView;
4242

43-
public class SceneLayerSelectSample extends Application {
43+
public class SceneLayerSelectionSample extends Application {
4444

4545
private SceneView sceneView;
4646

@@ -54,7 +54,7 @@ public void start(Stage stage) throws Exception {
5454
Scene fxScene = new Scene(stackPane);
5555

5656
// set title, size, and add JavaFX scene to stage
57-
stage.setTitle("Scene Layer Select Sample");
57+
stage.setTitle("Scene Layer Selection Sample");
5858
stage.setWidth(800);
5959
stage.setHeight(700);
6060
stage.setScene(fxScene);
@@ -68,6 +68,10 @@ public void start(Stage stage) throws Exception {
6868
sceneView = new SceneView();
6969
sceneView.setArcGISScene(scene);
7070

71+
// set the initial viewpoint
72+
Camera camera = new Camera(48.378, -4.494, 200, 345, 65, 0);
73+
sceneView.setViewpointCamera(camera);
74+
7175
// add the scene view to the stack pane
7276
stackPane.getChildren().add(sceneView);
7377

@@ -77,15 +81,14 @@ public void start(Stage stage) throws Exception {
7781
surface.getElevationSources().add(new ArcGISTiledElevationSource(elevationService));
7882
scene.setBaseSurface(surface);
7983

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";
84+
// add a scene layer of buildings in Brest, France
85+
final String buildings = "http://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Brest/SceneServer/layers/0";
8286
ArcGISSceneLayer sceneLayer = new ArcGISSceneLayer(buildings);
8387
scene.getOperationalLayers().add(sceneLayer);
8488

8589
// zoom to the layer's extent when loaded
8690
sceneLayer.addDoneLoadingListener(() -> {
8791
if (sceneLayer.getLoadStatus() == LoadStatus.LOADED) {
88-
sceneView.setViewpoint(new Viewpoint(sceneLayer.getFullExtent()));
8992

9093
// when the scene is clicked, identify the clicked feature and select it
9194
sceneView.setOnMouseClicked(e -> {

0 commit comments

Comments
 (0)