No, this code is not working. In fact, I don't know how to paint into the map directly. It would be rather complicated because the map is not static and changes with zoom level and center of the map.
On the other hand, you probably want to mark some specific locations or a track. For this purpose, the MapViewer (that one by ti_dic which is in a modified version on Lazarus-CCR) has a list for GPS locations. Look at unit mvGpsObj: there is a TGpsPoint which you create with the gps coordinates as argument. Add the point to the GpsItems of the Mapviewer. You must provide some kind of ID to differentiate between the various kind of GPS items. The following code adds a GPS point for the location clicked with the mouse while the CTRL key is pressed:
const
_POINTS_ = 20;
procedure TMainForm.MapViewMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
rPt: TRealPoint;
gpsPt: TGPSPoint;
begin
if (Button = mbLeft) and (ssCtrl in Shift) then begin
rPt := MapView.ScreenToLonLat(Point(X, Y));
gpsPt := TGpsPoint.CreateFrom(rPt);
MapView.GPSItems.Add(gpsPt, _POINTS_);
end;
end;
The point is drawn as a red cross, but you'll certainly find in the code the procedure where this is defined, and you can replace it by a circle (*).
There is also a TGpsTrack containing a list of TGpsPoints, but I did not study it yet.
To learn more about the component study ti_dic's original code in the "roadbook" application which you can see on
https://sourceforge.net/p/roadbook/code/ci/master/tree/. Unfortunately, I was not able to compile the original code, I had to remove the special grid used.
(*) Drawing of the points happens in unit mvMapViewer, procedure TMapView.DrawPt.