<?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 ScreenToMap() retuning wrong values in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/screentomap-retuning-wrong-values/m-p/125892#M3128</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;SPAN&gt; I am facing a issue with the ScreenToMap() method of the API. Whenever a user clicks on the map I'm capturing that event and performing a ScreeToMap() conversion on that point. Most of the time the conversion is correct, however, sometimes the returned value is wrong. I have confirmed the wrong values by running a mouse hover event on the map which gives me the current x,y co-ordinates corresponding to the current mouse location on the map. The map is in WGS1984.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If anybody else has ever faced the same issue or a relative issue please share your experience.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jaskirat&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Aug 2010 16:45:19 GMT</pubDate>
    <dc:creator>JaskiratAnand</dc:creator>
    <dc:date>2010-08-31T16:45:19Z</dc:date>
    <item>
      <title>ScreenToMap() retuning wrong values</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/screentomap-retuning-wrong-values/m-p/125892#M3128</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;SPAN&gt; I am facing a issue with the ScreenToMap() method of the API. Whenever a user clicks on the map I'm capturing that event and performing a ScreeToMap() conversion on that point. Most of the time the conversion is correct, however, sometimes the returned value is wrong. I have confirmed the wrong values by running a mouse hover event on the map which gives me the current x,y co-ordinates corresponding to the current mouse location on the map. The map is in WGS1984.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If anybody else has ever faced the same issue or a relative issue please share your experience.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jaskirat&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Aug 2010 16:45:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/screentomap-retuning-wrong-values/m-p/125892#M3128</guid>
      <dc:creator>JaskiratAnand</dc:creator>
      <dc:date>2010-08-31T16:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: ScreenToMap() retuning wrong values</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/screentomap-retuning-wrong-values/m-p/125893#M3129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Make sure you give it coordinates that are relative to the upper left corner of the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can transform them using the TransformToVisual command. Ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Point relativeToMap = uiElementThatInputPointAreRelativeTo.TransformToVisual(MyMap).Transform(inputPoint);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Aug 2010 18:42:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/screentomap-retuning-wrong-values/m-p/125893#M3129</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2010-08-31T18:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: ScreenToMap() retuning wrong values</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/screentomap-retuning-wrong-values/m-p/125894#M3130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Make sure you give it coordinates that are relative to the upper left corner of the map.&lt;BR /&gt;You can transform them using the TransformToVisual command. Ex:&lt;BR /&gt;Point relativeToMap = uiElementThatInputPointAreRelativeTo.TransformToVisual(MyMap).Transform(inputPoint);&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried TransformToVisualMethod but still values are wrong. How to give relative to upper left corner of the Map?. I am using ESRI SL 1.2 API. Can you please elobrate on this issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 09:32:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/screentomap-retuning-wrong-values/m-p/125894#M3130</guid>
      <dc:creator>LakshmananVenkatesan</dc:creator>
      <dc:date>2010-09-06T09:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: ScreenToMap() retuning wrong values</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/screentomap-retuning-wrong-values/m-p/125895#M3131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have tested the following code, works fine. Basically, I added a polygon drawing points to a point collection and draw them again. If I use a UI element, a textbox for example, the polygon will shift to right to some extent. However, I found this works great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var ps = e.GetPosition(null);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Point aPnt = this.TransformToVisual(Map).Transform(ps);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint = Map.ScreenToMap(aPnt);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_measurPntCol.Add(mapPoint);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 20:07:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/screentomap-retuning-wrong-values/m-p/125895#M3131</guid>
      <dc:creator>ShenglinXu</dc:creator>
      <dc:date>2011-06-24T20:07:06Z</dc:date>
    </item>
  </channel>
</rss>

