Layers
A layer can access data from a data source. You can use an ArcGIS Map as a container for layers to display geographic data in an Unreal Engine level.
There are two groups of layers that an ArcGIS Map contains:
- Basemap layers, used for geographic context.
- Data layers, used to display geographic data within the context of the basemap.
A layer's data source can either be a data service or a data file stored locally.
Basemap Layers
You can use one or more basemap layers to provide a background of geographical context for the data layers displayed in your Unreal Engine level.
Basemap layer types
The basemap layer service provides several vector tile and image tile basemap layers that you can use for your applications.
Vector tile basemaps are vector tile layers capable of displaying high-density geographic data as vector tile data. In addition to the default vector basemap styles, you can create custom vector basemap styles with ArcGIS Vector Tile Style Editor.
Image tile layers are pre-rendered images hosted in ArcGIS that can be displayed at different scales.
For a complete list of styles, see the Basemap layer service topic in the Mapping APIs and location services guide.
Basemaps
Basemap layers are collected together in a basemap and you use the Basemap property of the ArcGIS Map to control the basemap in your level.
The following are the source and source types to create a Basemap to use in your ArcGIS Map.
Source | Source type |
---|---|
Basemap layer | Basemap |
Web map | Basemap |
Image tile layer | Image layer |
Vector tile layer | Vector tile layer |
Basemaps from the basemap layer service (basemap styles service)
The basemap layer service provides global basemap layers in a variety of styles to use in mapping applications.
There are two ways to access basemap layers: through the basemap styles service and the tile services. You can access the basemap styles service with a URL and parameters to get the JSON definition for a specific basemap style. To see a complete list of styles, visit the Basemap layer service in the Mapping APIs and location services guide.
With ArcGIS Maps SDK for Unreal Engine you can use the standard endpoint formatted as follows.
For information about tile services, see the image tile layers and vector tile layers sections.
Basemaps from web maps
As mentioned previously, you can create a basemap from a URL that references a web map by providing the item page URL or the JSON, typically read from an item with type Web Map
which is stored in an ArcGIS Portal.
You can load any web maps that contain image tile layers, vector tile layers, and reference layers as a basemap. It is possible to use web maps that contain other layer types but they will not be displayed in the Viewport.
ArcGIS Maps SDK for Unreal Engine provides several preset basemaps on the Modes Panel UI. These also use the basemap layer service with the web map format.
There are two ways to format the URL to create a basemap from a web map:
- Item page URL
- REST endpoint URL
Set a basemap
In the Basemap panel is a list of selectable, preset basemaps. You can also set a basemap from a basemap layer service, a web map, an image tile layer, a vector tile layer, or a local tile package.
If you do not want to set a basemap, click the ArcGIS Map Actor in the Outliner panel and empty the Basemap field in the Details panel.
The preset basemaps are listed in the World Basemaps for Developers group in ArcGIS Online. Preset basemaps do not include Human Geography Map and Human Geography Dark Map.
To set a custom basemap:
Click the Basemap tab.
Click + Add New at the bottom of the list. A pop-up window opens.
In the Source field, enter a service URL or a local file path.
- To use a basemap layer service or a web map, select Basemap from the Type drop-down list.
- To use an image tile layer service, select Image Layer from the Type drop-down list.
- To use a
.tpk
or.tpkx
tile package as a basemap source, click more options ··· to select the local tile package, then select Image Layer from the Type drop-down list. - To use a vector tile layer service, select Vector Tile Layer from the Type drop-down list.
- To use a
.vtpk
file package as a basemap source, click more options ··· to select the local file package, then select Vector Tile Layer from the Type drop-down list. - To use a privately hosted web map or services, select the matching configuration from the Authentication drop-down list. For more information about using private content, see ArcGIS identity.
Type a Name for your basemap; this will be used to identify it in the basemap gallery.
Click Add to finish creating the custom basemap. The pop-up window closes.
Verify that the custom basemap is selected in the gallery.
To remove a custom basemap registry from the basemap gallery, click on X on the thumbnail.
Click on the ArcGISMap in the Outliner panel.
Expand the Basemap section in the Details panel.
Provide the URL of an online service or local tile package path in the Basemap field.
- To use a basemap layer service or a web map, select Basemap from the Type drop-down list.
- To use an image tile layer service,
.tpk
or.tpkx
tile package, select Image Layer from the Type drop-down list. - To use a vector tile layer service or
.vtpk
tile package as a basemap source, select Vector Tile Layer from the Type drop-down list. - To use a privately hosted web map or services, select the matching configuration from the Authentication drop-down list. For more information about using private content, see ArcGIS identity.
- To set up a basemap, use nodes in ArcGIS Maps SDK > ArcGIS Basemap.
- To create a basemap from a web map, select Create ArcGIS Basemap with Basemap Source to create a basemap and introduce the URL for a web map in the source field.
- To create a basemap from an image tile service, vector tile service, image tile package, or vector tile package, select Create ArcGIS Basemap with Layer Source and Type. Enter an online service URL or a local tile package path in the source field and select ArcGIS Image Layer or ArcGIS Vector Tile Layer as the type according to the source.
- To create a basemap from the basemap styles service, select Create ArcGIS Basemap with Basemap Style. Select a basemap style from the Basemap Style drop-down list.
- Connect the API key variable to the API Key pin.
- Use the Set Basemap node to set a basemap for the ArcGIS Map.
Set a basemap with ArcGISBasemap
. If you want to use an image tile layer, vector tile layer, or a local tile package as the basemap, specify the layer type in the constructor.
Use ArcGISBasemap
to use the preset basemaps that are listed on the Modes Panel UI.
You can find the sample code to set a Basemap in the ArcGISImagery
value with ArcGISBasemap
class in the SampleAPIMapCreator.cpp file. The sample script file is located in:
Plugins/ArcGISMapsSDK/Source/ArcGISSamples/Private
Refer to FAQ for troubleshooting data loading issues.
Data layers
Data layers bring additional geographic data into your Unreal Engine level to be displayed in the context of the basemap. You use the Layers property of the ArcGIS Map to control the data layers in your level. The following layer types are supported:
- Image tile layers
- Vector tile layers
- Scene layers (version 1.7 or higher)
- 3D object scene layers
- Integrated mesh scene layers
- Building scene layers
To find the scene layers version, open the service JSON and look for "service
.
In global scenes, Esri supports data in any geographic coordinate system; for projected coordinate systems, Esri supports Web Mercator when the spatial reference is set to WGS84.
In local scenes, we support any projected coordinate systems; for geographic coordinate systems, we support WGS84 when the spatial reference is set to CGCS 2000.
Refer to Spatial references for more information.
Image tile layers
An image tile layer is a data layer that can access and display image tile data provided by an image tile service or an image tile package.
The spatial reference of the image tile layers should match the spatial reference of the basemap.
Image tile services
An image tile service is a data service that provides static pre-rendered image tiles to display at different scales.
You can use the following kinds of URLs for the source to add image tile services to your ArcGIS Map:
- Item page URL
- Image tile service URL
You can learn more about image tile services in the Mapping APIs and location services guide.
Local image tile packages
Image tile layers can also access data from image tile packages stored locally.
An image tile package is a single .tpk (or .tpkx) file containing image tiles, and you can share the file as you would with any file. Compared with .tpk files, .tpkx files provide better performance on network shares and cloud store directories.
Vector tile layers
A vector tile layer contains vector representations of data across a range of scales that is provided by a vector tile service or vector tile package. In contrast to image tiles, vector tiles can adapt to the resolution of the device they are displayed on and restyled for multiple uses.
The spatial reference of the vector tile layers should match the spatial reference of the basemap.
Vector tile services
A vector tile service is a type of data service that stores and provides access to vector tiles and vector tile style resources.
You can use the following kinds of URLs for the source to add vector tile services to your ArcGIS Map:
- Item page URL
- Vector tile service URL
- Vector tile style URL
You can learn more about vector tile services in the Mapping APIs and location services guide.
Local vector tile packages
A vector tile service can also package vector tiles for offline use as vector tile packages. A vector tile package (.vtpk) is a collection of vector tiles and style resources that are stored on a server. When you publish a vector tile package to ArcGIS Online or ArcGIS Enterprise, a vector tile layer is created.
Scene layers
A scene layer is a type of data layer that is optimized for displaying large amounts of 3D data from a scene service or a local scene layer packages, as defined by the Open Geospatial Consortium's Indexed 3D Scene Layer (I3S) specification.
ArcGIS Maps SDK for Unreal Engine currently supports 3D object scene layers, integrated mesh scene layers, and building scene layers from the I3S specification:
- 3D object scene layer: A 3D object scene layer represents objects such as buildings that are explicitly modeled in 3D. You can visualize a 3D object scene layer with textures embedded into the 3D features. A 3D object scene layer is automatically thinned to improve performance and visibility at different scale ranges. With a 3D object scene layer, you can change the rendering by filtering by attributes. See 3D attributes filtering for more details.
- Integrated mesh scene layer: An integrated mesh scene layer is generally created for citywide 3D mapping. It is often captured by drones and structures from motion mapping.
- Building scene layer: A building scene layer is a 3D representation of a building model, which may be derived from 3D construction content, such as 3D BIM (Building Information Modeling) data. The building scene layer organizes construction data and groups content into standard engineering disciplines. Content in a building scene layer may represent a partial building, an individual building, or multiple buildings on campus.
Scene layers will be reprojected to the spatial reference of the ArcGIS Map when they don't match in both global and local scenes. Therefore, you can use scene layers that are in any geographic and projected coordinate system.
Scene services
A scene service is a data service that provides I3S Scene Layer content. It is optimized for streaming large amounts of 3D data to client applications considering the client's 3D view of the data.
You can use the following kinds of URLs for the source to add scene services to your ArcGIS Map:
- Item page URL
- Scene service URL
Local scene layer packages
Scene layers can also access data from scene layer packages (.slpk files) stored locally.
ArcGIS Maps SDK for Unreal Engine currently supports three types of .slpk files: integrated mesh scene layer package, 3D object scene layer package, and building scene layer package. SLPK files are created using different tools depending on the original data files.
Set data layers
- Click on the Layers tab.
- In the Add New Data section, select a layer type from the Layer Type drop-down list.
- In the Layer Source field, introduce an online service URL. If you want to use a local file package, click on ··· and select the file.
- Introduce a name in the Layer Name field.
- Click on the Add button.
When you click the Add button, the layer is listed under the Layers section.
To use private content, select the matching configuration from the Authentication drop-down list in the Layers section. For more information about using private content, see ArcGIS identity.
- Click the ArcGIS Map Actor in the Outliner panel.
- Expand the ArcGIS Map Component, then the Layers section in the Details panel.
- Click the + icon on the right side of the section to add a new array element.
- Set a Name and select a layer type from Type drop-down list.
- Set an online service URL or a local file path in the Source field.
To use private content, select the matching configuration from the Authentication drop-down list. For more information about using private content, see ArcGIS identity.
- To get a layer collection and add it to the ArcGIS Map, find ArcGIS Maps SDK > ArcGIS Map and select Get Layers and add it to the graph.
- Use the Set Map node to create a layer collection
- To add an image tile layer, use the Create nodes under ArcGIS Image Layer.
- To add a vector tile layer, use the Create nodes under ArcGIS Vector Tile Layer.
- To add a 3D object scene layer, use the Create nodes under ArcGIS 3DObject Scene Layer.
- To add an integrated mesh layer, use the Create nodes under ArcGIS Integrated Mesh Layer.
- To add a building scene layer, use the Create nodes under ArcGIS Building Scene Layer.
- To set properties for the layer, such as name, visibility, and opacity, select the Create node that has Properties in the name (Create Arc GISVector Tile Layer with Properties, for example).
- Connect the API key variable to the API Key pin.
- Use the Add node to add the custom layer to the layer collection.
Use ArcGISImage
, ArcGISVector
, ArcGIS3DObject
, ArcGISIntegrated
, or ArcGISBuilding
according to the layer you add to the level and register them to the ArcGISMap
. Specify the source URL or file path, layer name, opacity value (between 0.0f
and 1.0f
), visibility, and API key in the constructor.
You can find the sample code to add ArcGISImage
and ArcGIS3DObject
in the SampleAPIMapCreator.cpp file. The sample script file is located in:
Plugins/ArcGISMapsSDK/Source/ArcGISSamples/Private
Refer to FAQ for troubleshooting data loading issues.
Layer management
You can toggle layer visibility on and off, change layer opacity, remove and reorder layers. When you have multiple layer sources, the last item added to the collection takes precedence and is displayed topmost in the Modes Panel UI.
You can make the following layer management operations under the Layers tab.
- Change the layer order by dragging it to a new order position. The layer at top of the layer list has the highest priority.
- Change a layer name by typing a new name under the Name field.
- Add a new layer by clicking the + icon.
- Delete a layer by clicking the v icon in the layer name row and selecting Delete.
- Delete all layers at once by clicking the trashcan icon.
- Add a layer source by directly pasting the URL to the Source field or loading a file package via the ... icon.
- Set a value between
0.0
and1.0
or use the slider to set the layer opacity. - Hide a layer by marking the checkbox next to the layer name.
- Click on the triangle icon on the left to expand a layer registry and see the layer properties.
- Change the layer type by clicking on the Type drop-down list.
- Replace the layer source URL or file path.
- Select matching authentication configuration.
- Zoom to a specific layer's extent by clicking on the Zoom To Layer button.
You can make the following layer management operations under the Layers section in the Details panel.
- Change the layer order by dragging it to a new order position. The layer at top of the layer list has the highest priority.
- Change a layer name by typing a new name under the Name field.
- Add a new layer by clicking the + icon.
- Delete a layer by clicking the v icon in the index row and selecting Delete.
- Delete all layers at once by clicking the trashcan icon.
- Add a layer source by directly pasting the URL to the Source field.
- Set a value between
0.0
and1.0
or use the slider to set the layer opacity. - Hide a layer by marking the Is Visible checkbox.
- Click on the triangle icon on the left to expand a layer registry and see the layer properties.
- Change the layer type by clicking on the Type drop-down list.
- Replace the layer source URL or file path.
- Select matching authentication configuration.
When you use the Create node with Properties in their name to add a layer with Blueprints, you can set opacity and visibility in the node (e.g. Create ArcGIS Image Layer with Properties)
For layer management and other layer operations during the play mode, please refer to the nodes under ArcGIS Maps SDK > ArcGIS Layer or ArcGIS Maps SDK > ArcGIS Layer Collections.
For instance:
- To remove a layer, use the Remove node under ArcGIS Layer Collections.
- To change layer opacity, use the Set Opacity node under ArcGIS Layer.
The ArcGISLayer
base class has properties that you can use to layer management during the runtime.
To remove a layer:
You can update a layer's name, opacity, and visibility without needing to rebuild the map.
To change the opacity of a layer:
You can find the sample code to remove a layer and change the opacity of layers in the SampleAPIMapCreator.cs file. The sample script file is in:
Plugins/ArcGISMapsSDK/Source/ArcGISSamples/Private