First, we create a proxy model to the Geodata API:
public class GeodataProxy { private const string API_URL_TEMPLATE = "https://platform.bing.com/geo/spatial/v1/public/geodata?spatialFilter=GetBoundary({0},{1},1,'PostCode1',1,1,'en','us')&key=[YOUR BING MAPS KEY]&$format=json"; }
Note how the URL here points at a different host to the other APIs, a platform.bing.com.
Apart from the Bing Maps Key (this service is also subject to data usage), the following parameters are used to build the URL template (you can get the full list of parameters at http://msdn.microsoft.com/en-us/library/dn306801.aspx):
latitude
,longitude
(required): This is a pair of double values between -90 and +90 for the latitude, and between -180 and +180 for the longitude.address
(the coordinates or address are required): This is a string representing an address, as in the previous chapter. This task is performed in two steps; first the address is geocoded, and then the resulting coordinates...