<?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: Add features to the infoWindow from feature service that are not in the map in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/add-features-to-the-infowindow-from-feature/m-p/202915#M5644</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;&lt;SPAN style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"&gt;Your approach is exactly what I would do. Listening for the setFeatures event is the best method.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 Mar 2018 16:23:41 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2018-03-18T16:23:41Z</dc:date>
    <item>
      <title>Add features to the infoWindow from feature service that are not in the map</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/add-features-to-the-infowindow-from-feature/m-p/202912#M5641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some background:&lt;/P&gt;&lt;P&gt;I have a Web App built using the Developer Edition of WAB, and have customized it slightly (using Dojo inheritance), so all my customizations live in a separate Widgetxx.js to the OOTB version (Smart Editor widget).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;I have feature services that I don't want in the map, but do want to use to populate the infoWindow when a user clicks on the map. I haven't got a clue how to do this!&lt;/P&gt;&lt;P&gt;I have tried hooking into the set-features event of the popup and changing the features to use a deferred that returns the features from a query on the feature service, and this sort of works - it displays the selceted geometry associated with the feature, but the popup itself is not displayed.&lt;/P&gt;&lt;P&gt;I expect this is probably the worst way to try and achieve what I want. So, is it possible to add features to the existing popup associated with the map, or do I need to create a custom widget that has it's own custom popup and custom metohds for populating the content?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Miles.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2018 17:08:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/add-features-to-the-infowindow-from-feature/m-p/202912#M5641</guid>
      <dc:creator>mileshitchen1</dc:creator>
      <dc:date>2018-03-12T17:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Add features to the infoWindow from feature service that are not in the map</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/add-features-to-the-infowindow-from-feature/m-p/202913#M5642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miles,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;What you are wanting to do is absolutely possible. But you need to have a custom widget or add your logic (ie. map click event handler &amp;gt; query &amp;gt; display results in popup) to an existing file such as the jimu/MapManager.js.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2018 22:11:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/add-features-to-the-infowindow-from-feature/m-p/202913#M5642</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-03-12T22:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add features to the infoWindow from feature service that are not in the map</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/add-features-to-the-infowindow-from-feature/m-p/202914#M5643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me. I don't think I made my problem very clear. What I want to do is add features to the existing popup, here's the scenario:&lt;/P&gt;&lt;P&gt;Action: User clicks on map.&lt;/P&gt;&lt;P&gt;Response: Standard popup is displayed showing features (contained in the maps layers) at the clicked location, and also features returned from a REST call to other feature services (that aren't represented as layers in the map).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written something now that does this (in a inherited SmartEditor Widget), but really need some verification that my approach is appropriate and there isn't a better way to do this. Basically my code does this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Listen for the SetFeatures event of the maps InfoWindow.&lt;/P&gt;&lt;P&gt;Use an array of deferreds (and Dojo's 'all' method) to return an array features from the REST services.&lt;/P&gt;&lt;P&gt;Call the SetFeatures method on the maps InfoWindow, passing in the existing features plus those just retrieved from the REST services.&lt;/P&gt;&lt;P&gt;Call the Show method on the maps InfoWindow (having to do this as the previous SetFeatures seems to hide the popup).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also got logic in there that ensures the process doesn't get into an infinite loop!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in your opinion is this a good way to do what I want? Feel free to slate my approach, any constructive criticism is much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Miles.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2018 11:24:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/add-features-to-the-infowindow-from-feature/m-p/202914#M5643</guid>
      <dc:creator>mileshitchen1</dc:creator>
      <dc:date>2018-03-18T11:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add features to the infoWindow from feature service that are not in the map</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/add-features-to-the-infowindow-from-feature/m-p/202915#M5644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;&lt;SPAN style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"&gt;Your approach is exactly what I would do. Listening for the setFeatures event is the best method.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2018 16:23:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/add-features-to-the-infowindow-from-feature/m-p/202915#M5644</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-03-18T16:23:41Z</dc:date>
    </item>
  </channel>
</rss>

