View Full Version : Method FindNearby() with a route object

12-19-2002, 03:13 AM
I would like to use the method FindNearby(...) with a route object but It doesn't seems to function.

I make:

Dim oDS As MapPoint.DataSet
Dim objshape As MapPoint.Shape
Dim objRecords As MapPoint.Recordset
Dim lngcount As Integer

lgncount = 0

'oRoute ever exists
Set oRoute = oMap.ActiveRoute
Set oResults = oRoute.Directions.Location.FindNearby(20)

But my pb is that this method doesn't make what I want. I want to draw a zone around the route, but not a circle.
Then after I would like to find pushpins wich are placed in this zone. I have the method to make that.
My pb is to draw this zone and to recover the zone.

Thanks for your help.

12-19-2002, 03:38 AM
If it could interest somebody a answer to my own question !!!!

You have to do:

Set oRoute = oMap.ActiveRoute
Set oResults = oRoute.Directions.FindNearby(20)

It draw a zone around the road.

But now, I always have one problem. How to recover this zone in order to find the pushpin palced in this zone ???

Could you help me ???? please ???



12-19-2002, 04:42 AM
Hi Val,

just before you do the findnearby(x) you need to set the findnearby Pane state which will list all points within the radius.

Have a look at the PaneState Property within the mappoint help this should do what you are after.



12-19-2002, 08:06 AM
Thank you very much Dave, I can see that my data were yet in the category.
Thank you very much.
I continue ...