RobertJay
Posts: 0
Joined: Fri Jun 15, 2012 1:32 pm

How to dynamically set size of Google map

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How to dynamically set size of Google map

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

RobertJay
Posts: 0
Joined: Fri Jun 15, 2012 1:32 pm

How to dynamically set size of Google map

Perfect, Sergiy ... thanks a million!

Return to “Issues”