am2 wrote:
I also noticed that the grid lines should change by changing in zoom of the map..How we can consider it?
**jany_ wrote:**Any one can help me with?You have to use pixel coordiates for g.DrawLine.Hi,
In your example you'd simply usebecause that are the pixel coordinates that correspond to the geographic cooordinates (ptfpr1, ptfpr2) you wanted to use for drawing.g.DrawLine(bluePen, ptf1, ptf2);
I used this code but it returns (0,0,0) for both points..Where is my mistake?Can you please help me?
ThanksSystem.Drawing.Point ptf1 = new System.Drawing.Point(0, 0); System.Drawing.Point ptf2 = new System.Drawing.Point(300,400); DotSpatial.Topology.Coordinate ptfpr1 = new DotSpatial.Topology.Coordinate(map1.PixelToProj(ptf1)); DotSpatial.Topology.Coordinate ptfpr2 = new DotSpatial.Topology.Coordinate(map1.PixelToProj(ptf2)); g.DrawLine(drawingPen, ptf1, ptf2);
I also noticed that the grid lines should change by changing in zoom of the map..How we can consider it?