1

I am using the Gmap module to display a map on the page; however, it works on the PC, but not on the iPhone.
I checked the iPhone debug console, and got the following error:

Drupal.gmap [undefined] is not an object

Could anyone please suggest me the way to solve this problem?

2 Answers 2

2

So your solution hacks the module code. Do the community a favour and submit your change to the issue cue for the module so that everyone can share in your success or even better roll a patch for the authour to apply to the module code.

0

I fixed the problem; it was caused by the JavaScript file. This is what I have tried:

  1. Open the file of "/sites/all/modules/gmap/gmap.module"
  2. Find the function "_gmap_doheader()"
  3. Find the line begin with "drupal_set_html_head('
  4. Move it to the second line of _gmap_doheader(), so it may look like:

    function _gmap_doheader() {    
      drupal_set_html_head('<script src=xxx    
      static $gmap_initialized = FALSE;
      // …
    }
    
  5. Upload the file to /sites/all/modules/gmap/

  6. Flush all caches

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.