<?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: showing lat/long on mouse move in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331059#M8507</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The coordinates displayed are the units defined by the maps spatial reference. &lt;BR /&gt;So for example if the maps spatial reference is web mercator the units are meters. You can reproject from webmercator to geographic by using the ESRI.ArcGIS.Client.Bing.WebMercatorToGeographic method.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried using that method, but it returns "Invalid spatial reference." error. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint = MyMap.ScreenToMap(screenPoint);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MapPoint point = ESRI.ArcGIS.Client.Bing.Transform.WebMercatorToGeographic(mapPoint); // error thrown here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MapCoordsTextBlock.Text = string.Format("Coordinates: X = {0}, Y = {1}", Math.Round(point.Extent.XMin, 4), Math.Round(point.Extent.YMin, 4));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Two things: First, is that the correct approach? Second, can I still achieve the geographic coordinates without having to rely on the Bing assembly?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Jan 2011 17:16:26 GMT</pubDate>
    <dc:creator>SangamLama</dc:creator>
    <dc:date>2011-01-28T17:16:26Z</dc:date>
    <item>
      <title>showing lat/long on mouse move</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331057#M8505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I implemented an eventhandler that shows map co-cordinates when mouse hovers on the map. I followed this tutorial &lt;/SPAN&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#MouseCoords"&gt;http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#MouseCoords&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I get huge numbers (example: X=1313829.334, Y=2801189.49) for coordinates instead of the +/- 180 range. I looked at the web service where the map data is coming out of, and noticed that the big numbers seem to be representing the map extent?(XMin: 1315433.26465964&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;YMin: 280294.468654908&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XMax: 1318786.62214751&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;YMax: 283455.239814947)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what's the difference? How can I display the proper coordinates?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jan 2011 16:11:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331057#M8505</guid>
      <dc:creator>SangamLama</dc:creator>
      <dc:date>2011-01-28T16:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: showing lat/long on mouse move</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331058#M8506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The coordinates displayed are the units defined by the maps spatial reference. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So for example if the maps spatial reference is web mercator the units are meters. You can reproject from webmercator to geographic by using the ESRI.ArcGIS.Client.Bing.WebMercatorToGeographic method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jan 2011 16:38:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331058#M8506</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-01-28T16:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: showing lat/long on mouse move</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331059#M8507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The coordinates displayed are the units defined by the maps spatial reference. &lt;BR /&gt;So for example if the maps spatial reference is web mercator the units are meters. You can reproject from webmercator to geographic by using the ESRI.ArcGIS.Client.Bing.WebMercatorToGeographic method.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried using that method, but it returns "Invalid spatial reference." error. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint = MyMap.ScreenToMap(screenPoint);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MapPoint point = ESRI.ArcGIS.Client.Bing.Transform.WebMercatorToGeographic(mapPoint); // error thrown here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MapCoordsTextBlock.Text = string.Format("Coordinates: X = {0}, Y = {1}", Math.Round(point.Extent.XMin, 4), Math.Round(point.Extent.YMin, 4));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Two things: First, is that the correct approach? Second, can I still achieve the geographic coordinates without having to rely on the Bing assembly?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jan 2011 17:16:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331059#M8507</guid>
      <dc:creator>SangamLama</dc:creator>
      <dc:date>2011-01-28T17:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: showing lat/long on mouse move</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331060#M8508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1. Don't use the bing one (its obsolete). Use the ESRI.ArcGIS.Client.Projection.WebMercator class instead (that way you don't need a reference to the Bing assembly either).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. If you get invalid spatial reference, then your input points are not WebMercator, and you will need to use the GeometryService task to perform the projection serverside (note: Don't try this on mousemove, which would swamp your server in requests).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 16:46:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331060#M8508</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2011-01-31T16:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: showing lat/long on mouse move</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331061#M8509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;1. Don't use the bing one (its obsolete). Use the ESRI.ArcGIS.Client.Projection.WebMercator class instead (that way you don't need a reference to the Bing assembly either).&lt;BR /&gt;2. If you get invalid spatial reference, then your input points are not WebMercator, and you will need to use the GeometryService task to perform the projection serverside (note: Don't try this on mousemove, which would swamp your server in requests).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks Morten! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Feb 2011 14:46:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/showing-lat-long-on-mouse-move/m-p/331061#M8509</guid>
      <dc:creator>SangamLama</dc:creator>
      <dc:date>2011-02-01T14:46:44Z</dc:date>
    </item>
  </channel>
</rss>

