I turned on Map.ExtendBuffer, and now everything is screwed up. Pixel dont project correctly anymore and panning and zooming is impossible.
I tried to find the bug, and I found this:
ProjExt.cs
Also, self.ImageRectangle is the map display pixels divided by 3, which I dont get either...
Please, am I going insane? How does the math add up here...
I have no idea where to start fixing this either...
Thx for help.
I tried to find the bug, and I found this:
ProjExt.cs
public static Coordinate PixelToProj(this IProj self, Point position)
{
double x = Convert.ToDouble(position.X);
double y = Convert.ToDouble(position.Y);
if (self != null && self.GeographicExtents != null)
{
x = x * self.GeographicExtents.Width / self.ImageRectangle.Width + self.GeographicExtents.MinX;
y = self.GeographicExtents.MaxY - y * self.GeographicExtents.Height / self.ImageRectangle.Height;
}
return new Coordinate(x, y, 0.0);
}
But self.GeographicExtents has the width of the buffer, and not of the map display...Also, self.ImageRectangle is the map display pixels divided by 3, which I dont get either...
Please, am I going insane? How does the math add up here...
I have no idea where to start fixing this either...
Thx for help.