<?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: Feature Widget access multiple layers with PortalItemID in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323517#M29793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So would it be something like the following....(apologies I am learning JS as I go along)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;Layer.fromPortalItem({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; portalItem: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; id: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"e5683bb09bad438aae49eef2a8796296"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; visibilityMode: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"independent"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// portal ID number&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; layerId: &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; visible: &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;false&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }).then(&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; (groupLayer) { &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// adding all layers into a group layer&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; map = &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; Map({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; basemap: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"dark-gray-vector"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; layers: groupLayer &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;//adding group layer to the map&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Jun 2019 19:16:20 GMT</pubDate>
    <dc:creator>MarquesMunson1</dc:creator>
    <dc:date>2019-06-18T19:16:20Z</dc:date>
    <item>
      <title>Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323509#M29785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using JavaScript 4.11 and I am trying to get the &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-feature/index.html"&gt;Feature Widget&lt;/A&gt; to access the popupTemplate for each layer that is under the same portalItem ID. So far the widget can only access one of the layers. Is there a way to write the code to have the widget access all of the items? I have the code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;html&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;head&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;meta&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;charset&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"utf-8"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;meta&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"viewport"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;content&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"initial-scale=1, maximum-scale=1, user-scalable=no"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;title&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;ArcGIS API for JavaScript Adoption Statistics Prototype&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;title&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;style&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d7ba7d;"&gt;html&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #d7ba7d;"&gt;body&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #d7ba7d;"&gt;#viewDiv&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;padding&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;margin&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;height&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;100%&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;width&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;100%&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/*******STYLE FOR THE HOVER FEATURE */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d7ba7d;"&gt;.esri-feature&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; { &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;letter-spacing&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0em&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;font-family&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"Oswald"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, sans-serif;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;line-height&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;1.55rem&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;font-feature-settings&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"liga"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"calt"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;background&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;: fff;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;padding&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;1em&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;style&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;&amp;lt;!------------REFERECING ESRI CDN FOR JAVASCRIPT 4.11-------------&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;link&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;rel&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"stylesheet"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;href&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"https://js.arcgis.com/4.11/esri/css/main.css"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;src&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"https://js.arcgis.com/4.11/"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;script&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;script&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; require([&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"esri/Map"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"esri/views/MapView"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"esri/layers/FeatureLayer"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;//Adding feature layer to the application using FeatureLayer module&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"esri/widgets/Legend"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;//Adding Legend to the application&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"esri/widgets/LayerList"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"esri/widgets/Feature"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; ], &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(Map, MapView, FeatureLayer, Legend, LayerList, Feature) { &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;//functions must match the require statements&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/***************SETTING THE BASEMAP*********** */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; map = &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; Map({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; basemap: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"dark-gray-vector"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;//specify the type of basemap (gray, topo, streets, dark-gray, etc)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/*************** CONTAINER FOR THE ACTUAL MAP WITH DIMENSIONS*********** */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view = &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; MapView({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; container: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"viewDiv"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; map: map,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; center: [-&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;25.432&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;34.09042&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;], &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;//longitude, latitude--- this is the center location of the map&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; zoom: &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;//zoom level, lower number = more zoomed out&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/*************** ADDING LAYERS TO THE MAP*********** */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; adoptionstats = &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; FeatureLayer({ &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; portalItem: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; id: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"e5683bb09bad438aae49eef2a8796296"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; map.add(adoptionstats, &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// the zero is for adding order, since only one layer technically do not need this&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/***************ADD FEATURE POP UP HERE*************************/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view.when().then(&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;() {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; legend = &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; Legend({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view: view&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view.ui.add(legend, &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"bottom-left"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; layerList = &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; LayerList({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view: view&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// Add widget to the top right corner of the view&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view.ui.add(layerList, &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"top-right"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// Create a default graphic for when the application starts&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; graphic = {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; popupTemplate: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; content: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"Mouse over features to show details..."&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; };&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// Provide graphic to a new instance of a Feature widget&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; feature = &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; Feature({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; graphic: graphic,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view: view&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view.ui.add(feature, &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"bottom-right"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view.whenLayerView(adoptionstats).then(&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(layerView) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;let&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; highlight;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// listen for the pointer-move event on the View&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view.on(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"pointer-move"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(event) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// Perform a hitTest on the View&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; view.hitTest(event).then(&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(event) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// Make sure graphic has a popupTemplate&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;let&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; results = event.results.filter(&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(result) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; result.graphic.layer.popupTemplate;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;let&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; result = results[&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; highlight &amp;amp;&amp;amp; highlight.remove();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// Update the graphic of the Feature widget&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// on pointer-move with the result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; (result) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; feature.graphic = result.graphic;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; highlight = layerView.highlight(result.graphic);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; } &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;else&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; feature.graphic = graphic;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;/****************END FEATURE POP UP HERE */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;script&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;head&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;body&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;div&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;id&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"viewDiv"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;div&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;body&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;html&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 13:46:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323509#M29785</guid>
      <dc:creator>MarquesMunson1</dc:creator>
      <dc:date>2019-06-18T13:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323510#M29786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marques,&lt;/P&gt;&lt;P&gt;You could use the layerId property to access other layers with in the portal item or service. Here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #006a00;"&gt;// loads the third layer in the given Portal Item&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91; font-weight: bold;"&gt;const&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; layer = &lt;/SPAN&gt;&lt;SPAN class="" style="color: #aa0d91; font-weight: bold;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; FeatureLayer(&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;{&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #595959;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;portalItem&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: { &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #595959;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;id&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"8d26f04f31f642b6828b7023b84c2188"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #595959;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;layerId&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;: &lt;/SPAN&gt;&lt;SPAN class="" style="color: #1c00cf;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 17:10:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323510#M29786</guid>
      <dc:creator>DavidWilson3</dc:creator>
      <dc:date>2019-06-18T17:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323511#M29787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply! I have tried that and it only accesses one layer at a time. I would like it so that each layer is showing in the Layer list and the widget works with each layer as I turn them on/off respectively. Apologies if I did not explain that in the initial post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 17:19:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323511#M29787</guid>
      <dc:creator>MarquesMunson1</dc:creator>
      <dc:date>2019-06-18T17:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323512#M29788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's one approach you could use:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/qofodep/edit?html,output" title="https://jsbin.com/qofodep/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>Tue, 18 Jun 2019 17:32:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323512#M29788</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2019-06-18T17:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323513#M29789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes!!! thank you so much!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 17:37:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323513#M29789</guid>
      <dc:creator>MarquesMunson1</dc:creator>
      <dc:date>2019-06-18T17:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323514#M29790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marques,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case a work around I can think of is to make a GroupLayer with the individual layerId-layers/portal-items and add that GroupLayer to the map instead of the indivdual portal items. This method will also allow you to have more customization control when making certain layers visible or not and if you want to add actions to the LayerList such as decreasing opacity of a layer or GroupLayer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 17:42:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323514#M29790</guid>
      <dc:creator>DavidWilson3</dc:creator>
      <dc:date>2019-06-18T17:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323515#M29791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;would I use the visibilityMode to manage only having one layer visibile at a time?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 18:36:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323515#M29791</guid>
      <dc:creator>MarquesMunson1</dc:creator>
      <dc:date>2019-06-18T18:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323516#M29792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marques,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you set the visibilityMode of the GroupLayer to "independent" then it will treat child layers independently and allow you to click on and off on the child layers. Also if you declare each layer as a separate layer you can set their visibility as false or true if you want to initially show specific layers on startup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is documentation on GroupLayer and its properties:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html#visibilityMode" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GroupLayer.html#visibilityMode"&gt;GroupLayer | ArcGIS API for JavaScript 4.11&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 18:58:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323516#M29792</guid>
      <dc:creator>DavidWilson3</dc:creator>
      <dc:date>2019-06-18T18:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323517#M29793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So would it be something like the following....(apologies I am learning JS as I go along)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;Layer.fromPortalItem({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; portalItem: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; id: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"e5683bb09bad438aae49eef2a8796296"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; visibilityMode: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"independent"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// portal ID number&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; layerId: &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; visible: &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;false&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }).then(&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; (groupLayer) { &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// adding all layers into a group layer&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; map = &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; Map({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; basemap: &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"dark-gray-vector"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; layers: groupLayer &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;//adding group layer to the map&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 19:16:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323517#M29793</guid>
      <dc:creator>MarquesMunson1</dc:creator>
      <dc:date>2019-06-18T19:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323518#M29794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marques,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have redone the code for you here:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/gacekukoyo/edit?html,output" title="https://jsbin.com/gacekukoyo/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can further edit the GroupLayer and the individual layers as you want from here. You can also create actions for the LayerList, like decreasing opacity if you so wish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 20:02:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323518#M29794</guid>
      <dc:creator>DavidWilson3</dc:creator>
      <dc:date>2019-06-18T20:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323519#M29795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;perfect! I already played around with it to see what I can do and it works!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 20:41:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323519#M29795</guid>
      <dc:creator>MarquesMunson1</dc:creator>
      <dc:date>2019-06-18T20:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323520#M29796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to hear I was helpful, if you have further questions on this application of yours just let me know and I can see if I can help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 20:49:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323520#M29796</guid>
      <dc:creator>DavidWilson3</dc:creator>
      <dc:date>2019-06-18T20:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Widget access multiple layers with PortalItemID</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323521#M29797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I definitely will! My next step will be to add some interactive charts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 21:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-widget-access-multiple-layers-with/m-p/323521#M29797</guid>
      <dc:creator>MarquesMunson1</dc:creator>
      <dc:date>2019-06-18T21:14:35Z</dc:date>
    </item>
  </channel>
</rss>

