Top |
Post New Question |
Read All |
MP2K Asks Microsoft
815
nirmal
-
August 1, 2002
I am trying my hand on Mappoint . I am trying to plot the routes on the map . but if there are 5 to 6 points it takes a long time to plot and i get a msgbox showing Server busy with three command buttons retry sitch to and cancel but clicking on any one of them shows no effect
Plz if yu have any solution do come out
thanks in advance
nirmal
Answer:
August 2, 2002
Without seeing your code it would be hard to see what is wrong. However, for a test, start a new VB project and add the Mappoint ActiveX Control. Add a command Button and put this code in. I added the form_Load below also to get a map loaded for you. Manually add a bunch of pushpins. I ran a test with about 15 pushpins and did not get the server busy error.(I usuall see that error when there is code in the mouse events) Hopefully this will help you narrow the problem down?
Private Sub Form_Load()
Set objMap = MappointControl1.NewMap(geoMapNorthAmerica)
MappointControl1.Toolbars("Drawing").Visible = True
End Sub
Dim objDataSet As MapPointctl.DataSet
Dim objRecordset As MapPointctl.Recordset
Dim objMap As MapPointctl.Map
Dim objRoute As MapPointctl.Route
Set objMap = MappointControl1.ActiveMap
Set objRoute = objMap.ActiveRoute
Set objDataSet = MappointControl1.ActiveMap.DataSets(1) '("My Pushpins")
Set objRecordset = objDataSet.QueryAllRecords
objRecordset.MoveFirst
Do Until objRecordset.EOF
objRoute.Waypoints.Add objRecordset.Pushpin.Location
objRecordset.MoveNext
Loop
objRoute.Calculate
John
john@support-pc.com
Post New Answer / Follow-up