Index: extensions/GMaps/gmaps_aip.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_aip.class.inc.php	(revision 7576)
+++ extensions/GMaps/gmaps_aip.class.inc.php	(revision 7616)
@@ -96,4 +96,5 @@
     global $template;
 
+    $this->cleanCache();
     $this->initRequest();
 
Index: extensions/GMaps/gmaps_ajax.php
===================================================================
--- extensions/GMaps/gmaps_ajax.php	(revision 7576)
+++ extensions/GMaps/gmaps_ajax.php	(revision 7616)
@@ -1030,5 +1030,5 @@
     private function ajax_gmaps_public_mapsInit($category, $mapId)
     {
-      global $prefixeTable, $template, $user, $conf;
+      global $prefixeTable, $user;
 
       $requestId='';
@@ -1058,23 +1058,15 @@
 
         // there is some maps to display
-        $requestId=date('Y-m-d h:i:s');
-
-        // delete cache (for user and data having more than 2h)
-        $sql="DELETE FROM ".$this->tables['cache']."
-              WHERE requestId<'".date('Y-m-d h:i:s', time()-7200)."';";
-        pwg_query($sql);
+        $requestId=$this->getCacheRequestId();
+
+        $this->cleanCache();
 
         // prepare the cache (same request in the 'GMaps_pip->displayCategoryPageMap' function)
-        $sql="SELECT DISTINCT pic.image_id, GROUP_CONCAT(DISTINCT pait.value ORDER BY pait.numID ASC SEPARATOR ';') AS coords,
-                GROUP_CONCAT(DISTINCT pic.category_id ORDER BY pic.category_id SEPARATOR ';') AS imageCatsId,
-                GROUP_CONCAT(DISTINCT pct.name ORDER BY pct.id SEPARATOR ';') AS imageCatsNames,
-                GROUP_CONCAT(DISTINCT IF(pct.permalink IS NULL, CONCAT('*', pct.id), pct.permalink) ORDER BY pct.id SEPARATOR ';') AS imageCatsPLink,
-                pit.name AS imageName, pit.path, pit.tn_ext
-              FROM ((((".USER_CACHE_CATEGORIES_TABLE." pucc
+        $sql="SELECT DISTINCT pic.image_id, GROUP_CONCAT(DISTINCT pait.value ORDER BY pait.numID ASC SEPARATOR ';') AS coords
+              FROM (((".USER_CACHE_CATEGORIES_TABLE." pucc
                 LEFT JOIN ".CATEGORIES_TABLE." pct ON pucc.cat_id = pct.id)
                 LEFT JOIN ".IMAGE_CATEGORY_TABLE." pic ON pic.category_id = pucc.cat_id)
                 LEFT JOIN ".$prefixeTable."amd_images_tags pait ON pait.imageId = pic.image_id)
-                LEFT JOIN ".$prefixeTable."amd_used_tags paut ON pait.numId = paut.numId)
-                LEFT JOIN ".IMAGES_TABLE." pit ON pit.id = pic.image_id
+                LEFT JOIN ".$prefixeTable."amd_used_tags paut ON pait.numId = paut.numId
               WHERE pucc.user_id = '".$user['id']."'
                AND (paut.tagId = 'magic.GPS.LatitudeNum' OR paut.tagId = 'magic.GPS.LongitudeNum')
@@ -1109,18 +1101,12 @@
 
             $massInsert[]=array(
-              'userId' => $user['id'],
               'requestId' => $requestId,
               'imageId' => $row['image_id'],
               'latitude' => $coords[0],
-              'longitude' => $coords[1],
-              'imageName' => GPCCore::getUserLanguageDesc(mysql_escape_string($row['imageName'])),
-              'imageTnFile' => dirname($row['path']).'/'.$conf['dir_thumbnail'].'/'.$conf['prefix_thumbnail'].get_filename_wo_extension(basename($row['path'])).'.'.$row['tn_ext'],
-              'imageCatsId' => $row['imageCatsId'],
-              'imageCatsNames' => mysql_escape_string($row['imageCatsNames']),
-              'imageCatsPLink' => $row['imageCatsPLink']
+              'longitude' => $coords[1]
             );
           }
 
-          mass_inserts($this->tables['cache'], array('userId', 'requestId', 'imageId', 'latitude', 'longitude', 'imageName', 'imageTnFile', 'imageCatsId', 'imageCatsNames', 'imageCatsPLink'), $massInsert);
+          mass_inserts($this->tables['cache'], array('requestId', 'imageId', 'latitude', 'longitude'), $massInsert);
 
           $returned=$requestId;
@@ -1145,5 +1131,5 @@
     private function ajax_gmaps_public_mapsGetMarkers($datas)
     {
-      global $user, $page;
+      global $user, $page, $conf;
 
       $returned=array(
@@ -1155,4 +1141,7 @@
         )
       );
+
+      $this->updateCacheRequestId($datas['requestId']);
+      $this->cleanCache();
 
       /*
@@ -1205,13 +1194,22 @@
       }
 
-      $sql="SELECT latitude, longitude, imageId, imageCatsId, imageCatsNames, imageTnFile, imageName, imageCatsPLink
-            FROM ".$this->tables['cache']."
-            WHERE userId='".$user['id']."'
+      $sql="SELECT DISTINCT pgc.latitude, pgc.longitude, pgc.imageId,
+                   GROUP_CONCAT(DISTINCT pic.category_id ORDER BY pic.category_id SEPARATOR ';') AS imageCatsId,
+                   GROUP_CONCAT(DISTINCT pct.name ORDER BY pct.id SEPARATOR ';') AS imageCatsNames,
+                   GROUP_CONCAT(DISTINCT IF(pct.permalink IS NULL, CONCAT('*', pct.id), pct.permalink) ORDER BY pct.id SEPARATOR ';') AS imageCatsPLink,
+                   pit.name AS imageName,
+                   pit.path, pit.tn_ext
+            FROM (((".$this->tables['cache']." pgc
+                    LEFT JOIN ".IMAGE_CATEGORY_TABLE." pic ON pic.image_id = pgc.imageId)
+                    LEFT JOIN ".USER_CACHE_CATEGORIES_TABLE." pucc ON  pucc.cat_id = pic.category_id)
+                    LEFT JOIN ".CATEGORIES_TABLE." pct ON pucc.cat_id = pct.id)
+                    LEFT JOIN ".IMAGES_TABLE." pit ON pit.id = pgc.imageId
+            WHERE pucc.user_id = '".$user['id']."'
               AND requestId='".$datas['requestId']."'
               AND ($lngClause)
               AND latitude >= ".$datas['bounds']['south']."
               AND latitude <= ".$datas['bounds']['north']."
+            GROUP BY pgc.imageId
             ORDER BY latitude, longitude;";
-
       $result=pwg_query($sql);
       if($result)
@@ -1224,7 +1222,5 @@
         $datas['distanceTreshold']=pow($datas['distanceTreshold']*$ratio,2);
 
-
         $groups=array();
-
 
         /*
@@ -1233,4 +1229,6 @@
         while($row=pwg_db_fetch_assoc($result))
         {
+          $row['imageName']  =GPCCore::getUserLanguageDesc($row['imageName']);
+          $row['imageTnFile']=dirname($row['path']).'/'.$conf['dir_thumbnail'].'/'.$conf['prefix_thumbnail'].get_filename_wo_extension(basename($row['path'])).'.'.$row['tn_ext'];
           if(!$this->checkInGroup($row, $groups, $datas['distanceTreshold']))
           {
@@ -1238,5 +1236,4 @@
           }
         }
-
 
         /*
Index: extensions/GMaps/gmaps_install.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_install.class.inc.php	(revision 7576)
+++ extensions/GMaps/gmaps_install.class.inc.php	(revision 7616)
@@ -87,15 +87,15 @@
 )",
 "CREATE TABLE `".$this->tables['cache']."` (
+  `requestId` mediumint(8) UNSIGNED NOT NULL default '0',
+  `imageId` mediumint(8) NOT NULL,
+  `latitude` decimal(17,14) NOT NULL default '0',
+  `longitude` decimal(17,14) NOT NULL default '0',
+  PRIMARY KEY (`requestId`,`imageId`)
+)",
+"CREATE TABLE `".$this->tables['cache_id']."` (
+  `requestId` mediumint(8) UNSIGNED NOT NULL auto_increment,
   `userId` smallint(5) NOT NULL,
-  `requestId` timestamp NOT NULL default '0000-00-00 00:00:00',
-  `imageId` mediumint(8) NOT NULL,
-  `latitude` decimal(20,17) NOT NULL default '0.00000000000000000',
-  `longitude` decimal(20,17) NOT NULL default '0.00000000000000000',
-  `imageName` varchar(255) NOT NULL,
-  `imageTnFile` varchar(255) NOT NULL,
-  `imageCatsId` varchar(255) NOT NULL,
-  `imageCatsNames` varchar(255) NOT NULL,
-  `imageCatsPLink` varchar(255) NOT NULL,
-  PRIMARY KEY  USING BTREE (`userId`,`requestId`,`imageId`)
+  `date` timestamp NOT NULL default '0000-00-00 00:00:00',
+  PRIMARY KEY (`requestId`)
 )",
 "CREATE TABLE `".$this->tables['kmlfiles']."` (
@@ -144,4 +144,8 @@
         case '01.01.00':
           $this->updateFrom_010100();
+        case '01.02.00':
+        case '01.02.01':
+        case '01.02.02':
+          $this->updateFrom_010202();
         default:
           // nothing to do...
@@ -218,4 +222,44 @@
     }
 
+    /**
+     * update from release 1.2.2
+     *
+     */
+    private function updateFrom_010202()
+    {
+      $sql="DROP TABLE ".$this->tables['cache'];
+      pwg_query($sql);
+
+      $tablesCreate=array(
+"CREATE TABLE `".$this->tables['cache']."` (
+  `requestId` int(8) UNSIGNED NOT NULL default '0',
+  `imageId` mediumint(8) NOT NULL,
+  `latitude` decimal(17,14) NOT NULL default '0',
+  `longitude` decimal(17,14) NOT NULL default '0',
+  PRIMARY KEY (`requestId`,`imageId`)
+);",
+"CREATE TABLE `".$this->tables['cache_id']."` (
+  `requestId` mediumint(8) UNSIGNED NOT NULL auto_increment,
+  `userId` smallint(5) NOT NULL,
+  `date` NOT NULL default '0000-00-00 00:00:00',
+  PRIMARY KEY (`requestId`)
+)"
+      );
+
+      $tablesUpdate=array(
+        $this->tables['category_maps'] => array(
+          'forceDisplay' => " ADD COLUMN `forceDisplay` CHAR(1)  NOT NULL DEFAULT 'n' AFTER `title` ",
+        )
+      );
+
+      $tablesDef = create_table_add_character_set($tablesCreate);
+
+      $tablef=new GPCTables(array($this->tables['cache'], $this->tables['cache_id']));
+      $tablef->create($tablesCreate);
+      $tablef->updateTablesFields($tablesUpdate);
+
+      unset($tablesCreate);
+      unset($tablesUpdate);
+    }
 
 
Index: extensions/GMaps/gmaps_pip.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_pip.class.inc.php	(revision 7576)
+++ extensions/GMaps/gmaps_pip.class.inc.php	(revision 7616)
@@ -119,5 +119,4 @@
     if(preg_match_all('/\[gmaps=(?:id:(?P<id>\d+);|width:(?P<width>\d+);|height:(?P<height>\d+);|markerImg:(?P<markerImg>[a-z0-9\-\._]+);|kmlId:(?P<kmlId>\d+);|kmlUrl:"(?P<kmlUrl>.+)";|allowBubble:(?P<allowBubble>y|n);|kmlZoom:(?P<kmlZoom>y|n);|markerVisible:(?P<markerVisible>y|n);)+\]/i',$desc,$mapParams,PREG_SET_ORDER)>0)
     {
-
       if($param!='main_page_category_description')
       {
@@ -129,5 +128,5 @@
       GPCCore::addHeaderJS("jquery", "themes/default/js/jquery.packed.js");
       GPCCore::addHeaderJS("maps.google.com/api", "http://maps.google.com/maps/api/js?sensor=false");
-      GPCCore::addHeaderJS("gmaps.category", "plugins/GMaps/js/gmapsMarkup.packed.js");
+      GPCCore::addHeaderJS("gmaps.markup", "plugins/GMaps/js/gmapsMarkup.packed.js");
 
       $desc = preg_replace(
Index: extensions/GMaps/gmaps_root.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_root.class.inc.php	(revision 7576)
+++ extensions/GMaps/gmaps_root.class.inc.php	(revision 7616)
@@ -85,5 +85,5 @@
       $this->section_name=$this->getPluginNameFiles();
 
-      $this->setTablesList(array('maps', 'category_maps', 'cache', 'kmlfiles'));
+      $this->setTablesList(array('maps', 'category_maps', 'cache', 'cache_id', 'kmlfiles'));
       $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");
     }
@@ -312,4 +312,62 @@
     }
 
+
+    /**
+     * returns a new requestId for the cache
+     */
+    protected function getCacheRequestId()
+    {
+      global $user;
+
+      $returned=0;
+
+      // new requestId
+      $sql="INSERT INTO ".$this->tables['cache_id']."
+            VALUES ('', '".$user['id']."', '".date('Y-m-d h:i:s')."');";
+      $result=pwg_query($sql);
+      if($result)
+      {
+        $returned=pwg_db_insert_id();
+      }
+
+      return($returned);
+    }
+
+    /**
+     * update date for a cache requestId
+     */
+    protected function updateCacheRequestId($requestId)
+    {
+      global $user;
+
+      // new requestId
+      $sql="UPDATE ".$this->tables['cache_id']."
+            SET `date` = '".date('Y-m-d h:i:s')."'
+            WHERE requestId='$requestId';";
+      pwg_query($sql);
+    }
+
+    /**
+     * clean the cache : cache values older than given number of second are
+     * deleted
+     *
+     * @param Integer $time : number of second
+     */
+    protected function cleanCache($time=300)
+    {
+      $date=date('Y-m-d h:i:s', time()-$time);
+
+      $sql="DELETE FROM ".$this->tables['cache']." pgc
+              USING ".$this->tables['cache']." pgc
+                JOIN ".$this->tables['cache_id']." pgci
+                ON pgc.requestId = pgci.requestId
+            WHERE pgci.`date` < '$date';";
+      pwg_query($sql);
+
+      $sql="DELETE FROM ".$this->tables['cache_id']."
+            WHERE `date` < '$date';";
+      pwg_query($sql);
+    }
+
   } //class
 
Index: extensions/GMaps/gmaps_version.inc.php
===================================================================
--- extensions/GMaps/gmaps_version.inc.php	(revision 7576)
+++ extensions/GMaps/gmaps_version.inc.php	(revision 7616)
@@ -15,6 +15,6 @@
   if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-  define('GMAPS_VERSION',  '1.2.2');
-  define('GMAPS_VERSION2', '01.02.02');
+  define('GMAPS_VERSION',  '1.2.3');
+  define('GMAPS_VERSION2', '01.02.03');
   define('GMAPS_GPC_NEEDED', '3.3.2');
   define('GMAPS_AMD_NEEDED', '0.5.2'); //advanced metadata plugin is needed
Index: extensions/GMaps/js/gmapsCategory.js
===================================================================
--- extensions/GMaps/js/gmapsCategory.js	(revision 7576)
+++ extensions/GMaps/js/gmapsCategory.js	(revision 7616)
@@ -2,6 +2,6 @@
  * -----------------------------------------------------------------------------
  * file: gmapsCategory.js
- * file version: 1.1.1
- * date: 2010-10-28
+ * file version: 1.2.0
+ * date: 2010-11-04
  */
 
@@ -426,30 +426,8 @@
      'closeclick',
      function () {
-       $('body').append($('#iGMapsInfoWindowContent'));
+       //$('body').append($('#iGMapsInfoWindowContent'));
        gmaps.infoWindow.setContent('');
        $('#ciGMIWC_img').unbind();
      }
-    );
-
-    /*
-     * initialize map on the server side (call the 'public.maps.init'
-     * function)
-     */
-    $.ajax(
-      {
-        type: "POST",
-        url: "plugins/GMaps/gmaps_ajax.php",
-        async: true,
-        data: { ajaxfct:"public.maps.init", category:gmaps.categoryId, mapId:'n' },
-        success:
-          function(msg)
-          {
-            gmaps.requestId=msg;
-            for(var i=0;i<gmaps.maps.length;i++)
-            {
-              initializeMapViewport('loaded', i);
-            }
-          }
-      }
     );
 
