Scaling Map to Screen Size

I was wondering is this possible to scale map to screen size, for example:
Small maps like this one are centered on screen, surrounded by blackness. That's not look well in actual gameplay, so I was thinking how I can strech map (proportional, complete strech etc) and is this even possible. (Of course I could just simply lower game resolution and the problem would go away, but my actual HUD eventualy cover most of screen and map would be not comfortable to play...)
You can try following on each mapchange (not tested yet):
Code:
var dw = $dataMap.width*48 - window.innerWidth;
var dh = $dataMap.height*48 - window.innerHeight;
window.moveBy(-dw / 2, -dh / 2);
window.resizeBy(dw, dh);
Unfourtunately...
giphy.gif
Maybe a map zoom plugin could do the trick..? You can dynamically change the zoom value via plugin commands (so entering a door can add zoom and leaving that room can reduce the zoom) and if you want the camera to be static you can center the camera into an event so it doesn't move along the player.

Original thread: https://forums.rpgmakerweb.com/threads/scaling-map-to-screen-size.131110/