View Single Post

  #3 (permalink)  
Old 01-10-2005
Anonymous Anonymous is offline
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
Reply With Quote