@@ -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 }
0 commit comments