some1 on IRC was getting the 'jQuery is undefined' error caused by this mess:

  $o .= '<script type="text/javascript">'."\n";
  $o .= "/* <![CDATA[ */\n";
  $o .= 'jQuery.extend(true, Drupal, { settings: '. drupal_to_js(array('gmap' => array($element['#map'] => $map))) ." });\n";
  $o .= "/* ]]> */\n";
  $o .= "</script>\n";

this is not how we add js

attached patch tries to fix that by wrapping it in (function($){ ... })(jQuery) and adding it with a drupal_add_js() with inline as second argument and should apply to current HEAD

CommentFileSizeAuthor
gmap.patch886 bytesseutje

Comments

OnkelTem’s picture

Yeah, thanks, it was me1 :)

seutje’s picture

Status: Active » Needs review

every friggin time I forget status -_-

James Andres’s picture

+1, I was bit by this bug also. The patch did the trick!

bdragon’s picture

seutje’s picture

Status: Needs review » Closed (duplicate)

o wow, how did I not find that?

this patch is a lot cleaner than mine aswel, what was I thinking? :x