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.


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.

| improve this answer | |
  • 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. – arsalan Oct 19 '16 at 13:15
  • Did you get any error in console? – Pallavi Sugandhi Oct 19 '16 at 13:30
  • Nope @pallavi There isn't any error – arsalan Oct 19 '16 at 13:49
  • Ok. Have you tried by disabling 'Aggregate JavaScript files' after going to Configuration --> Development --> Performance page. – Pallavi Sugandhi Oct 19 '16 at 13:49
  • Yes disabled that but no progress. I dont know why it shows up when I inspect page. – arsalan Oct 19 '16 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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