# C1.Win.Map.C1Map.CalculateAutoZoomCenter

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Map_C1Map_CalculateAutoZoomCenter_" data-uid="C1.Win.Map.C1Map.CalculateAutoZoomCenter*">CalculateAutoZoomCenter Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Map_C1Map_CalculateAutoZoomCenter_" data-uid="C1.Win.Map.C1Map.CalculateAutoZoomCenter*"></a>
<h4 id="C1_Win_Map_C1Map_CalculateAutoZoomCenter_System_Double__C1_Win_Interop_Point__System_Collections_Generic_IEnumerable_C1_Win_Map_VectorItem__" data-uid="C1.Win.Map.C1Map.CalculateAutoZoomCenter(System.Double@,C1.Win.Interop.Point@,System.Collections.Generic.IEnumerable{C1.Win.Map.VectorItem})">CalculateAutoZoomCenter(out double, out Point, IEnumerable&lt;VectorItem&gt;)</h4>
<div class="markdown level1 summary"><p>Calculates the suitable zoom and center which can show all or selected the vector items.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool CalculateAutoZoomCenter(out double zoom, out Point center, IEnumerable&lt;VectorItem&gt; items = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CalculateAutoZoomCenter(ByRef zoom As Double, ByRef center As Point, Optional items As IEnumerable(Of VectorItem) = Nothing) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">zoom</span></td>
      <td><p>The suitable zoom.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Point</span></td>
      <td><span class="parametername">center</span></td>
      <td><p>The suitable center.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="C1.Win.Map.VectorItem.html">VectorItem</a>&gt;</td>
      <td><span class="parametername">items</span></td>
      <td><p>The vector items (can be null to select all).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><pre><code class="lang-csharp">false</code></pre>, if there are no items to track; otherwise, <pre><code class="lang-csharp">true</code></pre>.
</td>
    </tr>
  </tbody>
</table>
</div>