@@ -482,5 +460,26 @@
           open: function ()
             {
-              initializeMapViewport('open', $(this).data('index'));
+              /*
+               * initialize map on the server side (call the 'public.maps.init'
+               * function)
+               */
+              $.ajax(
+                {
+                  type: "POST",
+                  url: "plugins/GMaps/gmaps_ajax.php",
+                  async: true,
+                  data: { ajaxfct:"public.maps.init", category:gmaps.categoryId, mapId:'n' },
+                  success:
+                    function(msg)
+                    {
+                      gmaps.requestId=msg;
+                      for(var i=0;i<gmaps.maps.length;i++)
+                      {
+                        initializeMapViewport('loaded', i);
+                        //initializeMapViewport('open', $(this).data('index'));
+                      }
+                    }
+                }
+              );
             }
         }
Index: extensions/GMaps/js/gmapsCategory.packed.js
===================================================================
--- extensions/GMaps/js/gmapsCategory.packed.js	(revision 7576)
+++ extensions/GMaps/js/gmapsCategory.packed.js	(revision 7616)
@@ -1,2 +1,2 @@
-/* file: gmapsCategory.js - v1.1.1 | packed on 2010/10/30 with http://joliclic.free.fr/php/javascript-packer/ */
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('u 16=[D,{w:32,h:32,x:15,y:31},{w:32,h:32,x:15,y:31},{w:32,h:32,x:10,y:31},{w:30,h:40,x:4,y:39},];8 2B(l,1m){u 5=o j.3.2Y($("#"+l.q).1U(0),{36:\'#2T\',2S:l.2R,3v:l.1A,3o:2.r.2A(),1F:(l.1F==-1)?v:z,3n:(l.1F==-1)?v:z,2f:(l.2f==\'n\')?v:z,2g:(l.2g==\'n\')?v:z,1q:(l.1q==-1)?v:z,3m:{1M:l.1q},3h:\'\',});9(l.2h!=\'\'){I=o j.3.3p(l.2h,{3i:z});I.2q(5)}C{I=D}2e=/^3j(\\d\\d)3k.*/i;B=2e.3g(l.Z);9(B!=D)B=o 3d(B[1]);9(B!=D){5.Z=o j.3.3e(\'1l/1B/2j/\'+l.Z,o j.3.3l(16[B].w,16[B].h),o j.3.2d(0,0),o j.3.2d(16[B].x,16[B].y))}C{5.Z=D}5.I=I;5.g=o 3u();5.1m=1m;5.1C=v;5.Q=0;l.k=5}8 1a(5){5.Q++;1f={1P:2.1P,Q:5.Q,r:{2D:5.1k().2a().1p(),2E:5.1k().2a().1o(),2I:5.1k().2b().1p(),2G:5.1k().2b().1o()},12:$(5.2c()).12(),13:$(5.2c()).13(),3c:20,1r:5.1m,};$(\'#1L\').m(\'p\',\'V-1D\');$(\'#1Q\').J(\'\');$.2y({2z:"2J",2L:"1l/1B/2O.1T",2N:z,1j:{2x:"2w.3.2P",1f:1f},2H:8(1b){M=$.2U(1b);9(2.3[M.1r].k.Q==M.Q){M.g.2Q(2l);2p(2.3[M.1r].k,M.g);$(\'#1L\').m(\'p\',\'O\');$(\'#1Q\').J(\'[\'+M.1f.38+\']\')}}})}8 2p(5,g){9(5.g.E>0){u i=0;35(i<5.g.E){1t=2s(5.g[i].H,g);9(1t==-1){5.g[i].f.2q(D);5.g.2r(i,1)}C{g.2r(1t,1);i++}}}P(u i=0;i<g.E;i++){u f=o j.3.3w({3t:o j.3.1s(g[i].1p,g[i].1o),5:5,S:g[i].1x});9(5.Z!=D)f.43(5.Z);f.F=g[i];f.F.s=0;5.g.44({f:f,H:g[i].H});j.3.14.19(f,\'26\',8(){2t(W)});P(u b=0;b<f.F.K.E;b++){41(f.F.K[b].3Z(0)){2o\'G\':f.F.K[b]=\'./3W/\'+f.F.K[b].2n(1);29;2o\'U\':f.F.K[b]=\'./46/\'+f.F.K[b].2n(1);29}}}}8 2l(1G,1u){9(1G.H<1u.H){L(-1)}C 9(1G.H<1u.H){L(1)}L(0)}8 2s(1S,1E){P(u i=0;i<1E.E;i++){9(1E[i].H==1S)L(i)}L(-1)}8 2t(f){2.6=f.F;2.N.2v();2.N.2u($(\'#2F\').48().1R(1w).1U(0));2.N.1i(f.5,f);1c(2.6.s)}8 1w(i,e){9(e.q!=\'\')e.q=\'c\'+e.q;$(e).49().1R(1w)}8 1c(b){2.6.s=b;9(2.6.28[b]==\'\'){$(\'#1W\').J(\'&3F;\')}C{$(\'#1W\').J(2.6.28[b])}$(\'#17\').1I(\'2i\',2.6.K[b]);$(\'#17\').2K();9(2.6.1n[b].E==1){$(\'#17\').1y(\'26\',8(){18.3C=2.6.1n[2.6.s][0]})}C{$(\'#27\').J(\'\');P(u i=0;i<2.6.1n[b].E;i++){$(\'#27\').T(\'<24><a 1N="\'+2.6.1n[b][i]+\'">\'+2.6.3z[b][i]+\'</a></24>\')}$(\'#17, #1z\').1y(\'3B\',8(){$(\'#1z\').m(\'p\',\'1D\')}).1y(\'3J\',8(){$(\'#1z\').m(\'p\',\'O\')})}9(2.6.1v>1){$(\'#23\').J((b+1)+\'/\'+2.6.1x);$(\'#1Z, #21\').m(\'p\',\'V-1D\')}C{$(\'#23\').J(2.6.1x);$(\'#1Z, #21\').m(\'p\',\'O\')}}8 3P(){2.6.s--;9(2.6.s<0)2.6.s=2.6.1v-1;1c(2.6.s)}8 3O(){2.6.s++;9(2.6.s>=2.6.1v)2.6.s=0;1c(2.6.s)}8 Y(r,7){2.3[7].k.3M(r);9(2.3[7].3N&&2.3[7].k.33()>2.3[7].1A){2.3[7].k.3L(2.3[7].1A)}}8 1J(1H,7){9(7>-1&&($(\'#\'+2.3[7].q+\'22\').R(\'3T\')&&1H==\'2C\'||1H==\'1i\')&&(2.3[7].k.1C==v)){j.3.14.3R(2.3[7].k,\'3A\');$(\'#\'+2.3[7].q+\' t, #\'+2.3[7].q+\' a\').m(\'3x-3y\',\'3D.0%\');9(2.1X){9(2.3[7].Y){Y(2.r,7)}C{2.3[7].k.3H(2.r.2A())}}C{Y(2.3[7].k.I.25(),7)}j.3.14.19(2.3[7].k,\'3U\',8(){1a(W);$(\'#1d\').m(\'p\',\'V\');$(\'#1e\').m(\'p\',\'V\')});j.3.14.19(2.3[7].k,\'4a\',8(){1a(W);2.N.2v();$(\'#1d\').m(\'p\',\'V\');$(\'#1e\').m(\'p\',\'V\')});2.3[7].k.1C=z;1a(2.3[7].k)}}$(18).45(8(){2.6=D;2.r=o j.3.3Y(o j.3.1s(2.r.2I,2.r.2G),o j.3.1s(2.r.2D,2.r.2E));2.N=o j.3.2Z();j.3.14.19(2.N,\'37\',8(){$(\'2W\').T($(\'#2F\'));2.N.2u(\'\');$(\'#17\').2K()});$.2y({2z:"2J",2L:"1l/1B/2O.1T",2N:z,1j:{2x:"2w.3.3a",34:2.2X,3G:\'n\'},2H:8(1b){2.1P=1b;P(u i=0;i<2.3.E;i++){1J(\'2C\',i)}}});P(u i=0;i<2.3.E;i++){2B(2.3[i],i);9(2.3[i].3V==\'A\'){$(\'#\'+2.3[i].q).m({12:($(18).12()*2.2M)+\'2k\',13:($(18).13()*2.2M)+\'2k\'})}$(\'#\'+2.3[i].q+\'22\').R({3K:v,12:\'1Y\',13:\'1Y\',3S:z,3Q:\'X\',3I:\'1h\',S:2.3[i].S,1i:8(){1J(\'1i\',$(W).1j(\'b\'))}}).1j(\'b\',i);9(2.1X){$(\'11.1h 11.1g-R-1K\').T(\'<a 1N="#" q="1d" 1M="p:O;" 1V="Y(2.r, \'+i+\'); $(W).m(\\\'p\\\', \\\'O\\\').2m(); L(v);">\'+\'<t>&3E;</t></a>\');$(\'#1d\').1I(\'S\',2.1O.47)}9(2.3[i].k.I!=D){$(\'11.1h 11.1g-R-1K\').T(\'<a 1N="#" q="1e" 1V="Y(2.3[\'+i+\'].k.I.25(), \'+i+\'); $(W).m(\\\'p\\\', \\\'O\\\').2m(); L(v);">\'+\'<t>&3X;</t></a>\');$(\'#1e\').1I(\'S\',2.1O.42)}$(\'11.1h 11.1g-R-1K\').T(\'<t q="1L" 1M="p:O;"><2j 2i="./1l/2V/3b/3q.3r"><t>\'+2.1O.3s+\'</t></t>\');$(\'#1g-R-S-3f\').T(\'<t q="1Q"></t>\')}});',62,259,'||gmaps|maps||map|currentInfo|mapIndex|function|if||index||||marker|markers|||google|gMap|properties|css||new|display|id|bounds|displayed|span|var|false||||true||iM|else|null|length|info||uId|kmlFile|html|imgTn|return|tmp|infoWindow|none|for|callId|dialog|title|append||inline|this||fitToBounds|markerImg||div|width|height|event||markerImgProp|ciGMIWC_img|window|addListener|loadMarkers|msg|displayPictureInfo|gmapsBoundMap|gmapsBoundKml|datas|ui|gmapsPopup|open|data|getBounds|plugins|gmapsIndex|imgCatsUrl|lng|lat|mapTypeControl|loadIndex|LatLng|newListIndex|m2|nbImg|renameId|nbImgTxt|bind|ciGMIWC_showcat|zoomLevel|GMaps|viewportInitialized|block|markerList|navigationControl|m1|mode|attr|initializeMapViewport|titlebar|gmapsLoading|style|href|lang|requestId|gmapsNbPhotos|each|uniqueId|php|get|onclick|ciGMIWC_title|geolocated|auto|ciWALeft||ciWARight|Content|ciGMIWC_picnum|li|getDefaultViewport|click|ciGMIWC_showcatList|imgName|break|getNorthEast|getSouthWest|getDiv|Point|re|scaleControl|streetViewControl|kmlFileUrl|src|img|px|compareMarkers|blur|substr|case|applyMarkers|setMap|splice|markerInList|displayWindowInfo|setContent|close|public|ajaxfct|ajax|type|getCenter|createMap|loaded|north|east|iGMapsInfoWindowContent|west|success|south|POST|unbind|url|popupAutomaticSize|async|gmaps_ajax|getMarkers|sort|mapType|mapTypeId|ffffff|parseJSON|GrumPluginClasses|body|categoryId|Map|InfoWindow||||getZoom|category|while|backgroundColor|closeclick|nbPhotos||init|icons|distanceTreshold|Number|MarkerImage|iGMapsIconContent|exec|markerTitle|preserveViewport|mS|_|Size|mapTypeControlOptions|scrollwheel|center|KmlLayer|processing|gif|loading|position|Array|zoom|Marker|font|size|imgCatsNames|resize|mouseenter|location|55|there4|nbsp|mapId|setCenter|dialogClass|mouseleave|autoOpen|setZoom|fitBounds|zoomLevelMaxActivated|displayPictureNext|displayPicturePrev|closeText|trigger|modal|isOpen|dragend|sizeMode|galleries|sim|LatLngBounds|charAt||switch|boundkml|setIcon|push|load|upload|boundmap|clone|children|zoom_changed'.split('|'),0,{}))
+/* file: gmapsCategory.js - v1.2.0 | packed on 2010/11/04 with http://joliclic.free.fr/php/javascript-packer/ */
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('u 14=[B,{w:32,h:32,x:15,y:31},{w:32,h:32,x:15,y:31},{w:32,h:32,x:10,y:31},{w:30,h:40,x:4,y:39},];9 2E(l,1d){u 5=m j.3.2W($("#"+l.q).2d(0),{2V:\'#2Z\',34:l.2U,35:l.1p,2O:2.s.1X(),1s:(l.1s==-1)?v:z,2Q:(l.1s==-1)?v:z,2r:(l.2r==\'n\')?v:z,2z:(l.2z==\'n\')?v:z,1K:(l.1K==-1)?v:z,3h:{1t:l.1K},3f:\'\',});7(l.2i!=\'\'){H=m j.3.38(l.2i,{3a:z});H.24(5)}F{H=B}2A=/^3b(\\d\\d)2T.*/i;E=2A.3j(l.Q);7(E!=B)E=m 2S(E[1]);7(E!=B){5.Q=m j.3.3g(\'1h/1H/2t/\'+l.Q,m j.3.3c(14[E].w,14[E].h),m j.3.2e(0,0),m j.3.2e(14[E].x,14[E].y))}F{5.Q=B}5.H=H;5.f=m 2P();5.1d=1d;5.1v=v;5.Y=0;l.k=5}9 1e(5){5.Y++;1c={1q:2.1q,Y:5.Y,s:{2F:5.1l().2j().1I(),2C:5.1l().2j().1N(),2I:5.1l().1T().1I(),2G:5.1l().1T().1N()},17:$(5.1S()).17(),12:$(5.1S()).12(),2R:20,1r:5.1d,};$(\'#1z\').o(\'p\',\'S-1G\');$(\'#1w\').M(\'\');$.2l({2m:"2n",2o:"1h/1H/2k.2B",2f:z,1O:{2g:"2h.3.33",1c:1c},2p:9(1f){L=$.36(1f);7(2.3[L.1r].k.Y==L.Y){L.f.37(21);2a(2.3[L.1r].k,L.f);$(\'#1z\').o(\'p\',\'K\');$(\'#1w\').M(\'[\'+L.1c.3k+\']\')}}})}9 2a(5,f){7(5.f.C>0){u i=0;3i(i<5.f.C){1L=2c(5.f[i].I,f);7(1L==-1){5.f[i].g.24(B);5.f.27(i,1)}F{f.27(1L,1);i++}}}W(u i=0;i<f.C;i++){u g=m j.3.3e({3l:m j.3.1x(f[i].1I,f[i].1N),5:5,R:f[i].1P});7(5.Q!=B)g.3m(5.Q);g.D=f[i];g.D.r=0;5.f.2Y({g:g,I:f[i].I});j.3.16.19(g,\'22\',9(){25(Z)});W(u b=0;b<g.D.J.C;b++){2X(g.D.J[b].3d(0)){1Y\'G\':g.D.J[b]=\'./3W/\'+g.D.J[b].1Q(1);1R;1Y\'U\':g.D.J[b]=\'./3X/\'+g.D.J[b].1Q(1);1R}}}}9 21(1B,1A){7(1B.I<1A.I){N(-1)}F 7(1B.I<1A.I){N(1)}N(0)}9 2c(26,1n){W(u i=0;i<1n.C;i++){7(1n[i].I==26)N(i)}N(-1)}9 25(g){2.6=g.D;2.O.2H();2.O.2K($(\'#3Y\').3Z().1W(1J).2d(0));2.O.1M(g.5,g);1b(2.6.r)}9 1J(i,e){7(e.q!=\'\')e.q=\'c\'+e.q;$(e).3V().1W(1J)}9 1b(b){2.6.r=b;7(2.6.1U[b]==\'\'){$(\'#1V\').M(\'&3U;\')}F{$(\'#1V\').M(2.6.1U[b])}$(\'#11\').1m(\'2u\',2.6.J[b]);$(\'#11\').2D();7(2.6.18[b].C==1){$(\'#11\').1E(\'22\',9(){1a.3Q=2.6.18[2.6.r][0]})}F{$(\'#2b\').M(\'\');W(u i=0;i<2.6.18[b].C;i++){$(\'#2b\').13(\'<23><a 1D="\'+2.6.18[b][i]+\'">\'+2.6.3P[b][i]+\'</a></23>\')}$(\'#11, #1F\').1E(\'3R\',9(){$(\'#1F\').o(\'p\',\'1G\')}).1E(\'3S\',9(){$(\'#1F\').o(\'p\',\'K\')})}7(2.6.1o>1){$(\'#29\').M((b+1)+\'/\'+2.6.1P);$(\'#1Z, #28\').o(\'p\',\'S-1G\')}F{$(\'#29\').M(2.6.1P);$(\'#1Z, #28\').o(\'p\',\'K\')}}9 3T(){2.6.r--;7(2.6.r<0)2.6.r=2.6.1o-1;1b(2.6.r)}9 42(){2.6.r++;7(2.6.r>=2.6.1o)2.6.r=0;1b(2.6.r)}9 T(s,8){2.3[8].k.41(s);7(2.3[8].46&&2.3[8].k.48()>2.3[8].1p){2.3[8].k.49(2.3[8].1p)}}9 2q(1y,8){7(8>-1&&($(\'#\'+2.3[8].q+\'2L\').P(\'3n\')&&1y==\'2x\'||1y==\'1M\')&&(2.3[8].k.1v==v)){j.3.16.47(2.3[8].k,\'43\');$(\'#\'+2.3[8].q+\' t, #\'+2.3[8].q+\' a\').o(\'44-45\',\'3N.0%\');7(2.2y){7(2.3[8].T){T(2.s,8)}F{2.3[8].k.3O(2.s.1X())}}F{T(2.3[8].k.H.2v(),8)}j.3.16.19(2.3[8].k,\'3w\',9(){1e(Z);$(\'#1i\').o(\'p\',\'S\');$(\'#1k\').o(\'p\',\'S\')});j.3.16.19(2.3[8].k,\'3v\',9(){1e(Z);2.O.2H();$(\'#1i\').o(\'p\',\'S\');$(\'#1k\').o(\'p\',\'S\')});2.3[8].k.1v=z;1e(2.3[8].k)}}$(1a).3x(9(){2.6=B;2.s=m j.3.3y(m j.3.1x(2.s.2I,2.s.2G),m j.3.1x(2.s.2F,2.s.2C));2.O=m j.3.3z();j.3.16.19(2.O,\'3u\',9(){2.O.2K(\'\');$(\'#11\').2D()});W(u i=0;i<2.3.C;i++){2E(2.3[i],i);7(2.3[i].3t==\'A\'){$(\'#\'+2.3[i].q).o({17:($(1a).17()*2.2J)+\'2M\',12:($(1a).12()*2.2J)+\'2M\'})}$(\'#\'+2.3[i].q+\'2L\').P({3q:v,17:\'2N\',12:\'2N\',3r:z,3s:\'X\',3B:\'1g\',R:2.3[i].R,1M:9(){$.2l({2m:"2n",2o:"1h/1H/2k.2B",2f:z,1O:{2g:"2h.3.3K",3L:2.3M,3I:\'n\'},2p:9(1f){2.1q=1f;W(u i=0;i<2.3.C;i++){2q(\'2x\',i)}}})}}).1O(\'b\',i);7(2.2y){$(\'V.1g V.1j-P-1C\').13(\'<a 1D="#" q="1i" 1t="p:K;" 2w="T(2.s, \'+i+\'); $(Z).o(\\\'p\\\', \\\'K\\\').2s(); N(v);">\'+\'<t>&3C;</t></a>\');$(\'#1i\').1m(\'R\',2.1u.3E)}7(2.3[i].k.H!=B){$(\'V.1g V.1j-P-1C\').13(\'<a 1D="#" q="1k" 2w="T(2.3[\'+i+\'].k.H.2v(), \'+i+\'); $(Z).o(\\\'p\\\', \\\'K\\\').2s(); N(v);">\'+\'<t>&3G;</t></a>\');$(\'#1k\').1m(\'R\',2.1u.3F)}$(\'V.1g V.1j-P-1C\').13(\'<t q="1z" 1t="p:K;"><2t 2u="./1h/3D/3H/3J.3A"><t>\'+2.1u.3o+\'</t></t>\');$(\'#1j-P-R-3p\').13(\'<t q="1w"></t>\')}});',62,258,'||gmaps|maps||map|currentInfo|if|mapIndex|function||index||||markers|marker|||google|gMap|properties|new||css|display|id|displayed|bounds|span|var|false||||true||null|length|info|iM|else||kmlFile|uId|imgTn|none|tmp|html|return|infoWindow|dialog|markerImg|title|inline|fitToBounds||div|for||callId|this||ciGMIWC_img|height|append|markerImgProp||event|width|imgCatsUrl|addListener|window|displayPictureInfo|datas|gmapsIndex|loadMarkers|msg|gmapsPopup|plugins|gmapsBoundMap|ui|gmapsBoundKml|getBounds|attr|markerList|nbImg|zoomLevel|requestId|loadIndex|navigationControl|style|lang|viewportInitialized|gmapsNbPhotos|LatLng|mode|gmapsLoading|m2|m1|titlebar|href|bind|ciGMIWC_showcat|block|GMaps|lat|renameId|mapTypeControl|newListIndex|open|lng|data|nbImgTxt|substr|break|getDiv|getSouthWest|imgName|ciGMIWC_title|each|getCenter|case|ciWALeft||compareMarkers|click|li|setMap|displayWindowInfo|uniqueId|splice|ciWARight|ciGMIWC_picnum|applyMarkers|ciGMIWC_showcatList|markerInList|get|Point|async|ajaxfct|public|kmlFileUrl|getNorthEast|gmaps_ajax|ajax|type|POST|url|success|initializeMapViewport|scaleControl|blur|img|src|getDefaultViewport|onclick|loaded|geolocated|streetViewControl|re|php|east|unbind|createMap|north|west|close|south|popupAutomaticSize|setContent|Content|px|auto|center|Array|scrollwheel|distanceTreshold|Number|_|mapType|backgroundColor|Map|switch|push|ffffff||||getMarkers|mapTypeId|zoom|parseJSON|sort|KmlLayer||preserveViewport|mS|Size|charAt|Marker|markerTitle|MarkerImage|mapTypeControlOptions|while|exec|nbPhotos|position|setIcon|isOpen|loading|iGMapsIconContent|autoOpen|modal|closeText|sizeMode|closeclick|zoom_changed|dragend|load|LatLngBounds|InfoWindow|gif|dialogClass|there4|GrumPluginClasses|boundmap|boundkml|sim|icons|mapId|processing|init|category|categoryId|55|setCenter|imgCatsNames|location|mouseenter|mouseleave|displayPicturePrev|nbsp|children|galleries|upload|iGMapsInfoWindowContent|clone||fitBounds|displayPictureNext|resize|font|size|zoomLevelMaxActivated|trigger|getZoom|setZoom'.split('|'),0,{}))
Index: extensions/GMaps/js/gmapsMarkup.js
===================================================================
--- extensions/GMaps/js/gmapsMarkup.js	(revision 7576)
+++ extensions/GMaps/js/gmapsMarkup.js	(revision 7616)
@@ -2,422 +2,428 @@
  * -----------------------------------------------------------------------------
  * file: gmapsMarkup.js
