Bing Maps Integration

Here is a quick code sample that demonstrates how to use our map markers with Bing Maps.

Important for animated map markers: Bing Maps renders all shapes on an HTML 5 canvas which ends up flattening images and disables any animation they might have built in. In this case its likely only rendering the first frame of your animated image which may be the reason why it can't be seen. The solution is to use an "HTML Pushpin": Read more.

var map = new Microsoft.Maps.Map(document.getElementById('myMap'), {
    credentials: 'Your Bing Maps Key'

var pushpin = new Microsoft.Maps.Pushpin(map.getCenter(), {
    icon: '',
    // define an anchor point at the bottom middle of pin markers to avoid visual shift during zooms
    // for non-pin style markers, you probably won't need this
    anchor: new Microsoft.Maps.Point(25, 50)


Bing Maps Animated Icons via HTML Pushpin

Here is a quick code sample that demonstrates how to use our animated map markers with Bing Maps:

  1. Initialize Bing Map
  2. Initialize Bing Map HtmlPushpinLayerModule Module
  3. Async Load Icon
  4. Add Icon to HtmlPushpinLayer
  5. Add HtmlPushpinLayer to Bing Map
var map = new Microsoft.Maps.Map(document.getElementById('map-bing-html-pushpin'), {
    credentials: 'Your Bing Maps Key',
    disableScrollWheelZoom: true

// initalize map
var loc = new Microsoft.Maps.Location(-25.34492034440821, 131.0329830613222);
map.setView({ center: loc, zoom: 12 });

// fetch html pushpin layer module (source:
Microsoft.Maps.registerModule('HtmlPushpinLayerModule', '');
Microsoft.Maps.loadModule('HtmlPushpinLayerModule', function () {

    // fetch marker
    const Http = new XMLHttpRequest();
    const url='';"GET", url);

    //  marker loaded callbakc
    Http.onreadystatechange = function() {
        // marker available
        if(this.readyState == 4 && this.status == 200) {
            var pin = new HtmlPushpin(loc, Http.responseText, {anchor: new Microsoft.Maps.Point(25, 50)});
            layer = new HtmlPushpinLayer([pin]);