Strange behavior when moving map with keys

Topics: Bugs
Dec 1, 2011 at 4:49 PM

Hi, I've just noticed that there is strange behavior when moving map with left/right keys to the left/right. It slowly moves up. I've found reason behind this: in Internals.Core class, DragOffset method incorrectly calculates position, when map size is not even number. To fix it I've replaced line in DragOffset method

Position = FromLocalToLatLng((int)Width / 2, (int)Height / 2);

with this 

Position = FromLocalToLatLng((int)Math.Round(Width / 2.0, MidpointRounding.AwayFromZero), (int)Math.Round(Height / 2.0, MidpointRounding.AwayFromZero));
Dec 1, 2011 at 10:03 PM

thanks, fixed