<?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 Reprojecting results from find task in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91124#M8322</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm returning a bunch of objects from a find task that I'm performing, and my results are ending up in South Africa, not Florida where they should be.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My map is using a spatial reference of 102100. My results are coming back with a WKID of 2236.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried specifying &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;findParams = new esri.tasks.FindParameters(); findParams.outSR = '102100';&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also tried specifying that WKID as an integer (no quotes). I've tried specifying a new spatial reference like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var sr = new esri.SpatialReference(102100); findParams = new esri.tasks.FindParameters(); findParams.outSR = sr;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No matter what, my results come back with a WKID of 2236... and naturally, those plot quite far away from where they should.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I get these points back where they belong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Aug 2012 22:38:34 GMT</pubDate>
    <dc:creator>JimWharton</dc:creator>
    <dc:date>2012-08-14T22:38:34Z</dc:date>
    <item>
      <title>Reprojecting results from find task</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91124#M8322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm returning a bunch of objects from a find task that I'm performing, and my results are ending up in South Africa, not Florida where they should be.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My map is using a spatial reference of 102100. My results are coming back with a WKID of 2236.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried specifying &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;findParams = new esri.tasks.FindParameters(); findParams.outSR = '102100';&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also tried specifying that WKID as an integer (no quotes). I've tried specifying a new spatial reference like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var sr = new esri.SpatialReference(102100); findParams = new esri.tasks.FindParameters(); findParams.outSR = sr;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No matter what, my results come back with a WKID of 2236... and naturally, those plot quite far away from where they should.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I get these points back where they belong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 22:38:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91124#M8322</guid>
      <dc:creator>JimWharton</dc:creator>
      <dc:date>2012-08-14T22:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reprojecting results from find task</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91125#M8323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The outSpatialReference property of findParameters is expecting a spatial reference object.&amp;nbsp; The code below demonstrates the proper syntax.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ie:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var sr = new esri.SpatialReference({wkid:102100});
//findParams.outSR = sr (incorrect)
findParams.outSpatialReference = sr&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;findParameters in the API reference&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/findparameters.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/findparameters.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;spatialReference&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/spatialreference.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/spatialreference.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91125#M8323</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2021-12-10T23:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reprojecting results from find task</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91126#M8324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks. Unfortunately, the objects are still coming back with a spatialReference of 2236.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I loop through the results like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;dojo.forEach(results, function(result) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = result.feature;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // x = graphic;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // dataForGrid.push([result.layerName, result.foundFieldName, result.value]);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (graphic.geometry.type) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case "point":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(markerSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case "polyline":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(lineSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case "polygon":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(polygonSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(graphic);

&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I log out the graphic object (that I set to the feature attribute of the result) the spatial reference doesn't change.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:29:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91126#M8324</guid>
      <dc:creator>JimWharton</dc:creator>
      <dc:date>2021-12-10T23:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reprojecting results from find task</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91127#M8325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Heres a fiddle which shows how to reproject returned geometries successfully.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/jagravois/nQGdA/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/jagravois/nQGdA/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I double checked my previous post and noticed that i had accidently copied the incorrect property name "outSR" in my code rather than "outSpatialReference".&amp;nbsp; I corrected the previous post to avoid further confusion.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 15:02:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91127#M8325</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2012-08-15T15:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reprojecting results from find task</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91128#M8326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm going to need to go back and try that! Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I rewrote the whole app based on WKID 2236 and used dynamic layers on top of that. That got me the result I needed, but I still have the old code in GIT so I can't wait to try your soluction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for getting back to me on this!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 15:05:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/reprojecting-results-from-find-task/m-p/91128#M8326</guid>
      <dc:creator>JimWharton</dc:creator>
      <dc:date>2012-08-15T15:05:51Z</dc:date>
    </item>
  </channel>
</rss>

