Adding Points to a map

Good Afternoon,

I’m hoping someone can help me. I am new to MapWinGis and am playing around with it in an attempt to learn how it works. I’ve programmed maps in the past using other ocx’s that are no longer supported and are not being updated. I’ve programed in Visual FoxPro for years. I’m attempting to add a point to a map. I have the map loaded and working and can interact with it. I created a button on my form with the below code in the click method. The purpose of this is the learn how to put points on the map. Eventually, the map will be used to track the location of cars on the street. The map will be periodically refreshed to update the cars new location as new lat/lng data is received.

This code seems to work as I don’t get any errors. However, I do not see any points being added to the map either. What am I not doing correctly? Thanks!

LOCAL lnLatitude, lnLongitude, llSuccess, m.x, m.y, lnColor, lnFill
SET DECIMALS TO 8

m.lnLatitude = 42.871
m.lnLongitude = -71.952
m.x = 0.0
m.y = 0.0
m.llSuccess = .F.

m.llSuccess = This.Parent.AxMap.DegreesToProj(m.lnLatitude, m.lnLongitude,@x,@y)

m.lnColor = RGB(0,0,255)

*IF m.llSuccess
This.Parent.AxMap.DrawPoint(m.x, m.y,100,m.lnColor,255)
This.Parent.AxMap.Redraw()
This.Parent.AxMap.Refresh()
*ENDIF