You get a new point every second. What are you doing with it ? Do you save it somewhere? I am afraid that you redraw all the points onto the screen? This could result in speed trouble because the more points you have the longer it takes to redraw ALL of them?Are the points drawn onto the forelayer or onto the background or onto a bitmap and then transfered to the background layer?
A new position is stored in an array in degrees if:
(a) the new posn has moved by a certain distance from the last stored postion OR
(b) the heading has changed since the last stored position OR
(c) no new position has been captured in the last X seconds
Now for drawing the track I do the following to minimise the number of positions that have to be calculated on in order to determine the corresponding pixel positions on the screen, which is very time consuming:
(a) calculate the border of the screen interms of lat and lon (degrees)
(b) disregard points from the array that fall outside the screen border
(c) for positions that fall within the screen, depending on the zoom level, I disregard more points before drawing the track using agraham's ImageLibEx drawer to draw on the forelayer.
How do you move your map on the screen?Do you load your map on a bitmap and draw on it and then copy the needed part of it onto the screen?
The map is loaded into an ImageList array and then drawn onto a form using:
frmMap.DrawImage(ImageList1.Item(mapIndex),X1,Y1, X2,Y2)
X1,Y1 & X2,Y2 are calculated based on the current lat/lon position and zoom level, then used to re-draw the JPG every second, i.e. move the map.
In that case you shouldn't have trouble because you just need to add the last point to the whole drawing and copy the needed part onto the screen.
I haven't tried this, do you have any examples?