<?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 How to enable clustering in graphics layer or feature layer in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/how-to-enable-clustering-in-graphics-layer-or/m-p/1333228#M54802</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to implement clustering with a graphics layer in our application. We are adding multiple symbols with coordinates to the graphics layer, and it appears that enabling clustering directly on the graphics layer is not possible based on the documentation.&amp;nbsp;&lt;SPAN&gt;I am including a few lines of code to provide a better understanding.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;I need assistance with one of the following approaches:&lt;/P&gt;&lt;P&gt;1. How can I add graphics to a feature layer, especially when the graphics' names are coming from an API?&lt;/P&gt;&lt;P&gt;2. How can I enable clustering in the graphics layer?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; const loadPins = () =&amp;gt; {
    for(let i=0;i&amp;lt;markers.length; i++){
      const marker = markers[i];
      const graphic = new Graphic({
        symbol: new WebStyleSymbol({
          name: marker.pinIcon,
          styleName: "Esri2DPointSymbolsStyle",
        }),
        geometry: new Point({
          longitude: marker.lng,
          latitude: marker.lat
        }),
        attributes: {
          ...marker
        }
      })
      graphicsLayer.add(graphic); // How to add to feature layer?
    }
    map.add(graphicsLayer)
  }&lt;/LI-CODE&gt;&lt;P&gt;This feature is critical for our product, and I would greatly appreciate your help in finding a solution. Thank you.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2023 02:26:12 GMT</pubDate>
    <dc:creator>EHQAdmin</dc:creator>
    <dc:date>2023-09-28T02:26:12Z</dc:date>
    <item>
      <title>How to enable clustering in graphics layer or feature layer</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-to-enable-clustering-in-graphics-layer-or/m-p/1333228#M54802</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to implement clustering with a graphics layer in our application. We are adding multiple symbols with coordinates to the graphics layer, and it appears that enabling clustering directly on the graphics layer is not possible based on the documentation.&amp;nbsp;&lt;SPAN&gt;I am including a few lines of code to provide a better understanding.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;I need assistance with one of the following approaches:&lt;/P&gt;&lt;P&gt;1. How can I add graphics to a feature layer, especially when the graphics' names are coming from an API?&lt;/P&gt;&lt;P&gt;2. How can I enable clustering in the graphics layer?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; const loadPins = () =&amp;gt; {
    for(let i=0;i&amp;lt;markers.length; i++){
      const marker = markers[i];
      const graphic = new Graphic({
        symbol: new WebStyleSymbol({
          name: marker.pinIcon,
          styleName: "Esri2DPointSymbolsStyle",
        }),
        geometry: new Point({
          longitude: marker.lng,
          latitude: marker.lat
        }),
        attributes: {
          ...marker
        }
      })
      graphicsLayer.add(graphic); // How to add to feature layer?
    }
    map.add(graphicsLayer)
  }&lt;/LI-CODE&gt;&lt;P&gt;This feature is critical for our product, and I would greatly appreciate your help in finding a solution. Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 02:26:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-to-enable-clustering-in-graphics-layer-or/m-p/1333228#M54802</guid>
      <dc:creator>EHQAdmin</dc:creator>
      <dc:date>2023-09-28T02:26:12Z</dc:date>
    </item>
  </channel>
</rss>

