Getting started with the Bing Maps AJAX Control

Getting started with the Bing Maps AJAX Control

The Bing Maps AJAX Control (currently on version 7.0), is ideally a JavaScript control containing the objects, methods and events that allow you to incorporate Bing Maps into your application.

In this blog post, we look at how to add a basic map onto your web page using Bing Maps AJAX Control.

Step 1: Create a Bing Maps Account and get a Bing Maps Key

Before you begin developing your application, you need to create a developer account on the Bing Maps Account Center. A Bing Maps Developer Account allows you to create a Bing Maps Key to use in your map application.

You will need to sign in with your Windows LiveID (if you don’t have one, there’s a provision for creating one).

Setup your account details

Under My Account, click on Create or View Keys

Under My Keys, enter the required information for the application that will use the Bing Maps Key i.e. Application Name, Application URL, Key Type (Trial, Basic or Enterprise) and the Application Type.

Click on Submit. You will get a new key under list of available keys. We shall use this key to authenticate our Bing Maps application.

Step 2: Add a map control to your web page

We then need to come up with a basic web page to incorporate our map.

At the header section, we include a reference to the map control as follows

Your basic web page is now ready for display. The output will be as follows:

You can add lots of customizations to your map as you go along. The Bing Maps AJAX Control 7.0. Interactive SDK contains code snippets and feature samples that will get you started on possible customizations.