Conect two points with a direct line

Jan 15, 2010 at 10:26 PM

Hi, first of all, congrats for the amaizing job you've done.

I need to draw a car trip following the lat,lng points i0ve read frim a GPS Module

I've tryed using Routes but the points are not directly connected.

I did this in the google Earth using a KML file with the point listing, i'd like to do the same but in the GMAP Control.

Here is the test code

 

 Dim StartPoint As GMap.NET.PointLatLng = New PointLatLng(-34.6536023333, -58.629187666)
        Dim EndPoint As GMap.NET.PointLatLng = New PointLatLng(-34.6494748333, -58.628913)
        Dim route As MapRoute = GMaps.Instance.GetRouteBetweenPoints(StartPoint, EndPoint, False, GMapControl1.Zoom)
        Dim r As GMapRoute = New GMapRoute(route.Points, route.Name)
        r.Color = Color.Blue
        Objects_GmapOverlay.Routes.Add(r)
        AddGMAP_Marker(StartPoint.Lat, StartPoint.Lng, "Start")
        AddGMAP_Marker(EndPoint.Lat, EndPoint.Lng, "Stop")
        GMapControl1.ZoomAndCenterRoute(r)

 

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim StartPoint As GMap.NET.PointLatLng = New PointLatLng(-34.6536023333, -58.629187666)

        Dim EndPoint As GMap.NET.PointLatLng = New PointLatLng(-34.6494748333, -58.628913)

        Dim route As MapRoute = GMaps.Instance.GetRouteBetweenPoints(StartPoint, EndPoint, True, GMapControl1.Zoom)

        Dim r As GMapRoute = New GMapRoute(route.Points, route.Name)

        r.Color = Color.Blue

        Objects_GmapOverlay.Routes.Add(r)

        AddGMAP_Marker(StartPoint.Lat, StartPoint.Lng, "Start")

        AddGMAP_Marker(EndPoint.Lat, EndPoint.Lng, "Stop")

        GMapControl1.ZoomAndCenterRoute(r)

end sub

 

 

Coordinator
Jan 15, 2010 at 10:35 PM
Edited Jan 15, 2010 at 10:36 PM

well i did the same for mobile gps log visualization, check winforms demo source

// testing my mobile gp log
      void AddGpsMobileLogRoutes(string file)

 

void AddGpsMobileLogRoutes(string file)

Jan 15, 2010 at 10:50 PM
Radioman, thanks for the fast reply
I change the DLL's to the last version, i found the GetRoutesFromMobileLog
do you have any file with the format so i can use as demo to load the points into the function
Thanks

From: [email removed]
Sent: Friday, January 15, 2010 7:35 PM
To: [email removed]
Subject: Re: Conect two points with a direct line [greatmaps:80997]

From: radioman

well i did the same for mobile gps log visualization, check winforms demo source

// testing my mobile gp log
void AddGpsMobileLogRoutes(string file)

void AddGpsMobileLogRoutes(string file)

Coordinator
Jan 15, 2010 at 10:52 PM

check /etc folder

Jan 15, 2010 at 11:05 PM
i found the file in this folder,
i hoped it was an ascii file, obviously it's not. By the way, you don't have the specs of the file,
i can't find anything on the web
Thanks

From: [email removed]
Sent: Friday, January 15, 2010 7:52 PM
Subject: Re: Conect two points with a direct line [greatmaps:80997]

From: radioman

check /etc folder

Coordinator
Jan 15, 2010 at 11:16 PM

it's simple sqlite db,use sqlitespy(http://www.yunqa.de/delphi/doku.php/products/sqlitespy/index) to open it