<?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 Show height in mouse position in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/show-height-in-mouse-position/m-p/751255#M9407</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to show height above the sea level in mouse cursor point on the surface.&amp;nbsp;How&amp;nbsp;can i get&amp;nbsp;it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My mouse cursor handler (i display cursor coordinates, but the third parameter should be height) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private async void MySceneView_MouseMove(object sender, MouseEventArgs e)&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; if (MySceneView.GetCurrentViewpoint(ViewpointType.BoundingGeometry) == null)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; System.Windows.Point screenPoint = e.GetPosition(MySceneView);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; MapPoint mapPoint = new MapPoint(0,0,0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; mapPoint = await MySceneView.ScreenToLocationAsync(screenPoint);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; MapCoordsTextBlock.Text = string.Format("Map Coords: X = {0}, Y = {1}, Z = {2}",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Math.Round(mapPoint.X, 4), Math.Round(mapPoint.Y, 4), "I need height in meteres here");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And just in case my scene initialization (i use geotiff data for 3d relief) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private async void CreateNewScene()&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Scene newScene = new Scene(Basemap.CreateImagery());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; RasterElevationSource elevationSource = new RasterElevationSource(new[]@"D:\Programms\ArcGis&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; \14072020geotiff\DEM_geotiff\alwdgg.tif" });&lt;BR /&gt;&amp;nbsp; &amp;nbsp; await elevationSource.LoadAsync();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Surface elevationSurface = new Surface();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; elevationSurface.ElevationSources.Add(elevationSource);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; await elevationSurface.LoadAsync();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; newScene.BaseSurface = elevationSurface;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Scene = newScene;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; await Scene.BaseSurface.LoadAsync();&lt;BR /&gt; }&lt;/P&gt;&lt;DIV style="position: absolute; left: 616px; top: 52px;"&gt;&lt;DIV class="gtx-trans-icon"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Aug 2020 10:26:21 GMT</pubDate>
    <dc:creator>VanyaIvanov</dc:creator>
    <dc:date>2020-08-03T10:26:21Z</dc:date>
    <item>
      <title>Show height in mouse position</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/show-height-in-mouse-position/m-p/751255#M9407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to show height above the sea level in mouse cursor point on the surface.&amp;nbsp;How&amp;nbsp;can i get&amp;nbsp;it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My mouse cursor handler (i display cursor coordinates, but the third parameter should be height) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private async void MySceneView_MouseMove(object sender, MouseEventArgs e)&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; if (MySceneView.GetCurrentViewpoint(ViewpointType.BoundingGeometry) == null)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; System.Windows.Point screenPoint = e.GetPosition(MySceneView);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; MapPoint mapPoint = new MapPoint(0,0,0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; mapPoint = await MySceneView.ScreenToLocationAsync(screenPoint);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; MapCoordsTextBlock.Text = string.Format("Map Coords: X = {0}, Y = {1}, Z = {2}",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Math.Round(mapPoint.X, 4), Math.Round(mapPoint.Y, 4), "I need height in meteres here");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And just in case my scene initialization (i use geotiff data for 3d relief) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private async void CreateNewScene()&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Scene newScene = new Scene(Basemap.CreateImagery());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; RasterElevationSource elevationSource = new RasterElevationSource(new[]@"D:\Programms\ArcGis&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; \14072020geotiff\DEM_geotiff\alwdgg.tif" });&lt;BR /&gt;&amp;nbsp; &amp;nbsp; await elevationSource.LoadAsync();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Surface elevationSurface = new Surface();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; elevationSurface.ElevationSources.Add(elevationSource);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; await elevationSurface.LoadAsync();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; newScene.BaseSurface = elevationSurface;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Scene = newScene;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; await Scene.BaseSurface.LoadAsync();&lt;BR /&gt; }&lt;/P&gt;&lt;DIV style="position: absolute; left: 616px; top: 52px;"&gt;&lt;DIV class="gtx-trans-icon"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2020 10:26:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/show-height-in-mouse-position/m-p/751255#M9407</guid>
      <dc:creator>VanyaIvanov</dc:creator>
      <dc:date>2020-08-03T10:26:21Z</dc:date>
    </item>
  </channel>
</rss>

