PDA

View Full Version : Find Nearby Pushpin in dataset



Dazzer
10-16-2003, 06:24 AM
I am writing a vb application using mappoint and currently have it so that the user can enter an address, the map template i have created then zooms to the location on the map and adds a pushpin. I would like mappoint to then return the location of the nearest pushpin in a seperate dataset, is this possible.

I am currently using

objPushPin.Location.FindNearby(2).Item(1).Name

where objpushpin is the location the user has typed in, however this returns nearest places of interest (i.e. hotels, airports etc.) is it possible to have it locating just nearest pushpins instead.

Thanks in advance for your help.

Dazzer

John Meyer
10-16-2003, 03:05 PM
Look at the "QueryCircle" method. Using your new pushpin as the center you can enumerate other pushpins within the circle.