Silverlight Bing Map Control in SharePoint 2010

Silverlight Bing Map Control in SharePoint 2010

In this article we will be seeing how to use Silverlight Bing map control in SharePoint 2010.

Bing Map Developer Account:

  • Open

  • Go to New User section and click on Create.

  • Sign in using Windows Live ID.
  • Enter the account details and click on Save.

  • Bing Map Developer account will be created successfully.


Bing Maps Key:

Bing Maps Key should be created to authenticate your Bing Maps application as described in the SDK for the Bing Maps API we are using. If you run the program without providing the valid Bind Maps Key then the map appears in the browser with a message that you have invalid credential appears.
• Select Create or view keys in the Tasks left-hand menu MAP APIs.


• In the Create key box on the My keys page, provide the following information for the application that will use the Bing Maps key:

  • Application name Required. The name of the application.
  • Application URL Required. The URL of the application.
  • Application Type Required. The scenario for your application. Select the application type that best represents the application that will use this key.

    The following are general descriptions of these types.

    Application Type



    Application is used for public or internal-facing television, movies or similar.


    Application does not exceed 125,000 sessions or 500,000 transactions within a 12 month period.


    Application is used for public use by schools, including faculty, staff and students.


    Application is used for public or internal use during a 90 day evaluation period.


    Application is used for publically available and installable applications on mobile handsets.


    Application is used by a tax-exempt organization.


    This option is available to licensed enterprise accounts only.

• Click Create key and the new key displays in the list of available keys.
• Refer for more information:

Bing Maps Silverlight Control:

Download the Bing Maps Silverlight Control This download includes the Bing Maps Silverlight Control assemblies and an offline version of the Bing Maps Silverlight Control SDK.

Create Silverlight application:

  • Open Visual Studio 2010.
  • Go to File => New => Project.
  • Select Silverlight Application from the installed templates Silverlight.

  • Enter the Name and click on Ok.
  • In the New Silverlight Application wizard check the "Host the Silverlight Application in a new Web site".
  • Click OK.
  • Go to C:\Program Files (x86)\Bing Maps Silverlight Control\V1\Libraries\ (Check the path where you have installed Bing Maps Silverlight Control).
  • Add the following assemblies to the project.

    o Microsoft.Maps.MapControl.Common.dll
    o Microsoft.Maps.MapControl.dll
  • Replace MainPage.xaml with the following code

    <UserControl x:Class="SilverlightMapControl.MainPage"
        d:DesignHeight="300" d:DesignWidth="400">
        <Grid x:Name="LayoutRoot" Background="White">
            <map:Map  CredentialsProvider="AvlbQD5CwBygUC98qmXz7r_lKco_VV0QAAIPV-frlHrdGsMf4DkoSJOJ9qrw8Hv8"  Mode="Aerial" />
  • Build the solution.

Deploying in SharePoint site:

  • Upload the xap file in the SharePoint Site => Shared Documents.
  • Go to Site Actions => Edit Page => Editing Tools => Insert => Web Part.

  • Go to Categories => Media and Content => Silverlight Web Part => Click on Add.

  • In the URL give the path of the xap file ~site/Sample/Shared%20Documents/ SilverlightMapControl.xap

  • Click on Ok.


With Valid Bing Map Key:


Without Valid Bing Map Key:


Up Next
    Ebook Download
    View all
    View all