Posted By

wildpeaks on 03/02/11


Tagged

bing-maps


Versions (?)

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


 / Published in: JavaScript
 

URL: http://www.wildpeaks.com

  1. var map = new Microsoft.Maps.Map(
  2. document.getElementById("map"),
  3. {
  4. credentials: "YOUR-BING-KEY",
  5. mapTypeId: Microsoft.Maps.MapTypeId.auto
  6. }
  7. );
  8.  
  9. Microsoft.Maps.Events.addHandler(map, "imagerychanged", function(){
  10. var style = this.target.getImageryId();
  11. //
  12. // "style" contains the type of imagery being displayed
  13. //
  14. });

Report this snippet  

You need to login to post a comment.