added fix for fitting map to mobile devices with js logic