FromLatLngToLocal change?

Topics: Help
Jan 9, 2012 at 1:59 PM

Hello radioman,

i updatet my program from GMap.dll 1.5.3 to 1.6.0.

I had a marker wich shows from a clicked position up to the current mouse position a line.

my marker:

        Dim TmpPoint_Drawing_End As GPoint = Form_Main.MainMap.FromLatLngToLocal(Me.EndPoint)
        g.DrawLine(Pen, LocalPosition.X, LocalPosition.Y, TmpPoint_Drawing_End.X, TmpPoint_Drawing_End.Y)

but in the new Version the function

FromLatLngToLocal returns wrong values

is there a new way, how to calculate the new Position of the local mouse Position?

If i draw a route instead, it works, but now i want to draw a circle instead of this line. So i can't use route or polygon.

Do you have a answer for it?

Thanks an happy new year readioman.

regards EDE

Jan 9, 2012 at 2:34 PM
Edited Jan 9, 2012 at 2:51 PM

it returns good value, but rendering should be done in overrided function OnPaintOverlays, the other option is to use custom marker, check GMapMarkerCircle in Demo.WindowsForms, double click add 100m circle

p.s. checked it works as expected:

protected override void OnPaintOverlays(System.Drawing.Graphics g)
{
  base.OnPaintOverlays(g); 

 var p = PointToClient(Form.MousePosition);
 g.DrawLine(Pens.Blue, 10, 10, p.X, p.Y);

Jan 10, 2012 at 1:03 PM

damn my fault.

e.Graphics.DrawRectangle(blackPen, p1.x, p1.y, WIDTH, HEIGHT) not e.Graphics.DrawRectangle(blackPen, p1.x, p1.y, p2.x, p2.y)

now it works fine. 

Bye EDE