Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Paradox > MapPoint Active...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1343 of 1396
Post > Topic >>

MapPoint ActiveX control integration with Pdox 9

by "Jim Moseley" <jmose@[EMAIL PROTECTED] > Mar 14, 2008 at 01:15 PM

Greetings all.  I had to integrate MapPoint into my Pdox 9 application. 
From
all the history here, it seems like others were having trouble with this,
so I thought I'd post a basic solution - it even works in Runtime.  

I'm using MapPoint 2004.  If someone has 2006, can you test this to see if
it still works?

First, add the MapPoint ActiveX Control to the ActiveX toolbar.  From
there,
add it to your form.  Then, it's just a matter of controlling the control.
 For some reason, you can't directly access the Map object.  But, the OCX
has an ActiveMap property that returns the Map itself.  The same applies
with the Route object - you use the ActiveRoute property to get the Route.


HTH,
Jim Moseley



method pushButton(var eventInfo Event)

var
	oaMP1,
   oaMap,
   oaRoute,
   oaStops,
   oaLocation
   oleAuto
   dyn	dynarray[] anytype
endVar
doDefault

MapPointOCX.NewMap(1)

;while not MapPointOCX.ReadyState = 4
;	sleep(200)
;endWhile

if not oaMP1.attach(MapPointOCX) then
	errorShow()
	return                                           
endif

oaMap = oaMP1.ActiveMap
oaRoute = oaMap.ActiveRoute
oaRoute^clear()
oaStops = oaRoute.WayPoints
oaLocation = oaMap^getLocation(30.299, -81.708)
oaStops^add(oaLocation, "Start") 
oaLocation = oaMap^getLocation(33.321, -83.321)
oaStops^add(oaLocation, "Stop 1") 
oaLocation = oaMap^getLocation(35.321, -82.321)
oaStops^add(oaLocation, "End") 
oaRoute^calculate()

driveTime = round(oaRoute.DrivingTime * 24,2)  

endMethod
 




 1 Posts in Topic:
MapPoint ActiveX control integration with Pdox 9
"Jim Moseley" &  2008-03-14 13:15:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 2:33:40 CDT 2008.