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 13

About ERROR 4-40028-1. Error or Bug ?

This is a discussion on About ERROR 4-40028-1. Error or Bug ? within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi I have just found that this error is thrown also when : I have 2 coordinates : p1(lat1,long1) p2(lat2,long2) ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    About ERROR 4-40028-1. Error or Bug ?

    Hi

    I have just found that this error is thrown also when :

    I have 2 coordinates :
    p1(lat1,long1)
    p2(lat2,long2)

    When we add the 2 points on a map, here are the possible errors :

    (E1) IF lat1==lat2 AND long1==long2 THEN ERROR 4-40028-1
    (E2) IF lat1==lat2 AND long1<>long2 THEN ERROR 4-40028-1


    The second case (E2) is very problematic to me because we have an application tracking vehicles and sometimes between 2 coordinates the latitude is the same but not the longitude...

    To me it's a bug... What do you think of this ?

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

    Just putted 2 pushpin on map with same latitude and different longitude. Then connected them with an arrow. No exception, no error...

    Where comes this error out ? Can you demonstrate the behavour with a few lines of code ?

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Hi

    Do you use MapPoint 2002 ?

    With my version of MapPoint Europe 2002, I have a list of coodinates. In this list there is the following points :

    LAT[0x17] = 48.4537363 LONG[0x17] = 2.0505554
    LAT[0x18] = 48.4537359 LONG[0x18] = 2.0505554

    Here's the drawing source code :
    The error seems to happen in the "zoomout" functions. Also, I tried to cancel the zoomout functions but the error still happens. When I remove the 2 GPS coordinates LAT[0x17] LONG[0x17] and LAT[0x18] LONG[0x18] the error does not happen...



    private void TraceTrackPoints()
    {
    try
    {
    // Gets a reference on the mappoint 2002 control
    MapPoint.Map mpmap = this.axMappointControl1.ActiveMap;

    // Geocodes all the points in array, and links them with a line shape
    int i=0;

    while ( (g_dLat[i] != -1) && (g_dLong[i] != -1) )
    {
    mpmap = this.axMappointControl1.ActiveMap;
    mploc[i] = mpmap.GetLocation(g_dLat[i], g_dLong[i], 1);
    if(i==0) mploc[i].GoTo(); // zoom on start point

    MapPoint.Shape sh = null;

    if(i>0)
    {
    sh = mpmap.Shapes.AddLine(mploc[i-1], mploc[i]);
    sh.Line.Weight= 1;
    }

    MapPoint.Pushpin pp = null;

    if (i==0)
    pp = mpmap.AddPushpin(mploc[i], "START");
    else
    pp = mpmap.AddPushpin(mploc[i], "");

    pp.Symbol = 83;
    i++;
    }

    mpmap.ZoomOut();
    mpmap.ZoomOut();
    }
    catch(Exception)
    {
    MessageBox.Show("ERROR", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Warning);
    }
    }






    thanks

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

    Probably the reason I dont have the error. I use MP 2004 at the moment. I have MP 2002 also but the machine where it is on is at the moment defective motherboard. Should be repaired next week.

    I will try this when I have again access to that machine. In case I forget please send me ar reply to remind me

  5. #5
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    LAT[0x17] = 48.4537363 LONG[0x17] = 2.0505554
    LAT[0x18] = 48.4537359 LONG[0x18] = 2.0505554


    I have just traced my application in debug mode in VS.NET C# 2003 and the error is throw on the following line, for LAT[0x18] and LONG[0x18]

    sh.Line.Weight= 1;



    I'm sure at 99% that the error is due to the similar longitudes... Let me know if you can reproduce the same case

    thanks

  6. #6
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    I'm sure at 99% that the error is due to the similar longitudes... Let me know if you can reproduce the same case
    yes. and please remind me if I did not do it in next week

  7. #7
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Okay, thank you for your investigation

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

    Just thinging on something what could be a workaround. What if you compare both latitudes, and if they are equal increment 1 by 0.00005 ?

    This is around 5.5 meter difference. Maybe even a smaller increment is oK to not get the error again ?

  9. #9
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    As an aside, Wilfried, you can run MapPoint 2002 and 2004 on the same machine. The only problem is if you have an executable that accesses MapPoint as a COM object - then it will always default to 2004 even if you explicitly give the 2002 version number.

    This PC here has three versions of MapPoint installed, and the fourth is currently in the mail


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  10. #10
    brianmcg is offline Junior Member Yellow Belt
    Join Date
    Jan 2003
    Posts
    17
    I seem to remember that I would run into a problem when adding a zero-length line (Lat1=Lat2 and Long1=Long2) in Mappoint 2002 (programming in VB6), but I have no way to test that now. Your two points are virtually on top of one another. Could that be your issue here?

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. MapPoint error 4-40028-1 : Solution
    By Etienne in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 01-11-2008, 06:23 AM
  2. synchronous error
    By Wilfried in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 06-09-2005, 05:27 AM
  3. Mappoint Error
    By Mudrover in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 01-20-2005, 03:59 PM
  4. I get this following error
    By ananthdeena in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 01-01-2005, 03:46 AM
  5. Runtime Error 462
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-02-2004, 05:07 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 25