Skip to content

Commit 2c067ae

Browse files
tTakeda09Jade-JadeHavr757
authored
Feature layer readme improvements (#26)
* Update readme.md * 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>
1 parent 0f541b4 commit 2c067ae

File tree

1 file changed

+19
-7
lines changed
  • sample_project/Content/SampleViewer/Samples/FeatureLayer

1 file changed

+19
-7
lines changed

sample_project/Content/SampleViewer/Samples/FeatureLayer/readme.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
1-
# Feature Layer
1+
# Query a feature layer
22

33
Query objects from a feature layer and show them on the map.
44

55
![Image of Feature Layer Sample](FeatureLayer.jpg)
66

7+
## How to use the sample
8+
9+
1. Open the **FeatureLayer_lvl** level.
10+
2. Click on the **ArcGISMapActor** in the Outliner panel.
11+
3. Set your API key under Authentication section in the Details panel.
12+
4. Click play and select a stadium from the list.
13+
714
## How it works
815

9-
1. Create an http request in the project's gamemode.cpp and gamemode.h
10-
2. Using the UE_LOG, confirm that you are gathering the data properly.
11-
3. Create a new Blueprint class and cast to the gamemode.
12-
4. Using the cast, get the data stored from the http request.
13-
5. Spawn in a new actor of the class you created above and set the data accordingly.
16+
1. Create a new C++ class and make a http request to [query a feature layer](https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-.htm).
17+
2. Create a new Blueprint Actor class
18+
- Create the event to place the stadium data returned from the feature layer.
19+
- Create a function to spawn the actor according to the stadium `NAME`.
20+
- Create a function to apply different materials according to the `LEAGUE` value.
21+
- Attach the [**ArcGIS Location Component**](https://developers.arcgis.com/unreal-engine/maps/location-component/) to the static stadium mesh model.
22+
- Create a function to place the static mesh model on the `geometry`'s `coordinates` location returned by the feature layer query and the height calculated by [raycasts](https://docs.unrealengine.com/5.0/en-US/using-a-single-line-trace-raycast-by-channel-in-unreal-engine/).
23+
3. Create a widget for the viewport so users can select a stadium from the list fed from the feature service.
24+
25+
Note: You can use `UE_LOG` to print log messages in the **Output Log** window and see if you are gathering the data properly from the feature service.
1426

1527
## About the data
1628

17-
Data for all Major League Baseball Stadiums in the United States [Feature Layer](https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/Major_League_Baseball_Stadiums/FeatureServer/0/query?f=geojson&where=1=1&outfields=TEAM,NAME,LEAGUE) hosted by Esri.
29+
Data for all Major League Baseball Stadiums in the United States [Feature Layer](https://www.arcgis.com/home/item.html?id=f60004d3037e42ad93cb03b9590cafec) hosted by Esri. (Format the request URL for the [query](https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/Major_League_Baseball_Stadiums/FeatureServer/0/query?f=geojson&where=1=1&outfields=TEAM,NAME,LEAGUE).)
1830

1931
Elevation data is loaded from the [Terrain 3D elevation layer](https://www.arcgis.com/home/item.html?id=7029fb60158543ad845c7e1527af11e4) hosted by Esri.
2032

0 commit comments

Comments
 (0)