-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* readme improvements * Apply suggestions from code review Co-authored-by: Jade Huang <jadehuang@esri.com> Co-authored-by: Andy Ren <aren@esri.com> Co-authored-by: Jade Huang <jadehuang@esri.com> Co-authored-by: Andy Ren <aren@esri.com>
- Loading branch information
1 parent
f228a84
commit 1a94bec
Showing
2 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
Binary file modified
BIN
-494 KB
(28%)
sample_project/Content/SampleViewer/Samples/Geocoding/Geocoding.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 20 additions & 9 deletions
29
sample_project/Content/SampleViewer/Samples/Geocoding/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 |
---|---|---|
@@ -1,19 +1,30 @@ | ||
# Geocoding | ||
# Find places or search for an address | ||
|
||
Find the location for an address or find the address of a selected location using the Geocoding service. | ||
Find the location for an address or find the address of a selected location using the Geocoding service. | ||
|
||
![Geocoding](Geocoding.jpg) | ||
|
||
## How it works | ||
## How to use the sample | ||
|
||
This sample demonstrates the capability of the [Geocoding service](https://developers.arcgis.com/documentation/mapping-apis-and-services/search/geocoding/) inside Unreal Engine. You can make two kinds of operations with this sample, find a place and find an address. | ||
|
||
1. Set your API Key in the ArcGISMapActor using the World Outliner window (if you are using the SampleViewerLevel you can also set the key through the UI or the level blueprint). | ||
2. Enter an address in the text field to get the location of the address. | ||
3. While holding shift, left-click on a location on the map to get the address (or description) of that location. | ||
4. Raycasts are used to determine the height at the queried location to account for elevation. | ||
5. This sample uses Esri's [Geocoding service API](https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm), which requires an API Key. You can learn more about [API keys](https://developers.arcgis.com/documentation/mapping-apis-and-services/security/api-keys/) and [Accounts](https://developers.arcgis.com/documentation/mapping-apis-and-services/deployment/accounts/) in the _Mapping APIs and location services_ guide. [Configure your API key](https://developers.arcgis.com/documentation/mapping-apis-and-services/security/tutorials/create-and-manage-an-api-key/#set-service-scopes) to support Geocoding capabilities. | ||
1. Open the **Geocoding** level. | ||
2. Click on the **ArcGISMap Actor** in the **Outliner**. | ||
3. Set your API key in the **Details** panel. | ||
4. Click play. | ||
5. To find a place, put a place name or address in the search bar and press Enter. For information about the type of locations that are supported by the Geocoding service, see the [ArcGIS REST APIs documentation](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm). | ||
6. To find an address of a place, drop the marker to your point of interest by clicking in the viewport while holding Shift, and you will see the address displayed above the marker. | ||
|
||
**Note:** This sample is only set up to work with mouse and keyboard. | ||
|
||
## How it works | ||
|
||
1. Have a map with the mesh colliders enabled in the level. The mesh collider is required for using raycast. | ||
2. Have an Actor with the C++ script to query [Geocoding service](https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm). | ||
3. The HTTPClient is used to query the Geocoding service. | ||
4. The [`findAddressCandidates`](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm) operation is used for finding a place. | ||
5. The [`reverseGeocode`](https://developers.arcgis.com/rest/geocode/api-reference/geocoding-reverse-geocode.htm) operation is used for finding an address. The marker should have the [**ArcGIS Location Component**](https://developers.arcgis.com/unity/maps/location-component/) attached and its values will be used to query the address of the location. | ||
6. Place a marker using the game engine's [raycast](https://docs.unity3d.com/ScriptReference/Physics.Raycast.html) feature to account for elevation at the queried position. | ||
|
||
## Tags | ||
geocode, reverse geocode, address, locate, search | ||
geocoding, reverse geocoding, address, locate, search |