<?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: Show mouse coordinates in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498165#M6115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my code sample that works. if somebody is interested in&lt;/P&gt;&lt;P&gt;&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;//get screen coordinates&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;System.Windows.Point screenPoint = e.GetPosition(MySceneView);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;ScreenCoordsTextBlock.Text = string.Format("Screen Coords: X = {0}, Y = {1}",&amp;nbsp;screenPoint.X, screenPoint.Y);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;//get geographical coordinates&lt;/P&gt;&lt;P&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;&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));&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;DIV style="position: absolute; left: 43px; top: 6px;"&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 09:34:38 GMT</pubDate>
    <dc:creator>VanyaIvanov</dc:creator>
    <dc:date>2020-08-03T09:34:38Z</dc:date>
    <item>
      <title>Show mouse coordinates</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498161#M6111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to display mouse cursor coordintes on Scene(not Map)?&lt;/P&gt;&lt;P&gt;I&amp;nbsp;didn't find any&amp;nbsp;code example. I've found how to display coordinates on Map(&lt;A class="link-titled" href="https://developers.arcgis.com/net/10-2/sample-code/ShowMouseCoordinates/" title="https://developers.arcgis.com/net/10-2/sample-code/ShowMouseCoordinates/"&gt;Show Mouse Coordinates | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;). But it seems it doesn't fit for Scene&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2020 06:21:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498161#M6111</guid>
      <dc:creator>VanyaIvanov</dc:creator>
      <dc:date>2020-07-17T06:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Show mouse coordinates</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498162#M6112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the Scene.ScreenToBaseSurface method from a MouseMove event:&amp;nbsp;&lt;A class="link-bare" href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/M_Esri_ArcGISRuntime_UI_Controls_SceneView_ScreenToBaseSurface.htm" title="https://developers.arcgis.com/net/latest/wpf/api-reference/html/M_Esri_ArcGISRuntime_UI_Controls_SceneView_ScreenToBaseSurface.htm"&gt;https://developers.arcgis.com/net/latest/wpf/api-reference/html/M_Esri_ArcGISRuntime_UI_Controls_SceneView_ScreenToBaseSurface.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's also a more accurate ScreenToLocationAsync method that takes&amp;nbsp;data in layers into account, but this is a lot slower and not recommended to be used on a mouse move event.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2020 06:32:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498162#M6112</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2020-07-17T06:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Show mouse coordinates</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498163#M6113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could you please&amp;nbsp;give me link to code example? i didnt understand how to use it(&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2020 07:28:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498163#M6113</guid>
      <dc:creator>VanyaIvanov</dc:creator>
      <dc:date>2020-07-17T07:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Show mouse coordinates</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498164#M6114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's basically&amp;nbsp;identical to the sample you linked to, but with sceneview and the ScreenToBaseSurface method instead of ScreenToLocation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2020 18:10:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498164#M6114</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2020-07-17T18:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Show mouse coordinates</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498165#M6115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my code sample that works. if somebody is interested in&lt;/P&gt;&lt;P&gt;&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;//get screen coordinates&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;System.Windows.Point screenPoint = e.GetPosition(MySceneView);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;ScreenCoordsTextBlock.Text = string.Format("Screen Coords: X = {0}, Y = {1}",&amp;nbsp;screenPoint.X, screenPoint.Y);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;//get geographical coordinates&lt;/P&gt;&lt;P&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;&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));&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;DIV style="position: absolute; left: 43px; top: 6px;"&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 09:34:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498165#M6115</guid>
      <dc:creator>VanyaIvanov</dc:creator>
      <dc:date>2020-08-03T09:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Show mouse coordinates</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498166#M6116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd recommend you be very careful with running async code in an event as frequent as mouse-move. The async get location call is actually quite expensive, so it could severely affect rendering performance. I'd recommend using the synchronous ScreenToBaseSurface method instead in this event, and not run the high-accuracy one until after the mouse stopped moving, as well as avoid doing it while&amp;nbsp;SceneView.IsNavigating==true (I doubt it's really that useful while navigating anyway)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2020 17:39:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/498166#M6116</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2020-08-03T17:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Show mouse coordinates</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/1121572#M10674</link>
      <description>&lt;P&gt;Just an FYI that link is no longer working.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 04:15:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/show-mouse-coordinates/m-p/1121572#M10674</guid>
      <dc:creator>Comprodigy</dc:creator>
      <dc:date>2021-12-01T04:15:55Z</dc:date>
    </item>
  </channel>
</rss>

