Can I change the text displayed when a esri Legend dijit has no legend displayed?

302
1
02-15-2017 09:42 PM
MarkStewart2
New Contributor

When there is no legend to display (e.g. layers are turned off or otherwise not visible) the legend div defaults to some text "No legend".  I would like to change the text used.  How do I do this?

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Mark,

   You will need to replace the default sting in the esriNLS strings:

sample snippet:

var map;
require(["esri/map", "dojo/i18n!esri/nls/jsapi", "dojo/domReady!"],
  function(Map, bundle) {
    bundle.widgets.legend.NLS_noLegend = "My No Legend";
  }
);

Localization | Guide | ArcGIS API for JavaScript 3.19 

0 Kudos