<?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: How to hide the layer name in legend in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hide-the-layer-name-in-legend/m-p/664483#M61985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See here the same example with different layer name &lt;A class="link-titled" href="http://jsfiddle.net/ew8VY/5/" title="http://jsfiddle.net/ew8VY/5/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you are creating the layerInfo in order to pass it on the Legend widget change the layer title&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;map.on("layers-add-result", function (evt) {&lt;BR /&gt; var layerInfo = arrayUtils.map(evt.layers, function (layer, index) {&lt;BR /&gt; if (layer.layer.name==="Rivers"){&lt;BR /&gt; &lt;STRONG&gt;return {layer:layer.layer, title:"My River"};&lt;/STRONG&gt;&lt;BR /&gt; }else{&lt;BR /&gt; return {layer:layer.layer, title:layer.layer.name};&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; });&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it is more easily to use webmap for the map creation and control the layer name, legend visibility e.t.c from the webmap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Sep 2016 08:24:19 GMT</pubDate>
    <dc:creator>PanagiotisPapadopoulos</dc:creator>
    <dc:date>2016-09-20T08:24:19Z</dc:date>
    <item>
      <title>How to hide the layer name in legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hide-the-layer-name-in-legend/m-p/664482#M61984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;how to hide the layer name in legend? like the "Rivers" in the example &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/samples/widget_legend/" title="https://developers.arcgis.com/javascript/3/samples/widget_legend/"&gt;Map with legend&lt;/A&gt; , Or&amp;nbsp; can i change the text ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 07:53:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hide-the-layer-name-in-legend/m-p/664482#M61984</guid>
      <dc:creator>yanli</dc:creator>
      <dc:date>2016-09-20T07:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide the layer name in legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hide-the-layer-name-in-legend/m-p/664483#M61985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See here the same example with different layer name &lt;A class="link-titled" href="http://jsfiddle.net/ew8VY/5/" title="http://jsfiddle.net/ew8VY/5/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you are creating the layerInfo in order to pass it on the Legend widget change the layer title&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;map.on("layers-add-result", function (evt) {&lt;BR /&gt; var layerInfo = arrayUtils.map(evt.layers, function (layer, index) {&lt;BR /&gt; if (layer.layer.name==="Rivers"){&lt;BR /&gt; &lt;STRONG&gt;return {layer:layer.layer, title:"My River"};&lt;/STRONG&gt;&lt;BR /&gt; }else{&lt;BR /&gt; return {layer:layer.layer, title:layer.layer.name};&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; });&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it is more easily to use webmap for the map creation and control the layer name, legend visibility e.t.c from the webmap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 08:24:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-hide-the-layer-name-in-legend/m-p/664483#M61985</guid>
      <dc:creator>PanagiotisPapadopoulos</dc:creator>
      <dc:date>2016-09-20T08:24:19Z</dc:date>
    </item>
  </channel>
</rss>

