Location class from MapPoint object model exposes the FindNearby method to find POI around a location. The only parameter that the FindNearby method takes is distance as type System.Double.

The distance must be greater than zero and less than or equal to 50 miles. The default unit of measurement for distance is in Miles. Code snippet shown below is a good example of how to use that method:

//Call the find nearby on the current location
MapPoint.FindResults poiResults = location.FindNearby(distance);

As you can see the result is again a FindResults class that encapsulates a collection of locations. You can get the details of the location including the POI category (such as a restaurant or a gas station etc) using the PlaceCategory.

The PlaceCategory class encapsulates a category name and is exposed as PlaceCategory property from the Location class.

To learn more about this topic and other related topics, please buy Programming MapPoint in .NET

0 comments