<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problems loading custom elevation layers and IntegratedMesh data in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/problems-loading-custom-elevation-layers-and/m-p/1662512#M1167</link>
    <description>&lt;P&gt;If i instead for example add the elevation source like this, it loads. So something funky is going on and it may be seperated from the issue I have with Integrated Mesh layer that in 2.1 sometimes does not render depending on angle of camera. If I downgrade to 2.0 and use the below code, everything works for me.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var temp = new ArcGISElevationSourceInstanceData
{
	Source = uri,
	AuthenticationType = Esri.ArcGISMapsSDK.Authentication.ArcGISAuthenticationType.None,
	IsEnabled = true,
	Type = ArcGISElevationSourceType.ArcGISImageElevationSource,
	Name = layer.Name
};

_mapComp.MapElevation.ElevationSources.Add(temp);
map.Elevation.ElevationSources.Add(new ArcGISImageElevationSource(uri, layer.Name, ""));&lt;/LI-CODE&gt;&lt;P&gt;For some reason when I load an elevation layer from an offline file I need to add it to elevationsources here meanwhile if i use a elevation source from an Enterprise/ArcGIS online server I need to add it to the map.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Oct 2025 15:24:07 GMT</pubDate>
    <dc:creator>ChristofferLindellBolin</dc:creator>
    <dc:date>2025-10-31T15:24:07Z</dc:date>
    <item>
      <title>Problems loading custom elevation layers and IntegratedMesh data</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/problems-loading-custom-elevation-layers-and/m-p/1662479#M1166</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In the latest ArcGIS maps SDK release 2.1 I am having issues loading in custom elevation data and IntegratedMesh data through C# API. It worked in prior 1.* without an issue so there seems to be a problem in the latest release. I use the following code:&lt;/P&gt;&lt;P&gt;Map is created as follows which is called in start:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        private void CreateArcGisMapComponent()
        {
            GameObject go = new GameObject("ArcGISMap");
            _mapComp = go.AddComponent&amp;lt;ArcGISMapComponent&amp;gt;();

            _mapComp.transform.SetParent(transform, false);
            _mapComp.OriginPosition = new ArcGISPoint(Origin.Longitude, Origin.Latitude, Origin.Altitude, ArcGISSpatialReference.WGS84());
            _mapComp.MeshCollidersEnabled = _enableMeshColliders;
            _mapComp.MapType = _mapType;
            _mapComp.MapTypeChanged += new ArcGISMapComponent.MapTypeChangedEventHandler(() =&amp;gt; CreateArcGISMap());

            GameObject rebaseObject = new GameObject("Rebase Component");
            rebaseObject.transform.SetParent(go.transform, false);
            _rebaseComponent = rebaseObject.AddComponent&amp;lt;CustomRebaseComponent&amp;gt;();

            if (ApplicationBootstrapper.Instance.IsDebugEnabled(typeof(TerrainManagerHostService)))
            {
                ArcGISViewStateLoggingComponent logger = _mapComp.gameObject.GetComponent&amp;lt;ArcGISViewStateLoggingComponent&amp;gt;();
                if (logger == null)
                {
                    _mapComp.gameObject.AddComponent&amp;lt;ArcGISViewStateLoggingComponent&amp;gt;();
                }
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        private uint CreateArcGISMap()
        {
            uint result = Res.OK;

            List&amp;lt;TerrainDefinition&amp;gt; definitions = _parser.GetDefinitions().ToList();

            var map = new ArcGISMap(_mapComp.MapType);
            var elevationLayers = new ArcGISCollection&amp;lt;ArcGISElevationSource&amp;gt;();
            var layers = new ArcGISCollection&amp;lt;ArcGISLayer&amp;gt;();

            foreach (TerrainDefinition definition in definitions)
            {
                result = ValidateConditions(definition, out ArcGISMapLayer layer, out TerrainSource source);
                if (Res.CheckCallFailed(result))
                {
                    break;
                }

                string uri = source.Uri.IsFile ? source.Uri.LocalPath : source.Uri.ToString();
                if (layer.Type == ArcGISSourceType.Basemap)
                {
                    if (!string.IsNullOrEmpty(map.Basemap.Source))
                    {
                        LOG.Error("A basemap has already been added, multiple basemaps are not supported!");
                        result = RES.E_SERVICE_INVALID_STATE;
                        break;
                    }

                    if (layer.LayerSourceType == ArcGISLayerType.ArcGISImageLayer)
                    {
                        map.Basemap = new ArcGISBasemap(uri, ArcGISLayerType.ArcGISImageLayer, "");
                    }
                    else if (layer.LayerSourceType == ArcGISLayerType.ArcGISVectorTileLayer)
                    {
                        map.Basemap = new ArcGISBasemap(uri, ArcGISLayerType.ArcGISVectorTileLayer, "");
                    }
                    else
                    {
                        map.Basemap = new ArcGISBasemap(uri, "");
                    }

                    LOG.Debug($"Added Basemap {Enum.GetName(typeof(ArcGISLayerType), _mapComp.BasemapType)} from URL: \"{uri}\"");

                }
                else if (layer.Type == ArcGISSourceType.Elevation)
                {
                    var elevation = new ArcGISElevationSource(uri, ArcGISElevationSourceType.ArcGISImageElevationSource, "");
                    elevationLayers.Add(elevation);
                    LOG.Debug($"Added Elevation layer from URL: \"{uri}\"");
                }
                else
                {
                    layers.Add(new ArcGISLayer(uri, layer.LayerSourceType, ""));
                    LOG.Debug($"Added {Enum.GetName(typeof(ArcGISLayerType), layer.LayerSourceType)} from URL: \"{uri}\"");
                }
            }

            if (Res.CheckCallFailed(result))
            {
                return result;
            }

            if (string.IsNullOrEmpty(map.Basemap.Source))
            {
                LOG.Warn("Missing basemap, creating an empty basemap");
                _mapComp.Map = new ArcGISMap(ArcGISSpatialReference.WGS84(), _mapType);
            }
            else
            {
                map.Elevation = new ArcGISMapElevation(elevationLayers);
            }

            map.Layers = layers;
            _mapComp.View.Map = map;
            _mapComp.Map.LoadStatusChanged += OnMapStatusChanged;
            _mapComp.View.SpatialReferenceChanged += OnSpatialReferenceChanged;

            return result;
        }&lt;/LI-CODE&gt;&lt;P&gt;And if i get it to load, my integrated mesh data can look like this and I need to move the camera around to get it to load:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristofferLindellBolin_0-1761923096412.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/142988i047E5AFE96B08A5F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristofferLindellBolin_0-1761923096412.png" alt="ChristofferLindellBolin_0-1761923096412.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also, another issue which bothers me is that when I update the map through C# script, these changes does not update the MapComponent in the editor.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 15:05:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/problems-loading-custom-elevation-layers-and/m-p/1662479#M1166</guid>
      <dc:creator>ChristofferLindellBolin</dc:creator>
      <dc:date>2025-10-31T15:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problems loading custom elevation layers and IntegratedMesh data</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/problems-loading-custom-elevation-layers-and/m-p/1662512#M1167</link>
      <description>&lt;P&gt;If i instead for example add the elevation source like this, it loads. So something funky is going on and it may be seperated from the issue I have with Integrated Mesh layer that in 2.1 sometimes does not render depending on angle of camera. If I downgrade to 2.0 and use the below code, everything works for me.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var temp = new ArcGISElevationSourceInstanceData
{
	Source = uri,
	AuthenticationType = Esri.ArcGISMapsSDK.Authentication.ArcGISAuthenticationType.None,
	IsEnabled = true,
	Type = ArcGISElevationSourceType.ArcGISImageElevationSource,
	Name = layer.Name
};

_mapComp.MapElevation.ElevationSources.Add(temp);
map.Elevation.ElevationSources.Add(new ArcGISImageElevationSource(uri, layer.Name, ""));&lt;/LI-CODE&gt;&lt;P&gt;For some reason when I load an elevation layer from an offline file I need to add it to elevationsources here meanwhile if i use a elevation source from an Enterprise/ArcGIS online server I need to add it to the map.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 15:24:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/problems-loading-custom-elevation-layers-and/m-p/1662512#M1167</guid>
      <dc:creator>ChristofferLindellBolin</dc:creator>
      <dc:date>2025-10-31T15:24:07Z</dc:date>
    </item>
  </channel>
</rss>

