I am using Bing Map API v7 and I am trying to make it responsive. My initial idea was the typical
I do it with map.SetView
:
addEvent(window, 'resize', function() {
var width = $(window).width();
map.setView({ width: width, height: 400 })
});
You need to detect the window height with Javascript and then set the height dynamically on load as well as on resize. This is for Google map but it's the same premise.
$(window).resize(function () {
var screenH = $(document).height();
var screenW = $(document).width();
$('#map-canvas').css({
width: screenW - listingsW,
})
google.maps.event.trigger(map, 'resize');
});