Return to Snippet

Revision: 42296
at March 2, 2011 23:08 by wildpeaks


Initial Code
var map = new Microsoft.Maps.Map(
    document.getElementById("map"),
    {
      credentials: "YOUR-BING-KEY",
      mapTypeId: Microsoft.Maps.MapTypeId.auto
    }
  );

  Microsoft.Maps.Events.addHandler(map, "imagerychanged", function(){
    var style = this.target.getImageryId();
    //
    // "style" contains the type of imagery being displayed
    //
  });

Initial URL
http://www.wildpeaks.com

Initial Description
**Important: this snipplet has moved to Github.**

 - [Get the current map style, even in automatic mode, in Bing Maps AJAX 7.0](https://gist.github.com/1973187)

Initial Title
Bing Maps AJAX 7.0: get the current map style, even in automatic mode

Initial Tags


Initial Language
JavaScript