Sekhar
2009-04-24 19:06:06 UTC
I'm creating a class library to be used in a Windows Service to find GeoCode
for addresses in a database.
In the class library, I have references to
http://staging.mappoint.net/standard-30/mappoint.wsdl
https://staging.common.virtualearth.net/find-30/common.asmx
I was trying to implement the sample code from Virtual Earth SDK
GeocodeService.GeocodeRequest geocodeRequest = new
GeocodeService.GeocodeRequest();
// Set the credentials using a valid Virtual Earth token
geocodeRequest.Credentials = new GeocodeService.Credentials();
geocodeRequest.Credentials.Token = token;
// Set the full address query
geocodeRequest.Query = "1 Microsoft Way, Redmond, WA";
// Set the options to only return high confidence results
GeocodeService.ConfidenceFilter[] filters = new
GeocodeService.ConfidenceFilter[1];
filters[0] = new GeocodeService.ConfidenceFilter();
filters[0].MinimumConfidence = GeocodeService.Confidence.High;
GeocodeService.GeocodeOptions geocodeOptions = new
GeocodeService.GeocodeOptions();
geocodeOptions.Filters = filters;
geocodeRequest.Options = geocodeOptions;
// Make the geocode request
GeocodeService.GeocodeServiceClient geocodeService = new
GeocodeService.GeocodeServiceClient();
GeocodeService.GeocodeResponse geocodeResponse =
geocodeService.Geocode(geocodeRequest);
Results.Text = geocodeResponse.Results[0].DisplayName;
But, I can't seem to find the "GeocodeServiceClient" in the GeocodeService
namespace (everything else in the above code has no issues). It finds
GeoCodeService but not GeocodeServiceClient. Am I missing any other reference
I need in the project?
Can someone please help?
Thanks in advance.
for addresses in a database.
In the class library, I have references to
http://staging.mappoint.net/standard-30/mappoint.wsdl
https://staging.common.virtualearth.net/find-30/common.asmx
I was trying to implement the sample code from Virtual Earth SDK
GeocodeService.GeocodeRequest geocodeRequest = new
GeocodeService.GeocodeRequest();
// Set the credentials using a valid Virtual Earth token
geocodeRequest.Credentials = new GeocodeService.Credentials();
geocodeRequest.Credentials.Token = token;
// Set the full address query
geocodeRequest.Query = "1 Microsoft Way, Redmond, WA";
// Set the options to only return high confidence results
GeocodeService.ConfidenceFilter[] filters = new
GeocodeService.ConfidenceFilter[1];
filters[0] = new GeocodeService.ConfidenceFilter();
filters[0].MinimumConfidence = GeocodeService.Confidence.High;
GeocodeService.GeocodeOptions geocodeOptions = new
GeocodeService.GeocodeOptions();
geocodeOptions.Filters = filters;
geocodeRequest.Options = geocodeOptions;
// Make the geocode request
GeocodeService.GeocodeServiceClient geocodeService = new
GeocodeService.GeocodeServiceClient();
GeocodeService.GeocodeResponse geocodeResponse =
geocodeService.Geocode(geocodeRequest);
Results.Text = geocodeResponse.Results[0].DisplayName;
But, I can't seem to find the "GeocodeServiceClient" in the GeocodeService
namespace (everything else in the above code has no issues). It finds
GeoCodeService but not GeocodeServiceClient. Am I missing any other reference
I need in the project?
Can someone please help?
Thanks in advance.
--
Sekhar
Sekhar