Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Help for a delphi program

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 ...

  1. #1
    tontaegu is offline Junior Member White Belt
    Join Date
    Aug 2005
    Posts
    4

    Help for a delphi program

    I should make a program in Delphi to show a route with a list of destinations.
    I need an example to begin.
    Thanks

  2. #2
    Mohamed is offline Member Green Belt
    Join Date
    Mar 2005
    Posts
    97
    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

  3. #3
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi Mohamed,

    Is Delphi easy to use ?
    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.

  4. #4
    tontaegu is offline Junior Member White Belt
    Join Date
    Aug 2005
    Posts
    4

    Example in delphi

    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.

  5. #5
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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;

  6. #6
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    It works!
    Do you know how to set parameters of speed, starting time, cost x litres and preference route?
    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
    You find some other membersin the Route and Driverprofile objects to set.

  7. #7
    Dexter is offline Junior Member White Belt
    Join Date
    Sep 2005
    Posts
    5
    I have tried your code in delphi and it comes up with the error : EoleSysError with message 'Class not registered'

  8. #8
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

  9. #9
    Dexter is offline Junior Member White Belt
    Join Date
    Sep 2005
    Posts
    5
    I get a Invalid Class String from this line of code :

    Code:
    OleContainer.CreateObject('MapPoint.Map.EU.11', False);
    Any ideas ow to fix it, i have copied the example from http://www.mp2kmag.com/a65--delphi.e....mappoint.html

  10. #10
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problems depoying a program
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 03-04-2005, 03:24 PM
  2. Sync display and program?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-29-2005, 04:37 AM
  3. My boss is looking for a softwear program into whi....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-29-2001, 12:18 PM
  4. Looking for a program where I can plug in zip code....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-09-2001, 08:05 AM
  5. Where can I get information or program upgrades to....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-11-2001, 04:00 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96