<?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: LabelClass where clause with spaces in value (API v3) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1274908#M80728</link>
    <description>&lt;P&gt;This just plain won't work out of the box, but that's not to say you can't work around it. We should first note that the documentation for &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/labelclass-amd.html#where" target="_self"&gt;LabelClass.where&lt;/A&gt; says "Only very basic SQL is supported."&amp;nbsp; Perhaps if we better understood the qualifications for that, we could better understand why this fails.&amp;nbsp; Fortunately, we can.&amp;nbsp; The logic for evaluating the where clause of a LabelClass is found in the implementation of the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/labellayer-amd.html" target="_self"&gt;LabelLayer&lt;/A&gt; class.&amp;nbsp; Basically, it comes down to a private (and therefore undocumented) method called "_isWhere", which I have reproduced here:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;_isWhere: function(d, l) {
	try {
		if (!d)
			return !0;
		if (d) {
			var t = d.split(" ");
			if (3 === t.length)
				return this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(t[2]));
			if (7 === t.length) {
				var E = this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(t[2]))
				  , G = t[3]
				  , n = this._sqlEquation(l[this._removeQuotes(t[4])], t[5], this._removeQuotes(t[6]));
				switch (G) {
				case "AND":
					return E &amp;amp;&amp;amp; n;
				case "OR":
					return E || n
				}
			}
		}
		return !1
	} catch (F) {
		console.log("Error.: can't parse \x3d " + d)
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this, we can better understand what they mean by only basic SQL being supported.&amp;nbsp; The problem happens because they split the where clause on spaces in order to evaluate it, and this implementation expects that the value portion of the expression will not have any spaces in it.&amp;nbsp; This is why it fails out of the box for you, and there's really no way we can manipulate the expression to make it succeed.&amp;nbsp; Instead, if we want to make this work, we'll have to alter the implementation.&amp;nbsp; Fortunately, that's not terribly hard.&lt;/P&gt;&lt;P&gt;Basically, within the first "require" statement of your application, you'll want to include a reference to "esri/layers/LabelLayer", and then you'll want to override the definition of the _isWhere function.&amp;nbsp; I will use the &lt;A href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=layers_label" target="_self"&gt;sample&lt;/A&gt; referred to by&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;as an example.&lt;/P&gt;&lt;P&gt;First, we add the reference in the call to "require" (note changes on lines 5 and 14).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      require([
        "esri/map", 
        "esri/geometry/Extent",
        "esri/layers/FeatureLayer",
        "esri/layers/LabelLayer", //added line
        "esri/symbols/SimpleLineSymbol",
        "esri/symbols/SimpleFillSymbol",
        "esri/symbols/TextSymbol",
        "esri/renderers/SimpleRenderer",
        "esri/layers/LabelClass",
        "esri/Color",
         
        "dojo/domReady!"
      ], function(Map, Extent, FeatureLayer, LabelLayer, //modified line
                  SimpleLineSymbol, SimpleFillSymbol, 
                  TextSymbol, SimpleRenderer, LabelClass, Color) 
      {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Immediately after this, we'll add our override of the _isWhere function:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        LabelLayer.prototype._isWhere = function(d, l) {
            try {
                if (!d)
                    return !0;
                if (d) {
                    var t = d.split(" ");
                    if (3 === t.length)
                        return this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(this._replaceSpaces(t[2])));
                    if (7 === t.length) {
                        var E = this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(t[2]))
                          , G = t[3]
                          , n = this._sqlEquation(l[this._removeQuotes(t[4])], t[5], this._removeQuotes(t[6]));
                        switch (G) {
                        case "AND":
                            return E &amp;amp;&amp;amp; n;
                        case "OR":
                            return E || n
                        }
                    }
                }
                return !1
            } catch (F) {
                console.log("Error.: can't parse \x3d " + d)
            }
        };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will see it is exactly the same as the default implementation, except that I have added a call to a function "replaceSpaces" to the third argument on line 8.&amp;nbsp; However, this function does not exist, so we will add it immediately afterwards:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        LabelLayer.prototype._replaceSpaces = function(a) {
          return a.replace(/&amp;amp;nbsp;/g, " ");
        };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll see this function replaces any instances of the arbitrary placeholder "&amp;amp;nbsp;" with a space.&amp;nbsp; With this in place, we can now replace any spaces in our where clause value with that placeholder, and things will work.&amp;nbsp; In this case, as with Ken's suggestion, we could try:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;labelClass.where = "STATE_NAME = 'West&amp;amp;nbsp;Virginia'";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And it now works as expected.&amp;nbsp; For clarity then, I've reproduced the entire contents within the script tag of the sample below.&amp;nbsp; Modifications/additions are on lines 7, 16, 20-47, and 85.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      var map;
    
      require([
        "esri/map", 
        "esri/geometry/Extent",
        "esri/layers/FeatureLayer",
        "esri/layers/LabelLayer",
        "esri/symbols/SimpleLineSymbol",
        "esri/symbols/SimpleFillSymbol",
        "esri/symbols/TextSymbol",
        "esri/renderers/SimpleRenderer",
        "esri/layers/LabelClass",
        "esri/Color",
         
        "dojo/domReady!"
      ], function(Map, Extent, FeatureLayer, LabelLayer,
                  SimpleLineSymbol, SimpleFillSymbol, 
                  TextSymbol, SimpleRenderer, LabelClass, Color) 
      {
        LabelLayer.prototype._isWhere = function(d, l) {
            try {
                if (!d)
                    return !0;
                if (d) {
                    var t = d.split(" ");
                    if (3 === t.length)
                        return this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(this._replaceSpaces(t[2])));
                    if (7 === t.length) {
                        var E = this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(t[2]))
                          , G = t[3]
                          , n = this._sqlEquation(l[this._removeQuotes(t[4])], t[5], this._removeQuotes(t[6]));
                        switch (G) {
                        case "AND":
                            return E &amp;amp;&amp;amp; n;
                        case "OR":
                            return E || n
                        }
                    }
                }
                return !1
            } catch (F) {
                console.log("Error.: can't parse \x3d " + d)
            }
        };
        LabelLayer.prototype._replaceSpaces = function(a) {
          return a.replace(/&amp;amp;nbsp;/g, " ");
        };
        // load the map centered on the United States
        var bbox = new Extent({"xmin": -1940058, "ymin": -814715, "xmax": 1683105, "ymax": 1446096, "spatialReference": {"wkid": 102003}});
      
        //create the map and set the extent, making sure to "showLabels"
        map = new Map("map", {
          extent: bbox,
          showLabels : true //very important that this must be set to true!   
        });

        // create a renderer for the states layer to override default symbology
        var statesColor = new Color("#666");
        var statesLine = new SimpleLineSymbol("solid", statesColor, 1.5);
        var statesSymbol = new SimpleFillSymbol("solid", statesLine, null);
        var statesRenderer = new SimpleRenderer(statesSymbol);
         
        // create the feature layer to render and label
        var statesUrl = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3";
        var states = new FeatureLayer(statesUrl, {
          id: "states",
          outFields: ["*"]
        });
        states.setRenderer(statesRenderer);


        // create a text symbol to define the style of labels
        var statesLabel = new TextSymbol().setColor(statesColor);
        statesLabel.font.setSize("14pt");
        statesLabel.font.setFamily("arial");

        //this is the very least of what should be set within the JSON  
        var json = {
          "labelExpressionInfo": {"value": "{STATE_NAME}"}
        };

        //create instance of LabelClass (note: multiple LabelClasses can be passed in as an array)
        var labelClass = new LabelClass(json);
        labelClass.symbol = statesLabel; // symbol also can be set in LabelClass' json
        labelClass.where = "STATE_NAME = 'West&amp;amp;nbsp;Virginia'";
        states.setLabelingInfo([ labelClass ]);
        map.addLayer(states);
    
      });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2023 19:07:09 GMT</pubDate>
    <dc:creator>JoelBennett</dc:creator>
    <dc:date>2023-04-03T19:07:09Z</dc:date>
    <item>
      <title>LabelClass where clause with spaces in value (API v3)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1274802#M80725</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an issue when trying to apply a where clause to some of my LabelClass.&lt;/P&gt;&lt;P&gt;My first where clause is working fine:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;where: `STATUS = 'Done'`,&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This one not:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;where: `STATUS = 'To Do'`,&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I think it's because there is a space in my value.&lt;/P&gt;&lt;P&gt;I have also tried this, but it's not working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;where: `STATUS IN ('To Do')`,&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In ArcMap this where clause is working fine.&lt;/P&gt;&lt;P&gt;Do you know how to solve this?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 17:13:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1274802#M80725</guid>
      <dc:creator>Polopolo</dc:creator>
      <dc:date>2023-04-03T17:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause with spaces in value (API v3)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1274823#M80726</link>
      <description>&lt;P&gt;Use double quotes and single quotes. Try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;where: "STATUS = 'To Do'"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 17:52:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1274823#M80726</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2023-04-03T17:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause with spaces in value (API v3)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1274826#M80727</link>
      <description>&lt;P&gt;It fails with a space in the string in this &lt;A href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=layers_label" target="_self"&gt;sample&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;This works (inserted at line 70): labelClass.where = "STATE_NAME = 'Virginia'"&lt;/P&gt;&lt;P&gt;This doesn't: labelClass.where = "STATE_NAME = 'West Virginia'"&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 17:54:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1274826#M80727</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-04-03T17:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause with spaces in value (API v3)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1274908#M80728</link>
      <description>&lt;P&gt;This just plain won't work out of the box, but that's not to say you can't work around it. We should first note that the documentation for &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/labelclass-amd.html#where" target="_self"&gt;LabelClass.where&lt;/A&gt; says "Only very basic SQL is supported."&amp;nbsp; Perhaps if we better understood the qualifications for that, we could better understand why this fails.&amp;nbsp; Fortunately, we can.&amp;nbsp; The logic for evaluating the where clause of a LabelClass is found in the implementation of the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/labellayer-amd.html" target="_self"&gt;LabelLayer&lt;/A&gt; class.&amp;nbsp; Basically, it comes down to a private (and therefore undocumented) method called "_isWhere", which I have reproduced here:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;_isWhere: function(d, l) {
	try {
		if (!d)
			return !0;
		if (d) {
			var t = d.split(" ");
			if (3 === t.length)
				return this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(t[2]));
			if (7 === t.length) {
				var E = this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(t[2]))
				  , G = t[3]
				  , n = this._sqlEquation(l[this._removeQuotes(t[4])], t[5], this._removeQuotes(t[6]));
				switch (G) {
				case "AND":
					return E &amp;amp;&amp;amp; n;
				case "OR":
					return E || n
				}
			}
		}
		return !1
	} catch (F) {
		console.log("Error.: can't parse \x3d " + d)
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this, we can better understand what they mean by only basic SQL being supported.&amp;nbsp; The problem happens because they split the where clause on spaces in order to evaluate it, and this implementation expects that the value portion of the expression will not have any spaces in it.&amp;nbsp; This is why it fails out of the box for you, and there's really no way we can manipulate the expression to make it succeed.&amp;nbsp; Instead, if we want to make this work, we'll have to alter the implementation.&amp;nbsp; Fortunately, that's not terribly hard.&lt;/P&gt;&lt;P&gt;Basically, within the first "require" statement of your application, you'll want to include a reference to "esri/layers/LabelLayer", and then you'll want to override the definition of the _isWhere function.&amp;nbsp; I will use the &lt;A href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=layers_label" target="_self"&gt;sample&lt;/A&gt; referred to by&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;as an example.&lt;/P&gt;&lt;P&gt;First, we add the reference in the call to "require" (note changes on lines 5 and 14).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      require([
        "esri/map", 
        "esri/geometry/Extent",
        "esri/layers/FeatureLayer",
        "esri/layers/LabelLayer", //added line
        "esri/symbols/SimpleLineSymbol",
        "esri/symbols/SimpleFillSymbol",
        "esri/symbols/TextSymbol",
        "esri/renderers/SimpleRenderer",
        "esri/layers/LabelClass",
        "esri/Color",
         
        "dojo/domReady!"
      ], function(Map, Extent, FeatureLayer, LabelLayer, //modified line
                  SimpleLineSymbol, SimpleFillSymbol, 
                  TextSymbol, SimpleRenderer, LabelClass, Color) 
      {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Immediately after this, we'll add our override of the _isWhere function:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        LabelLayer.prototype._isWhere = function(d, l) {
            try {
                if (!d)
                    return !0;
                if (d) {
                    var t = d.split(" ");
                    if (3 === t.length)
                        return this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(this._replaceSpaces(t[2])));
                    if (7 === t.length) {
                        var E = this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(t[2]))
                          , G = t[3]
                          , n = this._sqlEquation(l[this._removeQuotes(t[4])], t[5], this._removeQuotes(t[6]));
                        switch (G) {
                        case "AND":
                            return E &amp;amp;&amp;amp; n;
                        case "OR":
                            return E || n
                        }
                    }
                }
                return !1
            } catch (F) {
                console.log("Error.: can't parse \x3d " + d)
            }
        };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will see it is exactly the same as the default implementation, except that I have added a call to a function "replaceSpaces" to the third argument on line 8.&amp;nbsp; However, this function does not exist, so we will add it immediately afterwards:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        LabelLayer.prototype._replaceSpaces = function(a) {
          return a.replace(/&amp;amp;nbsp;/g, " ");
        };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll see this function replaces any instances of the arbitrary placeholder "&amp;amp;nbsp;" with a space.&amp;nbsp; With this in place, we can now replace any spaces in our where clause value with that placeholder, and things will work.&amp;nbsp; In this case, as with Ken's suggestion, we could try:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;labelClass.where = "STATE_NAME = 'West&amp;amp;nbsp;Virginia'";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And it now works as expected.&amp;nbsp; For clarity then, I've reproduced the entire contents within the script tag of the sample below.&amp;nbsp; Modifications/additions are on lines 7, 16, 20-47, and 85.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      var map;
    
      require([
        "esri/map", 
        "esri/geometry/Extent",
        "esri/layers/FeatureLayer",
        "esri/layers/LabelLayer",
        "esri/symbols/SimpleLineSymbol",
        "esri/symbols/SimpleFillSymbol",
        "esri/symbols/TextSymbol",
        "esri/renderers/SimpleRenderer",
        "esri/layers/LabelClass",
        "esri/Color",
         
        "dojo/domReady!"
      ], function(Map, Extent, FeatureLayer, LabelLayer,
                  SimpleLineSymbol, SimpleFillSymbol, 
                  TextSymbol, SimpleRenderer, LabelClass, Color) 
      {
        LabelLayer.prototype._isWhere = function(d, l) {
            try {
                if (!d)
                    return !0;
                if (d) {
                    var t = d.split(" ");
                    if (3 === t.length)
                        return this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(this._replaceSpaces(t[2])));
                    if (7 === t.length) {
                        var E = this._sqlEquation(l[this._removeQuotes(t[0])], t[1], this._removeQuotes(t[2]))
                          , G = t[3]
                          , n = this._sqlEquation(l[this._removeQuotes(t[4])], t[5], this._removeQuotes(t[6]));
                        switch (G) {
                        case "AND":
                            return E &amp;amp;&amp;amp; n;
                        case "OR":
                            return E || n
                        }
                    }
                }
                return !1
            } catch (F) {
                console.log("Error.: can't parse \x3d " + d)
            }
        };
        LabelLayer.prototype._replaceSpaces = function(a) {
          return a.replace(/&amp;amp;nbsp;/g, " ");
        };
        // load the map centered on the United States
        var bbox = new Extent({"xmin": -1940058, "ymin": -814715, "xmax": 1683105, "ymax": 1446096, "spatialReference": {"wkid": 102003}});
      
        //create the map and set the extent, making sure to "showLabels"
        map = new Map("map", {
          extent: bbox,
          showLabels : true //very important that this must be set to true!   
        });

        // create a renderer for the states layer to override default symbology
        var statesColor = new Color("#666");
        var statesLine = new SimpleLineSymbol("solid", statesColor, 1.5);
        var statesSymbol = new SimpleFillSymbol("solid", statesLine, null);
        var statesRenderer = new SimpleRenderer(statesSymbol);
         
        // create the feature layer to render and label
        var statesUrl = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3";
        var states = new FeatureLayer(statesUrl, {
          id: "states",
          outFields: ["*"]
        });
        states.setRenderer(statesRenderer);


        // create a text symbol to define the style of labels
        var statesLabel = new TextSymbol().setColor(statesColor);
        statesLabel.font.setSize("14pt");
        statesLabel.font.setFamily("arial");

        //this is the very least of what should be set within the JSON  
        var json = {
          "labelExpressionInfo": {"value": "{STATE_NAME}"}
        };

        //create instance of LabelClass (note: multiple LabelClasses can be passed in as an array)
        var labelClass = new LabelClass(json);
        labelClass.symbol = statesLabel; // symbol also can be set in LabelClass' json
        labelClass.where = "STATE_NAME = 'West&amp;amp;nbsp;Virginia'";
        states.setLabelingInfo([ labelClass ]);
        map.addLayer(states);
    
      });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 19:07:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1274908#M80728</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-04-03T19:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause with spaces in value (API v3)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1275129#M80734</link>
      <description>&lt;P&gt;Thank you for your help Joel! It's working now&lt;/P&gt;&lt;P&gt;Where can I find the implementation of the API method so next time I will search by myself?&lt;BR /&gt;I've found this repo but it is minified&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-js-api/blob/3.40.0/layers/LabelClass.js" target="_blank"&gt;https://github.com/Esri/arcgis-js-api/blob/3.40.0/layers/LabelClass.js&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 09:10:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1275129#M80734</guid>
      <dc:creator>Polopolo</dc:creator>
      <dc:date>2023-04-04T09:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause with spaces in value (API v3)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1275374#M80744</link>
      <description>&lt;P&gt;You can download a copy of the API as described at the bottom of &lt;A href="https://developers.arcgis.com/javascript/3/jshelp/intro_accessapi.html" target="_self"&gt;this page&lt;/A&gt;.&amp;nbsp; You can also view the source code in your browser's developer tools (typically F12), most of which now provide tools for "beautifying" the code (i.e. formatting it to make it readable).&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 17:15:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-with-spaces-in-value-api/m-p/1275374#M80744</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-04-04T17:15:06Z</dc:date>
    </item>
  </channel>
</rss>

