# Centering map at a given position - Unhandled Exception: System.ArgumentOutOfRangeException: The input double value is out of range. Parameter name: percentage

**URL:** <https://community.thinkgeo.com/t/centering-map-at-a-given-position-unhandled-exception-system-argumentoutofrangeexception-the-input-double-value-is-out-of-range-parameter-name-percentage/9566>\
**Category:** WPF\
**Created:** [July 30, 2019, 7:30pm UTC](https://community.thinkgeo.com/t/centering-map-at-a-given-position-unhandled-exception-system-argumentoutofrangeexception-the-input-double-value-is-out-of-range-parameter-name-percentage/9566 "2019-07-30T19:30:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [August 2, 2019, 5:35am UTC](https://community.thinkgeo.com/t/centering-map-at-a-given-position-unhandled-exception-system-argumentoutofrangeexception-the-input-double-value-is-out-of-range-parameter-name-percentage/9566/4 "2019-08-02T05:35:30Z")

</div>

Hi Klaus,

I think your code have some problem.

Because when InternalProjection equal 4326 and ExternalProjection equal 3857, the result of projection.ConvertToExternalProjection(new RectangleShape(-180, 90, 180, -90)) should equal {-61364715.8090785,43988480.2683944,61364715.8090785,-43988484.7436007} but not your result.

And the result looks like:

 ![](https://community.thinkgeo.com/uploads/default/original/3X/e/a/ea57717f8749359399b220c3631d459e8542ba4e.png)

You can try my sample here, if I missed anything, you can modify the sample and upload it again, so I will help you find the reason.

[9566.zip](https://community.thinkgeo.com/uploads/default/original/3X/1/e/1e7ddfb6f477c7af68eacbd67acdd321007bb907.zip) (101.5 KB)

Regards,

Ethan

---

_[View the full topic](https://community.thinkgeo.com/t/centering-map-at-a-given-position-unhandled-exception-system-argumentoutofrangeexception-the-input-double-value-is-out-of-range-parameter-name-percentage/9566)._
