<?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: Change Elevation Source at runtime in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/change-elevation-source-at-runtime/m-p/1294964#M11878</link>
    <description>&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Yes it works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This Code Works:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;RasterElevationSource elevationSource = null;
if (isFile1)
{
     elevationSource = new RasterElevationSource(new List&amp;lt;string&amp;gt; { @"C:\File1.tif" });
}
else
{
     elevationSource = new RasterElevationSource(new List&amp;lt;string&amp;gt; { @"C:\File2.tif" });
}

Surface surface = new Surface();
surface.ElevationSources.Add(elevationSource);
await elevationSource.LoadAsync();
await surface.LoadAsync();
MyScene.BaseSurface = surface;&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 01 Jun 2023 14:18:19 GMT</pubDate>
    <dc:creator>FlorianKowalsky</dc:creator>
    <dc:date>2023-06-01T14:18:19Z</dc:date>
    <item>
      <title>Change Elevation Source at runtime</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/change-elevation-source-at-runtime/m-p/1294447#M11874</link>
      <description>&lt;P&gt;Is it possible to Change the ElevationSource at runtime?&lt;/P&gt;&lt;P&gt;I have two elevation Files (File1.tif and File2.tif) and i want to switch them.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;MyScene.BaseSurface.ElevationSources.Clear());

if(file1)
{
	elevationSource = new RasterElevationSource(new List&amp;lt;string&amp;gt; { @"C:\File1.tif" });
}
else
{
	elevationSource = new RasterElevationSource(new List&amp;lt;string&amp;gt; { @"C:\File2.tif" });
}

elevationSource.LoadAsync();
MyScene.BaseSurface.ElevationSources.Add(elevationSource);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if i switch, the Elevation sources seemed to be merged.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 12:42:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/change-elevation-source-at-runtime/m-p/1294447#M11874</guid>
      <dc:creator>FlorianKowalsky</dc:creator>
      <dc:date>2023-05-31T12:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Change Elevation Source at runtime</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/change-elevation-source-at-runtime/m-p/1294627#M11875</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/442398"&gt;@FlorianKowalsky&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for reaching out to us with your question. You should be able to do it, except that you found a bug. I've logged an internal bug for it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a workaround, you can create and set (on the scene) a new baseSurface object every time, with the desired elevation source. Hopefully, that'll get you going in the meantime. Please let us know if you run into any further issues.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Koushik&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 18:14:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/change-elevation-source-at-runtime/m-p/1294627#M11875</guid>
      <dc:creator>KoushikHajra</dc:creator>
      <dc:date>2023-05-31T18:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Change Elevation Source at runtime</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/change-elevation-source-at-runtime/m-p/1294964#M11878</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Yes it works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This Code Works:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;RasterElevationSource elevationSource = null;
if (isFile1)
{
     elevationSource = new RasterElevationSource(new List&amp;lt;string&amp;gt; { @"C:\File1.tif" });
}
else
{
     elevationSource = new RasterElevationSource(new List&amp;lt;string&amp;gt; { @"C:\File2.tif" });
}

Surface surface = new Surface();
surface.ElevationSources.Add(elevationSource);
await elevationSource.LoadAsync();
await surface.LoadAsync();
MyScene.BaseSurface = surface;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Jun 2023 14:18:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/change-elevation-source-at-runtime/m-p/1294964#M11878</guid>
      <dc:creator>FlorianKowalsky</dc:creator>
      <dc:date>2023-06-01T14:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Change Elevation Source at runtime</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/change-elevation-source-at-runtime/m-p/1295018#M11879</link>
      <description>&lt;P&gt;That's great to see! If you have any further questions, please reach out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 15:55:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/change-elevation-source-at-runtime/m-p/1295018#M11879</guid>
      <dc:creator>KoushikHajra</dc:creator>
      <dc:date>2023-06-01T15:55:15Z</dc:date>
    </item>
  </channel>
</rss>

