<?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 Point clustering - zoom to layer extent upon creation in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-zoom-to-layer-extent-upon/m-p/510835#M47568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd like to zoom to the extent of the cluster layer when it is created. The request I'm using is: map.setExtent(esri.graphicsExtent(clusterLayer.graphics)). However, there's a couple of problems:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;If the cluster layer has only one cluster, there's no extent&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;If the cluster layer has a few clusters, zooming to the cluster layer extent triggers a cluster recalculation, which almost always makes the zoom extent smaller than the layer's extent after the recalculation&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;Hoping this isn't the only solution, but the only way I see around this is to maintain an extent inside the cluster layer and update it with minX, maxX, minY, and maxY values as each point is being evaluated for placement in the _clusterGraphics function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Open to better suggestions...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 19:01:10 GMT</pubDate>
    <dc:creator>TyroneLigon</dc:creator>
    <dc:date>2013-04-26T19:01:10Z</dc:date>
    <item>
      <title>Point clustering - zoom to layer extent upon creation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-zoom-to-layer-extent-upon/m-p/510835#M47568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd like to zoom to the extent of the cluster layer when it is created. The request I'm using is: map.setExtent(esri.graphicsExtent(clusterLayer.graphics)). However, there's a couple of problems:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;If the cluster layer has only one cluster, there's no extent&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;If the cluster layer has a few clusters, zooming to the cluster layer extent triggers a cluster recalculation, which almost always makes the zoom extent smaller than the layer's extent after the recalculation&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt;Hoping this isn't the only solution, but the only way I see around this is to maintain an extent inside the cluster layer and update it with minX, maxX, minY, and maxY values as each point is being evaluated for placement in the _clusterGraphics function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Open to better suggestions...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 19:01:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-zoom-to-layer-extent-upon/m-p/510835#M47568</guid>
      <dc:creator>TyroneLigon</dc:creator>
      <dc:date>2013-04-26T19:01:10Z</dc:date>
    </item>
  </channel>
</rss>

