Skip to content

Commit d45eca6

Browse files
authored
200.2.0 (#800)
New samples: - Add custom dynamic entity data source - Create and edit geometries - Display route layer Enhancements: - Map image layer sublayer visibility and Manage bookmarks samples have been updated to utilize ObservableLists. - Edit feature attachments, Generate offline map overrides, Mobile map search and route, Search symbol dictionary and Perform valve isolation trace samples have been updated to utilize CompletableFutures.
1 parent c59195d commit d45eca6

File tree

897 files changed

+4183
-1973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

897 files changed

+4183
-1973
lines changed

README.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,82 +14,83 @@
1414

1515
![Gradle build](https://github.com/Esri/arcgis-runtime-samples-java/workflows/Java%20CI%20with%20Gradle/badge.svg)
1616

17-
Welcome to the home of the ArcGIS Maps SDK for Java samples! The ArcGIS Maps SDK for Java is used to build mapping, location, and GIS applications for desktop applications running on Windows, Mac, or Linux. This repo contains a set of sample projects demonstrating how to accomplish various mapping and geospatial tasks with the ArcGIS Maps SDK for Java.
17+
Welcome to the ArcGIS Maps SDK for Java Samples repository.
1818

19-
![Choose Camera Controller sample preview](https://user-images.githubusercontent.com/36415565/185649571-7d6feb6f-f0c2-42cb-9139-9d4541dd1da8.png)
19+
The ArcGIS Maps SDK for Java is used to build mapping, location, and GIS applications for desktop applications running on Windows, Mac, or Linux. This repo contains a set of sample projects demonstrating how to accomplish various mapping and geospatial tasks with the ArcGIS Maps SDK for Java.
2020

21-
Browse the category directories to explore the samples. Each sample is an individual [Gradle](https://docs.gradle.org/current/userguide/userguide.html) project that can be run standalone. The Gradle buildscripts have tasks for running the application, building a jar, and distributing the app as a zip.
21+
### Sections
22+
* [Sample Viewer](#sample-viewer)
23+
* [Running the samples locally via this project](#running-the-samples-locally-via-this-project)
24+
* [Setup an API Key](#setup-an-api-key)
25+
* [Offline sample data](#offline-sample-data)
26+
* [System requirements for ArcGIS Maps SDK for Java](#system-requirements-for-arcgis-maps-sdk-for-java)
27+
* [Issues](#issues)
28+
* [Contributing](#contributing)
2229

23-
Installing Gradle is not necessary since each sample includes the Gradle wrapper.
30+
### Sample viewer
31+
You can browse our samples by downloading our [Sample Viewer Application](https://arcgisruntime.maps.arcgis.com/home/item.html?id=d34b33f673134862bdb414814d9fbd0a).
2432

25-
Accessing Esri location services, including basemaps, routing, and geocoding, requires authentication using either an ArcGIS identity or an API Key:
26-
1. ArcGIS identity: An ArcGIS named user account that is a member of an organization in ArcGIS Online or ArcGIS Enterprise.
27-
2. API key: A permanent key that gives your application access to Esri location services. Visit your [ArcGIS Developers Dashboard](https://developers.arcgis.com/dashboard) to create a new API key or access an existing API key.
33+
![Java Sample Viewer](sample-viewer.png)
34+
35+
### Running the samples locally via this project
36+
Each sample is an individual [Gradle](https://docs.gradle.org/current/userguide/userguide.html) project that can be run standalone. Installing Gradle is not necessary since each sample includes the Gradle wrapper.
2837

29-
Note: *in the following instructions for setting the API key, if a `gradle.properties` file does not already exist in the `/.gradle` folder within your home directory, a Gradle task in the samples build.gradle file will generate one for you.*
38+
#### Pre-requisites:
3039

31-
## Instructions
40+
* [System Requirements for ArcGIS Maps SDK for Java](#system-requirements-for-arcgis-maps-sdk-for-java)
41+
* An API Key. [More details](#setup-an-api-key)
42+
* [IntelliJ IDEA](https://www.jetbrains.com/idea/)
43+
* Fork and clone this repo. [More details](WorkingWithGit.md).
3244

33-
### IntelliJ IDEA
45+
#### Manually via the IDE:
3446

3547
1. Open IntelliJ IDEA and select _File > Open..._.
36-
2. Choose one of the sample project directories (not the category folder) and click _OK_.
37-
3. Select _File > Project Structure..._ and ensure that the Project SDK and language level are set to use Java 11 or Java 17.
48+
2. Choose one of the sample project directories (e.g. `display-map`) and click _OK_.
49+
3. Select _File > Project Structure..._ and ensure that the Project SDK and language level are set to use Java 17.
3850
4. Store your API key in the `gradle.properties` file located in the `/.gradle` folder within your home directory. The API key will be set as a Java system property when the sample is run.
51+
52+
Note: if a `gradle.properties` file does not already exist in the `/.gradle` folder within your home directory, a Gradle task in the samples `build.gradle` file will generate one for you to populate with your API key.
3953
```
4054
apiKey = yourApiKey
4155
```
56+
4257
5. Open the Gradle view with _View > Tool Windows > Gradle_.
4358
6. In the Gradle view, double-click the `run` task under _Tasks > application_ to run the app.
4459

4560
Note: *if you encounter the error `Could not get unknown property 'apiKey' for task ':run' of type org.gradle.api.tasks.JavaExec.` you may have to set the Gradle user home in the IntelliJ Gradle settings to the `/.gradle` folder in your home directory.*
4661

47-
### Eclipse
48-
49-
1. Open Eclipse and select _File > Import_.
50-
2. In the import wizard, choose _Gradle > Existing Gradle Project_, then click _Next_.
51-
3. Choose one of the sample project directories (not the category folder) as the project root directory.
52-
4. Click _Finish_ to complete the import.
53-
5. Store your API key in the `gradle.properties` file located in the `/.gradle` folder within your home directory. The API key will be set as a Java system property when the sample is run.
54-
```
55-
apiKey = yourApiKey
56-
```
57-
6. Open the Gradle Tasks view with _Window > Show View > Other... > Gradle > Gradle Tasks_.
58-
7. In the Gradle Tasks view, double-click the `run` task under _{project_name} > application_ to run the app.
62+
#### Via the terminal:
5963

60-
### Terminal
61-
62-
1. `cd` into one of the sample project directories (not the category folder).
64+
1. `cd` into one of the sample project directories (e.g. `display-map`).
6365
2. Run `gradle wrapper` to create the Gradle Wrapper
6466
3. Store your API key in the `gradle.properties` file located in the `/.gradle` folder within your home directory. The API key will be set as a Java system property when the sample is run.
6567
4. Run `./gradlew run` on Linux/Mac or `gradlew.bat run` on Windows to run the app.
6668

67-
### Java 11
68-
Java 11 users may find exceptions when running the project if their library path is still set for Oracle JDK 1.8 (see the [OpenJavaFX docs](https://openjfx.io/openjfx-docs/) for more information). A workaround for this is to add the following argument in the `run` task of the Gradle buildscript:
69-
```
70-
systemProperty "java.library.path", "C:\tmp"
71-
```
69+
### Setup an API key
70+
Accessing Esri location services, including basemaps, routing, and geocoding, requires authentication using either an ArcGIS identity or an API Key:
71+
1. ArcGIS identity: An ArcGIS named user account that is a member of an organization in ArcGIS Online or ArcGIS Enterprise.
72+
2. API key: A permanent key that gives your application access to Esri location services. Visit your [ArcGIS Developers Dashboard](https://developers.arcgis.com/dashboard) to create a new API key or access an existing API key.
7273

7374
### Offline sample data
7475
Some samples require offline data. A `samples-data` directory will automatically download to the project root when the Gradle project is configured/imported.
7576

76-
## Requirements
77+
### System requirements for ArcGIS Maps SDK for Java
7778

7879
See the ArcGIS Maps SDK for Java's [system requirements](https://developers.arcgis.com/java/reference/system-requirements/).
7980

80-
## Issues
81+
### Issues
8182

8283
Find a bug or want to request a new feature? Please let us know by submitting an issue.
8384

84-
## Contributing
85+
### Contributing
8586

8687
Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).
8788

88-
New to Git? Check out our [Working with Git](https://github.com/Esri/arcgis-runtime-samples-java/blob/master/WorkingWithGit.md) guide.
89+
New to Git? Check out our [Working with Git](WorkingWithGit.md) guide.
8990

90-
## Licensing
91+
### Licensing
9192

92-
Copyright 2022 Esri
93+
Copyright 2023 Esri
9394

9495
Licensed under the Apache License, Version 2.0 (the "License"); you may not
9596
use this file except in compliance with the License. You may obtain a copy

WorkingWithGit.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
### Fork the repository
2-
To view and make changes to your own copy of the repository, [fork the repo](https://github.com/Esri/arcgis-runtime-samples-java/fork).
2+
To view and make changes to your own copy of the repository, [fork the repo](https://github.com/Esri/arcgis-maps-sdk-java-samples/fork).
33

44
### Clone your fork
55

66
Open your terminal and navigate to the directory you want to put the repository directory in. Then [clone your fork](https://help.github.com/articles/fork-a-repo#step-2-clone-your-fork):
77
```
8-
$ git clone https://github.com/YOUR-USERNAME/arcgis-runtime-samples-java.git
8+
$ git clone https://github.com/YOUR-USERNAME/arcgis-maps-sdk-java-samples.git
99
```
1010

1111
### Configure your fork for syncing
1212
To sync changes you make in a fork with this repository, you must configure a remote that points to the upstream repository in Git. Go into the project directory you just cloned. Run the following to add the upstream remote:
1313
```
14-
$ git remote add upstream https://github.com/Esri/arcgis-runtime-samples-java.git
14+
$ git remote add upstream https://github.com/Esri/arcgis-maps-sdk-java-samples.git
1515
```
1616
Verify the changes by running
1717
```
1818
$ git remote -v
1919
```
2020
You should see something like the following:
2121
```
22-
origin https://github.com/YOUR_USERNAME/arcgis-runtime-samples-java.git (fetch)
23-
origin https://github.com/YOUR_USERNAME/arcgis-runtime-samples-java.git (push)
24-
upstream https://github.com/Esri/arcgis-runtime-samples-java.git (fetch)
25-
upstream https://github.com/Esri/arcgis-runtime-samples-java.git (push)
22+
origin https://github.com/YOUR_USERNAME/arcgis-maps-sdk-java-samples.git (fetch)
23+
origin https://github.com/YOUR_USERNAME/arcgis-maps-sdk-java-samples.git (push)
24+
upstream https://github.com/Esri/arcgis-maps-sdk-java-samples.git (fetch)
25+
upstream https://github.com/Esri/arcgis-maps-sdk-java-samples.git (push)
2626
```
2727

2828
### Sync your fork
@@ -35,11 +35,11 @@ $ git fetch upstream
3535

3636
Make sure to checkout whatever local branch you want the remote changes to be added to:
3737
```
38-
$ git checkout master
38+
$ git checkout main
3939
```
4040

4141
Finally, merge the upstream changes into your branch with
4242
```
43-
$ git merge upstream/master
43+
$ git merge upstream/main
4444
```
4545

analysis/analyze-hotspots/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ plugins {
66
group = 'com.esri.samples'
77

88
ext {
9-
arcgisVersion = '200.1.0'
9+
arcgisVersion = '200.2.0'
1010
}
1111

1212
javafx {
13-
version = "17.0.2"
13+
version = "17.0.7"
1414
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.fxml', 'javafx.web', 'javafx.media' ]
1515
}
1616

@@ -40,7 +40,7 @@ dependencies {
4040
natives "com.esri.arcgisruntime:arcgis-java-jnilibs:$arcgisVersion"
4141
natives "com.esri.arcgisruntime:arcgis-java-resources:$arcgisVersion"
4242
// handle SLF4J http://www.slf4j.org/codes.html#StaticLoggerBinder
43-
runtimeOnly 'org.slf4j:slf4j-nop:1.7.32'
43+
implementation 'org.slf4j:slf4j-nop:2.0.7'
4444
}
4545

4646
task createGradlePropertiesAndWriteApiKey {
@@ -83,6 +83,6 @@ task productionZip(type: Zip) {
8383
if (rootProject == project) {
8484
// the wrapper task is only used if this project is the root project i.e. not a subproject
8585
wrapper {
86-
gradleVersion = '7.5.1'
86+
gradleVersion = '8.1.1'
8787
}
8888
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

analysis/analyze-hotspots/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pluginManagement {
22
plugins {
33
// version defined in settings.gradle to avoid version error when this sample is used in a multi-project build
4-
id 'org.openjfx.javafxplugin' version "0.0.13"
4+
id 'org.openjfx.javafxplugin' version "0.0.14"
55
}
66
}
77

analysis/analyze-hotspots/src/main/java/module-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
// require ArcGIS Maps SDK for Java module
1919
requires com.esri.arcgisruntime;
2020

21+
// handle SLF4J http://www.slf4j.org/codes.html#StaticLoggerBinder
22+
requires org.slf4j.nop;
23+
2124
// require JavaFX modules that the application uses
2225
requires javafx.graphics;
2326
requires javafx.controls;

analysis/distance-measurement-analysis/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ plugins {
66
group = 'com.esri.samples'
77

88
ext {
9-
arcgisVersion = '200.1.0'
9+
arcgisVersion = '200.2.0'
1010
}
1111

1212
javafx {
13-
version = "17.0.2"
13+
version = "17.0.7"
1414
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.fxml', 'javafx.web', 'javafx.media' ]
1515
}
1616

@@ -40,7 +40,7 @@ dependencies {
4040
natives "com.esri.arcgisruntime:arcgis-java-jnilibs:$arcgisVersion"
4141
natives "com.esri.arcgisruntime:arcgis-java-resources:$arcgisVersion"
4242
// handle SLF4J http://www.slf4j.org/codes.html#StaticLoggerBinder
43-
runtimeOnly 'org.slf4j:slf4j-nop:1.7.32'
43+
implementation 'org.slf4j:slf4j-nop:2.0.7'
4444
}
4545

4646
task createGradlePropertiesAndWriteApiKey {
@@ -83,6 +83,6 @@ task productionZip(type: Zip) {
8383
if (rootProject == project) {
8484
// the wrapper task is only used if this project is the root project i.e. not a subproject
8585
wrapper {
86-
gradleVersion = '7.5.1'
86+
gradleVersion = '8.1.1'
8787
}
8888
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

analysis/distance-measurement-analysis/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pluginManagement {
22
plugins {
33
// version defined in settings.gradle to avoid version error when this sample is used in a multiproject build
4-
id 'org.openjfx.javafxplugin' version "0.0.13"
4+
id 'org.openjfx.javafxplugin' version "0.0.14"
55
}
66
}
77

analysis/distance-measurement-analysis/src/main/java/module-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
// require ArcGIS Maps SDK for Java module
1919
requires com.esri.arcgisruntime;
2020

21+
// handle SLF4J http://www.slf4j.org/codes.html#StaticLoggerBinder
22+
requires org.slf4j.nop;
23+
2124
// require JavaFX modules that the application uses
2225
requires javafx.graphics;
2326
requires javafx.controls;

0 commit comments

Comments
 (0)