Created
March 4, 2012 14:18
-
-
Save cecilemuller/1973187 to your computer and use it in GitHub Desktop.
Get the current map style, even in automatic mode, in Bing Maps AJAX 7.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
// | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment