<?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 Popup for graphicslayer not displaying in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-graphicslayer-not-displaying/m-p/504275#M46823</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using Angular Esri, version 2 (&lt;A class="link-titled" href="https://esri.github.io/angular-esri-map/#/examples" title="https://esri.github.io/angular-esri-map/#/examples"&gt;Angular Esri Map&lt;/A&gt;), with the JSAPI version 4.5. I'm creating custom graphic layers with a class break renderer. The colors for each class break include a transparency value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The map includes two feature layers with a simple renderer assigned. These are added to the basemap before any graphics layer. The graphicslayer has a popup template assigned. All the layers are polygons (county boundaries, and aggregated county boundaries), and overlap with each other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I add the graphics layer to the map as the top layer (index 2), then the graphic's popup displays fine. I would like to show the graphics layer at the bottom beneath the feature layer either index 0 or 1. When I add the graphicslayer to the map with these indexes, the popup does not include the template from the graphics layer. It includes popups from the feature layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried forcing the popup by using the hittest from the mapview click event, but this doesn't create any popup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a bug, or are there any better work arounds?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code for the hittest that doesn't work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;$scope.mapView.on('click',function(e){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;console.log("click event")&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var screenPoint = {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x:e.x,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y:e.y&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$scope.mapView.hitTest(screenPoint).then(getGraphics);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function getGraphics(response){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log("getgraphics")&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log($scope.mapView.popup.features)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(response.results[1].graphic.attributes)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//response.results[1].graphic.popupTemplate.actions.items[0].visible = true;&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;//$scope.mapView.popup.features = [response.results[1].graphic];&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$scope.mapView.popup.open({location:screenPoint,features:[response.results[1].graphic]})&lt;BR /&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; })&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2018 19:39:43 GMT</pubDate>
    <dc:creator>DavidLamb</dc:creator>
    <dc:date>2018-04-24T19:39:43Z</dc:date>
    <item>
      <title>Popup for graphicslayer not displaying</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-graphicslayer-not-displaying/m-p/504275#M46823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using Angular Esri, version 2 (&lt;A class="link-titled" href="https://esri.github.io/angular-esri-map/#/examples" title="https://esri.github.io/angular-esri-map/#/examples"&gt;Angular Esri Map&lt;/A&gt;), with the JSAPI version 4.5. I'm creating custom graphic layers with a class break renderer. The colors for each class break include a transparency value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The map includes two feature layers with a simple renderer assigned. These are added to the basemap before any graphics layer. The graphicslayer has a popup template assigned. All the layers are polygons (county boundaries, and aggregated county boundaries), and overlap with each other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I add the graphics layer to the map as the top layer (index 2), then the graphic's popup displays fine. I would like to show the graphics layer at the bottom beneath the feature layer either index 0 or 1. When I add the graphicslayer to the map with these indexes, the popup does not include the template from the graphics layer. It includes popups from the feature layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried forcing the popup by using the hittest from the mapview click event, but this doesn't create any popup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a bug, or are there any better work arounds?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code for the hittest that doesn't work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;$scope.mapView.on('click',function(e){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;console.log("click event")&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var screenPoint = {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x:e.x,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y:e.y&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;$scope.mapView.hitTest(screenPoint).then(getGraphics);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function getGraphics(response){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log("getgraphics")&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log($scope.mapView.popup.features)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(response.results[1].graphic.attributes)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//response.results[1].graphic.popupTemplate.actions.items[0].visible = true;&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;//$scope.mapView.popup.features = [response.results[1].graphic];&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$scope.mapView.popup.open({location:screenPoint,features:[response.results[1].graphic]})&lt;BR /&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; })&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 19:39:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-for-graphicslayer-not-displaying/m-p/504275#M46823</guid>
      <dc:creator>DavidLamb</dc:creator>
      <dc:date>2018-04-24T19:39:43Z</dc:date>
    </item>
  </channel>
</rss>

