# Full Extents of the map

**URL:** <https://community.thinkgeo.com/t/full-extents-of-the-map/373>\
**Category:** WinForms\
**Created:** [April 21, 2009, 2:21pm UTC](https://community.thinkgeo.com/t/full-extents-of-the-map/373 "2009-04-21T14:21:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nelson](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/n/dec6dc/32.png) [@Nelson](https://community.thinkgeo.com/u/Nelson)\
**Post date:** [April 21, 2009, 2:21pm UTC](https://community.thinkgeo.com/t/full-extents-of-the-map/373/1 "2009-04-21T14:21:56Z")

</div>

Is&nbsp;there&nbsp;a&nbsp;method&nbsp;to&nbsp;obtain&nbsp;the&nbsp;Bounding&nbsp;Box&nbsp;of&nbsp;an&nbsp;entire&nbsp;overlay&nbsp;or&nbsp;of&nbsp;the&nbsp;entire&nbsp;map&nbsp;across&nbsp;all&nbsp;overlays?&nbsp;I&nbsp;suppose&nbsp;I&nbsp;would&nbsp;leverage&nbsp;the&nbsp;first&nbsp;option&nbsp;if&nbsp;I&nbsp;had&nbsp;a&nbsp;choice.&nbsp;Thanks.

---

<div class="post-metadata">

**Author:** ![Lee](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@Lee](https://community.thinkgeo.com/u/Lee)\
**Post date:** [April 22, 2009, 4:46am UTC](https://community.thinkgeo.com/t/full-extents-of-the-map/373/2 "2009-04-22T04:46:10Z")

</div>

Nelson,

I&nbsp;am&nbsp;afraid&nbsp;we&nbsp;don’t&nbsp;have&nbsp;that&nbsp;API,&nbsp;but&nbsp;you&nbsp;can&nbsp;do&nbsp;it&nbsp;by&nbsp;the&nbsp;following&nbsp;method.

`private RectangleShape GetBoundingBox (Collection<Layer> layers){    RectangleShape rectangleShape = null;    foreach (Layer layer in layers)    {        if (layer.HasBoundingBox)        {            layer.Open(); if (rectangleShape == null)            { rectangleShape = layer.GetBoundingBox();            }            else            { rectangleShape.ExpandToInclude(layer.GetBoundingBox()); } }    }	return rectangleShape;}`

&nbsp;

Also&nbsp;we&nbsp;have&nbsp;added&nbsp;it&nbsp;to&nbsp;our&nbsp;tracking&nbsp;system&nbsp;and&nbsp;consider&nbsp;adding&nbsp;it&nbsp;in&nbsp;the&nbsp;future.

Thanks,  
  
ThinkGeo&nbsp;Support  
  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Nelson](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/n/dec6dc/32.png) [@Nelson](https://community.thinkgeo.com/u/Nelson)\
**Post date:** [April 22, 2009, 7:41am UTC](https://community.thinkgeo.com/t/full-extents-of-the-map/373/3 "2009-04-22T07:41:41Z")

</div>

Thank&nbsp;you,&nbsp;this&nbsp;works&nbsp;well.

---

<div class="post-metadata">

**Author:** ![Lee](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@Lee](https://community.thinkgeo.com/u/Lee)\
**Post date:** [April 22, 2009, 9:07pm UTC](https://community.thinkgeo.com/t/full-extents-of-the-map/373/4 "2009-04-22T21:07:26Z")

</div>

You&nbsp;are&nbsp;welcome.&nbsp;  
&nbsp;&nbsp;  
&nbsp;ThinkGeo&nbsp;Support
