RESTful services provide their data in form of resources accessible via a URL. The Bing Maps Location API responds with location resources, whereas the other API responses, in JSON, or XML format, contain imagery, route, or traffic information.
The fields returned by the API are quite large, and need to be serialized in other programming languages, such as JavaScript, C# or Ruby. In .NET we can use a collection of DataContracts
that correspond to the JSON format of the REST APIs (the latest version of them can be found at http://msdn.microsoft.com/en-us/library/jj870778.aspx). We will also use them in our project, so let's copy them to a JsonDataContracts.cs
file inside the Models folder.
Now, it's time to write our proxy class that will communicate with Bing Maps; we'll place it inside the Models folder:
public class LocatorProxy { private const string MAP_KEY = "[YOUR BING MAPS KEY]"; private const string REST_URL = "http://dev.virtualearth.net...