Skip to content

Commit 347586a

Browse files
authored
Merge pull request #214 from Esri/100.2.1
100.2.1
2 parents 9552bca + 836e9b6 commit 347586a

File tree

19 files changed

+599
-28
lines changed

19 files changed

+599
-28
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ buildscript {
1414
}
1515
}
1616

17-
arcgis.version = '100.2.0'
17+
arcgis.version = '100.2.1'
1818

1919
idea.module.downloadJavadoc = true
2020
eclipse.classpath.downloadJavadoc = true

src/main/java/com/esri/samples/analysis/line_of_sight_location/LineOfSightLocationSample.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void start(Stage stage) throws Exception {
5252
StackPane stackPane = new StackPane();
5353
Scene fxScene = new Scene(stackPane);
5454

55-
// set title, size, and add JavaFX scene to stage
55+
// set title, size, and add JavaFX scene to stage
5656
stage.setTitle("Line of Sight Location Sample");
5757
stage.setWidth(800);
5858
stage.setHeight(700);
@@ -70,7 +70,7 @@ public void start(Stage stage) throws Exception {
7070

7171
// add base surface for elevation data
7272
Surface surface = new Surface();
73-
surface.getElevationSources().add(new ArcGISTiledElevationSource( "http://elevation3d.arcgis" +
73+
surface.getElevationSources().add(new ArcGISTiledElevationSource("http://elevation3d.arcgis" +
7474
".com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"));
7575
scene.setBaseSurface(surface);
7676

@@ -79,7 +79,7 @@ public void start(Stage stage) throws Exception {
7979
sceneView.getAnalysisOverlays().add(analysisOverlay);
8080

8181
// initialize a line of sight analysis and add it to the analysis overlay
82-
Point observerLocation = new Point(-73.06958032962375,-49.253112971555446,2000, SpatialReferences.getWgs84());
82+
Point observerLocation = new Point(-73.06958032962375, -49.253112971555446, 2000, SpatialReferences.getWgs84());
8383
Point targetLocation = new Point(-73.079266999709162, -49.300457676730559, 1312, SpatialReferences.getWgs84());
8484
LocationLineOfSight lineOfSight = new LocationLineOfSight(observerLocation, targetLocation);
8585
analysisOverlay.getAnalyses().add(lineOfSight);

src/main/java/com/esri/samples/analysis/viewshed_geoelement/ViewshedGeoElementSample.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public class ViewshedGeoElementSample extends Application {
5858

5959
private SceneView sceneView;
6060
private Graphic tank;
61+
private Timeline animation;
6162
private Point waypoint;
6263

6364
private static final LinearUnit METERS = new LinearUnit(LinearUnitId.METERS);
@@ -148,7 +149,7 @@ public void start(Stage stage) throws Exception {
148149
sceneView.setCameraController(cameraController);
149150

150151
// create a timeline to animate the tank
151-
Timeline animation = new Timeline();
152+
animation = new Timeline();
152153
animation.setCycleCount(-1);
153154
animation.getKeyFrames().add(new KeyFrame(Duration.millis(100), e -> animate()));
154155
animation.play();
@@ -191,6 +192,9 @@ private void animate() {
191192
@Override
192193
public void stop() {
193194

195+
// stop the animation
196+
animation.stop();
197+
194198
if (sceneView != null) {
195199
sceneView.dispose();
196200
}

src/main/java/com/esri/samples/featurelayers/feature_collection_layer/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@
1010

1111
<ol>
1212
<li>Create a feature collection layer using a new feature collection, <code>new FeatureCollectionLayer(featureCollection)</code></li>
13-
<li>The layer is then added to the map, <code>ArcGISap.getOperationalLayers().add(featureCollectionLayer)</code>.</li>
14-
<li>A feature collection table is then created for the <code>GeometryType</code>s <code>Point</code> <code>Polyline</code> <code>Polygon</code>, <code>new FeatureCollectionTable(fields, geometryType, spatialRefernce)</code></li>
15-
<ol>
16-
<li><code>Field</code>s is a list of the feature's attributes, which this one defines it's name.</li>
17-
</ol>
13+
<li>The layer is then added to the map, <code>ArcGISMap.getOperationalLayers().add(featureCollectionLayer)</code>.</li>
14+
<li>A feature collection table is then created for the <code>GeometryType</code>s <code>Point</code> <code>Polyline</code> <code>Polygon</code>, <code>new FeatureCollectionTable(fields, geometryType, spatialRefernce)</code>
15+
<ol>
16+
<li><code>Field</code>s is a list of the feature's attributes, which this one defines it's name.</li>
17+
</ol>
18+
</li>
1819
<li>A <code>SimpleRenderer</code> is then assigned to each table which will render any <code>Feature</code>s from that table using the <code>Symbol</code> that was set.</li>
1920
<li>The table is then added to the feature collection, <code>FeatureCollection.getTables().add(featureCollectionTable)</code>.</li>
2021
<li>To create a feature from the feature collection table use the createFeature method passing an attribute and geometry for that feature, <code>FeatureCollectionTable.createFeature(attributes, geometry)</code>.</li>
21-
<li>Add new feature to the table, <code>FeatureCollectionTable.addFeatureAsync(feature)</code>.</li>
22+
<li>Add new feature to the table, <code>FeatureCollectionTable.addFeatureAsync(feature)</code>.</li>
2223
</ol>
2324

2425
<h2>Features</h2>

src/main/java/com/esri/samples/featurelayers/feature_layer_definition_expression/FeatureLayerDefinitionExpressionSample.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import javafx.scene.Scene;
2323
import javafx.scene.control.ToggleButton;
2424
import javafx.scene.layout.StackPane;
25-
import javafx.scene.layout.VBox;
2625
import javafx.stage.Stage;
2726

2827
import com.esri.arcgisruntime.data.ServiceFeatureTable;
@@ -45,7 +44,7 @@ public class FeatureLayerDefinitionExpressionSample extends Application {
4544
public void start(Stage stage) throws Exception {
4645

4746
try {
48-
// create stack pane and application scene
47+
// create stack pane and application scene
4948
StackPane stackPane = new StackPane();
5049
Scene scene = new Scene(stackPane);
5150
scene.getStylesheets().add(getClass().getResource("/css/style.css").toExternalForm());

src/main/java/com/esri/samples/featurelayers/feature_layer_rendering_mode_map/FeatureLayerRenderingModeMapSample.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class FeatureLayerRenderingModeMapSample extends Application {
4040

4141
private MapView mapViewTop;
4242
private MapView mapViewBottom;
43+
private Timeline timeline;
4344

4445
@Override
4546
public void start(Stage stage) throws Exception {
@@ -100,7 +101,7 @@ public void start(Stage stage) throws Exception {
100101
mapViewBottom.setViewpoint(zoomOutPoint);
101102

102103
//loop an animation into and out from the zoom in point (5 seconds each) with a 2 second gap between zooming
103-
Timeline timeline = new Timeline();
104+
timeline = new Timeline();
104105
timeline.setCycleCount(Animation.INDEFINITE);
105106
timeline.getKeyFrames().add(new KeyFrame(Duration.seconds(7), event -> zoomTo(zoomInPoint, 5)));
106107
timeline.getKeyFrames().add(new KeyFrame(Duration.seconds(14), event -> zoomTo(zoomOutPoint, 5)));
@@ -129,6 +130,9 @@ private void zoomTo(Viewpoint viewpoint, int seconds) {
129130
@Override
130131
public void stop() {
131132

133+
// stop the timer
134+
timeline.stop();
135+
132136
if (mapViewTop != null) {
133137
mapViewTop.dispose();
134138
}

src/main/java/com/esri/samples/featurelayers/generate_geodatabase/GenerateGeodatabaseSample.java

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2017 Esri.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
15+
*/
116
package com.esri.samples.featurelayers.generate_geodatabase;
217

318
import java.io.File;
@@ -74,11 +89,12 @@ public void start(Stage stage) throws Exception {
7489
generateButton.setDisable(true); //wait until sync task loaded
7590
ProgressBar progressBar = new ProgressBar();
7691
progressBar.visibleProperty().bind(Bindings.createBooleanBinding(() -> progressBar.getProgress() > 0,
77-
progressBar.progressProperty()));
92+
progressBar.progressProperty()));
7893
progressBar.setProgress(0.0);
7994

8095
// create a geodatabase sync task
81-
String featureServiceURL = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Sync/WildfireSync/FeatureServer";
96+
String featureServiceURL =
97+
"https://sampleserver6.arcgisonline.com/arcgis/rest/services/Sync/WildfireSync/FeatureServer";
8298
GeodatabaseSyncTask syncTask = new GeodatabaseSyncTask(featureServiceURL);
8399
syncTask.loadAsync();
84100
syncTask.addDoneLoadingListener(() -> generateButton.setDisable(false));
@@ -96,7 +112,7 @@ public void start(Stage stage) throws Exception {
96112

97113
// create generate geodatabase parameters for the current extent
98114
ListenableFuture<GenerateGeodatabaseParameters> defaultParameters = syncTask
99-
.createDefaultGenerateGeodatabaseParametersAsync(extent);
115+
.createDefaultGenerateGeodatabaseParametersAsync(extent);
100116
defaultParameters.addDoneListener(() -> {
101117
try {
102118
// set parameters
@@ -122,7 +138,7 @@ public void start(Stage stage) throws Exception {
122138
if (job.getStatus() == Job.Status.SUCCEEDED) {
123139
Geodatabase geodatabase = job.getResult();
124140
displayMessage("Geodatabase successfully generated", "Unregistering geodatabase since we're not " +
125-
"syncing it here");
141+
"syncing it here");
126142
geodatabase.loadAsync();
127143
geodatabase.addDoneLoadingListener(() -> {
128144
if (geodatabase.getLoadStatus() == LoadStatus.LOADED) {

src/main/java/com/esri/samples/na/offline_routing/OfflineRoutingSample.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
/*
2-
* Copyright 2017 Esri. Licensed under the Apache License, Version 2.0 (the
3-
* "License"); you may not use this file except in compliance with the License.
4-
* You may obtain a copy of the License at
5-
* http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
6-
* or agreed to in writing, software distributed under the License is
7-
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8-
* KIND, either express or implied. See the License for the specific language
9-
* governing permissions and limitations under the License.
2+
* Copyright 2017 Esri.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
* use this file except in compliance with the License. You may obtain a copy of
6+
* the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations under
14+
* the License.
1015
*/
11-
1216
package com.esri.samples.na.offline_routing;
1317

1418
import java.util.Arrays;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<h1>WMS Layer URL</h1>
2+
3+
<p>Shows how to display a WMS layer from a URL.</p>
4+
5+
<p><img src="WmsLayerUrl.png"/></p>
6+
7+
<h2>How it works</h2>
8+
9+
<p>To create a <code>WmsLayer</code> from a URL and display it:</p>
10+
11+
<ol>
12+
<li>Create a <code>WmsLayer</code> specifying the URL of the service and the layer names you want <code>new
13+
WmsLayer(url, names)</code>.</li>
14+
<li>To display it, add it to the map as an operational layer <code>map.getOperationalLayers().add(wmsLayer)</code>.</li>
15+
</ol>
16+
17+
<h2>Features</h2>
18+
19+
<ul>
20+
<li>ArcGISMap</li>
21+
<li>MapView</li>
22+
<li>WmsLayer</li>
23+
</ul>
437 KB
Loading

0 commit comments

Comments
 (0)