I've submitted a quick n'dirty patch on the plugin's bugtracker, for
those who want to integrate it manually, here's what it looks like :

----------------------------------

--- GMap.class.php
+++ GMap.class.php2
@@ -87,6 +87,7 @@
   protected $parameters = array(
       'js_name' => 'map',
       'onload_method' => 'js',
+      'init_function' => 'initialize',
       'api_keys' => null
   );

@@ -298,6 +299,12 @@
   {

     return $this->parameters['js_name'];
+  }
+
+
+  public function getInitFunction()
+  {
+      return $this->parameters['init_function'];
   }

   /**
@@ -394,14 +401,15 @@
     switch ($this->parameters['onload_method'])
     {
       case 'jQuery':
-        return 'jQuery(document).ready(function(){initialize();});';
+      case 'jquery':
+        return 'jQuery(document).ready(function(){' . $this-
>getInitFunction() . '();});';
         break;
       case 'prototype':
-        return 'document.observe("dom:loaded", function()
{initialize();});';
+        return 'document.observe("dom:loaded", function(){' . $this-
>getInitFunction() . '();});';
         break;
       default:
       case 'js':
-        return 'window.onload = function(){initialize()};';
+        return 'window.onload = function(){' . $this-
>getInitFunction() . '()};';
         break;
     }
   }
@@ -443,7 +451,7 @@
     }
     $return .= '
   //  Call this function when the page has been loaded
-  function initialize()
+  function ' . $this->getInitFunction() . '()
   {';
     foreach($init_events as $init_event)
     {


----------------------------------

It currently only works with the jQuery onload method, you'll have to
instantiate your maps like this :

$this->gMap = new GMap(array(),array(),array('id' =>
'map1'),array('js_name' => 'map1', 'init_function' => 'init_map1',
'onload_method' => 'jQuery'));

$this->gMap_2 = new GMap(array(),array(),array('id' =>
'map2'),array('js_name' => 'map2', 'init_function' => 'init_map2',
'onload_method' => 'jQuery'));

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to