MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




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

This is a discussion on About ERROR 4-40028-1. Error or Bug ? within the MapPoint 2006/2009 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) ...


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 01-10-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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 ?
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 01-10-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
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 ?
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 01-10-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
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 01-10-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
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
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 01-10-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
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 01-10-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Quote:
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
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 01-10-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Okay, thank you for your investigation
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 01-10-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
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 ?
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 01-10-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 787
Blog Entries: 5
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
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
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 01-10-2005
Junior Member
Yellow Belt
 
Join Date: Jan 2003
Posts: 17
Send a message via ICQ to brianmcg
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?
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
MapPoint error 4-40028-1 : Solution Etienne MapPoint 2006/2009 Discussion 5 01-11-2008 05:23 AM
synchronous error Wilfried MapPoint 2006/2009 Discussion 4 06-09-2005 04:27 AM
Mappoint Error Mudrover MapPoint 2006/2009 Discussion 5 01-20-2005 02:59 PM
I get this following error ananthdeena MapPoint 2006/2009 Discussion 3 01-01-2005 02:46 AM
Runtime Error 462 Anonymous MapPoint 2006/2009 Discussion 0 09-02-2004 04:07 AM


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


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

Cheap Skiing
When it comes to cheap skiing, Holiday Hypermarket will speed you on your way. Searching the leading travel brands, Holiday Hypermarket offers you great value skiing.

Spain Holidays
Find great Spain Holidays with Travel Counsellors. A personal Travel Counsellor can help you plan the perfect holiday to Spain.

Portugal Holidays
Lisbon is perhaps Europe's most pleasant and affordable city. Check out the fantastic architecture, delicious seafood and non-stop night-life. Book Portugal Holidays with us.

Antigua Holidays
We have the most popular Antigua holidays at highly competitive prices at The Holiday Place. Book a break in sunny Antigua today.

Cheap Greece Holidays
For cheap Greece holidays make sure you know when to book and who to book with. Visit ulookubook.com to get help with doing both of those things. Why not time your visit with a Greek festival?

Travel
Before making a choice regarding travel, check out the amazing variety of options on Travel.co.uk.

Holidays in Lanzarote
A quality luxury hotel awaits your patronage in the Canary Islands. Get information on holidays in Lanzarote 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