MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Help for a delphi program

This is a discussion on Help for a delphi program within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-19-2005
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 08-19-2005
Member
Green Belt
 
Join Date: Mar 2005
Posts: 96
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 08-19-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,047
Hi Mohamed,

Quote:
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 08-23-2005
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 08-23-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,047
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;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 08-23-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,047
Hi,

Quote:
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 09-20-2005
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'
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 09-20-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,047
Hi,

What is the offending line of code ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 09-20-2005
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 09-21-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,047
Hi,

did you include Mappoint_TLB in the uses clause ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Problems depoying a program Anonymous MapPoint 2006/2009 Discussion 0 03-04-2005 02:24 PM
Sync display and program? Anonymous MapPoint 2006/2009 Discussion 1 01-29-2005 03:37 AM
My boss is looking for a softwear program into whi.... Anonymous MapPoint 2006/2009 Discussion 1 11-29-2001 11:18 AM
Looking for a program where I can plug in zip code.... Anonymous MapPoint 2006/2009 Discussion 1 11-09-2001 07:05 AM
Where can I get information or program upgrades to.... Anonymous MapPoint 2006/2009 Discussion 1 09-11-2001 03:00 PM


All times are GMT -5. The time now is 04:04 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

Stansted Flights
Stansted flights are great value when you book with Holiday Hypermarket. You can find plenty of information about destinations and even UK airports online at Holiday Hypermarket.

Flights to Greece
Find cheap flights to Greece on Travel Counsellors. A personal Travel Counsellor can help you plan flights and find accommodation in Greece.

Flight
When looking to jet set off, make sure you check out dealchecker.co.uk before you check in anywhere else. Bag a bargain flight from all major scheduled and charter airlines.

Sri Lanka Holidays
There are some outstanding deals on Sri Lanka holidays at theholidayplace.co.uk. Sri Lanka is renowned for it's exceptional beauty! Book a holiday today!

Balearics
Before booking to the Balearics Islands make sure you check out our travel guide online. The Balearics are renowned for their vibrant nightlife but there are also some stunning Gothic cathedrals, Stone Age ruins and fishing villages.

Price Comparisons
Search and compare millions of holidays, flights and hotels etc. At Travel.co.uk, price comparisons are easy.

Holidays in Fuerteventura
Need a break? Go to the Canary Islands! Find information on holidays in Fuerteventura at On The Beach.


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