Hi everyone: I have to say Thank you!!!! for the wealth of information everyone on this post is sharing about mappoint. Information which for the most part, is not found anywhere else.
I am using vb6 and mp2006, and I am also new to programming. ---- Problem: I do not know how to continually display the lat/lot information coming from my GPS. I have two "Public" variables one for latitude (lat) and another one for longitude (lot) which are constantly receiving the already parsed lat/lot coordinates from the GPS, but the GetLocation method allows me to place only one pushpin on on the map. (See the last procedure below) What code do I use to place one pushpin every 1 or 2 seconds on the map based on the lat/lot info from the GPS?
code below:
--------------------------------------------------------------------------
Public lat As Double
Public lon As Double
Private Sub Form_Load()
Dim objMap As MapPointCtl.map
Set objMap = MappointControl1.NewMap(geoMapNorthAmerica)
Set objMap = MappointControl1.ActiveMap
call position_gps
End Sub
Private Sub form_unload(cancel As Integer)
MappointControl1.ActiveMap.Saved = True
End Sub
Private Sub position_gps()
Dim mymap As MapPointCtl.map
Dim myLoc As MapPointCtl.Location
Dim mypushpin As MapPointCtl.Pushpin
Set mymap = MappointControl1.ActiveMap
Set myLoc = mymap.GetLocation(lat, lon)
Set mypushpin = mymap.AddPushpin(myLoc)
mypushpin.Symbol = 83
mypushpin.Location.GoTo
End Sub
--------------------------------------------------------------------------
There is one or two similar threads, but no code is posted on the solution to this question.