Display a map (UI)

Learn how to set a basemap, elevation source, data layers and display a specific area by using the Modes Panel UI.

In this tutorial, you will create a Unreal Engine local scene using a basemap layer service, and data layers. The surface of the scene is defined with an elevation layer and the camera is positioned to display a cropped area of New York City.

Local scene UI

Prerequisites

Before starting this tutorial, you should:

  1. You need an ArcGIS Developer account or ArcGIS Online account and an API key to access ArcGIS services. If you don't have an account, sign up for free.

  2. Ensure your development environment meets the system requirements.

  3. Follow install and setup steps and install the plugin.

If you are not familiar with the Unreal Engine's interface, see Unreal Editor Interface for the information about the most common editor panels, and how to make full use of them.

Steps

Create a new level and open the Modes Panel UI

  1. Click on File on the Menu Bar and select New Level.

  2. Select Empty Level in the popup window.

    New Level

  3. Click Window in the menu bar and select World Settings.

    Open World Wettings

  4. Open Advanced under World and check the Enable Large Worlds.

    Enable Large Worlds

  5. Click the the Select Mode drop-down in the Unreal UI toolbar and select ArcGIS Maps SDK.

    Select Mode

  6. The Modes Panel UI on the left side.

    Open the Modes Panel UI

Create a map

  1. In the Modes Panel UI, click the Map tab.

  2. Select Local for the Map Type.

  3. In the Origin Location section you can set up the the center of your GIS scene with its coordinates and a spatial reference Well-Known ID (WKID). For the tutorial, set the parameters to these values:

    • Longitude = -74;
    • Latitude = 41;
    • Altitude = 0;
    • Spatial Reference WKID: 4326

    For the information regarding the spatial reference, see the spatial references page.

  4. Add mark on the Enable Extent check box and display the Map Extent section.

  5. In Map Extent, set the extent of the map to these values:

    • Longitude = -74.0;
    • Latitude = 40.72;
    • Shape: Circle;
    • Spatial Reference WKID: 4326
    • Shape Dimensions (Radius) = 5000;
  6. Click on the Create button. In the Outliner panel, ArcGIS Map Actor is created.

    ArcGIS Map Actor

This is the result of the Map tab.

Map tab result

Set the API key

In this tutorial you will use a preset basemap which requires an API key.

  1. Go to your developer dashboard to get your API key.

  2. Click on the Auth tab to display the panel content.

  3. Set the API key in the API Key section.

Make sure your API key is in the field where you see Paste your API key here in this screenshot. You can find the information about how to get API keys by clicking on Get an API Key in the UI.

Set the API key

For more information about API keys, refer to the API keys section.

Create and set up a camera

ArcGIS Maps SDK for Unreal Engine will load better LODs for areas closer to the view and lower LODs for the areas that are further away with the ArcGIS Camera.

  1. Click on the Camera tab.

  2. The Camera Position defines the initial point of view of the camera. For the tutorial, set the parameters to these values:

    • Longitude = -74.054921;
    • Latitude = 40.691242;
    • Altitude = 3000;
    • Spatial Reference WKID: 4326
  3. The Camera Rotation defines the angle of the camera.

    • Heading = 55;
    • Pitch = 58;
    • Roll = 0;
  4. Click on the Create button. In the Outliner panel, Default Pawn Actor is created.

    Default Pawn

This is the result of the Camera tab.

Camera tab result

Replace the Default Pawn with the ArcGIS Pawn

You can move the camera around by using WASD keys during the Editor mode regardless you attach a controller Component to it before it responds to player input. For the runtime, you can attach your own controller Component to the Default Pawn. You can also replace the Default Pawn with the sample ArcGIS Pawn that is used in the sample levels. For the information about the sample ArcGIS Pawn, see the ArcGIS Pawn section.

  1. Open the location below in the Content Drawer.

    Plugins > ArcGIS Maps SDK for Unreal ENgine C++ Classes > ArcGISSamples > Public

  2. Click on the ArcGIS Pawn to select it. When it is selected the background color changes to blue.

  3. Right click the Default Pawn in the Outliner panel.

  4. Click on Replace Selected Actor with, then select ArcGIS Pawn.

Set basemap

