<?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: Displaying information from different Feature Layers in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-information-from-different-feature/m-p/602135#M56339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are both layers in the same map service? If so, use an &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/identifytask.htm"&gt;Identify Task&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2012 13:55:53 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2012-10-19T13:55:53Z</dc:date>
    <item>
      <title>Displaying information from different Feature Layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-information-from-different-feature/m-p/602134#M56338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have in my ArcGIS Server 10.1 two layers published: one corresponds to a World map by country and the other to a layer containing some cities, represented by points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I would like to do is creating a ESRI Javascript API interface to view those (Feature) layers, so when the user clicks on a point, it appears a popup &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;(or info in a side bar, does not mind)&lt;/SPAN&gt;&lt;SPAN&gt; with the &lt;/SPAN&gt;&lt;STRONG&gt;BOTH&lt;/STRONG&gt;&lt;SPAN&gt; features associated to this city, namely: &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;name of the city AND name of the country the city belongs to&lt;/SPAN&gt;&lt;SPAN&gt;. But, if the user clicks on an area where &lt;/SPAN&gt;&lt;STRONG&gt;there is not&lt;/STRONG&gt;&lt;SPAN&gt; any city, &lt;/SPAN&gt;&lt;STRONG&gt;only&lt;/STRONG&gt;&lt;SPAN&gt; the name of the country should be displayed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that it is a quite basic example, but I am not sure on how to tackle this problem: I see examples on retrieving information from a SINGLE layer, but not about how to distinguish between information required from different layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please, can anyone provide some information/ideas/links to tutorials about that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 08:42:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-information-from-different-feature/m-p/602134#M56338</guid>
      <dc:creator>IreneGM</dc:creator>
      <dc:date>2012-10-19T08:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying information from different Feature Layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-information-from-different-feature/m-p/602135#M56339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are both layers in the same map service? If so, use an &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/identifytask.htm"&gt;Identify Task&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 13:55:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-information-from-different-feature/m-p/602135#M56339</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-10-19T13:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying information from different Feature Layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-information-from-different-feature/m-p/602136#M56340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/find_popup.html"&gt;This sample&lt;/A&gt;&lt;SPAN&gt; basically does what you want using an identify Task. If you were looking to present a more elegant popup back to your user, you'd have to manually build the content in the infoWindow using the query task and a deferred list as (somewhat) shown in &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/query_deferred_list.html"&gt;this sample&lt;/A&gt;&lt;SPAN&gt;. Once the deferred list's results are returned, you would manually step through the results and build up your popup's content however you want it to appear.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 13:58:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-information-from-different-feature/m-p/602136#M56340</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2012-10-19T13:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying information from different Feature Layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-information-from-different-feature/m-p/602137#M56341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you both for your responses. Yes, it seems that the "Display identify results in popup" sample suits more what I would like my interface to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I am facing a problem: I copied the example and changed the REST endpoints to my services. Then, on &lt;/SPAN&gt;&lt;STRONG&gt;executeIdentifyTask&lt;/STRONG&gt;&lt;SPAN&gt; function I changed the sample parameters to show my city names and country names. When I click on a city name, the popup appears saying the city name, but when clicking to a region where there are not cities it says "no information available". I checked the name of the layer just in case was wrong, but it is correct. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did I skipped anything? The example is the same as the one you linked, but changing parameter names and REST links. Is something going wrong with the countries layer? I am not sure, because when I firstly wrote on this forum, I was able to show the country names OR the city names, so I assume data are ok.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 09:50:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-information-from-different-feature/m-p/602137#M56341</guid>
      <dc:creator>IreneGM</dc:creator>
      <dc:date>2012-10-22T09:50:45Z</dc:date>
    </item>
  </channel>
</rss>

