This project is read-only.

GeocodeRequest Query Results = 0

Mar 23, 2009 at 3:33 PM
Edited Mar 23, 2009 at 3:34 PM
I read a similar posting today, but has anyone else been having trouble returning the Geocodes of a US City this weekend and today? If I use this code:

// Set the credentials using a valid Virtual Earth token
DeepEarth.Provider.VirtualEarth.VEGeocodeService.GeocodeRequest geocodeRequest = new DeepEarth.Provider.VirtualEarth.VEGeocodeService.GeocodeRequest();
geocodeRequest.Credentials = new DeepEarth.Provider.VirtualEarth.VEGeocodeService.Credentials { Token = _clientToken };

// Set the full address query
geocodeRequest.Query = name; // Location search: "New York, NY"  


// Set the options to only return high confidence results
List<DeepEarth.Provider.VirtualEarth.VEGeocodeService.FilterBase> filters = new List<DeepEarth.Provider.VirtualEarth.VEGeocodeService.FilterBase>();
ConfidenceFilter cFilter = new DeepEarth.Provider.VirtualEarth.VEGeocodeService.ConfidenceFilter();
cFilter.MinimumConfidence = DeepEarth.Provider.VirtualEarth.VEGeocodeService.


GeocodeOptions geocodeOptions = new DeepEarth.Provider.VirtualEarth.VEGeocodeService.GeocodeOptions();
geocodeOptions.Filters = filters;
geocodeRequest.Options = geocodeOptions;




GeocodeServiceClient geocodeService = new DeepEarth.Provider.VirtualEarth.VEGeocodeService.GeocodeServiceClient();
geocodeService.GeocodeCompleted +=
new EventHandler<DeepEarth.Provider.VirtualEarth.VEGeocodeService.GeocodeCompletedEventArgs>(geocodeService_GeocodeCompleted);

... in the "geocodeService_GeocodeCompleted()" function I get a non-null e.Results, but the Results.count are always 0 when searching based on City and State (i.e., New York, NY, etc, etc):




geocodeService_GeocodeCompleted(object sender, DeepEarth.Provider.VirtualEarth.VEGeocodeService.GeocodeCompletedEventArgs e)

   DeepEarth.Provider.VirtualEarth.VEGeocodeService.GeocodeResponse geocodeResponse = e.Result;
   if (geocodeResponse.Results.Count > 0)   // This is Always Zero (started on Saturday 3/21/2009)

My token looks like it's working fine, I'm wondering if something changes on VE's end the way I search for Cities, etc.

Any ideas are appreciated. Thanks for your time,

Paul DiPalma