FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Mappoint Methods question
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
Re: Mappoint Methods question (Solved)
Posted: Tue Aug 11, 2009 07:55 PM
Now is working fine after I am using FWH 9.04 + XHarbour Builder Pro Sep08
This is the code:

local hToolBar, hStandard, oMapPoint, nDist, oMap
oActiveX = TActiveX():New( oWnd, "MapPoint.Control.16" )


oMap := oActiveX:Do( "Newmap", 1 )
hToolBar = oActiveX:GetProp( "Toolbars" )
//hStandard = OleGetProperty( hToolBar, "Item", "Standard" )
//OleSetProperty( hStandard, "Visible", .T. )
//oActiveX:GetProp( "Toolbars" )

oMap := oActiveX:ActiveMap()
oStartLocation:= oMap:FindResults("205 Broadway, Lawrence, MA"):Item(1)
oEndLocation:= oMap:FindResults("77 Centre Street, Roxbury, MA"):Item(1)

msgInfo( oMap:Distance( oStartLocation, oEndLocation ), "Distance" )

Thanks everyone for your help.

Regards,

George
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Mappoint Methods question
Posted: Tue Aug 11, 2009 10:31 PM

George,

Yea!

Just for clarity, I would change this line:

oMap := oActiveX:Do( "Newmap", 1 )

To this:

oActiveX:Do( "Newmap", 1 )

Congratulations on getting it working.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion