Search code examples
javascriptgoogle-mapsgmaps.js

How do I get the gmaps.js map size?


I'm using gmaps.js. I'd like to get the current width and height of the map in pixels, so that I can adjust the density of points. I skimmed through the gmaps.js source, but nothing really stuck out.


Solution

  • width and height can be accessed independently through GMaps.el.clientWidth and GMaps.el.clientHeight.