I'm using primefaces ronin theme and I'm trying to make a full screen gmap no matter what the resolution of the screen is. how ever, unless I state the height in pixels, it won't work.
for example, if i set the height css attribute of the map to 100%, it doesn't show, and if I wrap the gmap with a div container with 100% height, it still doesn't work. how can I make a full screen responsive gmap?
You can show a full screen responsive p:gmap on following way:
Lets assume that
p:gmap
is defined like this (no need forstyle
attribute)Place following JavaScript on your page that will do the trick
Advantage of this solution is that
p:map
will be automatically resized when screen is resized including screen orientation change on mobile devices.It is tested running on the latest Primefaces version 6.1.