<?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: Popup for overlapped graphics [JavaScript API v4.3] in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342543#M31687</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know the answer here but I'm curious how you got multiple results into the popup in 4.2, I don't think I've seen that working in the 4.X API in general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My understanding is that&amp;nbsp;popups rely&amp;nbsp;on hitTest to search for the feature that was clicked on. &amp;nbsp;(Although in 3D, currently, popups&amp;nbsp;seem to rely on a back-end query for on-the-ground graphics). &amp;nbsp;Since&amp;nbsp;hitTest only seems to return one graphic per layer view, it doesn't seem like multiple graphics in a popup should work right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you get a chance, could you try to replicate how you got it working in a simple&amp;nbsp;4.2 sandbox like:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/bewuyiwuvi/edit?html,output" title="https://jsbin.com/bewuyiwuvi/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Mar 2017 15:32:07 GMT</pubDate>
    <dc:creator>ThomasSolow</dc:creator>
    <dc:date>2017-03-23T15:32:07Z</dc:date>
    <item>
      <title>Popup for overlapped graphics [JavaScript API v4.3]</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342542#M31686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I'm having some problems with the popup in version 4.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the API for JavaScript v4.2, when I click on a graphic that is overlapped to others in the map, a popup appears and it is possible to see the information of each one of those graphics,&amp;nbsp;using the arrows or displaying the list of results.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="343495" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/343495_pastedImage_5.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Few days ago I decided to upgrade to v4.3 of the API, because I want to use some of the new features. Doing this I found that now, for the same overlapping graphics in the map, the popup no longer allows to see the information of each one.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="343493" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/343493_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to have the same behavior for popups&amp;nbsp;in v4.3? Otherwise, what would be the right way to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, in the previous version it was possible to right-click to display the popup, but in&amp;nbsp;v4.3 that is no longer possible.&amp;nbsp;Is it possible to display the popup only using right-click?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, and sorry for my englilsh!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 21:41:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342542#M31686</guid>
      <dc:creator>IsmaelSilveira</dc:creator>
      <dc:date>2017-03-21T21:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Popup for overlapped graphics [JavaScript API v4.3]</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342543#M31687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know the answer here but I'm curious how you got multiple results into the popup in 4.2, I don't think I've seen that working in the 4.X API in general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My understanding is that&amp;nbsp;popups rely&amp;nbsp;on hitTest to search for the feature that was clicked on. &amp;nbsp;(Although in 3D, currently, popups&amp;nbsp;seem to rely on a back-end query for on-the-ground graphics). &amp;nbsp;Since&amp;nbsp;hitTest only seems to return one graphic per layer view, it doesn't seem like multiple graphics in a popup should work right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you get a chance, could you try to replicate how you got it working in a simple&amp;nbsp;4.2 sandbox like:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/bewuyiwuvi/edit?html,output" title="https://jsbin.com/bewuyiwuvi/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 15:32:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342543#M31687</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-03-23T15:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Popup for overlapped graphics [JavaScript API v4.3]</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342544#M31688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's really odd, I tried to reproduce this behavior using 4.2 on JS Bin, but I could not do it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2017 13:28:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342544#M31688</guid>
      <dc:creator>IsmaelSilveira</dc:creator>
      <dc:date>2017-03-29T13:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Popup for overlapped graphics [JavaScript API v4.3]</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342545#M31689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas, I cannot replicate that behavior, but I've found an example of the API in which it happens! (&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-improvements/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-improvements/index.html"&gt;FeatureLayer drawing improvements | ArcGIS API for JavaScript 4.3&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/345186_pastedImage_4.png" style="width: 620px; height: 377px;" /&gt;&lt;/P&gt;&lt;P&gt;I clicked on the map and that popup appears.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 19:14:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342545#M31689</guid>
      <dc:creator>IsmaelSilveira</dc:creator>
      <dc:date>2017-04-03T19:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Popup for overlapped graphics [JavaScript API v4.3]</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342546#M31690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As explained in another thread by &lt;A href="https://community.esri.com/migrated-users/193995"&gt;Thomas Solow&lt;/A&gt;‌, this could happen when HitTest fails to return any record and the popup uses a fallback option to use query function to get the result. More details below.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/message/676156-re-viewhittest-bug-with-multipoint-geometry?commentID=676156#comment-676156" title="https://community.esri.com/message/676156-re-viewhittest-bug-with-multipoint-geometry?commentID=676156#comment-676156"&gt;https://community.esri.com/message/676156-re-viewhittest-bug-with-multipoint-geometry?commentID=676156#comment-676156&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 19:21:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342546#M31690</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2017-04-03T19:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Popup for overlapped graphics [JavaScript API v4.3]</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342547#M31691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for digging that up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the distinction here is that this map is actually querying the feature service on click, instead (or maybe in addition to) a front-end hitTest. &amp;nbsp;Querying a service has no trouble returning multiple features, which are then used to hydrate the pop-up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming you have a service to query, you should be able to manually perform a query using FeatureLayer.createQuery and FeatureLayer.queryFeatures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way to set this up would be adding a click event to the view and, on click, firing off a queryFeatures request to the service.&amp;nbsp; You can&amp;nbsp;pass in the point where the user clicked as your query's geometry and I'd try the "intersects" spatial relationship. &amp;nbsp;The service should respond with a list of features&amp;nbsp;which you can use to hydrate the popup like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;popup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;open&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; features&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; responseFromFeatureService&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// array of features&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; location&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; mapPoint &lt;SPAN class="comment token"&gt;// pop up points to this&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may want to call event.stopPropagation() inside your click callback to stop the client-side hitTest from occurring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm not sure what exactly happened to cause this issue for you. &amp;nbsp;It does seem like this should be handled automatically and there may be some configuration setting I'm forgetting about that would take care of this.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:09:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-overlapped-graphics-javascript-api-v4-3/m-p/342547#M31691</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2021-12-11T16:09:42Z</dc:date>
    </item>
  </channel>
</rss>

