View Full Version : Possible to Locate all Hospitals in 1 mile radius?

01-08-2003, 04:10 PM
Hi everyone -

I was wondering if it was possible to locate a specific type of POI (such as all hospitals) in a 1 mile radius? I was trying to figure out how the PlaceCategory property works (and if it will tell me what type of feature each POI or place is that I find.) I am trying to put PushPins on each of these hospitals (if I can select them out) from a FindResults Collection from a FindNearby search from the original (center) location.

I do not have any of my own hospital information (locations that I would import), but using MapPoint interactively, I can easily find all hospitals (or any other single type of POI) in a certain radius from a single location.

Is this a good way to go about it? I'm also doing this development in C#, so if anyone knows where I can locate other good C# examples, I'd be really interested.


01-08-2003, 05:09 PM
I think I figured out how to get just the "Hospitals" out of a FindResults Collection: (in C#)

for ( int i = 0 ; i < oRes.Count; i++ )

MapPoint.Pushpin Pin;
MapPoint.Location Loc = (MapPoint.Location)oEnum.Current;

if ( (Loc.PlaceCategory != null) && (Loc.PlaceCategory.Name == "Hospitals") )

Pin = oMap.AddPushpin(Loc, Loc.Name);
Pin.BalloonState = MapPoint.GeoBalloonState.geoDisplayName;