Page 1 of 1

How to dynamically set size of Google map

Posted: Mon Nov 23, 2015 3:44 pm
by RobertJay

I can't seem to make the solutions I've seen in the forum or docs work, so some guidance or a URL on what I should try would be appreciated. I have a pure HTML5 app with a page having map component (among other components). I now can successfully determine the screen size in pixels, and want to change the size of the map to better accommodate different sizes. Thanks.


How to dynamically set size of Google map

Posted: Tue Nov 24, 2015 1:56 pm
by Serhii Kulibaba

Hello Robert,

Please use JS below for changing map's height/width:

$(".screenName_mapName").height(newHeight);
$(".screenName_mapName").width(newWidth);

here screenName - name of the screen,
mapName - name of the google map component


How to dynamically set size of Google map

Posted: Tue Nov 24, 2015 3:38 pm
by RobertJay

Perfect, Sergiy ... thanks a million!