I should make a program in Delphi to show a route with a list of destinations.
I need an example to begin.
Thanks
This is a discussion on Help for a delphi program within the MapPoint Desktop Discussion forums, part of the Map Forums category; I should make a program in Delphi to show a route with a list of destinations. I need an example ...
I should make a program in Delphi to show a route with a list of destinations.
I need an example to begin.
Thanks
Hi,
You should use "Search" engine here !![]()
You will find a lot of topics concerning Delphi.
as http://www.mp2kmag.com/a65--delphi.e....mappoint.html
( Is Delphi easy to use ? )
Rgds
Mohamed
www.AtlasCouscous.com
Hi Mohamed,
Yes very easy, very type structured, but you can typecast everyting what you wants. It is very high level, but you can go to low level programming if needed without problem, and it support inline assembler.Is Delphi easy to use ?
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
I already read the example nr 65 and other examples in the forum, but they are not sufficient for my use. I'm searching for an example to design a route with a list of 10-20 address and to know the cost,price and distance.
Hi,
Thisi is how to calc a route from an address in Delphi:
Code:var RT: Route; Loc: Location; Results: FindResults; i: OleVariant; begin RT := FMap.ActiveRoute; RT.Clear; i := 1; Results := FMap.FindAddressResults(Street1, Place1, '', '', PostC1, GeoCountryBelgium); if Results.ResultsQuality = geoNoResults then Exit; Loc := Location(Results.Item[i]); RT.Waypoints.Add(Loc, ''); Results := FMap.FindAddressResults(Street2, Place2, '', '', PostC2, GeoCountryBelgium); if Results.ResultsQuality = geoNoResults then Exit; Loc := Location(Results.Item[i]); RT.Waypoints.Add(Loc, ''); RT.Calculate;
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
Hi,
It works!
Do you know how to set parameters of speed, starting time, cost x litres and preference route?You find some other membersin the Route and Driverprofile objects to set.Code:RT.DriverProfile.PreferredRoads[geoRoadInterstate] := 0.8; RT.DriverProfile.PreferredRoads[geoRoadStreet] := 0.5; // etc RT.DriverProfile.Speed[geoRoadInterstate] := 160; RT.DriverProfile.Speed[geoRoadStreet] := 50; // etc
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
I have tried your code in delphi and it comes up with the error : EoleSysError with message 'Class not registered'
Hi,
What is the offending line of code ?
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
I get a Invalid Class String from this line of code :
Any ideas ow to fix it, i have copied the example from http://www.mp2kmag.com/a65--delphi.e....mappoint.htmlCode:OleContainer.CreateObject('MapPoint.Map.EU.11', False);
Hi,
did you include Mappoint_TLB in the uses clause ?
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
There are currently 1 users browsing this thread. (0 members and 1 guests)