As you learned in the previous chapter, you can show a map directly in your application. Unfortunately, by default, it informs a user that the map service token has not been specified. You can solve this problem by generating a map token using the Bing Maps Dev Center portal, as you will see in this recipe. Then, the obtained token should be set as a value of the MapServiceToken
property of MapControl
.
To step through this recipe, you need a project that contains a page with the MapControl
control. You could use an application developed as an example in the Showing a map within a page recipe from
Chapter 8, Internet-based Scenarios.
To obtain a map token, perform the following steps:
Log in to the Windows Dev Center, as already explained in the recipe titled Adding a project to the Windows Dev Center.
Click on the application name in the dashboard.
Go to Services | Maps from the menu on the left-hand side.
According to the information presented...