Hi Experts, I have a question regarding Bing Maps and its Silverlight SDK..
I want to be able to get a list of addresses from a database using WCF DATA SERVICE and get the addresses geocoded and passed into the Silverlight Bing Maps Control.
Working with one address at a time seems to work fine but how can I re-engineer the code so that I can input an array of addresses and the output is an array of coordinates which i can then bind to the Bing Maps Silverlight Control in the form of pushpins?
Thanks in advance for your assistance
ps: I have the wcf service to get the addresses already
This is what i have currently in MainPage.xaml.cs - As you can see it takes in one address
private void geocodeaddresses(string rawadd)
GeocodeRequest geocodeReq = new GeocodeRequest();
//set the credentials using a valid bing maps key
geocodeReq.Credentials = new Credentials();
geocodeReq.Credentials.Token = myKey;
//set the full address query
geocodeReq.Query = rawadd;
//set the options to only return high confidence results
ConfidenceFilter filters = new ConfidenceFilter;
filters = new ConfidenceFilter();
filters.MinimumConfidence = gecodeservice.Confidence.High;
GeocodeOptions geocodeOptions = new GeocodeOptions();
geocodeOptions.Filters = filters;
geocodeReq.Options = geocodeOptions;
GeocodeServiceClient geocodeService = new GeocodeServiceClient("BasicHttpBinding_IGeocodeService");
geocodeService.GeocodeCompleted +=new EventHandler<GeocodeCompletedEventArgs>(geocodeService_GeocodeCompleted);
void geocodeService_GeocodeCompleted(object sender, GeocodeCompletedEventArgs e)
GeocodeResponse geoResp = e.Result;