sharpmap-issue in converting image coordinates to world coordianates at low level zoom

Aug 2, 2011 at 6:54 AM
Edited Aug 2, 2011 at 6:55 AM

Hi guys i am facing one problem

when i am converting image coordinates to world coordinates at low level zoom, latitude and longitude are not correct.

Lat and long values are accurate, when we zoom to higher levels.

public static Point MapToWorld(PointF p, Map map)     

{

       Point ul = new Point(map.Center.X - map.Zoom * .5, map.Center.Y + map.MapHeight * .5);          

            return new Point(ul.X + p.X * map.PixelWidth,                             ul.Y - p.Y * map.PixelHeight);       

}

what could be the problem.. can u pls help regarding this