<?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 Measurement widget 2.4 Location BUG in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/measurement-widget-2-4-location-bug/m-p/8508#M796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I came across with something that I might be a bug in the location tool for the measurement widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was looking for ways of customizing the Location coordinates to UTM so I had to use the workaround and change the inner html on the widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;location = dojo.query('[widgetid=\"result\"]')[0];&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;By doing this I was able to Add UTM coordinates right bellow the default Lat Long.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I happened to notice that the coordinates would not match.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After comparing and testing I found that the default Lat Long coordinates coming from the widget are wrong when either Lat Long is negative. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example use decimal degree coordinates from a monument here in the university of Calgary: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lon -114.131852814035 Lat 51.079891659168&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The correct coordinates in degree minute second should be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lon: -114°7'55" Lat: 51°4'48"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead the Widget gives:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lon: -115°52'5"&amp;nbsp; Lat: 51°4'48"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Longitude is almost 2 degrees off, while Latitude is OK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe the problem might be with the Widget using Math.floor function when converting the coordinates to DMS. for example if you do Math.floor(-114.131852814035) = -115&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps using the ABS would fix the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (deg &amp;lt; 0) {
&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; signal = "-";
&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; deg = Math.abs(deg);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The signal could be added to the integer degree afterwards.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Aug 2011 18:33:36 GMT</pubDate>
    <dc:creator>JulianoKersting</dc:creator>
    <dc:date>2011-08-11T18:33:36Z</dc:date>
    <item>
      <title>Measurement widget 2.4 Location BUG</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/measurement-widget-2-4-location-bug/m-p/8508#M796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I came across with something that I might be a bug in the location tool for the measurement widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was looking for ways of customizing the Location coordinates to UTM so I had to use the workaround and change the inner html on the widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;location = dojo.query('[widgetid=\"result\"]')[0];&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;By doing this I was able to Add UTM coordinates right bellow the default Lat Long.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I happened to notice that the coordinates would not match.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After comparing and testing I found that the default Lat Long coordinates coming from the widget are wrong when either Lat Long is negative. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example use decimal degree coordinates from a monument here in the university of Calgary: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lon -114.131852814035 Lat 51.079891659168&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The correct coordinates in degree minute second should be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lon: -114°7'55" Lat: 51°4'48"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead the Widget gives:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lon: -115°52'5"&amp;nbsp; Lat: 51°4'48"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Longitude is almost 2 degrees off, while Latitude is OK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe the problem might be with the Widget using Math.floor function when converting the coordinates to DMS. for example if you do Math.floor(-114.131852814035) = -115&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps using the ABS would fix the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (deg &amp;lt; 0) {
&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; signal = "-";
&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; deg = Math.abs(deg);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The signal could be added to the integer degree afterwards.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 18:33:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/measurement-widget-2-4-location-bug/m-p/8508#M796</guid>
      <dc:creator>JulianoKersting</dc:creator>
      <dc:date>2011-08-11T18:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Measurement widget 2.4 Location BUG</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/measurement-widget-2-4-location-bug/m-p/8509#M797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Juliano,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for reporting this. It will be verified and fixed in the next release.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 20:10:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/measurement-widget-2-4-location-bug/m-p/8509#M797</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2011-08-11T20:10:38Z</dc:date>
    </item>
  </channel>
</rss>

