franzini81 / gmlibrary

Automatically exported from code.google.com/p/gmlibrary
0 stars 0 forks source link

Optimizing route not working correctly #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi

I have made a route with TDirection with serveral waypoint.
This works great.
 But when I first make the route (unoptimized) I get all details correctly. When I set the property OptimizeWaypoints to try and to a exceute it shows me the correct route on the map, but it leaves the legs (GMDirection1.DirectionsResult[i].Routes[j].Leg[l].StartAddress) in the original order of my first excute.

When I restart the program and I optimize rightway it goes all oke, including 
the legs. But when I turn off the optimize and execute again the map shows 
fines but the legs are still in the optimized order.

Between the two executes I use the function GMDirection1.ClearWaypoint;

But do I need to clear also the DirectionResults, and how do i do this.

Thanks for your help and excellent component.

Andre

Original issue reported on code.google.com by an...@cds-nl.com on 15 Jun 2013 at 11:49

GoogleCodeExporter commented 9 years ago
Hi

Can you attach a demo program (only scr code) with your problem.

Thanks

Original comment by cadet...@gmail.com on 17 Jun 2013 at 9:50

GoogleCodeExporter commented 9 years ago
Please find attached the source files.
If you start the program and click on Route. It displays a route through 
europe. If you then tick the Optimize check box and click Route again, 
the map of the optimized route is displayed but the listbox is not 
changed for some reason.

Thanks for your help

Andre

Op 17-6-2013 11:51, gmlibrary@googlecode.com schreef:

Original comment by an...@cds-nl.com on 17 Jun 2013 at 10:00

GoogleCodeExporter commented 9 years ago
Hi

I think I found it. It seems that calling GMDirection1.Execute; add a 
directionresult and I only checked the first one in stead of the last one.

Am I right

Brdgs
Andre

Op 17-6-2013 11:51, gmlibrary@googlecode.com schreef:

Original comment by an...@cds-nl.com on 17 Jun 2013 at 1:17

GoogleCodeExporter commented 9 years ago
Hi

No attached files. However I will try to reproduce it

Regards

Original comment by cadet...@gmail.com on 17 Jun 2013 at 1:29

GoogleCodeExporter commented 9 years ago
Hereby the files again.
it is a rar file.
brdgs
andre

Op 17-6-2013 15:29, gmlibrary@googlecode.com schreef:

Original comment by an...@cds-nl.com on 17 Jun 2013 at 2:12

GoogleCodeExporter commented 9 years ago

Original comment by cadet...@gmail.com on 17 Mar 2014 at 10:12