<?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: Geoprocessing (intersecting / reading attributes / routing) with Javascript API  in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722792#M67109</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Christopher,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I would just use a simple QueryTask to get the intersection of Address 1 geocode point with your polygon layer. The returned results of the QueryTask will have the attributes that you can read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/querytask-amd.html#execute" title="https://developers.arcgis.com/javascript/jsapi/querytask-amd.html#execute"&gt;QueryTask | API Reference | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Sep 2015 18:39:57 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2015-09-23T18:39:57Z</dc:date>
    <item>
      <title>Geoprocessing (intersecting / reading attributes / routing) with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722791#M67108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to work with the Javscript API do the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enter an address (address 1), intersect a polygon, get an address (address 2) from that polygon and route a line between the resulting points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to find the proper functionality in the API to support this processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the routing support in the sample on the directions app at &lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2Fjssamples%2Fwidget_directions_basic.html" rel="nofollow" target="_blank"&gt;Directions | ArcGIS API for JavaScript&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is also an example for point in polygon search at &lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2Fjssamples%2Futil_relation.html" rel="nofollow" target="_blank"&gt;Geoprocessing - Point in polygon search | ArcGIS API for JavaScript&lt;/A&gt; .&amp;nbsp; Is there an basic example of this functionality available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any example of reading attributes from a selected feature?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 17:51:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722791#M67108</guid>
      <dc:creator>wcESRI</dc:creator>
      <dc:date>2015-09-23T17:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing (intersecting / reading attributes / routing) with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722792#M67109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Christopher,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I would just use a simple QueryTask to get the intersection of Address 1 geocode point with your polygon layer. The returned results of the QueryTask will have the attributes that you can read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/querytask-amd.html#execute" title="https://developers.arcgis.com/javascript/jsapi/querytask-amd.html#execute"&gt;QueryTask | API Reference | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 18:39:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722792#M67109</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-09-23T18:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing (intersecting / reading attributes / routing) with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722793#M67110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert, thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;I am having difficulty with determining what classes to use and getting the results from the event.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;I am trying to&amp;nbsp; use a search object and get the data from the search results.&amp;nbsp; I would then perform an intersection on the polygon layer and get the address.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;I am trying to use a each object with no luck.&amp;nbsp; Am I using the right classes and how do I get the results from the event?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mySearch = new Search(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&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; map: myMap&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, "searchDiv");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySearch.startup();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //begin event handler&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySearch.on("search-results", function(e)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&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; alert(e.results[0].toString());&lt;BR /&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; &lt;BR /&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; //end call process results function);&amp;nbsp; //end event handler &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2015 14:10:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722793#M67110</guid>
      <dc:creator>wcESRI</dc:creator>
      <dc:date>2015-10-08T14:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing (intersecting / reading attributes / routing) with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722794#M67111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Christopher,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Try using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mySearch.on("select-result", function (evt){
&amp;nbsp; //Do something with the result feature 
&amp;nbsp; console.info(evt.result.feature);
});&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:55:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722794#M67111</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T06:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing (intersecting / reading attributes / routing) with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722796#M67113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Christopher,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You need to look care fully at the API documentation the returned parameters for "select-result" is different than "select-result" code that I provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/search-amd.html#event-search-results" title="https://developers.arcgis.com/javascript/jsapi/search-amd.html#event-search-results" rel="nofollow noopener noreferrer" target="_blank"&gt;Search | API Reference | ArcGIS API for JavaScript | event-search-results&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code would have to be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//begin event handler&amp;nbsp; 
 mySearch.on("search-results", function(e)&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;&amp;nbsp; console.info(e.results);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This should return an array of results that have a extent and feature property&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 });&amp;nbsp;&amp;nbsp; //end call process results function);&amp;nbsp; //end event handler&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:55:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722796#M67113</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T06:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing (intersecting / reading attributes / routing) with Javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722795#M67112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;/PRE&gt;&lt;P&gt;Robert,&amp;nbsp; thank you again.&amp;nbsp; However, your code issues an error in javascript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: Consolas; font-size: 10pt;"&gt;My code is below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #008000; font-size: 10pt;"&gt;//begin event handler
 mySearch.on("search-results", function(e)
 {
&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; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.info(e.result.feature);
&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; 
 });&amp;nbsp;&amp;nbsp; //end call process results function);&amp;nbsp; //end event handler &lt;/SPAN&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: Consolas; font-size: 10pt;"&gt;TypeError: Unable to get property 'feature' of undefined or null reference TypeError: Unable to get property 'feature' of undefined or null reference&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code will produce a result but not very useful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
console.info(e.results[0].toString());&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't seem to access the event object in the seach results to get the results.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/search-amd.html#searchresults" rel="nofollow noopener noreferrer" target="_blank"&gt;https://developers.arcgis.com/javascript/jsapi/search-amd.html#searchresults&lt;/A&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:55:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geoprocessing-intersecting-reading-attributes/m-p/722795#M67112</guid>
      <dc:creator>wcESRI</dc:creator>
      <dc:date>2021-12-12T06:55:12Z</dc:date>
    </item>
  </channel>
</rss>

