Skip to content

Commit

Permalink
Merge pull request #185 from Esri/patch-1.0.8
Browse files Browse the repository at this point in the history
Improvements to app docs
  • Loading branch information
esreli authored Aug 5, 2020
2 parents aff71fe + c1b567b commit 01730e3
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 13 deletions.
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
# Maps App Android

This repo provides an example app for Android devices called Maps App that can be used as a
This repo provides an example app for Android devices called Maps App that can be used as a
starter for your organization's mapping app built with [ArcGIS Runtime SDK for Android](https://developers.arcgis.com/android/). You can use the Maps App as is, or extend it using the ArcGIS Runtime SDK for Android.

Visit Esri's [**open source apps site**](https://developers.arcgis.com/example-apps/maps-app-android/) to read more about this app and how the Runtime features are implemented.

Visit Esri's [**open source apps site**](https://developers.arcgis.com/example-apps/maps-app/) to read more about this app and how the Runtime features are implemented.

<!-- MDTOC maxdepth:6 firsth1:0 numbering:0 flatten:0 bullets:1 updateOnSave:1 -->

- [Features](#features)
- [Detailed Documentation](#detailed-documentation)
- [Development Instructions](#development-instructions)
- [Fork the repo](#fork-the-repo)
- [Clone the repo](#clone-the-repo)
- [Command line Git](#command-line-git)
- [Configuring a Remote for a Fork](#configuring-a-remote-for-a-fork)
- [Requirements](#requirements)
- [Resources](#resources)
- [Issues](#issues)
- [Contributing](#contributing)
- [MDTOC](#mdtoc)
- [Licensing](#licensing)

<!-- /MDTOC -->
---

## Features

Expand All @@ -13,7 +32,11 @@ Visit Esri's [**open source apps site**](https://developers.arcgis.com/example-a
* Geocode addresses
* Reverse geocode
* Sign into an ArcGIS account


## Detailed Documentation

Read the [docs](./docs/README.md) for a detailed explanation of the application, including its architecture and how it leverages the ArcGIS platform, as well as how you can begin using the app right away.

## Development Instructions

This Maps App repo is an Android Studio Project and App Module that can be directly cloned and imported into Android Studio. In addition, you'll need to follow the steps below to obtain your client id and redirect uri. Both are required for leveraging all the features of the app.
Expand Down Expand Up @@ -113,6 +136,10 @@ Anyone and everyone is welcome to [contribute](https://github.com/Esri/maps-app-
3. Contribute code
4. Improve documentation

## MDTOC

Generating table of contents for documents in this repository was performed using the [MDTOC package for Atom](https://atom.io/packages/atom-mdtoc).

## Licensing

Copyright 2016 Esri
Expand Down
7 changes: 6 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Release 1.0.8

- Adds doc table of contents to root README.md and docs/index.md
- Renames docs/index.md to [docs/README.md](/docs/README.md)

# Release 1.0.7

- Support for ArcGIS Runtime SDK for Android 100.8.0
Expand All @@ -21,7 +26,7 @@

# Release 1.0.2

- Comprehensive [app documentation](/docs/index.md) from the ArcGIS for Developers site.
- Comprehensive [app documentation](/docs/README.md) from the ArcGIS for Developers site.

# Release 1.0.1

Expand Down
33 changes: 25 additions & 8 deletions docs/index.md → docs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
# Contents

<!-- MDTOC maxdepth:6 firsth1:0 numbering:0 flatten:0 bullets:1 updateOnSave:1 -->

- [Description](#description)
- [Using web maps](#using-web-maps)
- [Accessing your organization's basemaps](#accessing-your-organizations-basemaps)
- [Identity](#identity)
- [Place search](#place-search)
- [Place suggestions](#place-suggestions)
- [Geocoding](#geocoding)
- [Reverse geocoding](#reverse-geocoding)
- [Route](#route)

<!-- /MDTOC -->
---

## Description

Get your organization's authoritative map data into the hands of your workers with this ArcGIS Runtime Android app. The application you build can include a custom web map from your [ArcGIS Online organization](https://doc.arcgis.com/en/arcgis-online/reference/what-is-agol.htm). For example, a web map from the [Living Atlas](https://livingatlas.arcgis.com/en/browse/?#d=1&type=maps) can be used as a starting place for your app. The Maps App also includes examples of place search and routing capabilities using either ArcGIS Online's powerful services or your own services. It also leverages your organization's configured basemaps to allow users to switch between the basemaps that make sense for them.

Grab the source code to configure the app for your organization, or to learn how to integrate similar capabilities into your own app!

## Using web maps
### Using web maps

You can author your own web maps from ArcGIS Online or ArcGIS Pro and share them in your app via your ArcGIS Online organization. This is the central power of the Web GIS model built into ArcGIS. Building an app which uses a web map allows the cartography and map configuration to be completed in ArcGIS Online rather than in code. This allows the map to change over time, without any code changes or app updates. Learn more about the benefits of developing with web maps [here](https://developers.arcgis.com/web-map-specification/). You can also learn about authoring web maps in [ArcGIS Online](http://doc.arcgis.com/en/arcgis-online/create-maps/make-your-first-map.htm) and [ArcGIS Pro](http://pro.arcgis.com/en/pro-app/help/mapping/map-authoring/author-a-basemap.htm).

Expand All @@ -16,7 +33,7 @@ Map map = new Map(portal, "<your map id>");
mapView.setMap(map);
```

## Accessing your organization's basemaps
### Accessing your organization's basemaps

As an administrator of an ArcGIS Online organization or Portal, you can configure the basemaps that your users can switch between via a [group](http://doc.arcgis.com/en/arcgis-online/share-maps/share-items.htm). Applications can leverage this configuration using the [Portal API](https://developers.arcgis.com/android/latest/guide/access-the-arcgis-platform.htm#ESRI_SECTION2_B8EDBBD3D4F1499C80AF43CFA73B8292). The Maps App does this by an asynchronous call to find the group containing web maps in the basemap gallery. With the returned group id, the collection of basemaps is retrieved from the portal.

Expand Down Expand Up @@ -57,7 +74,7 @@ groupFuture.addDoneListener(new Runnable() {
});
```

## Identity
### Identity

The Maps App leverages the ArcGIS [identity](https://developers.arcgis.com/authentication/) model to provide access to resources via the the [named user](https://developers.arcgis.com/authentication/#named-user-login) login pattern. During the routing workflow, the app prompts you for your organization’s ArcGIS Online credentials used to obtain a token later consumed by the Portal and routing service. The ArcGIS Runtime SDKs provide a simple-to-use API for dealing with ArcGIS logins.

Expand Down Expand Up @@ -101,7 +118,7 @@ Any time a secured service issues an authentication challenge, the `DefaultAuthe

Note the value for android:scheme in the XML. This is [redirect URI](https://developers.arcgis.com/authentication/browser-based-user-logins/#configuring-a-redirect-uri) that you configured when you registered your app [here](https://developers.arcgis.com/dashboard/). For more details on the user authorization flow, see the [Authorize REST API](https://developers.arcgis.com/rest/users-groups-and-items/authorize.htm).

## Place search
### Place search

[Geocoding](https://developers.arcgis.com/android/latest/guide/search-for-places-geocoding-.htm#ESRI_SECTION1_406F4F35F62C465ABC52F3FF04BB6B04) lets you transform an address or a place name to a specific geographic location. The reverse lets you use a geographic location to find a description of the location, like a postal address or place name. In the Maps App, we use a [LocatorTask](https://developers.arcgis.com/android/latest/guide/search-for-places-geocoding-.htm#ESRI_SECTION1_62AE6A47EB4B403ABBC72337A1255F8A) to perform geocoding and reverse geocoding functions provided by [Esri's World Geocoding Service](https://developers.arcgis.com/features/geocoding/). The `LocatorTask` has various asynchronous methods that we use to provide address suggestions when searching for places or geocoding locations.

Expand All @@ -114,7 +131,7 @@ mLocator = new LocatorTask(getString("http://geocode.arcgis.com/arcgis/rest/serv

You can also provision your own [custom geocode service](https://doc.arcgis.com/en/arcgis-online/administer/configure-services.htm#ESRI_SECTION1_0A9A071A7AB748028C8213D1D863FA18) to support your organization. Before using the `LocatorTask` to geocode or search for places, the `LocatorTask` must be `LOADED`. The loadable pattern is described [here](https://developers.arcgis.com/android/latest/guide/loadable-pattern.htm). `LocatorTask` operations are performed asynchronously using `ListenableFutures`, an implementation of Java’s Future interface. `ListenableFutures` add the ability to attach a listener that runs upon completion of the task. One of the first user interactions the Maps App supports is suggesting places near the device location.

## Place suggestions
### Place suggestions

Typing the first few letters of a place into the Map App search box (e.g. “Voodoo Doughnut”) shows a number of suggestions near the device’s location

Expand Down Expand Up @@ -147,7 +164,7 @@ mLocator.addDoneLoadingListener(new Runnable() {
mLocator.loadAsync();
```

## Geocoding
### Geocoding

Once a suggestion in the list has been selected by the user, the suggested address is geocoded using the `geocodeAsync` method of the `LocatorTask`. Along with the address, specific [geocoding parameters](https://developers.arcgis.com/android/latest/guide/search-for-places-geocoding-.htm#ESRI_SECTION2_48C5C281B21B4BF1BBBDBCEA71F105B9) can be set to tune the results. For example, in the Maps App, we set the preferred location and refine that further by setting a boundary of the area to search for matching addresses.

Expand Down Expand Up @@ -177,7 +194,7 @@ locFuture.addDoneListener(new Runnable() {
});
```

## Reverse geocoding
### Reverse geocoding

The Map App uses the built-in map magnifier to help users fine tune a location on the map for reverse geocoding. The magnifier appears after a long-press on the map view. Once the long-press is released, the map point is reverse geocoded.

Expand Down Expand Up @@ -230,7 +247,7 @@ private void reverseGeocode(Point point) {
}
```

## Route
### Route

Getting navigation directions in the Maps App is just as easy in the [Runtime SDK](https://developers.arcgis.com/features/directions/) as it is on [ArcGIS Online](http://doc.arcgis.com/en/arcgis-online/use-maps/get-directions.htm). You can [customize](http://doc.arcgis.com/en/arcgis-online/administer/configure-services.htm#ESRI_SECTION1_567C344D5DEE444988CA2FE5193F3CAD) your navigation services for your organization, add new travel modes that better reflect your organization’s workflows, or remove travel modes that are not suitable for your organization’s workflows.

Expand Down
2 changes: 2 additions & 0 deletions maps-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ android {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
versionCode 1
versionName '1.0.8'
}

packagingOptions {
Expand Down

0 comments on commit 01730e3

Please sign in to comment.