My organization has service locations all over the United States. We currently have a MapPoint-based solution that our customer service reps use when our clients call in to locate an appropriate service location. We have full postal addresses for all of our service locations imported into our map as a Data Set.


A potential client of ours has offices in many locations (approx 400) throughout the US. From the center of each zip code for which this client has an office, they would like to see the number of service locations that we have within a 20 mile radius.

I realize that zip codes vary in size, but this is the request of the client.


I know you can service this request one by one using the MapPoint UI (Tools>>Find Nearby Places; specifying a zip code and a radius of 20) so I am assuming that I can do this programatically for each zip code that I am presented with from my potential client.

The question is how do I do this programatically?

My psuedocode would look like this:

For each ZipCode in ZipCode List

//Return the set of service locations for the current zip code and radius
ServiceLocationsInRadius = FindNearbyPlaces(ServiceLocationDataSet, ZipCode, 20)

//Add key-value pair to result set where the key is the zip and the value is the number of service locations in the given radius
ServiceLocationsResult.Add(ZipCode, ServiceLocationsInRadius.Count)