There are several things which cause errors in geographic calculations:
1. The formula you use works well for very short distances only. This formula uses Pythagorean theorem but it is not applicable for big distances on the earth surface. The bigger distance will produce bigger error.
2. The Mercator projection introduce calculation error in calculating of the Width and Height of the rectangle in the kilometers. This error depends on the location of the rectangle (close to the equator or one of the poles) and its height in degrees. The rectangle with bigger height will produce bigger error.
3. The stroke of the shape has some thickness. Depends on where you put a pin (to the left of stroke, at the center, to the right of stroke) the second point will be shifted. But small pixel shift can result big distance difference depends on the zoom level.
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.