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
Results 1 to 2 of 2

Does anybody know why next code doesn't work ?

This is a discussion on Does anybody know why next code doesn't work ? within the MapPoint Desktop Discussion forums, part of the Map Forums category; procedure DrawArrow(PctOne,PctTwo : PRoutePoints); var Traseu : PTraseu; locStart,locEnd : location; begin try locstart:=Childform.Map1.GetLocation(pctone.lat,pc tone.long,1); locend:=Childform.Map1.GetLocation(PctTwo.lat,PctT wo.long,1); Traseu.mapShape:=(Childform.Map1.Shapes.AddLine(lo cStart,locEnd) as ...

  1. #1
    azorgnairelau is offline Junior Member White Belt
    Join Date
    Oct 2007
    Posts
    11

    Does anybody know why next code doesn't work ?

    procedure DrawArrow(PctOne,PctTwo : PRoutePoints);
    var Traseu : PTraseu;
    locStart,locEnd : location;
    begin
    try
    locstart:=Childform.Map1.GetLocation(pctone.lat,pc tone.long,1);
    locend:=Childform.Map1.GetLocation(PctTwo.lat,PctT wo.long,1);
    Traseu.mapShape:=(Childform.Map1.Shapes.AddLine(lo cStart,locEnd) as Shape);
    Traseu.mapShape.Line.Weight:=1;
    Traseu.mapShape.Line.EndArrowhead:=true;
    end;

    I use this procedure to draw arrows between two points , but it give an exception when it trying to put the arrow ( at this line "Traseu.mapShape.Line.EndArrowhead:=true;" ) . Does anybody know how can I solve this problem ?
    Thanks.

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

    Re: Does anybody know why next code doesn't work ?

    Hi,

    What is the exact exception ?

    I try just the same code with the activeX component and it works:
    Code:
                Location locstart = MP.ActiveMap.GetLocation(51, 4, 1);
                Location locend = MP.ActiveMap.GetLocation(52, 4, 1);
                Shape s = MP.ActiveMap.Shapes.AddLine(locstart, locend);
                s.Line.Weight = 1;
                s.Line.EndArrowhead = true;

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Work with mapinfo by VB6, help me!!!
    By Anonymous in forum Other Mapping Platforms
    Replies: 8
    Last Post: 05-31-2011, 07:59 AM
  2. Will MapPoint Work for Me
    By budzinsk in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 06-07-2005, 06:47 PM
  3. i want to use this example but it don't work
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 02-28-2004, 09:37 AM
  4. Can Mappoint work for me?
    By mr_hypocrite in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-14-2003, 09:49 AM
  5. does mappoint2002 work with win 95
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 06-24-2003, 07:45 AM

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