David Omid
David Omid

Reputation: 665

Obtaining a list of place names for WP7

Sorry if this is a silly question or if it's been answered already, but I'm inexperienced with this sort of thing and need some advice.

Basically, I'm designing an app for Windows Phone 7 which contains an AutoCompleteBox. The idea is that when the user types in the name of a place (e.g any address string, whether it's a full address or just a street, town, city, etc), the AutoCompleteBox will show possible suggestions.

I already have the AutoCompleteBox placed on the app, with a sample ItemsSource which just contains 3 strings saying "London", "Birmingham" and "Manchester". The only thing I need to do is connect the app to a web service which returns a list of place names.

Which APIs can do this? Which ones are the best to use for Windows Phone 7? If possible, I'd prefer to use one which uses Google Maps, as this app is designed around a website with a similar input box which connects to the Google Maps API.

Upvotes: 3

Views: 109

Answers (1)

ColinE
ColinE

Reputation: 70162

Yes, this can be done via the Google Maps 'autocomplete' API method:

https://developers.google.com/maps/documentation/places/autocomplete

Simply use a WebClient instance to make a request with the required URL, then parse the returned XML (using Linq-to-XML).

Upvotes: 3

Related Questions