<?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: Problem with UniqueValueRenderer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-uniquevaluerenderer/m-p/1245928#M79789</link>
    <description>&lt;P&gt;Thank you so much.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jan 2023 04:28:16 GMT</pubDate>
    <dc:creator>LazyDogz</dc:creator>
    <dc:date>2023-01-06T04:28:16Z</dc:date>
    <item>
      <title>Problem with UniqueValueRenderer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-uniquevaluerenderer/m-p/1243694#M79732</link>
      <description>&lt;P&gt;I want to make a UniqueValueRenderer that load from a list via AJAX but not working. here is my code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var renderer = [];
    console.log(renderer);
    $.ajax({
        type: 'POST',
        url: '/LocationType/LoadLocationType',  
        success: function (data) {
            var result = JSON.stringify(data);
            var obj = JSON.parse(result);  
            console.log(obj);
            for (var i = 0; i &amp;lt; obj.length; ++i) {
                let rendererpoint = new UniqueValueRenderer({
                    field: "id",
                    uniqueValueInfos: [{
                        value: data[i].id,
                        label: data[i].locationTypeName,
                        symbol: {
                            type: "picture-marker",
                            url:"https://localhost/image/"+ data[i].locationTypeImageName,
                            width: "20px",
                            height: "20px",
                            outline: {
                                color: [255, 255, 255],
                                width: 1
                            }
                        }
                    }]
                });
                 renderer.push(rendererpoint);
            }
            
        },
        error: function () {
            alert('Something when wrong');
        }
    })&lt;/LI-CODE&gt;&lt;P&gt;But it doesn't working. please help me&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2022 04:17:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-uniquevaluerenderer/m-p/1243694#M79732</guid>
      <dc:creator>LazyDogz</dc:creator>
      <dc:date>2022-12-26T04:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with UniqueValueRenderer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-uniquevaluerenderer/m-p/1245485#M79775</link>
      <description>&lt;P&gt;Your implementation will generate a number of UniqueValueRenderers, each with one symbol.&amp;nbsp; However, it seems what you're really trying to do is create a single UniqueValueRenderer with all the symbols.&amp;nbsp; If that's the case, then the code below may solve the problem:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;$.ajax({
	type: "GET",
	dataType: "json",
	url: "/LocationType/LoadLocationType",  
	success: function(data) {
		var renderer = new UniqueValueRenderer({field:"id});

		for (var i = 0; i &amp;lt; data.length; ++i) {
			renderer.addUniqueValueInfo({
				value: data[i].id,
				label: data[i].locationTypeName,
				symbol: {
					type: "picture-marker",
					url: "https://localhost/image/" + data[i].locationTypeImageName,
					width: "20px",
					height: "20px",
					outline: {
						color: [255, 255, 255],
						width: 1
					}
				}
			});
		}

		//now do something with the renderer (e.g. add to a layer, etc).
	},
	error: function () {
		alert('Something when wrong');
	}
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 23:30:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-uniquevaluerenderer/m-p/1245485#M79775</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-01-04T23:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with UniqueValueRenderer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-uniquevaluerenderer/m-p/1245928#M79789</link>
      <description>&lt;P&gt;Thank you so much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 04:28:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-uniquevaluerenderer/m-p/1245928#M79789</guid>
      <dc:creator>LazyDogz</dc:creator>
      <dc:date>2023-01-06T04:28:16Z</dc:date>
    </item>
  </channel>
</rss>

