This tutorial shows how to obtain an API key for the Microsoft Bing Maps web service and how to install that key in TransDEM. Requires TransDEM 2.6.1 (and higher).
Note: At the moment you do not need such a key if you want to get Bing Maps ortho-images via the TransDEM Map Tile client. The classic Quadtree web service is still working fine and does not require any key. However, there may be one other reason, for those interested in UK topographic maps: Bing Maps offers Ordnance Survey 1:50000 Landranger and 1:25000 Explorer maps via this interface. In the past, these had also been available via the classic tile server, but were withdrawn from there for copyright reasons. The basic API key is free – you pay with your data – but comes with a limited contingent of 50000 requests per day (at the time of writing).
- To obtain a key you first need to register with Microsoft.
The quickest way for a first time user is to go via the Microsoft Bing Maps portal web page: https://www.bingmapsportal.com/
![Image](http://img.transdem.de/albums/userpics/10001/msapi01.png)
- Click on “Sign in”.
Microsoft wants you to log-in first. Use an existing Microsoft account or create a new one.
Please be aware of privacy implications. By using an API key, Microsoft is able and will trace your Bing Maps usage and may link this to any other of your activities within the Microsoft universe.
The ensuing Bing Maps registration procedure consists of two steps.
1. Create a Bing Maps account.
2. Create an application and a key.
- After signing in, Bing Maps will want to know whether you want to associate the Microsoft account with the Bing Maps account. Click yes.
- Bing Maps opens a form which you have to fill in. Assign a name to the account, confirm or enter your Microsoft email address, accept the terms of service and click “Create”.
![Image](http://img.transdem.de/albums/userpics/10001/msapi03.png)
- Once the account has been created you set up an application and a key. If the key page does not come up automatically, open it via the “My account” and “My Keys” menu commands.
Assign a name to the application. Select key type “Basic” (which is free) and set application type to “Public Windows App (7.x and earlier)” (which is the least restricted). Click “Create”.
![Image](http://img.transdem.de/albums/userpics/10001/msapi04.png)
- The created key will be shown in the next window. Copy it to the clipboard.
![Image](http://img.transdem.de/albums/userpics/10001/msapi05.png)
- Open TransDEM and the Map Tile client.
![Image](http://img.transdem.de/albums/userpics/10001/ggapi06.png)
- In the Map Tile client open “Settings”.
![Image](http://img.transdem.de/albums/userpics/10001/ggapi07.png)
- If you have not done that so far, import the latest map tile sample settings, available on my website (http://www.rolandziegler.de/), on the download page. Download and unzip. Import “Map Tile Sample Settings.xml”:
![Image](http://img.transdem.de/albums/userpics/10001/ggapi08.png)
- Then select “MS Bing (Virtual Earth, Key)” as provider and “Orthophoto” as tile type. Click on “Edit” in the Tile Type group.
![Image](http://img.transdem.de/albums/userpics/10001/msapi09.png)
- The URL composition dialog opens. All should be pre-set, except for the API key. Do not change anything. Click on “Key” to install your API key.
![Image](http://img.transdem.de/albums/userpics/10001/msapi10.png)
- Enter your key in the API Key dialog. Use Ctrl/V to paste it from the clipboard. If it's no longer there, copy it from the Bing Maps page again, still open in your web browser. Don't try to do that by hand. Keys are long and cryptic. You will certainly make errors when entering it manually.
Keep the “Apply to all” checkbox checked. The same key will be valid for the other Bing Maps tile types and TransDEM will copy the key there.
![Image](http://img.transdem.de/albums/userpics/10001/msapi11.png)
- Close all the dialogs with OK until you are back in the Map Tile client. The world as seen by Bing Maps should appear in the preview area.
![Image](http://img.transdem.de/albums/userpics/10001/msapi12.png)
- That's it. You can now also log-out from the Bing Maps portal and Microsoft.