This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #645 from Esri/100.6
100.6
- Loading branch information
Showing
88 changed files
with
1,983 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
61 changes: 61 additions & 0 deletions
61
java/apply-scheduled-updates-to-preplanned-map-area/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Apply scheduled updates to preplanned map area | ||
|
||
Apply scheduled updates to a downloaded preplanned map area. | ||
|
||
![Apply scheduled updates to preplanned map area app](apply-scheduled-updates-to-preplanned-map-area.png) | ||
|
||
## Use case | ||
|
||
With scheduled updates, the author can update the features within the preplanned areas on the service once, and multiple end-users can request these updates to bring their local copies up to date with the most recent state. Importantly, any number of end-users can download the same set of cached updates which means that this workflow is extremely scalable for large operations where you need to minimize load on the server. | ||
|
||
This workflow can be used by survey workers operating in remote areas where network connectivity is not available. The workers could download mobile map packages to their individual devices and perform their work normally. Once they regain internet connectivity, the mobile map packages can be updated to show any new features that have been added to the online service. | ||
|
||
## How to use the sample | ||
|
||
Start the app. It will display an offline map, check for available updates, and show update availability and size. Select 'Apply Updates' to apply the updates to the local offline map and show the results. | ||
|
||
## How it works | ||
|
||
1. Create an `OfflineMapSyncTask` with your offline map. | ||
2. If desired, get `OfflineMapUpdatesInfo` from the task to check for update availability or update size. | ||
3. Get a set of default `OfflineMapSyncParameters` for the task. | ||
4. Set the parameters to download all available updates. | ||
5. Use the parameters to create an `OfflineMapSyncJob`. | ||
6. Start the job and get the results once it completes successfully. | ||
7. Check if the mobile map package needs to be reopened, and do so if necessary. | ||
8. Finally, display your offline map to see the changes. | ||
|
||
## Relevant API | ||
|
||
* MobileMapPackage | ||
* OfflineMapSyncJob | ||
* OfflineMapSyncParameters | ||
* OfflineMapSyncResult | ||
* OfflineMapSyncTask | ||
* OfflineMapUpdatesInfo | ||
|
||
## Offline Data | ||
1. Download the data from [ArcGIS Online](https://arcgisruntime.maps.arcgis.com/home/item.html?id=740b663bff5e4198b9b6674af93f638a). | ||
2. Extract the contents of the downloaded zip file to disk. | ||
2. Open your command prompt and navigate to the folder where you extracted the contents of the data from step 1. | ||
3. Execute the following command: | ||
`adb push canyonlands/. /sdcard/ArcGIS/Samples/MapPackage/canyonlands` | ||
|
||
Link | Local Location | ||
---------|-------| | ||
|[Canyonlands MMPK](https://arcgisruntime.maps.arcgis.com/home/item.html?id=740b663bff5e4198b9b6674af93f638a)| `<sdcard>`/ArcGIS/Samples/MapPackage/canyonlands| | ||
|
||
## About the data | ||
|
||
The data in this sample shows the roads and trails in the Canyonlands National Park, Utah. Data by [U.S. National Parks Service](https://public-nps.opendata.arcgis.com/). No claim to original U.S. Government works. | ||
|
||
## Additional information | ||
|
||
**Note:** preplanned areas using the Scheduled Updates workflow are read-only. For preplanned areas that can be edited on the end-user device, see [Take a map offline - preplanned](https://developers.arcgis.com/java/latest/guide/take-map-offline-preplanned.htm). | ||
|
||
#### Tags | ||
Edit and Manage Data | ||
offline, preplanned | ||
pre-planned | ||
synchronize | ||
update |
28 changes: 28 additions & 0 deletions
28
java/apply-scheduled-updates-to-preplanned-map-area/README.metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"category": "Edit and Manage Data", | ||
"description": "Apply scheduled updates to a downloaded preplanned map area.", | ||
"ignore": false, | ||
"images": [ | ||
"apply-scheduled-updates-to-preplanned-map-area.png" | ||
], | ||
"keywords": [ | ||
"offline", | ||
"preplanned", | ||
"pre-planned", | ||
"synchronize", | ||
"update" | ||
], | ||
"redirect_from": "", | ||
"relevant_apis": [ | ||
"MobileMapPackage", | ||
"OfflineMapSyncJob", | ||
"OfflineMapSyncParameters", | ||
"OfflineMapSyncResult", | ||
"OfflineMapSyncTask", | ||
"OfflineMapUpdatesInfo" | ||
], | ||
"snippets": [ | ||
"src/main/java/com/esri/arcgisruntime/sample/applyscheduledupdatestopreplannedmaparea/MainActivity.java" | ||
], | ||
"title": "Apply scheduled updates to preplanned map area" | ||
} |
Binary file added
BIN
+555 KB
...dates-to-preplanned-map-area/apply-scheduled-updates-to-preplanned-map-area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
java/apply-scheduled-updates-to-preplanned-map-area/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
|
||
defaultConfig { | ||
applicationId "com.esri.arcgisruntime.sample.applyscheduledupdatestopreplannedmaparea" | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode rootProject.ext.versionCode | ||
versionName rootProject.ext.versionName | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
// arcgis-android & appcompat lib dependencies from rootProject build.gradle | ||
implementation "com.android.support.constraint:constraint-layout:$constraintLayoutVersion" | ||
} |
21 changes: 21 additions & 0 deletions
21
java/apply-scheduled-updates-to-preplanned-map-area/proguard-rules.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
30 changes: 30 additions & 0 deletions
30
java/apply-scheduled-updates-to-preplanned-map-area/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.esri.arcgisruntime.sample.applyscheduledupdatestopreplannedmaparea"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
|
||
<uses-feature | ||
android:glEsVersion="0x00020000" | ||
android:required="true" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
Oops, something went wrong.