I tried replacing the two lines as you suggested but it didn't help.
I got a map in the VIEW but it shows some generic location and the route is missing.
My version of DIAdem is DIAdem 20.0.0f7762 (64-bit), Packet 1 is Professionalk edition.
I didn't get any error message.
Here is the complete code for reference:
Dim oMySheet, oMyChart, oMyArea, oMyNewArea, oMyCurve
Call View.NewLayout()
Set oMySheet = View.ActiveSheet
oMySheet.Name = "RouteMap"
Set oMyArea = oMySheet.ActiveArea
oMyArea.Active = True
oMyArea.DisplayObjType = "Map"
Set Sheet = View.ActiveSheet
Set Area = Sheet.ActiveArea
Set Map = Area.DisplayObj
AreaName = Area.Name
Map.MapType = "Cache"
Map.ZoomLevel = 12
Map.ShowTrack = True
Map.MapMovingMode = "Pan"
Map.UseCache = True
Map.CachePath = "C:\Users\Public\Documents\National Instruments\DIAdem\MAP Cache\"
Map.SynchronisationChannelName = "[9]/TripTime"
Map.LongitudeChannelName = "[9]/GPS_Longitude"
Map.LatitudeChannelName = "[9]/GPS_Latitude"
Map.ColorChannelName = "[10]/imGPS_GROUND_SPEED"
Map.SynchronisationDimension = "X-Cursor"
Map.LongitudeDimension = "Y-Cursor"
Map.LatitudeDimension = "Z-Cursor"
Call ScriptStart(ProgramDrv & "Resource\VwLayTrans", "VWTransViewRep", False)
Set Sheet = Report.Sheets(Report.Sheets.Count)
Set Image = Sheet.Objects(AreaName)
Image.UseOriginalRatio = TRUE
The VIEW looks like this