- * file version: 1.0.0
- * date: 2010-10-28
+ * file version: 1.1.0
+ * date: 2010-11-04
  */
 
 var markerImgProp = [
-  null,
-  { w:32, h:32, x:15, y:31 }, // s01
-  { w:32, h:32, x:15, y:31 }, // s02
-  { w:32, h:32, x:10, y:31 }, // s03
-  { w:30, h:40, x:4, y:39 }, // s04
-];
-
-
-/**
- * create the map
- *
- * @param Object properties : map properties
- * @param Integer gmapsIndex : index in the map list
- */
-function createMap(properties, gmapsIndex)
+      null,
+      { w:32, h:32, x:15, y:31 }, // s01
+      { w:32, h:32, x:15, y:31 }, // s02
+      { w:32, h:32, x:10, y:31 }, // s03
+      { w:30, h:40, x:4, y:39 }, // s04
+    ];
+
+
+function markupMaps()
 {
-  var bounds = new google.maps.LatLngBounds(
-        new google.maps.LatLng(properties.mapBounds.south, properties.mapBounds.west),
-        new google.maps.LatLng(properties.mapBounds.north, properties.mapBounds.east)
-      ),
-      map = new google.maps.Map($("#"+properties.id).get(0),
-        {
-          backgroundColor:'#ffffff',
-          mapTypeId: properties.mapType,
-          zoom: properties.zoomLevel,
-          center: bounds.getCenter(),
-          navigationControl: (properties.navigationControl==-1)?false:true,
-          scrollwheel: (properties.navigationControl==-1)?false:true,
-          scaleControl: (properties.scaleControl=='n')?false:true,
-          streetViewControl: (properties.streetViewControl=='n')?false:true,
-          mapTypeControl:(properties.mapTypeControl==-1)?false:true,
-          mapTypeControlOptions:
+  /**
+   * create the map
+   *
+   * @param Object properties : map properties
+   * @param Integer gmapsIndex : index in the map list
+   */
+  this.createMap = function (properties, gmapsIndex)
+  {
+    var bounds = new google.maps.LatLngBounds(
+          new google.maps.LatLng(properties.mapBounds.south, properties.mapBounds.west),
+          new google.maps.LatLng(properties.mapBounds.north, properties.mapBounds.east)
+        ),
+        map = new google.maps.Map($("#"+properties.id).get(0),
+          {
+            backgroundColor:'#ffffff',
+            mapTypeId: properties.mapType,
+            zoom: properties.zoomLevel,
+            center: bounds.getCenter(),
+            navigationControl: (properties.navigationControl==-1)?false:true,
+            scrollwheel: (properties.navigationControl==-1)?false:true,
+            scaleControl: (properties.scaleControl=='n')?false:true,
+            streetViewControl: (properties.streetViewControl=='n')?false:true,
+            mapTypeControl:(properties.mapTypeControl==-1)?false:true,
+            mapTypeControlOptions:
+              {
+                style:properties.mapTypeControl
+              },
+            markerTitle:'',
+          }
+        );
+
+    if(properties.kmlFileUrl!='')
+    {
+      kmlFile = new google.maps.KmlLayer(properties.kmlFileUrl,
+        {
+          preserveViewport:true
+        }
+      );
+      kmlFile.setMap(map);
+    }
+    else
+    {
+      kmlFile=null;
+    }
+
+    re=/^mS(\d\d)_.*/i;
+    iM=re.exec(properties.markerImg);
+    if(iM!=null) iM=new Number(iM[1]);
+
+    if(iM!=null)
+    {
+      map.markerImg = new google.maps.MarkerImage('plugins/GMaps/img/'+properties.markerImg,
+          new google.maps.Size(markerImgProp[iM].w, markerImgProp[iM].h),
+          new google.maps.Point(0,0),
+          new google.maps.Point(markerImgProp[iM].x, markerImgProp[iM].y));
+    }
+    else
+    {
+      map.markerImg = null;
+    }
+
+    map.bounds=bounds;
+    map.kmlFile=kmlFile;
+    map.markers=new Array();
+    map.gmapsIndex=gmapsIndex;
+    map.width=properties.width;
+    map.height=properties.height;
+    map.callId=0;
+    map.allowBubble=properties.allowBubble;
+    map.initialized=false;
+    properties.gMap=map;
+
+
+    if(properties.geolocated)
+    {
+      if(properties.fitToBounds)
+      {
+        fitToBounds(map.bounds, gmapsIndex);
+      }
+      else
+      {
+        map.setCenter(map.bounds.getCenter());
+      }
+    }
+
+    if(properties.markerVisible)
+    {
+      loadMarkers(map);
+    }
+    else
+    {
+      initializeMapViewport(gmapsIndex);
+    }
+  };
+
+  /**
+   * load markers from the server
+   *
+   * @param Map map : the map
+   */
+  var loadMarkers = function(map)
+  {
+    if(map.getBounds()==null) return(false);
+    map.callId++;
+
+    datas={
+      requestId:gmapsMarkup.requestId,
+      callId:map.callId,
+      bounds:{
+          north:map.getBounds().getNorthEast().lat(),
+          east:map.getBounds().getNorthEast().lng(),
+          south:map.getBounds().getSouthWest().lat(),
+          west:map.getBounds().getSouthWest().lng()
+        },
+      width:map.width,
+      height:map.height,
+      distanceTreshold:20,
+      loadIndex:map.gmapsIndex,
+    };
+
+    $.ajax(
+      {
+        type: "POST",
+        url: "plugins/GMaps/gmaps_ajax.php",
+        async: true,
+        data: { ajaxfct:"public.maps.getMarkers", datas:datas },
+        success:
+          function(msg)
+          {
+            tmp=$.parseJSON(msg);
+            if(gmapsMarkup.maps[tmp.loadIndex].gMap.callId==tmp.callId)
             {
-              style:properties.mapTypeControl
-            },
-          markerTitle:'',
+              tmp.markers.sort(compareMarkers);
+              applyMarkers(gmapsMarkup.maps[tmp.loadIndex].gMap, tmp.markers);
+              initializeMapViewport(tmp.loadIndex);
+            }
+          }
+      }
+    );
+  };
+
+  /**
+   * apply markers to map
+   *
+   * @param Map map : the google map object
+   * @param Array markers : array of markers properties
+   *                        each marker is an object with properties :
+   *                          latitude, longitude, nbImg
+   */
+  var applyMarkers = function(map, markers)
+  {
+    if(map==null) return(false);
+
+    /*
+     * deleting markers from the map only if they are not in the new list
+     */
+    if(map.markers.length>0)
+    {
+      var i=0;
+      while(i<map.markers.length)
+      {
+        newListIndex=markerInList(map.markers[i].uId, markers);
+        if(newListIndex==-1)
+        {
+          map.markers[i].marker.setMap(null);
+          map.markers.splice(i, 1);
+        }
+        else
+        {
+          markers.splice(newListIndex,1);
+          i++;
+        }
+      }
+    }
+
+    /*
+     * add new markers on the map
+     */
+    for(var i=0;i<markers.length;i++)
+    {
+      var marker = new google.maps.Marker(
+        {
+          position:new google.maps.LatLng(markers[i].lat, markers[i].lng),
+          map: map,
+          title:markers[i].nbImgTxt
         }
       );
 
-  if(properties.kmlFileUrl!='')
-  {
-    kmlFile = new google.maps.KmlLayer(properties.kmlFileUrl,
-      {
-        preserveViewport:true
-      }
-    );
-    kmlFile.setMap(map);
-  }
-  else
-  {
-    kmlFile=null;
-  }
-
-  re=/^mS(\d\d)_.*/i;
-  iM=re.exec(properties.markerImg);
-  if(iM!=null) iM=new Number(iM[1]);
-
-  if(iM!=null)
-  {
-    map.markerImg = new google.maps.MarkerImage('plugins/GMaps/img/'+properties.markerImg,
-        new google.maps.Size(markerImgProp[iM].w, markerImgProp[iM].h),
-        new google.maps.Point(0,0),
-        new google.maps.Point(markerImgProp[iM].x, markerImgProp[iM].y));
-  }
-  else
-  {
-    map.markerImg = null;
-  }
-
-  map.bounds=bounds;
-  map.kmlFile=kmlFile;
-  map.markers=new Array();
-  map.gmapsIndex=gmapsIndex;
-  map.width=properties.width;
-  map.height=properties.height;
-  map.callId=0;
-  map.allowBubble=properties.allowBubble;
-  map.initialized=false;
-  properties.gMap=map;
-
-
-  if(properties.geolocated)
-  {
-    if(properties.fitToBounds)
-    {
-      fitToBounds(map.bounds, gmapsIndex);
+      if(map.markerImg!=null) marker.setIcon(map.markerImg);
+
+      marker.info=markers[i];
+      marker.info.displayed=0;
+
+      map.markers.push(
+        {
+          marker:marker,
+          uId:markers[i].uId
+        }
+      );
+
+      if(map.allowBubble)
+      {
+        google.maps.event.addListener(
+          marker,
+          'click',
+          function ()
+          {
+            displayWindowInfo(this);
+          }
+        );
+      }
+
+      for(var index=0;index<marker.info.imgTn.length;index++)
+      {
+        switch(marker.info.imgTn[index].charAt(0))
+        {
+          case 'G':
+            marker.info.imgTn[index]='./galleries/'+marker.info.imgTn[index].substr(1);
+            break;
+          case 'U':
+            marker.info.imgTn[index]='./upload/'+marker.info.imgTn[index].substr(1);
+            break;
+        }
+      }
+    }
+  };
+
+  var compareMarkers=function(m1,m2)
+  {
+    if(m1.uId<m2.uId)
+    {
+      return(-1);
+    }
+    else if(m1.uId<m2.uId)
+    {
+      return(1);
+    }
+    return(0);
+  };
+
+  var markerInList=function(uniqueId, markerList)
+  {
+    for(var i=0;i<markerList.length;i++)
+    {
+      if(markerList[i].uId==uniqueId) return(i)
+    }
+    return(-1);
+  };
+
+  /**
+   * display the infowindow
+   *
+   * @param Marker marker : the marker
+   */
+  var displayWindowInfo=function(marker)
+  {
+    gmapsMarkup.currentInfo=marker.info;
+    gmapsMarkup.infoWindow.close();
+    gmapsMarkup.infoWindow.setContent($('#iGMapsInfoWindowContent').clone().each(renameId).get(0));
+    gmapsMarkup.infoWindow.open(marker.map, marker);
+    displayPictureInfo(gmapsMarkup.currentInfo.displayed);
+  };
+  var renameId=function(i, e)
+  {
+    if(e.id!='') e.id='c'+e.id;
+    $(e).children().each(renameId);
+  };
+
+
+  /**
+   *
+   */
+  var displayPictureInfo=function(index)
+  {
+    gmapsMarkup.currentInfo.displayed=index;
+    if(gmapsMarkup.currentInfo.imgName[index]=='')
+    {
+      $('#ciGMIWC_title').html('&nbsp;');
     }
     else
     {
-      map.setCenter(map.bounds.getCenter());
-    }
-  }
-
-  if(properties.markerVisible)
-  {
-    loadMarkers(map);
-  }
-  else
-  {
-    initializeMapViewport(gmapsIndex);
-  }
+      $('#ciGMIWC_title').html(gmapsMarkup.currentInfo.imgName[index]);
+    }
+    $('#ciGMIWC_img').attr('src', gmapsMarkup.currentInfo.imgTn[index]);
+
+    $('#ciGMIWC_img').unbind();
+    if(gmapsMarkup.currentInfo.imgCatsUrl[index].length==1)
+    {
+      $('#ciGMIWC_img').bind('click',
+        function ()
+        {
+          window.location=gmapsMarkup.currentInfo.imgCatsUrl[gmapsMarkup.currentInfo.displayed][0];
+        }
+      );
+    }
+    else
+    {
+      $('#ciGMIWC_showcatList').html('');
+      for(var i=0;i<gmapsMarkup.currentInfo.imgCatsUrl[index].length;i++)
+      {
+        $('#ciGMIWC_showcatList')
+          .append('<li><a href="'+gmapsMarkup.currentInfo.imgCatsUrl[index][i]+'">'+gmapsMarkup.currentInfo.imgCatsNames[index][i]+'</a></li>');
+      }
+      $('#ciGMIWC_img, #ciGMIWC_showcat')
+        .bind('mouseenter', function () { $('#ciGMIWC_showcat').css('display', 'block'); } )
+        .bind('mouseleave', function () { $('#ciGMIWC_showcat').css('display', 'none'); } );
+    }
+
+    if(gmapsMarkup.currentInfo.nbImg>1)
+    {
+      $('#ciGMIWC_picnum').html((index+1)+'/'+gmapsMarkup.currentInfo.nbImgTxt);
+      $('#ciWALeft, #ciWARight').css('display', 'inline-block');
+    }
+    else
+    {
+      $('#ciGMIWC_picnum').html(gmapsMarkup.currentInfo.nbImgTxt);
+      $('#ciWALeft, #ciWARight').css('display', 'none');
+    }
+  };
+
+  /**
+   *
+   */
+  this.displayPicturePrev=function()
+  {
+    gmapsMarkup.currentInfo.displayed--;
+    if(gmapsMarkup.currentInfo.displayed<0) gmapsMarkup.currentInfo.displayed=gmapsMarkup.currentInfo.nbImg-1;
+    displayPictureInfo(gmapsMarkup.currentInfo.displayed);
+  };
+
+  /**
+   *
+   */
+  this.displayPictureNext=function()
+  {
+    gmapsMarkup.currentInfo.displayed++;
+    if(gmapsMarkup.currentInfo.displayed>=gmapsMarkup.currentInfo.nbImg) gmapsMarkup.currentInfo.displayed=0;
+    displayPictureInfo(gmapsMarkup.currentInfo.displayed);
+  };
+
+
+  /**
+   * check if zoomLevel
+   */
+  var fitToBounds=function(bounds, mapIndex)
+  {
+    gmapsMarkup.maps[mapIndex].gMap.fitBounds(bounds);
+
+    if(gmapsMarkup.maps[mapIndex].zoomLevelMaxActivated &&
+       gmapsMarkup.maps[mapIndex].gMap.getZoom() > gmapsMarkup.maps[mapIndex].zoomLevel)
+    {
+      gmapsMarkup.maps[mapIndex].gMap.setZoom(gmapsMarkup.maps[mapIndex].zoomLevel);
+    }
+  };
+
+  var initializeMapViewport=function(mapIndex)
+  {
+    if(mapIndex>-1 && !gmapsMarkup.maps[mapIndex].gMap.initialized)
+    {
+      // reduce copyright size... ^_^
+      $('#'+gmapsMarkup.maps[mapIndex].id+' span, #'+gmapsMarkup.maps[mapIndex].id+' a').css('font-size', '55.0%');
+
+      if(gmapsMarkup.maps[mapIndex].markerVisible)
+      {
+        google.maps.event.addListener(
+          gmapsMarkup.maps[mapIndex].gMap,
+          'dragend',
+          function()
+          {
+            loadMarkers(this);
+          }
+        );
+
+        google.maps.event.addListener(
+          gmapsMarkup.maps[mapIndex].gMap,
+          'zoom_changed',
+          function()
+          {
+            loadMarkers(this);
+            gmapsMarkup.infoWindow.close();
+          }
+        );
+      }
+
+
+      if(gmapsMarkup.maps[mapIndex].kmlZoom && gmapsMarkup.maps[mapIndex].gMap.kmlFile!=null)
+      {
+        google.maps.event.addListenerOnce(
+          gmapsMarkup.maps[mapIndex].gMap.kmlFile,
+          'defaultviewport_changed',
+          function()
+          {
+            fitToBounds(gmapsMarkup.maps[mapIndex].gMap.kmlFile.getDefaultViewport(), mapIndex);
+          }
+        );
+
+      }
+
+      gmapsMarkup.maps[mapIndex].gMap.initialized=true;
+    }
+  };
+
 }
 
-/**
- * load markers from the server
- *
- * @param Map map : the map
- */
-function loadMarkers(map)
-{
-  if(map.getBounds()==null) return(false);
-  map.callId++;
-
-  datas={
-    requestId:gmapsMarkup.requestId,
-    callId:map.callId,
-    bounds:{
-        north:map.getBounds().getNorthEast().lat(),
-        east:map.getBounds().getNorthEast().lng(),
-        south:map.getBounds().getSouthWest().lat(),
-        west:map.getBounds().getSouthWest().lng()
-      },
-    width:map.width,
-    height:map.height,
-    distanceTreshold:20,
-    loadIndex:map.gmapsIndex,
-  };
-
-  $.ajax(
-    {
-      type: "POST",
-      url: "plugins/GMaps/gmaps_ajax.php",
-      async: true,
-      data: { ajaxfct:"public.maps.getMarkers", datas:datas },
-      success:
-        function(msg)
-        {
-          tmp=$.parseJSON(msg);
-          if(gmaps.maps[tmp.loadIndex].gMap.callId==tmp.callId)
-          {
-            tmp.markers.sort(compareMarkers);
-            applyMarkers(gmapsMarkup.maps[tmp.loadIndex].gMap, tmp.markers);
-            initializeMapViewport(tmp.loadIndex);
-          }
-        }
-    }
-  );
-}
-
-/**
- * apply markers to map
- *
- * @param Map map : the google map object
- * @param Array markers : array of markers properties
- *                        each marker is an object with properties :
- *                          latitude, longitude, nbImg
- */
-function applyMarkers(map, markers)
-{
-  if(map==null) return(false);
-
-  /*
-   * deleting markers from the map only if they are not in the new list
-   */
-  if(map.markers.length>0)
-  {
-    var i=0;
-    while(i<map.markers.length)
-    {
-      newListIndex=markerInList(map.markers[i].uId, markers);
-      if(newListIndex==-1)
-      {
-        map.markers[i].marker.setMap(null);
-        map.markers.splice(i, 1);
-      }
-      else
-      {
-        markers.splice(newListIndex,1);
-        i++;
-      }
-    }
-  }
-
-  /*
-   * add new markers on the map
-   */
-  for(var i=0;i<markers.length;i++)
-  {
-    var marker = new google.maps.Marker(
-      {
-        position:new google.maps.LatLng(markers[i].lat, markers[i].lng),
-        map: map,
-        title:markers[i].nbImgTxt
-      }
-    );
-
-    if(map.markerImg!=null) marker.setIcon(map.markerImg);
-
-    marker.info=markers[i];
-    marker.info.displayed=0;
-
-    map.markers.push(
-      {
-        marker:marker,
-        uId:markers[i].uId
-      }
-    );
-
-    if(map.allowBubble)
-    {
-      google.maps.event.addListener(
-        marker,
-        'click',
-        function ()
-        {
-          displayWindowInfo(this);
-        }
-      );
-    }
-
-    for(var index=0;index<marker.info.imgTn.length;index++)
-    {
-      switch(marker.info.imgTn[index].charAt(0))
-      {
-        case 'G':
-          marker.info.imgTn[index]='./galleries/'+marker.info.imgTn[index].substr(1);
-          break;
-        case 'U':
-          marker.info.imgTn[index]='./upload/'+marker.info.imgTn[index].substr(1);
-          break;
-      }
-    }
-  }
-}
-
-function compareMarkers(m1,m2)
-{
-  if(m1.uId<m2.uId)
-  {
-    return(-1);
-  }
-  else if(m1.uId<m2.uId)
-  {
-    return(1);
-  }
-  return(0);
-}
-
-function markerInList(uniqueId, markerList)
-{
-  for(var i=0;i<markerList.length;i++)
-  {
-    if(markerList[i].uId==uniqueId) return(i)
-  }
-  return(-1);
-}
-
-/**
- * display the infowindow
- *
- * @param Marker marker : the marker
- */
-function displayWindowInfo(marker)
-{
-  gmapsMarkup.currentInfo=marker.info;
-  gmapsMarkup.infoWindow.close();
-  gmapsMarkup.infoWindow.setContent($('#iGMapsInfoWindowContent').clone().each(renameId).get(0));
-  gmapsMarkup.infoWindow.open(marker.map, marker);
-  displayPictureInfo(gmapsMarkup.currentInfo.displayed);
-}
-function renameId(i, e)
-{
-  if(e.id!='') e.id='c'+e.id;
-  $(e).children().each(renameId);
-}
-
-
-/**
- *
- */
-function displayPictureInfo(index)
-{
-  gmapsMarkup.currentInfo.displayed=index;
-  if(gmapsMarkup.currentInfo.imgName[index]=='')
-  {
-    $('#ciGMIWC_title').html('&nbsp;');
-  }
-  else
-  {
-    $('#ciGMIWC_title').html(gmapsMarkup.currentInfo.imgName[index]);
-  }
-  $('#ciGMIWC_img').attr('src', gmapsMarkup.currentInfo.imgTn[index]);
-
-  $('#ciGMIWC_img').unbind();
-  if(gmapsMarkup.currentInfo.imgCatsUrl[index].length==1)
-  {
-    $('#ciGMIWC_img').bind('click',
-      function ()
-      {
-        window.location=gmapsMarkup.currentInfo.imgCatsUrl[gmapsMarkup.currentInfo.displayed][0];
-      }
-    );
-  }
-  else
-  {
-    $('#ciGMIWC_showcatList').html('');
-    for(var i=0;i<gmapsMarkup.currentInfo.imgCatsUrl[index].length;i++)
-    {
-      $('#ciGMIWC_showcatList')
-        .append('<li><a href="'+gmapsMarkup.currentInfo.imgCatsUrl[index][i]+'">'+gmapsMarkup.currentInfo.imgCatsNames[index][i]+'</a></li>');
-    }
-    $('#ciGMIWC_img, #ciGMIWC_showcat')
-      .bind('mouseenter', function () { $('#ciGMIWC_showcat').css('display', 'block'); } )
-      .bind('mouseleave', function () { $('#ciGMIWC_showcat').css('display', 'none'); } );
-  }
-
-  if(gmapsMarkup.currentInfo.nbImg>1)
-  {
-    $('#ciGMIWC_picnum').html((index+1)+'/'+gmapsMarkup.currentInfo.nbImgTxt);
-    $('#ciWALeft, #ciWARight').css('display', 'inline-block');
-  }
-  else
-  {
-    $('#ciGMIWC_picnum').html(gmapsMarkup.currentInfo.nbImgTxt);
-    $('#ciWALeft, #ciWARight').css('display', 'none');
-  }
-}
-
-/**
- *
- */
-function displayPicturePrev()
-{
-  gmapsMarkup.currentInfo.displayed--;
-  if(gmapsMarkup.currentInfo.displayed<0) gmapsMarkup.currentInfo.displayed=gmapsMarkup.currentInfo.nbImg-1;
-  displayPictureInfo(gmapsMarkup.currentInfo.displayed);
-}
-
-/**
- *
- */
-function displayPictureNext()
-{
-  gmapsMarkup.currentInfo.displayed++;
-  if(gmapsMarkup.currentInfo.displayed>=gmapsMarkup.currentInfo.nbImg) gmapsMarkup.currentInfo.displayed=0;
-  displayPictureInfo(gmapsMarkup.currentInfo.displayed);
-}
-
-
-/**
- * check if zoomLevel
- */
-function fitToBounds(bounds, mapIndex)
-{
-  gmapsMarkup.maps[mapIndex].gMap.fitBounds(bounds);
-
-  if(gmapsMarkup.maps[mapIndex].zoomLevelMaxActivated &&
-     gmapsMarkup.maps[mapIndex].gMap.getZoom() > gmapsMarkup.maps[mapIndex].zoomLevel)
-  {
-    gmapsMarkup.maps[mapIndex].gMap.setZoom(gmapsMarkup.maps[mapIndex].zoomLevel);
-  }
-}
-
-function initializeMapViewport(mapIndex)
-{
-  if(mapIndex>-1 && !gmapsMarkup.maps[mapIndex].gMap.initialized)
-  {
-    // reduce copyright size... ^_^
-    $('#'+gmapsMarkup.maps[mapIndex].id+' span, #'+gmapsMarkup.maps[mapIndex].id+' a').css('font-size', '55.0%');
-
-    if(gmapsMarkup.maps[mapIndex].markerVisible)
-    {
-      google.maps.event.addListener(
-        gmapsMarkup.maps[mapIndex].gMap,
-        'dragend',
-        function()
-        {
-          loadMarkers(this);
-        }
-      );
-
-      google.maps.event.addListener(
-        gmapsMarkup.maps[mapIndex].gMap,
-        'zoom_changed',
-        function()
-        {
-          loadMarkers(this);
-          gmapsMarkup.infoWindow.close();
-        }
-      );
-    }
-
-
-    if(gmapsMarkup.maps[mapIndex].kmlZoom && gmapsMarkup.maps[mapIndex].gMap.kmlFile!=null)
-    {
-      google.maps.event.addListenerOnce(
-        gmapsMarkup.maps[mapIndex].gMap.kmlFile,
-        'defaultviewport_changed',
-        function()
-        {
-          fitToBounds(gmapsMarkup.maps[mapIndex].gMap.kmlFile.getDefaultViewport(), mapIndex);
-        }
-      );
-
-    }
-
-    gmapsMarkup.maps[mapIndex].gMap.initialized=true;
-  }
-}
-
 
 $(window).load(function ()
   {
+    var mm=new markupMaps();
+
     // all maps have the same initials bounds
     gmapsMarkup.currentInfo=null;
@@ -428,5 +434,5 @@
      'closeclick',
      function () {
-       $('body').append($('#iGMapsInfoWindowContent'));
+       //$('body').append($('#iGMapsInfoWindowContent'));
        gmapsMarkup.infoWindow.setContent('');
        $('#ciGMIWC_img').unbind();
@@ -459,5 +465,5 @@
               );
 
-              createMap(gmapsMarkup.maps[i], i);
+              mm.createMap(gmapsMarkup.maps[i], i);
             }
           }
@@ -466,6 +472,7 @@
 
 
-
-    $('body').append($('<div/>',
+    if($('#iGMapsInfoWindow').length==0)
+    {
+      $('body').append($('<div/>',
                         {
                           id:'iGMapsInfoWindow',
@@ -491,5 +498,5 @@
                                                                         css:{width:'28px'}
                                                                       }
-                                                                     ).append($('<div id="iWALeft" onclick="displayPicturePrev();"/>')
+                                                                     ).append($('<div id="iWALeft" onclick="mm.displayPicturePrev();"/>')
                                                                              )
                                                                    )
@@ -506,5 +513,5 @@
                                                                         css:{width:'28px'}
                                                                       }
-                                                                    ).append($('<div id="iWARight" onclick="displayPictureNext();">')
+                                                                    ).append($('<div id="iWARight" onclick="mm.displayPictureNext();">')
                                                                             )
                                                                   )
@@ -538,4 +545,5 @@
                               )
                     );
