You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-6Lines changed: 50 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,43 @@
2
2
3
3
This repository contains Flutter sample code demonstrating the capabilities of ArcGIS Maps SDK for Flutter and how to use them in your own app. This SDK enables development of cross-platform GIS apps for mobile devices running iOS and Android.
4
4
5
+
## Run the samples using the Beta package of ArcGIS Maps SDK for Flutter
6
+
7
+
Visit [earlyadopter.esri.com](https://earlyadopter.esri.com/) and download the ArcGIS Maps SDK for Flutter package. Follow the instructions to unpack it.
8
+
9
+
Clone or download this repository into the same parent directory as the `arcgis_maps_package`. Your file structure should be:
10
+
11
+
```
12
+
parent_directory
13
+
|
14
+
|__ arcgis-maps-sdk-flutter-samples
15
+
|
16
+
|__ arcgis_maps_package
17
+
```
18
+
19
+
Navigate to the `arcgis-maps-sdk-flutter-samples` directory.
20
+
21
+
```
22
+
cd arcgis-maps-sdk-flutter-samples
23
+
```
24
+
25
+
Use `flutter pub upgrade` to configure the dependencies.
26
+
27
+
```
28
+
flutter pub upgrade
29
+
```
30
+
31
+
Install arcgis_maps_core.
32
+
33
+
```
34
+
dart run arcgis_maps install
35
+
```
36
+
37
+
Now you are ready to run the samples app!
38
+
5
39
## Running the Samples app
6
40
7
-
The app can be run on an iOS or Android simulator or device.
41
+
The app can be run on an iOS or Android simulator or device. Note: you will need to configure an API key to take full advantage of the samples in the app. See [Configuring API Keys](#configuring-api-keys).
8
42
9
43
- Open the flutter project in VSCode
10
44
- Ensure a simulator is running or a device is connected to your development machine
@@ -26,24 +60,34 @@ Individual samples can also be run on an iOS or Android simulator or device.
26
60
27
61
## Configuring API Keys
28
62
29
-
To fully take advantage of the samples in the app, you will need to generate an API Key.
63
+
To take full advantage of the samples in the app, you will need to generate an API Key.
30
64
31
-
- Log into your developer account at the [ArcGIS Developers](https://developers.arcgis.com/)
65
+
- Log into your developer account at [ArcGIS Developers](https://developers.arcgis.com/)
32
66
- If you do not have an account, [create one](https://developers.arcgis.com/sign-up/)
33
67
- Go to the "API keys" tab
34
68
- Click the "New API Key" button and provide a Title and Description
35
69
- Set Location Service scopes to add or remove key capabilities
36
70
37
-
Add the new API Key directly to [main.dart](lib/main.dart) or create an environment JSON file that can be loaded with the `--dart-define-from-file``flutter run` command line argument.
71
+
Add the new API Key directly to [main.dart](lib/main.dart) or create an environment JSON file that can be loaded with the `--dart-define-from-file``flutter run` command line argument.
72
+
73
+
The JSON file itself should be of the format:
74
+
75
+
```
76
+
{
77
+
"API_KEY": "your_api_key_here"
78
+
}
79
+
```
80
+
81
+
To run using the JSON file to define your API key:
38
82
39
83
```
40
84
flutter run --dart-define-from-file=path/to/json/file.json
41
85
```
42
86
43
-
or to run an individual sample:
87
+
Or to run an individual sample:
44
88
45
89
```
46
-
flutter run lib/src/samples/display_map.dart --dart-define-from-file=path/to/json/file.json
90
+
flutter run lib/src/samples/display_map.dart --dart-define-from-file=path/to/json/file.json
0 commit comments