In this tutorial, you will use one from the preset basemap.

  1. Click on the Basemap tab and display the panel content.

  2. Make sure World Imagery is selected.

This is the result of setting up the basemap to World Imagery from the preset.

Set basemap

Set elevation

In this tutorial, you will use the default elevation from the Modes Panel UI.

  1. Click on the Elevation tab and display the panel content.

  2. Make sure Default Elevation is selected.

This is the result of the elevation panel.

Set elevation

Add data layers

You will add three tile image layers and one 3D object scene layer from ArcGIS Online.

  1. Click on the Layers tab.

  2. In the Add Data section, select ArcGIS image Layer from the Type.

  3. Enter the layer's online service URL in the URL field to add a raster tile layer UrbanObservatory_NYC_TransitFrequency.

    Use dark colors for code blocksCopy
     
    1
    https://tiles.arcgis.com/tiles/nGt4QxSblgDfeJn9/arcgis/rest/services/UrbanObservatory_NYC_TransitFrequency/MapServer
  4. Type 01 - New York Transit Frequency in the Layer Name field.

  5. Click on the Add button to add the layer to your map. When it's added you can see it in the Layers section.

  6. Repeat steps 1-4 to create the other layers.

    • Layer name: 02 - New York Industrial Areas

      ArcGIS Online item: New_York_Industrial

      Use dark colors for code blocksCopy
       
      1
      https://tiles.arcgis.com/tiles/nGt4QxSblgDfeJn9/arcgis/rest/services/New_York_Industrial/MapServer
    • Layer name: 03 - New York Population Density

      ArcGIS Online item: NewYorkCity_PopDensity

      Use dark colors for code blocksCopy
       
      1
      https://tiles.arcgis.com/tiles/4yjifSiIG17X0gW4/arcgis/rest/services/NewYorkCity_PopDensity/MapServer
  7. In the Add Data section, select ArcGIS 3D Object Scene Layer from the drop-down list.

  8. Enter the layer's online service URL in the URL field to add a 3D object scene layer New York, USA Buildings, and name the layer 04 - New York Buildings.

    Use dark colors for code blocksCopy
     
    1
    https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_NewYork_17/SceneServer
  9. Click on the Add button and add the layer to your map.

  10. On the Layers section, change the opacity of the layers 01 and 02 to 0.9 and 0.6. Keep the default opacity value of layers 03 and 04.

This is the result of the Layers panel.

Add data

Set up sky and lighting

  1. From the quick add menu on the toolbar, select Lights > Directional Light and drag it into the level to create a Directional Light. For more information about Directional Lights, see Lights.

    Directional Light

  2. Select the Directional Light in the Outliner, and open the Transform section in the Details panel.

  3. Reset the Location and Set the Rotation to:

    • X: 0
    • Y: -28
    • Z: -28
  4. Set the Mobility to Movable.

    Directional Light Transform

  5. In the Light section, change the Intensity Value to 3.1416.

  6. In the Cascaded Shadow Maps section, change the Dynamic Shadow Distance MovableLight to 2000000.

  7. In the Atmosphere and Cloud section, enable Atmosphere Sun Light.

  8. In the Actor > Spawn Collision Handling Method section, select Always Spawn, Ignore Collisions.

    Directional Light Actor

  9. From the quick add menu on the toolbar, select Lights > Sky Light and drag it into the level to create a Sky Light. For more information about Sky Light, see Lights.

  10. In the Transform section, reset the Location and set the Mobility to Movable.

  11. In the Light section, enable Real Time Capture.

    SkyLight

  12. From the quick add menu on the toolbar, select Visual Effects > Sky Atmosphere and drag it into the level to create a Sky. For more information about Sky Atmosphere, see Fog Effects.

  13. In the Planet section, change the Ground Radius to 6378.137207.

You have successfully configured local scene with the Modes Panel UI.

In the Outliner panel, double-click the Pawn Actor to move the Editor camera to the configured camera position. Use the WASD keys while holding the right mouse button mouse to move around, or hold the left mouse button to look around during the Editor mode.

Click the Play icon on the Tool bar, and Use the WASD keys to move around, hold the right mouse button mouse to look around or hold the left mouse button to pan. If you cannot move the camera during runtime, make sure you have replaced the Default Pawn with the ArcGIS Pawn.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.