Bing Maps iOS SDK

The Bing Maps iOS SDK is a control for embedding maps directly into native iOS apps. With a rich, gesture-based UI, the SDK provides support for adding pushpins and other overlays to the maps. The SDK also allows your device location to be displayed and provides the ability to retrieve contextual information for a given map location.

This project provides a managed binding of the native library for Xamarin.iOS.

Sadly, after getting all this nice stuff going, I found the actual native library to be very buggy and often caused the app to crash. For example, if the push pins were animated, tapping them caused the app to crash. As a result, I won’t be pushing this to the stores.

Getting Started

Before you can use the map control, you will need a Bing Maps Key from the Bing Maps Portal. The process is described in the MSDN documentation, Getting a Bing Maps Key, and is very simple with only four steps.

A map key is not required for the maps to appear, but will display a popup reminder every time a map view is displayed.

Using the Map View

Once you have obtained a key, the next step is to add the map view to your app. You can obtain the control from the 3.

Once you have added the assembly to your app, you then need to add your Bing Maps Key to the Info.plist file in your project. This is a string key-value item with the key, BingMapsKey, with the value being the key you obtained from the portal.

Now, all that is left to do is to add the map view to your view. This can be done in the code or in the designers (storyboards or interface files).

If we are going to use the designers, then you can just add a UIView to your app, and then change the Class to be BMMapView. When the app is launched, a map should appear. If the code is used, then this snippet is all that is needed:

    // create the map view
    BMMapView mapView = new BMMapView (UIScreen.MainScreen.Bounds);
    // add to some View
    View.AddSubview (mapView);
    // show the user's location on the map (optional)
    mapView.ShowsUserLocation = true;

Changing Bing Stylesheets

I have never liked Bing’s results page style, it is a decided lack of coloring – or anything for that matter. So, using Google Chrome I tweaked the stylesheet.

Here is the before:


Here is the after:


And all it took was a little CSS:

#sw_hdr {
    border-bottom: #6190FF 1px solid;
    padding-bottom: 12px;
    background: #DBE6FF;
#id_h {
    height: 75px;
    background: #DBE6FF;
.sw_bd {
    background: #FFF;
.sb_form_go {
    background: #DBE6FF;
    height: 25px;
.sb_ph .sb_count {
    color: #777;
.sw_logo {
    background-image: url('');
    background-color: #DBE6FF;
    background-size: 75px 26px;

It is just a tiny splash of colour and everything looks better. I use the different image because I wanted the transparency. Maybe Microsoft will change it a bit and then we can all celebrate by doing a few extra searches – maybe even click on some ads?