Query objects from the feature layer provided, or provide your own, in order to show them on the map.
- Open the FeatureLayer_lvl level.
- Click on the ArcGISMapActor in the Outliner panel.
- Set your API key under Authentication section in the Details panel.
- Click play and select a stadium from the list.
- Click Play in Unreal Editor.
- Input your API key under the API Key Drop down.
- Click the Sample Drop Down and select Feature Layer.
- Already available is a Feature Layer of park trees, upon running the scene, these feature items will be spawned in at their default latitude and longitude and with all of the properties associated with that feature item.
- Clicking on any of these objects under the Outliner in unreal to see it's latatude, longitude, and any properties recieved by the query.
- Under the outfields drop down, by default it will be set to "Get All Outfields". Clicking on any of the other outfields will deselect "Get All Outfields" and will only get the outfield selected. Multi-select is supported. Outfields are the properties associated with the individual features.
If the user would like to change the default link, they may place the link into the input field on screen. However if the link they plan to use has different Request Headers than the default ones we have set (/0/, query?, f=geojson, where=1=1, outfields=*), then the user will need to change them on the bp_feature game object in the Outliner. Each header has a different job for the link and gets added to the link once the user enters it into the input field.
- Create a new C++ class and make a http request to query a feature layer.
- Create a new Blueprint Actor class
- Create the event to place the data returned from the feature layer.
- Create a function to spawn the actor according to the data recieved in teh query.
- Attach the ArcGIS Location Component to the static stadium mesh model.
- Create a function to place the static mesh model on the
coordinateslocation returned by the feature layer query and the height calculated by raycasts.
- Create a widget for the viewport so users can select a stadium from the list fed from the feature service.
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.
Elevation data is loaded from the Terrain 3D elevation layer hosted by Esri.
Feature Layer, Data Collection