Making the Bing Map API Map responsive

前端 未结 2 407
北恋
北恋 2021-01-14 18:44

I am using Bing Map API v7 and I am trying to make it responsive. My initial idea was the typical

2条回答
  •  野的像风
    2021-01-14 19:09

    I do it with map.SetView:

    addEvent(window, 'resize', function() { 
      var width = $(window).width();
      map.setView({ width: width, height: 400 })
    });
    

提交回复
热议问题