Getting Started with the Bing Maps iOS Control

Include the Library in Your Xcode Project

You can find the Bing Maps iOS Control (as a universal static library) plus the required resources bundle and header files in the MapControl folder of your SDK installation.

addexistingfiles.png

Note: If there are any spaces in the path, be sure to enclose the entire path with double quotes (").

Add Linker Flags

addlinkerflags.png

Add Required Frameworks

addframeworks.png

Inserting the Map Control in a NIB File

insertmapcontrolinanib.png

Implementing the BMMapView Delegate in UIViewController

#import "BingMaps/BingMaps.h"
@interface LocationMapViewController : UIViewController <BMMapViewDelegate> {
    IBOutlet BMMapView* mapView;
}
@end
- (void)viewDidLoad {
    [super viewDidLoad];
    [mapView setDelegate:self];
    
    // If you want to show user location...
    [mapView setShowsUserLocation:YES];
}
implementing.png

Adding Your Bing Maps Key

To use the Bing Maps iOS Control, you need to have a Bing Maps Key to use in your app.

Bing Maps Keys can be requested from the Bing Maps Account Center (http://www.bingmapsportal.com). More information is available at http://msdn.microsoft.com/en-us/library/ff428642.aspx

Once you have a Bing Maps Key, follow the steps below to add it to your app project's main property list, named {appname}_Info.plist

addingkey.png

Session Counting

When the Bing Maps iOS Control is loaded with a valid Bing Maps Key, Bing Maps counts sessions. A session begins with the load of the first Bing Maps iOS Control which appears in an app and includes all map control interactions until the app is terminated. Information about Bing Maps usage reports is found in the Viewing Bing Maps Usage Reports topic.