<?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: Customize LayerList (4.x) &amp;quot;Render&amp;quot; &amp; &amp;quot;_renderItem&amp;quot; methods in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-layerlist-4-x-quot-render-quot-quot/m-p/210431#M19501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most pressing requirement was CSS styles based on indent level in the tree structure. (This I could get working with with CSS selectors now)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then also to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use checkbox/other icons instead of the 'eye' to control layer visibility. (See 'const toggleIconClasses' in LayerList.tsx) Other icons available &lt;A href="https://developers.arcgis.com/javascript/latest/guide/esri-icon-font/index.html"&gt;here&lt;/A&gt;. This will required changes in the tsx file I suspect?&lt;/LI&gt;&lt;LI&gt;Inject DOM element identifiers into the HTML so that it can be modified run-time - as you suggested. (I follow a similar approach with a custom version of the 3.x JS version in WAB applications, but need DOM selection identifiers that is similar to the layer indeitifiers assigned in AGOL Web Map layers - that allow one to configure the changes that need to be applied runtime. ) The 4.x version seems to be assign identifiers that is not related to any layer identifiers that one use when instantiate the layers add to the map/layer-list. This question is not related to a WAB application/WAB widget - but about direct use of teh ESRI JS API code base and LayerList widget.&lt;/LI&gt;&lt;LI&gt;Add ability to display single 'abc' layer in the layerlist, that control n different 'abc' scale-dependent layers. (The user should be agnostic to what scale-dependent layer he currently see of 'abc')&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played with the typing's you referenced but it seems it is somewhat different than what is needed by the LayerList.tsx. I will continue to investigate...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jul 2017 04:45:56 GMT</pubDate>
    <dc:creator>GertConradie</dc:creator>
    <dc:date>2017-07-04T04:45:56Z</dc:date>
    <item>
      <title>Customize LayerList (4.x) "Render" &amp; "_renderItem" methods</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-layerlist-4-x-quot-render-quot-quot/m-p/210429#M19499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might want/need to add some functionality into the default LayerList Widget - the typescript (*.tsx file) is available here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-js-api/blob/4master/widgets/LayerList.tsx"&gt;https://github.com/Esri/arcgis-js-api/blob/4master/widgets/LayerList.tsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is that the typings for&amp;nbsp;LayerListViewModel,&amp;nbsp;ListItem etc is not available (only *.js files)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TypeScript not my forte, so I throw questions out here:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;What would be the technical process of creating placeholders for this missing types? (If possible at all) Even if the typing checks can be disable.&lt;/LI&gt;&lt;LI&gt;Is there any licence issues/limitations to do the above?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a cul-de-sac - should I rather develop from scratch? ..last resort..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 06:22:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-layerlist-4-x-quot-render-quot-quot/m-p/210429#M19499</guid>
      <dc:creator>GertConradie</dc:creator>
      <dc:date>2017-07-03T06:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Customize LayerList (4.x) "Render" &amp; "_renderItem" methods</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-layerlist-4-x-quot-render-quot-quot/m-p/210430#M19500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get the typings from here:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/jsapi-resources/tree/master/4.x/typescript" title="https://github.com/Esri/jsapi-resources/tree/master/4.x/typescript"&gt;jsapi-resources/4.x/typescript at master · Esri/jsapi-resources · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure the exact issue you're running into, or the best way to approach this in general. &amp;nbsp;My feeling is that there is almost certainly a way to use the .js files with those typings but I'd have to play around with it to figure it out I'm sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, what capability do you need to add to the layer list? &amp;nbsp;There may be an easier way to add it on top, at runtime, as opposed to modifying the source code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 17:44:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-layerlist-4-x-quot-render-quot-quot/m-p/210430#M19500</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-07-03T17:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Customize LayerList (4.x) "Render" &amp; "_renderItem" methods</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-layerlist-4-x-quot-render-quot-quot/m-p/210431#M19501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most pressing requirement was CSS styles based on indent level in the tree structure. (This I could get working with with CSS selectors now)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then also to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use checkbox/other icons instead of the 'eye' to control layer visibility. (See 'const toggleIconClasses' in LayerList.tsx) Other icons available &lt;A href="https://developers.arcgis.com/javascript/latest/guide/esri-icon-font/index.html"&gt;here&lt;/A&gt;. This will required changes in the tsx file I suspect?&lt;/LI&gt;&lt;LI&gt;Inject DOM element identifiers into the HTML so that it can be modified run-time - as you suggested. (I follow a similar approach with a custom version of the 3.x JS version in WAB applications, but need DOM selection identifiers that is similar to the layer indeitifiers assigned in AGOL Web Map layers - that allow one to configure the changes that need to be applied runtime. ) The 4.x version seems to be assign identifiers that is not related to any layer identifiers that one use when instantiate the layers add to the map/layer-list. This question is not related to a WAB application/WAB widget - but about direct use of teh ESRI JS API code base and LayerList widget.&lt;/LI&gt;&lt;LI&gt;Add ability to display single 'abc' layer in the layerlist, that control n different 'abc' scale-dependent layers. (The user should be agnostic to what scale-dependent layer he currently see of 'abc')&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played with the typing's you referenced but it seems it is somewhat different than what is needed by the LayerList.tsx. I will continue to investigate...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jul 2017 04:45:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-layerlist-4-x-quot-render-quot-quot/m-p/210431#M19501</guid>
      <dc:creator>GertConradie</dc:creator>
      <dc:date>2017-07-04T04:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Customize LayerList (4.x) "Render" &amp; "_renderItem" methods</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-layerlist-4-x-quot-render-quot-quot/m-p/210432#M19502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an update - I were able to to get this LayerList.tsx to compile as part of my project in Visual Studio. It was a bit painful with a couple of issues:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The typing's available to download is not 100% compatible with what this widget expects (HandleRegistry etc), but I were able to get past that by creating my own typings for that/add changes to the version available for download.&lt;/LI&gt;&lt;LI&gt;Had to create custom interfaces for the viewmodels, views etc (i.e. no custom implementation) and replacing that run-time with aliases in dojo.config that redirect &amp;nbsp;it to the online esri versions.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also upgraded to a custom version of 4.4, but there is bugs like the grade out layers when out of scale stopped working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jul 2017 11:13:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-layerlist-4-x-quot-render-quot-quot/m-p/210432#M19502</guid>
      <dc:creator>GertConradie</dc:creator>
      <dc:date>2017-07-11T11:13:19Z</dc:date>
    </item>
  </channel>
</rss>

