I am using GMap Module (in Drupal 7). Map does not show on page load, but when I inspect the web page, map shows up.
I tried reinstalling module but in vain. Map shows in GMap Configuration, but on node page it shows only if user inspects page. I have made no change in default GMap code

If anyone has solution to this issue, please share
A bundle of Thanks.


1 Answer 1


you need to trigger resize when the map is shown.

Try this code:

 $(document).ready(function () { 
      $('#mymodal').on('shown', function () { 
        google.maps.event.trigger(map, 'resize');  

Hope this will help you.

  • Thanks @pallavi-sugandhi for your response. Issue still remains. I think you are reffering my issue with stackoverflow.com/questions/12133318/… Actually in my case there is no problem with position or size of GMap field. Oct 19, 2016 at 13:15
  • Did you get any error in console? Oct 19, 2016 at 13:30
  • Nope @pallavi There isn't any error Oct 19, 2016 at 13:49
  • Ok. Have you tried by disabling 'Aggregate JavaScript files' after going to Configuration --> Development --> Performance page. Oct 19, 2016 at 13:49
  • Yes disabled that but no progress. I dont know why it shows up when I inspect page. Oct 19, 2016 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.