+    }
 
   }
Index: extensions/GMaps/js/gmapsMarkup.packed.js
===================================================================
--- extensions/GMaps/js/gmapsMarkup.packed.js	(revision 7576)
+++ extensions/GMaps/js/gmapsMarkup.packed.js	(revision 7616)
@@ -1,2 +1,2 @@
-/* file: gmapsMarkup.js - v1.0.0 | packed on 2010/10/30 with http://joliclic.free.fr/php/javascript-packer/ */
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('t T=[r,{w:32,h:32,x:15,y:31},{w:32,h:32,x:15,y:31},{w:32,h:32,x:10,y:31},{w:30,h:2K,x:4,y:39},];9 2u(8,R){t z=o l.5.2J(o l.5.1v(8.17.1S,8.17.1G),o l.5.1v(8.17.1T,8.17.1D)),3=o l.5.2L($("#"+8.k).26(0),{2M:\'#2N\',2I:8.2H,2C:8.1s,2B:z.2g(),1c:(8.1c==-1)?E:u,2D:(8.1c==-1)?E:u,2q:(8.2q==\'n\')?E:u,2w:(8.2w==\'n\')?E:u,1n:(8.1n==-1)?E:u,2E:{2G:8.1n},2F:\'\',});6(8.2p!=\'\'){C=o l.5.2O(8.2p,{2P:u});C.1X(3)}A{C=r}2v=/^2Y(\\d\\d)2X.*/i;v=2v.2A(8.S);6(v!=r)v=o 33(v[1]);6(v!=r){3.S=o l.5.34(\'1q/1r/1C/\'+8.S,o l.5.2W(T[v].w,T[v].h),o l.5.2l(0,0),o l.5.2l(T[v].x,T[v].y))}A{3.S=r}3.z=z;3.C=C;3.f=o 2V();3.R=R;3.I=8.I;3.N=8.N;3.O=0;3.1x=8.1x;3.1m=E;8.q=3;6(8.2R){6(8.11){11(3.z,R)}A{3.2Q(3.z.2g())}}6(8.2m){13(3)}A{1t(R)}}9 13(3){6(3.V()==r)L(E);3.O++;1y={1e:2.1e,O:3.O,z:{1T:3.V().1R().1u(),1D:3.V().1R().1w(),1S:3.V().1P().1u(),1G:3.V().1P().1w()},I:3.I,N:3.N,2S:20,19:3.R,};$.1Z({21:"27",28:"1q/1r/2e.2f",2d:u,29:{2a:"2b.5.2T",1y:1y},25:9(16){Q=$.2U(16);6(3.O==Q.O){Q.f.35(2r);2c(2.5[Q.19].q,Q.f);1t(Q.19)}}})}9 2c(3,f){6(3==r)L(E);6(3.f.D>0){t i=0;2z(i<3.f.D){1a=2i(3.f[i].H,f);6(1a==-1){3.f[i].g.1X(r);3.f.2o(i,1)}A{f.2o(1a,1);i++}}}W(t i=0;i<f.D;i++){t g=o l.5.2y({2Z:o l.5.1v(f[i].1u,f[i].1w),3:3,2j:f[i].1f});6(3.S!=r)g.3i(3.S);g.B=f[i];g.B.p=0;3.f.3Q({g:g,H:f[i].H});6(3.1x){l.5.X.14(g,\'1I\',9(){1L(1j)})}W(t j=0;j<g.B.J.D;j++){3C(g.B.J[j].3L(0)){22\'G\':g.B.J[j]=\'./3F/\'+g.B.J[j].24(1);2t;22\'U\':g.B.J[j]=\'./3J/\'+g.B.J[j].24(1);2t}}}}9 2r(1h,1k){6(1h.H<1k.H){L(-1)}A 6(1h.H<1k.H){L(1)}L(0)}9 2i(2n,1o){W(t i=0;i<1o.D;i++){6(1o[i].H==2n)L(i)}L(-1)}9 1L(g){2.7=g.B;2.M.2k();2.M.23($(\'#1i\').3I().1N(1p).26(0));2.M.3K(g.3,g);12(2.7.p)}9 1p(i,e){6(e.k!=\'\')e.k=\'c\'+e.k;$(e).3M().1N(1p)}9 12(j){2.7.p=j;6(2.7.1H[j]==\'\'){$(\'#1K\').F(\'&3H;\')}A{$(\'#1K\').F(2.7.1H[j])}$(\'#Y\').3B(\'1B\',2.7.J[j]);$(\'#Y\').1Y();6(2.7.Z[j].D==1){$(\'#Y\').1d(\'1I\',9(){2x.3D=2.7.Z[2.7.p][0]})}A{$(\'#1O\').F(\'\');W(t i=0;i<2.7.Z[j].D;i++){$(\'#1O\').m(\'<1V><a 3E="\'+2.7.Z[j][i]+\'">\'+2.7.3O[j][i]+\'</a></1V>\')}$(\'#Y, #1l\').1d(\'36\',9(){$(\'#1l\').s(\'P\',\'1W\')}).1d(\'3U\',9(){$(\'#1l\').s(\'P\',\'18\')})}6(2.7.1b>1){$(\'#1z\').F((j+1)+\'/\'+2.7.1f);$(\'#1A, #1E\').s(\'P\',\'3V-1W\')}A{$(\'#1z\').F(2.7.1f);$(\'#1A, #1E\').s(\'P\',\'18\')}}9 1F(){2.7.p--;6(2.7.p<0)2.7.p=2.7.1b-1;12(2.7.p)}9 1J(){2.7.p++;6(2.7.p>=2.7.1b)2.7.p=0;12(2.7.p)}9 11(z,b){2.5[b].q.3S(z);6(2.5[b].3P&&2.5[b].q.3T()>2.5[b].1s){2.5[b].q.3R(2.5[b].1s)}}9 1t(b){6(b>-1&&!2.5[b].q.1m){$(\'#\'+2.5[b].k+\' 1M, #\'+2.5[b].k+\' a\').s(\'3G-3z\',\'3h.0%\');6(2.5[b].2m){l.5.X.14(2.5[b].q,\'3g\',9(){13(1j)});l.5.X.14(2.5[b].q,\'3A\',9(){13(1j);2.M.2k()})}6(2.5[b].3j&&2.5[b].q.C!=r){l.5.X.3k(2.5[b].q.C,\'3f\',9(){11(2.5[b].q.C.3e(),b)})}2.5[b].q.1m=u}}$(2x).38(9(){2.7=r;2.M=o l.5.37();l.5.X.14(2.M,\'3a\',9(){$(\'2s\').m($(\'#1i\'));2.M.23(\'\');$(\'#Y\').1Y()});$.1Z({21:"27",28:"1q/1r/2e.2f",2d:u,29:{2a:"2b.5.3b",3d:2.3c,3l:\'y\'},25:9(16){2.1e=16;W(t i=0;i<2.5.D;i++){$(\'#\'+2.5[i].k).s({I:2.5[i].I+\'2h\',N:2.5[i].N+\'2h\'});2u(2.5[i],i)}}});$(\'2s\').m($(\'<K/>\',{k:\'3m\',s:{P:\'18\'},}).m($(\'<K/>\',{k:\'1i\'}).m($(\'<K/>\',{k:\'3v\',F:\'(2j)\'})).m($(\'<3u/>\',{k:\'3w\'}).m($(\'<3x/>\').m($(\'<1g/>\',{s:{I:\'1Q\'}}).m($(\'<K k="3y" 1U="1F();"/>\'))).m($(\'<1g/>\').m($(\'<1C/>\',{k:\'3t\',1B:\'\'}))).m($(\'<1g/>\',{s:{I:\'1Q\'}}).m($(\'<K k="3s" 1U="1J();">\'))))).m($(\'<K/>\',{k:\'3o\',F:\'0/0 3n\'})).m($(\'<K/>\',{k:\'3p\',s:{P:\'18\'}}).m($(\'<1M/>\',{F:\'3q\'})).m($(\'<3r/>\',{k:\'3N\'})))))});',62,244,'||gmapsMarkup|map||maps|if|currentInfo|properties|function||mapIndex||||markers|marker|||index|id|google|append||new|displayed|gMap|null|css|var|true|iM||||bounds|else|info|kmlFile|length|false|html||uId|width|imgTn|div|return|infoWindow|height|callId|display|tmp|gmapsIndex|markerImg|markerImgProp||getBounds|for|event|ciGMIWC_img|imgCatsUrl||fitToBounds|displayPictureInfo|loadMarkers|addListener||msg|mapBounds|none|loadIndex|newListIndex|nbImg|navigationControl|bind|requestId|nbImgTxt|td|m1|iGMapsInfoWindowContent|this|m2|ciGMIWC_showcat|initialized|mapTypeControl|markerList|renameId|plugins|GMaps|zoomLevel|initializeMapViewport|lat|LatLng|lng|allowBubble|datas|ciGMIWC_picnum|ciWALeft|src|img|east|ciWARight|displayPicturePrev|west|imgName|click|displayPictureNext|ciGMIWC_title|displayWindowInfo|span|each|ciGMIWC_showcatList|getSouthWest|28px|getNorthEast|south|north|onclick|li|block|setMap|unbind|ajax||type|case|setContent|substr|success|get|POST|url|data|ajaxfct|public|applyMarkers|async|gmaps_ajax|php|getCenter|px|markerInList|title|close|Point|markerVisible|uniqueId|splice|kmlFileUrl|scaleControl|compareMarkers|body|break|createMap|re|streetViewControl|window|Marker|while|exec|center|zoom|scrollwheel|mapTypeControlOptions|markerTitle|style|mapType|mapTypeId|LatLngBounds|40|Map|backgroundColor|ffffff|KmlLayer|preserveViewport|setCenter|geolocated|distanceTreshold|getMarkers|parseJSON|Array|Size|_|mS|position||||Number|MarkerImage|sort|mouseenter|InfoWindow|load||closeclick|init|categoryId|category|getDefaultViewport|defaultviewport_changed|dragend|55|setIcon|kmlZoom|addListenerOnce|mapId|iGMapsInfoWindow|photo|iGMIWC_picnum|iGMIWC_showcat|gmaps_i_show_this_picture_in|ul|iWARight|iGMIWC_img|table|iGMIWC_title|iGMIWC_thumb|tr|iWALeft|size|zoom_changed|attr|switch|location|href|galleries|font|nbsp|clone|upload|open|charAt|children|iGMIWC_showcatList|imgCatsNames|zoomLevelMaxActivated|push|setZoom|fitBounds|getZoom|mouseleave|inline'.split('|'),0,{}))
+/* file: gmapsMarkup.js - v1.1.0 | packed on 2010/11/04 with http://joliclic.free.fr/php/javascript-packer/ */
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('f V=[s,{w:32,h:32,x:15,y:31},{w:32,h:32,x:15,y:31},{w:32,h:32,x:10,y:31},{w:30,h:2M,x:4,y:39},];9 2m(){P.1Q=9(8,S){f z=p l.3.2O(p l.3.1i(8.11.25,8.11.2b),p l.3.1i(8.11.1W,8.11.1X)),5=p l.3.2B($("#"+8.m).1P(0),{2D:\'#2J\',3h:8.3c,3d:8.1n,3f:z.1V(),1g:(8.1g==-1)?E:v,2V:(8.1g==-1)?E:v,21:(8.21==\'n\')?E:v,22:(8.22==\'n\')?E:v,1k:(8.1k==-1)?E:v,3b:{33:8.1k},2Z:\'\',});6(8.1Z!=\'\'){F=p l.3.2Y(8.1Z,{2X:v});F.1T(5)}A{F=s}1Y=/^37(\\d\\d)3e.*/i;C=1Y.3g(8.T);6(C!=s)C=p 38(C[1]);6(C!=s){5.T=p l.3.3a(\'1w/1v/1O/\'+8.T,p l.3.2U(V[C].w,V[C].h),p l.3.1U(0,0),p l.3.1U(V[C].x,V[C].y))}A{5.T=s}5.z=z;5.F=F;5.k=p 2G();5.S=S;5.I=8.I;5.O=8.O;5.Q=0;5.1j=8.1j;5.1e=E;8.q=5;6(8.2H){6(8.12){12(5.z,S)}A{5.2E(5.z.1V())}}6(8.2q){17(5)}A{1m(S)}};f 17=9(5){6(5.Y()==s)N(E);5.Q++;1s={1x:2.1x,Q:5.Q,z:{1W:5.Y().24().1t(),1X:5.Y().24().1h(),25:5.Y().2c().1t(),2b:5.Y().2c().1h()},I:5.I,O:5.O,2R:20,1b:5.S,};$.2t({2u:"2s",2r:"1w/1v/2n.2i",2w:v,2g:{2j:"2k.3.2P",1s:1s},1J:9(1a){M=$.2L(1a);6(2.3[M.1b].q.Q==M.Q){M.k.3i(1G);26(2.3[M.1b].q,M.k);1m(M.1b)}}})};f 26=9(5,k){6(5==s)N(E);6(5.k.u>0){f i=0;3P(i<5.k.u){1l=1A(5.k[i].D,k);6(1l==-1){5.k[i].j.1T(s);5.k.2e(i,1)}A{k.2e(1l,1);i++}}}W(f i=0;i<k.u;i++){f j=p l.3.3H({3I:p l.3.1i(k[i].1t,k[i].1h),5:5,1D:k[i].1q});6(5.T!=s)j.3J(5.T);j.B=k[i];j.B.r=0;5.k.3R({j:j,D:k[i].D});6(5.1j){l.3.Z.13(j,\'1K\',9(){1H(P)})}W(f g=0;g<j.B.J.u;g++){3T(j.B.J[g].3V(0)){2f\'G\':j.B.J[g]=\'./3W/\'+j.B.J[g].1C(1);1F;2f\'U\':j.B.J[g]=\'./3p/\'+j.B.J[g].1C(1);1F}}}};f 1G=9(1f,1c){6(1f.D<1c.D){N(-1)}A 6(1f.D<1c.D){N(1)}N(0)};f 1A=9(1S,1d){W(f i=0;i<1d.u;i++){6(1d[i].D==1S)N(i)}N(-1)};f 1H=9(j){2.7=j.B;2.K.2p();2.K.2x($(\'#1B\').3k().1N(1o).1P(0));2.K.3l(j.5,j);16(2.7.r)};f 1o=9(i,e){6(e.m!=\'\')e.m=\'c\'+e.m;$(e).3m().1N(1o)};f 16=9(g){2.7.r=g;6(2.7.1I[g]==\'\'){$(\'#1M\').H(\'&3u;\')}A{$(\'#1M\').H(2.7.1I[g])}$(\'#X\').3C(\'27\',2.7.J[g]);$(\'#X\').2o();6(2.7.18[g].u==1){$(\'#X\').1u(\'1K\',9(){2h.3A=2.7.18[2.7.r][0]})}A{$(\'#1L\').H(\'\');W(f i=0;i<2.7.18[g].u;i++){$(\'#1L\').o(\'<28><a 3v="\'+2.7.18[g][i]+\'">\'+2.7.3w[g][i]+\'</a></28>\')}$(\'#X, #1p\').1u(\'3y\',9(){$(\'#1p\').t(\'R\',\'2z\')}).1u(\'3x\',9(){$(\'#1p\').t(\'R\',\'14\')})}6(2.7.1r>1){$(\'#2y\').H((g+1)+\'/\'+2.7.1q);$(\'#2v, #2l\').t(\'R\',\'3D-2z\')}A{$(\'#2y\').H(2.7.1q);$(\'#2v, #2l\').t(\'R\',\'14\')}};P.1z=9(){2.7.r--;6(2.7.r<0)2.7.r=2.7.1r-1;16(2.7.r)};P.2d=9(){2.7.r++;6(2.7.r>=2.7.1r)2.7.r=0;16(2.7.r)};f 12=9(z,b){2.3[b].q.3n(z);6(2.3[b].3o&&2.3[b].q.3r()>2.3[b].1n){2.3[b].q.3q(2.3[b].1n)}};f 1m=9(b){6(b>-1&&!2.3[b].q.1e){$(\'#\'+2.3[b].m+\' 23, #\'+2.3[b].m+\' a\').t(\'3M-3Q\',\'3O.0%\');6(2.3[b].2q){l.3.Z.13(2.3[b].q,\'3N\',9(){17(P)});l.3.Z.13(2.3[b].q,\'3s\',9(){17(P);2.K.2p()})}6(2.3[b].2S&&2.3[b].q.F!=s){l.3.Z.2K(2.3[b].q.F,\'2I\',9(){12(2.3[b].q.F.2A(),b)})}2.3[b].q.1e=v}}}$(2h).2W(9(){f 19=p 2m();2.7=s;2.K=p l.3.3F();l.3.Z.13(2.K,\'34\',9(){2.K.2x(\'\');$(\'#X\').2o()});$.2t({2u:"2s",2r:"1w/1v/2n.2i",2w:v,2g:{2j:"2k.3.3t",3B:2.3E,3z:\'y\'},1J:9(1a){2.1x=1a;W(f i=0;i<2.3.u;i++){$(\'#\'+2.3[i].m).t({I:2.3[i].I+\'1R\',O:2.3[i].O+\'1R\'});19.1Q(2.3[i],i)}}});6($(\'#1E\').u==0){$(\'3j\').o($(\'<L/>\',{m:\'1E\',t:{R:\'14\'},}).o($(\'<L/>\',{m:\'1B\'}).o($(\'<L/>\',{m:\'3G\',H:\'(1D)\'})).o($(\'<3U/>\',{m:\'3X\'}).o($(\'<3K/>\').o($(\'<1y/>\',{t:{I:\'29\'}}).o($(\'<L m="3S" 2a="19.1z();"/>\'))).o($(\'<1y/>\').o($(\'<1O/>\',{m:\'3L\',27:\'\'}))).o($(\'<1y/>\',{t:{I:\'29\'}}).o($(\'<L m="2N" 2a="19.2d();">\'))))).o($(\'<L/>\',{m:\'2T\',H:\'0/0 2F\'})).o($(\'<L/>\',{m:\'2Q\',t:{R:\'14\'}}).o($(\'<23/>\',{H:\'35\'})).o($(\'<2C/>\',{m:\'36\'})))))}});',62,246,'||gmapsMarkup|maps||map|if|currentInfo|properties|function||mapIndex||||var|index|||marker|markers|google|id||append|new|gMap|displayed|null|css|length|true||||bounds|else|info|iM|uId|false|kmlFile||html|width|imgTn|infoWindow|div|tmp|return|height|this|callId|display|gmapsIndex|markerImg||markerImgProp|for|ciGMIWC_img|getBounds|event||mapBounds|fitToBounds|addListener|none||displayPictureInfo|loadMarkers|imgCatsUrl|mm|msg|loadIndex|m2|markerList|initialized|m1|navigationControl|lng|LatLng|allowBubble|mapTypeControl|newListIndex|initializeMapViewport|zoomLevel|renameId|ciGMIWC_showcat|nbImgTxt|nbImg|datas|lat|bind|GMaps|plugins|requestId|td|displayPicturePrev|markerInList|iGMapsInfoWindowContent|substr|title|iGMapsInfoWindow|break|compareMarkers|displayWindowInfo|imgName|success|click|ciGMIWC_showcatList|ciGMIWC_title|each|img|get|createMap|px|uniqueId|setMap|Point|getCenter|north|east|re|kmlFileUrl||scaleControl|streetViewControl|span|getNorthEast|south|applyMarkers|src|li|28px|onclick|west|getSouthWest|displayPictureNext|splice|case|data|window|php|ajaxfct|public|ciWARight|markupMaps|gmaps_ajax|unbind|close|markerVisible|url|POST|ajax|type|ciWALeft|async|setContent|ciGMIWC_picnum|block|getDefaultViewport|Map|ul|backgroundColor|setCenter|photo|Array|geolocated|defaultviewport_changed|ffffff|addListenerOnce|parseJSON|40|iWARight|LatLngBounds|getMarkers|iGMIWC_showcat|distanceTreshold|kmlZoom|iGMIWC_picnum|Size|scrollwheel|load|preserveViewport|KmlLayer|markerTitle||||style|closeclick|gmaps_i_show_this_picture_in|iGMIWC_showcatList|mS|Number||MarkerImage|mapTypeControlOptions|mapType|zoom|_|center|exec|mapTypeId|sort|body|clone|open|children|fitBounds|zoomLevelMaxActivated|upload|setZoom|getZoom|zoom_changed|init|nbsp|href|imgCatsNames|mouseleave|mouseenter|mapId|location|category|attr|inline|categoryId|InfoWindow|iGMIWC_title|Marker|position|setIcon|tr|iGMIWC_img|font|dragend|55|while|size|push|iWALeft|switch|table|charAt|galleries|iGMIWC_thumb'.split('|'),0,{}))
Index: extensions/GMaps/main.inc.php
===================================================================
--- extensions/GMaps/main.inc.php	(revision 7576)
+++ extensions/GMaps/main.inc.php	(revision 7616)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: GMaps
-Version: 1.2.2
+Version: 1.2.3
 Description: Display and manage (google) maps
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=454
@@ -78,6 +78,10 @@
 |         |            |   . Incompatibility with PHP prior than 5.2.2
 |         |            |
+| 1.2.3   | 2010-11-04 | * mantis bug:2004
+|         |            |   . Cache table becomes very huge
 |         |            |
-|         |            |
+|         |            | * mantis bug:2005
+|         |            |   . Category map is not displayed when a [gmaps] map is
+|         |            |     inserted in category description
 |         |            |
 |         |            |
Index: extensions/GMaps/maintain.inc.php
===================================================================
--- extensions/GMaps/maintain.inc.php	(revision 7576)
+++ extensions/GMaps/maintain.inc.php	(revision 7616)
@@ -35,5 +35,5 @@
   if(CommonPlugin::checkGPCRelease(GMAPS_GPC_NEEDED))
   {
-    @include_once('gmaps_install.class.inc.php');
+    include_once('gmaps_install.class.inc.php');
     $gpcInstalled=true;
   }
