Index: extensions/GMaps/gmaps.css
===================================================================
--- extensions/GMaps/gmaps.css	(revision 7178)
+++ extensions/GMaps/gmaps.css	(revision 7308)
@@ -70,12 +70,9 @@
   margin-left:3px;
 }
-#iDialogGMapWaiting {
-  position:absolute;
-  z-index:1500;
-  background:#000000;
-  opacity:0.55;
-  filter:alpha(opacity:55);
+
+
+div.cfgBloc {
+  margin-top:10px;
 }
-
 
 // fix IE8 compatibility bugs from GPC 3.2.0 (fixed in next release)
Index: extensions/GMaps/gmaps2.css
===================================================================
--- extensions/GMaps/gmaps2.css	(revision 7178)
+++ extensions/GMaps/gmaps2.css	(revision 7308)
@@ -137,9 +137,3 @@
 }
 
-#iDialogGMapWaiting {
-  position:absolute;
-  z-index:1500;
-  background:#ffffff;
-  opacity:0.55;
-  filter:alpha(opacity:55);
-}
+
Index: extensions/GMaps/gmaps_aip.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_aip.class.inc.php	(revision 7178)
+++ extensions/GMaps/gmaps_aip.class.inc.php	(revision 7308)
@@ -57,4 +57,8 @@
                           l10n('gmaps_search'),
                           $this->getAdminLink()."&amp;fGMaps_tabsheet=search");
+    $this->tabsheet->add('config',
+                          l10n('gmaps_config'),
+                          $this->getAdminLink()."&amp;fGMaps_tabsheet=config");
+
 /*    $this->tabsheet->add('help',
                           l10n('gmaps_help'),
@@ -112,4 +116,7 @@
       case 'search':
         $this->displaySearch();
+        break;
+      case 'config':
+        $this->displayConfig();
         break;
       case 'help':
@@ -335,4 +342,56 @@
 
 
+
+
+  /**
+   * display the config page
+   *
+   */
+  protected function displayConfig()
+  {
+    global $template;
+
+    $this->updateConfig();
+    $this->configForTemplate();
+
+    $template->set_filename('body_page',
+                dirname($this->getFileLocation()).'/admin/gmaps_config.tpl');
+
+    $template->assign_var_from_handle('GMAPS_BODY_PAGE', 'body_page');
+  }
+
+  /**
+   * update config values
+   */
+  protected function updateConfig()
+  {
+    global $infos;
+
+    if(!isset($_POST) or count($_POST)==0) return(false);
+
+
+    if(isset($_POST['fBDPopupAutomaticSize']) and $_POST['fBDPopupAutomaticSize']>=0.5 and $_POST['fBDPopupAutomaticSize']<=0.95)
+    {
+      $this->config['popupAutomaticSize']=$_POST['fBDPopupAutomaticSize'];
+    }
+    else
+    {
+      return(false);
+    }
+
+    if($this->saveConfig())
+    {
+      $this->displayResult(l10n('gmaps_config_saved'), true);
+      return(true);
+    }
+    return(false);
+  }
+
+
+
+
+
+
+
   /**
    * build an ordered category list
@@ -373,28 +432,4 @@
       {
         $row['level']=1+substr_count($row['rank'], '.');
-
-        /* rank is in formated without leading zero, giving bad order
-         *  1
-         *  1.10
-         *  1.11
-         *  1.2
-         *  1.3
-         *  ....
-         *
-         *  this loop cp,vert all sub rank in four 0 format, allowing to order
-         *  categories easily
-         *  0001
-         *  0001.0010
-         *  0001.0011
-         *  0001.0002
-         *  0001.0003
-         */
-        $row['rank']=explode('.', $row['rank']);
-        foreach($row['rank'] as $key=>$rank)
-        {
-          $row['rank'][$key]=str_pad($rank, 4, '0', STR_PAD_LEFT);
-        }
-        $row['rank']=implode('.', $row['rank']);
-
         $returned[]=$row;
       }
@@ -414,9 +449,5 @@
   public function compareCat($catA, $catB)
   {
-    if($catA['rank'] == $catB['rank'])
-    {
-      return(0);
-    }
-    return( ($catA['rank'] < $catB['rank'])?-1:1 );
+    return(strnatcmp($catA['rank'], $catB['rank']));
   }
 
Index: extensions/GMaps/gmaps_ajax.php
===================================================================
--- extensions/GMaps/gmaps_ajax.php	(revision 7178)
+++ extensions/GMaps/gmaps_ajax.php	(revision 7308)
@@ -77,6 +77,5 @@
 
            $_REQUEST['ajaxfct']=='public.maps.init' or
-           $_REQUEST['ajaxfct']=='public.maps.getMarkers' //or
-           //$_REQUEST['ajaxfct']=='public.maps.getMarkerInfos'
+           $_REQUEST['ajaxfct']=='public.maps.getMarkers'
            )) $_REQUEST['ajaxfct']='';
 
@@ -133,16 +132,18 @@
           else
           {
-            if(!(isset($_REQUEST['datas']['displayType']) &&
-                 isset($_REQUEST['datas']['sizeMode']) &&
-                 isset($_REQUEST['datas']['name']) &&
-                 isset($_REQUEST['datas']['width']) &&
-                 isset($_REQUEST['datas']['height']) &&
-                 isset($_REQUEST['datas']['zoomLevel']) &&
-                 isset($_REQUEST['datas']['mapType']) &&
-                 isset($_REQUEST['datas']['mapTypeControl']) &&
-                 isset($_REQUEST['datas']['navigationControl']) &&
-                 isset($_REQUEST['datas']['scaleControl']) &&
-                 isset($_REQUEST['datas']['streetViewControl']) &&
-                 isset($_REQUEST['datas']['style'])))
+            if(!(isset($_REQUEST['datas']['displayType']) and
+                 isset($_REQUEST['datas']['sizeMode']) and
+                 isset($_REQUEST['datas']['name']) and
+                 isset($_REQUEST['datas']['width']) and
+                 isset($_REQUEST['datas']['height']) and
+                 isset($_REQUEST['datas']['zoomLevel']) and
+                 isset($_REQUEST['datas']['mapType']) and
+                 isset($_REQUEST['datas']['mapTypeControl']) and
+                 isset($_REQUEST['datas']['navigationControl']) and
+                 isset($_REQUEST['datas']['scaleControl']) and
+                 isset($_REQUEST['datas']['streetViewControl']) and
+                 isset($_REQUEST['datas']['style']) and
+                 isset($_REQUEST['datas']['zoomLevelMaxActivated'])
+                 ))
             {
               $_REQUEST['ajaxfct']='';
@@ -187,4 +188,7 @@
               if(!($_REQUEST['datas']['streetViewControl']=='y' or
                    $_REQUEST['datas']['streetViewControl']=='n')) $_REQUEST['datas']['streetViewControl']='n';
+
+              if(!($_REQUEST['datas']['zoomLevelMaxActivated']=='y' or
+                   $_REQUEST['datas']['zoomLevelMaxActivated']=='n')) $_REQUEST['datas']['zoomLevelMaxActivated']='n';
             }
           }
@@ -204,11 +208,11 @@
           else
           {
-            if(!(isset($_REQUEST['datas']['categoryId']) &&
-                 isset($_REQUEST['datas']['mapId']) &&
-                 isset($_REQUEST['datas']['applySubCat']) &&
-                 isset($_REQUEST['datas']['kmlFileId']) &&
-                 isset($_REQUEST['datas']['kmlFileUrl']) &&
-                 isset($_REQUEST['datas']['icon']) &&
-                 isset($_REQUEST['datas']['marker']) &&
+            if(!(isset($_REQUEST['datas']['categoryId']) and
+                 isset($_REQUEST['datas']['mapId']) and
+                 isset($_REQUEST['datas']['applySubCat']) and
+                 isset($_REQUEST['datas']['kmlFileId']) and
+                 isset($_REQUEST['datas']['kmlFileUrl']) and
+                 isset($_REQUEST['datas']['icon']) and
+                 isset($_REQUEST['datas']['marker']) and
                  isset($_REQUEST['datas']['title']) ))
             {
@@ -262,23 +266,17 @@
           else
           {
-            if(!(isset($_REQUEST['datas']['requestId']) &&
-                 isset($_REQUEST['datas']['bounds']) &&
-                 isset($_REQUEST['datas']['width']) &&
-                 isset($_REQUEST['datas']['height']) &&
-                 isset($_REQUEST['datas']['distanceTreshold']) &&
-                 isset($_REQUEST['datas']['bounds']['north']) &&
-                 isset($_REQUEST['datas']['bounds']['south']) &&
-                 isset($_REQUEST['datas']['bounds']['east']) &&
+            if(!(isset($_REQUEST['datas']['requestId']) and
+                 isset($_REQUEST['datas']['callId']) and
+                 isset($_REQUEST['datas']['bounds']) and
+                 isset($_REQUEST['datas']['width']) and
+                 isset($_REQUEST['datas']['height']) and
+                 isset($_REQUEST['datas']['distanceTreshold']) and
+                 isset($_REQUEST['datas']['bounds']['north']) and
+                 isset($_REQUEST['datas']['bounds']['south']) and
+                 isset($_REQUEST['datas']['bounds']['east']) and
                  isset($_REQUEST['datas']['bounds']['west']) ))
             {
               $_REQUEST['ajaxfct']='';
             }
-            else
-            {
-              if(!isset($_REQUEST['datas']['levelInfo'])) $_REQUEST['datas']['levelInfo']=1;
-
-              if(!($_REQUEST['datas']['levelInfo']==0 or
-                   $_REQUEST['datas']['levelInfo']==1)) $_REQUEST['datas']['levelInfo']=1;
-            }
           }
         }
@@ -293,8 +291,5 @@
             $_REQUEST['ajaxfct']='';
           }
-
-
-        }
-
+        }
       }
     } //checkRequest
@@ -353,4 +348,7 @@
           $result=$this->ajax_gmaps_public_mapsGetMarkers($_REQUEST['datas']);
           break;
+        case 'public.maps.getMarkersInfos':
+          $result=$this->ajax_gmaps_public_mapsGetMarkersInfos($_REQUEST['datas']);
+          break;
       }
       GPCAjax::returnResult($result);
@@ -378,5 +376,7 @@
       $datas=Array();
 
-      $sql="SELECT id, name, displayType, sizeMode, width, height, zoomLevel, mapType, mapTypeControl, navigationControl, scaleControl, streetViewControl
+      $sql="SELECT id, name, displayType, sizeMode, width, height, zoomLevel,
+                   mapType, mapTypeControl, navigationControl, scaleControl,
+                   streetViewControl, zoomLevelMaxActivated
             FROM ".$this->tables['maps']."
             ORDER BY displayType ASC, name ASC";
@@ -443,5 +443,6 @@
                 $properties['scaleControl']."', '".
                 $properties['streetViewControl']."', '".
-                mysql_escape_string($properties['style'])."');";
+                mysql_escape_string($properties['style'])."', '".
+                $properties['zoomLevelMaxActivated']."');";
         $result=pwg_query($sql);
         $id=pwg_db_insert_id();
@@ -461,5 +462,6 @@
                 $properties['scaleControl']."', streetViewControl='".
                 $properties['streetViewControl']."', style='".
-                mysql_escape_string($properties['style'])."'
+                mysql_escape_string($properties['style'])."', zoomLevelMaxActivated='".
+                $properties['zoomLevelMaxActivated']."'
               WHERE id='$id';";
         $result=pwg_query($sql);
@@ -490,10 +492,20 @@
         'navigationControl' => 0,
         'scaleControl' => 'y',
-        'streetViewControl' => 'n'
+        'streetViewControl' => 'n',
+        'zoomLevelMaxActivated' => 'n',
+        'associations' => 0,
       );
 
-      $sql="SELECT id, displayType, sizeMode, name, width, height, zoomLevel, mapType, mapTypeControl, navigationControl, scaleControl, streetViewControl
-            FROM ".$this->tables['maps']."
-            WHERE id='$id';";
+      $sql="SELECT pgmm.id, pgmm.displayType, pgmm.sizeMode, pgmm.name,
+                   pgmm.width, pgmm.height, pgmm.zoomLevel, pgmm.mapType,
+                   pgmm.mapTypeControl, pgmm.navigationControl,
+                   pgmm.scaleControl, pgmm.streetViewControl,
+                   pgmm.zoomLevelMaxActivated,
+                   COUNT(pgcm.id) AS nbAssoc
+            FROM ".$this->tables['maps']." pgmm
+                  LEFT JOIN ".$this->tables['category_maps']." pgcm
+                    ON pgcm.mapId=pgmm.id
+            WHERE pgmm.id='$id'
+            GROUP BY pgmm.id;";
       $result=pwg_query($sql);
       if($result)
@@ -781,5 +793,5 @@
         while($row=pwg_db_fetch_assoc($result))
         {
-          $row['fileSize']=$this->formatOctet($row['fileSize']);
+          $row['fileSize']=GPCCore::formatOctet($row['fileSize']);
           $datas[]=$row;
         }
@@ -852,5 +864,5 @@
         }
 
-        $file=dirname(__FILE__).'/kml/'.$file;
+        $file=GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file;
 
         if(file_exists($file)) unlink($file);
@@ -858,5 +870,5 @@
         {
           $currentInfo=$this->ajax_gmaps_admin_kmlFilesGetFile($id, false);
-          if(file_exists(dirname(__FILE__).'/kml/'.$currentInfo['file'])) unlink(dirname(__FILE__).'/kml/'.$currentInfo['file']);
+          if(file_exists(self::KML_DIRECTORY.$currentInfo['file'])) unlink(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$currentInfo['file']);
         }
 
@@ -933,5 +945,5 @@
         while($row=pwg_db_fetch_assoc($result))
         {
-          $row['fileSizeUnits']=$this->formatOctet($row['fileSize']);
+          $row['fileSizeUnits']=GPCCore::formatOctet($row['fileSize']);
           $returned=$row;
         }
@@ -989,7 +1001,7 @@
       if($result)
       {
-        if($file!='' and file_exists(dirname(__FILE__).'/kml/'.$file))
-        {
-          unlink(dirname(__FILE__).'/kml/'.$file);
+        if($file!='' and file_exists(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file))
+        {
+          unlink(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file);
         }
         return('ok');
@@ -1092,5 +1104,5 @@
               'latitude' => $coords[0],
               'longitude' => $coords[1],
-              'imageName' => mysql_escape_string($row['imageName']),
+              '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'],
@@ -1119,6 +1131,4 @@
      *                       'width' : width of maps in pixels
      *                       'height' : height of maps in pixels
-     *                       'levelInfo' : 0 = don't return pictures info (name, url, ...)
-     *                                     1 = return pictures informations
      * @return Array|String : a JSON string of an array of points (nbPictures, lat, lng)
      */
@@ -1128,4 +1138,5 @@
 
       $returned=array(
+        'callId' => $datas['callId'],
         'markers' => array(),
         'datas' => array(
@@ -1200,42 +1211,21 @@
         // works with the highest ratio
         $ratio=max($ratioW, $ratioH);
-
-
-        $points=array();
+        $datas['distanceTreshold']=pow($datas['distanceTreshold']*$ratio,2);
+
+
         $groups=array();
 
-        while($row=pwg_db_fetch_assoc($result))
-        {
-          $points[]=$row;
-        }
 
         /*
          *  build groups
          */
-        while(count($points)>0)
-        {
-          $currentGroup=array();
-          $currentGroup[]=array_shift($points);
-
-          $i=0;
-          while($i<count($points))
-          {
-            $dist=sqrt(pow($points[$i]['latitude']-$currentGroup[0]['latitude'],2) + pow($points[$i]['longitude']-$currentGroup[0]['longitude'],2))/$ratio;
-
-            if($dist <= $datas['distanceTreshold'])
-            {
-              $tmp=array_splice($points, $i, 1);
-              $currentGroup[]=$tmp[0];
-              $points=array_values($points); // reset array index...
-            }
-            else
-            {
-              $i++;
-            }
-          }
-
-          $groups[]=$currentGroup;
-          unset($currentGroup);
-        }
+        while($row=pwg_db_fetch_assoc($result))
+        {
+          if(!$this->checkInGroup($row, $groups, $datas['distanceTreshold']))
+          {
+            $groups[]=array($row);
+          }
+        }
+
 
         /*
@@ -1247,5 +1237,5 @@
           $coords=array(
             'nbImgTxt' => '',
-            'nbImages' => 0,
+            'nbImg' => 0,
             'lat' => 0,                   // 'lat' rather than 'latitude'
             'lng' => 0,                   // 'lng' rather than 'longitude'
@@ -1270,5 +1260,5 @@
                   'category' => array(
                     'id' => $id,
-                    'name' => $tmpCatsNames[$key],
+                    'name' => GPCCore::getUserLanguageDesc($tmpCatsNames[$key]),
                     'permalink' => (substr($tmpCatsPLinks[$key],0,1)=='*')?'':$tmpCatsPLinks[$key],
                   )
@@ -1279,22 +1269,19 @@
             if(count($tmpCatsId)<=1) $tmpCatsNames='';
 
-            $coords['nbImages']++;
+            $coords['nbImg']++;
 
             $coords['lat']+=$point['latitude'];
             $coords['lng']+=$point['longitude'];
 
-            if($datas['levelInfo']==1)
-            {
-              $coords['imgTn'][]=substr($point['imageTnFile'],12);
-              $coords['imgCatsNames'][]=$tmpCatsNames;
-              $coords['imgName'][]=$point['imageName'];
-              $coords['imgCatsUrl'][]=$tmpCatsUrl;
-            }
+            $coords['imgTn'][]=substr($point['imageTnFile'],12);
+            $coords['imgCatsNames'][]=$tmpCatsNames;
+            $coords['imgName'][]=GPCCore::getUserLanguageDesc($point['imageName']);
+            $coords['imgCatsUrl'][]=$tmpCatsUrl;
           }
           $coords['lat']=$coords['lat']/count($group);
           $coords['lng']=$coords['lng']/count($group);
-          $coords['uniqueId']=md5($coords['lat'].$coords['lng']);
-
-          if($coords['nbImages']==1)
+          $coords['uId']=md5($coords['lat'].$coords['lng']);
+
+          if($coords['nbImg']==1)
           {
             $coords['nbImgTxt']=l10n('gmaps_1_picture');
@@ -1302,9 +1289,9 @@
           else
           {
-            $coords['nbImgTxt']=sprintf(l10n('gmaps_nb_pictures'), $coords['nbImages']);
+            $coords['nbImgTxt']=sprintf(l10n('gmaps_nb_pictures'), $coords['nbImg']);
           }
 
           $returned['markers'][]=$coords;
-          $returned['datas']['nbPhotos']+=$coords['nbImages'];
+          $returned['datas']['nbPhotos']+=$coords['nbImg'];
         }
       }
@@ -1324,82 +1311,27 @@
 
       return(json_encode($returned));
+    } //ajax_gmaps_public_mapsGetMarkers
+
+    /**
+     * check if a point is inside an existing group, and add it
+     * @param Array $point : the point
+     * @param Array &$groups : the groups
+     * @param Float $maxDist : maximum distance to be inside group
+     * @return Bool : true if added in a group, otherwise false
+     */
+    private function checkInGroup($point, &$groups, $maxDist)
+    {
+      foreach($groups as $key=>$group)
+      {
+        $dist=pow($point['latitude']-$group[0]['latitude'],2) + pow($point['longitude']-$group[0]['longitude'],2);
+
+        if($dist<=$maxDist)
+        {
+          $groups[$key][]=$point;
+          return(true);
+        }
+      }
+      return(false);
     }
-
-
-
-
-     /**
-      * formats a file size into a human readable size
-      *
-      * @param String $format : "A"  : auto
-      *                         "Ai" : auto (io)
-      *                         "O"  : o
-      *                         "K"  : Ko
-      *                         "M"  : Mo
-      *                         "G"  : Go
-      *                         "Ki" : Kio
-      *                         "Mi" : Mio
-      *                         "Gi" : Gio
-      * @param String $thsep : thousand separator
-      * @param Integer $prec : number of decimals
-      * @param Bool $visible : display or not the unit
-      * @return String : a formatted file size
-      */
-     private function formatOctet($octets, $format="Ai", $thsep="", $prec=2, $visible=true)
-     {
-      if($format=="Ai")
-      {
-       if($octets<1024)
-       { $format="O"; }
-       elseif($octets<1024000)
-       { $format="Ki"; }
-       elseif($octets<1024000000)
-       { $format="Mi"; }
-       else
-       { $format="Gi"; }
-      }
-      elseif($format=="A")
-      {
-       if($octets<1000)
-       { $format="O"; }
-       elseif($octets<1000000)
-       { $format="Ki"; }
-       elseif($octets<1000000000)
-       { $format="Mi"; }
-       else
-       { $format="Gi"; }
-      }
-
-      switch($format)
-      {
-       case "O":
-        $unit="o"; $div=1;
-        break;
-       case "K":
-        $unit="Ko"; $div=1000;
-        break;
-       case "M":
-        $unit="Mo"; $div=1000000;
-        break;
-       case "G":
-        $unit="Go"; $div=1000000000;
-        break;
-       case "Ki":
-        $unit="Kio"; $div=1024;
-        break;
-       case "Mi":
-        $unit="Mio"; $div=1024000;
-        break;
-       case "Gi":
-        $unit="Gio"; $div=1024000000;
-        break;
-      }
-
-      $returned=number_format($octets/$div, $prec, '.', $thsep);
-      if($visible) $returned.=' '.$unit;
-      return($returned);
-     } //function formatOctet
-
-
 
   } //class
Index: extensions/GMaps/gmaps_install.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_install.class.inc.php	(revision 7178)
+++ extensions/GMaps/gmaps_install.class.inc.php	(revision 7308)
@@ -41,4 +41,9 @@
     public function install()
     {
+      if(!file_exists(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY))
+      {
+        mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY, 0755, true);
+      }
+
       $this->initConfig();
       $this->loadConfig();
@@ -62,4 +67,5 @@
   `streetViewControl` char(1) NOT NULL default 'n',
   `style` varchar(512) NOT NULL,
+  `zoomLevelMaxActivated` char(1) NOT NULL default 'n',
   PRIMARY KEY  (`id`)
 )",
@@ -131,5 +137,6 @@
       switch($this->config['installed'])
       {
-        // actually, there no migration possible from previous release
+        case '01.00.00';
+          $this->updateFrom_010000();
         default:
           // nothing to do...
@@ -150,4 +157,41 @@
     }
 
+
+    /**
+     * update from release 1.0.0
+     *
+     *  - create the /local/plugins/GMaps/kml directory
+     *  - move kml files from /plugins/GMaps/kml directory to the new directory
+     *  - remove the /plugins/GMaps/kml directory
+     */
+    private function updateFrom_010000()
+    {
+      mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY, 0755, true);
+
+      $directory=scandir(GMAPS_PATH.'kml/');
+      foreach($directory as $file)
+      {
+        $ext=(pathinfo($file, PATHINFO_EXTENSION));
+        if(preg_match('/.*(?:\.kml|\.kmz)$/i', $file))
+        {
+          rename(GMAPS_PATH.'kml/'.$file, GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file);
+        }
+      }
+
+      mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY);
+
+
+      $tablesUpdate=array(
+        $this->tables['images_tags'] => array(
+          'zoomLevelMaxActivated' => " ADD COLUMN `zoomLevelMaxActivated` CHAR(1)  NOT NULL DEFAULT 'n' AFTER `style` ",
+        )
+      );
+
+      $tablef=new GPCTables(array($this->tables['maps']));
+      $tablef->updateTablesFields($tablesUpdate);
+
+      unset($tablesUpdate);
+    }
+
   } //class
 
Index: extensions/GMaps/gmaps_pip.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_pip.class.inc.php	(revision 7178)
+++ extensions/GMaps/gmaps_pip.class.inc.php	(revision 7308)
@@ -178,5 +178,6 @@
                 title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title']  )."',
                 markers:[],
-                fitToBounds:true
+                fitToBounds:true,
+                zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false')."
               }";
 
@@ -224,4 +225,6 @@
       maps:
       [".implode(',', $scripts)."],
+      popupAutomaticSize:".$this->config['popupAutomaticSize'].",
+      callId:0
     }
   </script>", false);
@@ -304,4 +307,5 @@
       maps:
       [".implode(',', $this->picture['properties'])."],
+      popupAutomaticSize:".$this->config['popupAutomaticSize']."
     }
 </script>", false);
Index: extensions/GMaps/gmaps_root.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_root.class.inc.php	(revision 7178)
+++ extensions/GMaps/gmaps_root.class.inc.php	(revision 7308)
@@ -18,4 +18,5 @@
   class GMaps_root extends CommonPlugin
   {
+    const KML_DIRECTORY='/local/plugins/GMaps/kml/';
     protected $css;
     protected $maps=array();
@@ -121,4 +122,5 @@
       //global $user;
       $this->config=array(
+        'popupAutomaticSize' => 0.8
       );
     }
@@ -214,5 +216,5 @@
               pgmm.width, pgmm.height, pgmm.zoomLevel,
               pgmm.mapType, pgmm.mapTypeControl, pgmm.scaleControl, pgmm.streetViewControl,
-              pgmm.navigationControl, pgmm.style,
+              pgmm.navigationControl, pgmm.style, pgmm.zoomLevelMaxActivated,
               IF(pgcm.categoryId=0, 0, pct.global_rank) AS priorityRank
             FROM ((".$this->tables['category_maps']." pgcm
@@ -245,5 +247,5 @@
         {
           // if an kml file id is given, apply the url of the file (needs to give the complete URI for google)
-          if($row['kmlFileId']>0 and $row['kmlFileUrlId']!='') $row['kmlFileUrl']=dirname($_SERVER['SCRIPT_URI']).'/plugins/GMaps/kml/'.$row['kmlFileUrlId'];
+          if($row['kmlFileId']>0 and $row['kmlFileUrlId']!='') $row['kmlFileUrl']=dirname($_SERVER['SCRIPT_URI']).self::KML_DIRECTORY.$row['kmlFileUrlId'];
 
           if($row['displayType']!='MP')
Index: extensions/GMaps/gmaps_version.inc.php
===================================================================
--- extensions/GMaps/gmaps_version.inc.php	(revision 7178)
+++ extensions/GMaps/gmaps_version.inc.php	(revision 7308)
@@ -15,7 +15,7 @@
   if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-  define('GMAPS_VERSION',  '1.0.0');
-  define('GMAPS_VERSION2', '01.00.00');
-  define('GMAPS_GPC_NEEDED', '3.3.0');
+  define('GMAPS_VERSION',  '1.1.0');
+  define('GMAPS_VERSION2', '01.01.00');
+  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 7178)
+++ extensions/GMaps/js/gmapsCategory.js	(revision 7308)
@@ -2,6 +2,6 @@
  * -----------------------------------------------------------------------------
  * file: gmapsCategory.js
- * file version: 1.0.0
- * date: 2010-10-10
+ * file version: 1.1.0
+ * date: 2010-10-20
  */
 
@@ -87,6 +87,9 @@
 function loadMarkers(map)
 {
+  gmaps.callId++;
+
   datas={
     requestId:gmaps.requestId,
+    callId:gmaps.callId,
     bounds:{
         north:map.getBounds().getNorthEast().lat(),
@@ -97,5 +100,5 @@
     width:$(map.getDiv()).width(),
     height:$(map.getDiv()).height(),
-    distanceTreshold:20
+    distanceTreshold:20,
   };
 
@@ -104,13 +107,4 @@
   $('#gmapsLoading').css('display', 'inline-block');
   $('#gmapsNbPhotos').html('');
-  $('#iDialogGMapWaiting').css(
-    {
-      width:$('#iGMapsIcon').width()+'px',
-      height:$('#iGMapsIcon').height()+'px',
-      top:$('#iGMapsIcon').position().top+'px',
-      left:$('#iGMapsIcon').position().left+'px',
-      display:'block'
-    }
-  );
 
   $.ajax(
@@ -124,9 +118,11 @@
         {
           tmp=$.parseJSON(msg);
-          tmp.markers.sort(compareMarkers);
-          applyMarkers(currentMapLoad, tmp.markers);
-          $('#gmapsLoading').css('display', 'none');
-          $('#gmapsNbPhotos').html('['+tmp.datas.nbPhotos+']');
-          $('#iDialogGMapWaiting').css('display', 'none');
+          if(gmaps.callId==tmp.callId)
+          {
+            tmp.markers.sort(compareMarkers);
+            applyMarkers(currentMapLoad, tmp.markers);
+            $('#gmapsLoading').css('display', 'none');
+            $('#gmapsNbPhotos').html('['+tmp.datas.nbPhotos+']');
+          }
         }
     }
@@ -140,5 +136,5 @@
  * @param Array markers : array of markers properties
  *                        each marker is an object with properties :
- *                          latitude, longitude, nbImages
+ *                          latitude, longitude, nbImg
  */
 function applyMarkers(map, markers)
@@ -154,5 +150,5 @@
     while(i<map.markers.length)
     {
-      newListIndex=markerInList(map.markers[i].uniqueId, markers);
+      newListIndex=markerInList(map.markers[i].uId, markers);
       if(newListIndex==-1)
       {
@@ -189,5 +185,5 @@
       {
         marker:marker,
-        uniqueId:markers[i].uniqueId
+        uId:markers[i].uId
       }
     );
@@ -207,9 +203,9 @@
 function compareMarkers(m1,m2)
 {
-  if(m1.uniqueId<m2.uniqueId)
+  if(m1.uId<m2.uId)
   {
     return(-1);
   }
-  else if(m1.uniqueId<m2.uniqueId)
+  else if(m1.uId<m2.uId)
   {
     return(1);
@@ -222,5 +218,5 @@
   for(var i=0;i<markerList.length;i++)
   {
-    if(markerList[i].uniqueId==uniqueId) return(i)
+    if(markerList[i].uId==uniqueId) return(i)
   }
   return(-1);
@@ -286,5 +282,5 @@
   }
 
-  if(gmaps.currentInfo.nbImages>1)
+  if(gmaps.currentInfo.nbImg>1)
   {
     $('#ciGMIWC_picnum').html((index+1)+'/'+gmaps.currentInfo.nbImgTxt);
@@ -304,5 +300,5 @@
 {
   gmaps.currentInfo.displayed--;
-  if(gmaps.currentInfo.displayed<0) gmaps.currentInfo.displayed=gmaps.currentInfo.nbImages-1;
+  if(gmaps.currentInfo.displayed<0) gmaps.currentInfo.displayed=gmaps.currentInfo.nbImg-1;
   displayPictureInfo(gmaps.currentInfo.displayed);
 }
@@ -314,13 +310,93 @@
 {
   gmaps.currentInfo.displayed++;
-  if(gmaps.currentInfo.displayed>=gmaps.currentInfo.nbImages) gmaps.currentInfo.displayed=0;
+  if(gmaps.currentInfo.displayed>=gmaps.currentInfo.nbImg) gmaps.currentInfo.displayed=0;
   displayPictureInfo(gmaps.currentInfo.displayed);
 }
 
 
+/**
+ * check if zoomLevel
+ */
+function fitToBounds(bounds)
+{
+  gmaps.maps[gmaps.currentMapLoadIndex].gMap.fitBounds(bounds);
+
+  if(gmaps.maps[gmaps.currentMapLoadIndex].zoomLevelMaxActivated &&
+     gmaps.maps[gmaps.currentMapLoadIndex].gMap.getZoom() > gmaps.maps[gmaps.currentMapLoadIndex].zoomLevel)
+  {
+    gmaps.maps[gmaps.currentMapLoadIndex].gMap.setZoom(gmaps.maps[gmaps.currentMapLoadIndex].zoomLevel);
+  }
+}
+
+function initializeMapViewport(mode)
+{
+  if(gmaps.currentMapLoadIndex>-1 &&
+     ($('#'+gmaps.maps[gmaps.currentMapLoadIndex].id+'Content').dialog('isOpen') && mode=='loaded' || mode=='open') &&
+     (gmaps.maps[gmaps.currentMapLoadIndex].viewportInitialized==false)
+    )
+  {
+    /*
+     * if the container is not visible when map are built, they are
+     * not initialized correctly
+     *
+     * when dialog is opened for the first time, proceed to map
+     * finalization :
+     *  - resize
+     *  - center the map
+     *  - add handlers on events 'dragend' and 'zoom_change'
+     *    allowing to reload markers according to the new viewport
+     */
+    google.maps.event.trigger(gmaps.maps[gmaps.currentMapLoadIndex].gMap, 'resize');
+
+
+    if(gmaps.maps[gmaps.currentMapLoadIndex].fitToBounds)
+    {
+      fitToBounds(gmaps.bounds)
+    }
+    else
+    {
+      gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.bounds.getCenter());
+    }
+
+    // reduce copyright size... ^_^
+    $('#'+gmaps.maps[gmaps.currentMapLoadIndex].id+' span, #'+gmaps.maps[gmaps.currentMapLoadIndex].id+' a').css('font-size', '55.0%');
+
+    if(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile!=null)
+      gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.setMap(gmaps.maps[gmaps.currentMapLoadIndex].gMap);
+
+    google.maps.event.addListener(
+      gmaps.maps[gmaps.currentMapLoadIndex].gMap,
+      'dragend',
+      function()
+      {
+        loadMarkers(this);
+        $('#gmapsBoundMap').css('display', 'inline');
+        $('#gmapsBoundKml').css('display', 'inline');
+      }
+    );
+
+    google.maps.event.addListener(
+      gmaps.maps[gmaps.currentMapLoadIndex].gMap,
+      'zoom_changed',
+      function()
+      {
+        loadMarkers(this);
+        gmaps.infoWindow.close();
+        $('#gmapsBoundMap').css('display', 'inline');
+        $('#gmapsBoundKml').css('display', 'inline');
+      }
+    );
+
+    gmaps.maps[gmaps.currentMapLoadIndex].viewportInitialized=true;
+  }
+
+  if(gmaps.currentMapLoadIndex>-1) loadMarkers(gmaps.maps[gmaps.currentMapLoadIndex].gMap);
+}
+
 $(window).load(function ()
   {
-    // all maps have the same intials bounds
+    // all maps have the same initials bounds
     gmaps.currentInfo=null;
+    gmaps.currentMapLoadIndex=-1;
 
     gmaps.bounds = new google.maps.LatLngBounds(
@@ -351,9 +427,29 @@
         $('#'+gmaps.maps[i].id).css(
           {
-            width: ($(window).width()*0.8)+'px',
-            height:($(window).height()*0.8)+'px'
+            width: ($(window).width()*gmaps.popupAutomaticSize)+'px',
+            height:($(window).height()*gmaps.popupAutomaticSize)+'px'
           }
         );
       }
+
+      /*
+       * 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 },
+          success:
+            function(msg)
+            {
+              gmaps.requestId=msg;
+              initializeMapViewport('loaded');
+            }
+        }
+      );
+
 
       // initialize dialog box for maps
@@ -370,82 +466,5 @@
             {
               gmaps.currentMapLoadIndex=$(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 },
-                  success:
-                    function(msg)
-                    {
-                      gmaps.requestId=msg;
-
-                      if(gmaps.maps[gmaps.currentMapLoadIndex].viewportInitialized==false)
-                      {
-                        /*
-                         * if the container is not visible when map are built, they are
-                         * not initialized correctly
-                         *
-                         * when dialog is opened for the first time, proceed to map
-                         * finalization :
-                         *  - resize
-                         *  - center the map
-                         *  - add handlers on events 'dragend' and 'zoom_change'
-                         *    allowing to reload markers according to the new viewport
-                         */
-                        google.maps.event.trigger(gmaps.maps[gmaps.currentMapLoadIndex].gMap, 'resize');
-
-
-                        if(gmaps.maps[gmaps.currentMapLoadIndex].fitToBounds)
-                        {
-                          gmaps.maps[gmaps.currentMapLoadIndex].gMap.fitBounds(gmaps.bounds);
-                        }
-                        else
-                        {
-                          gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.bounds.getCenter());
-                        }
-
-                        // reduce copyright size... ^_^
-                        $('#'+gmaps.maps[gmaps.currentMapLoadIndex].id+' span, #'+gmaps.maps[gmaps.currentMapLoadIndex].id+' a').css('font-size', '55.0%');
-
-                        if(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile!=null)
-                          gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.setMap(gmaps.maps[gmaps.currentMapLoadIndex].gMap);
-
-                        google.maps.event.addListener(
-                          gmaps.maps[gmaps.currentMapLoadIndex].gMap,
-                          'dragend',
-                          function()
-                          {
-                            loadMarkers(this);
-                            $('#gmapsBoundMap').css('display', 'inline');
-                            $('#gmapsBoundKml').css('display', 'inline');
-                          }
-                        );
-
-                        google.maps.event.addListener(
-                          gmaps.maps[gmaps.currentMapLoadIndex].gMap,
-                          'zoom_changed',
-                          function()
-                          {
-                            loadMarkers(this);
-                            gmaps.infoWindow.close();
-                            $('#gmapsBoundMap').css('display', 'inline');
-                            $('#gmapsBoundKml').css('display', 'inline');
-                          }
-                        );
-
-                        // loads the markers
-                        loadMarkers(gmaps.maps[gmaps.currentMapLoadIndex].gMap);
-                        gmaps.maps[gmaps.currentMapLoadIndex].viewportInitialized=true;
-                      }
-
-                    }
-                }
-              );
+              initializeMapViewport('open');
             }
         }
@@ -453,5 +472,5 @@
 
       $('div.gmapsPopup div.ui-dialog-titlebar')
-      .append('<a href="#" id="gmapsBoundMap" style="display:none;" onclick="gmaps.maps[gmaps.currentMapLoadIndex].gMap.fitBounds(gmaps.bounds); $(this).css(\'display\', \'none\').blur(); return(false);">'+
+      .append('<a href="#" id="gmapsBoundMap" style="display:none;" onclick="fitToBounds(gmaps.bounds); $(this).css(\'display\', \'none\').blur(); return(false);">'+
               '<span>&there4;</span></a>');
       $('#gmapsBoundMap').attr('title', gmaps.lang.boundmap);
@@ -460,5 +479,5 @@
       {
         $('div.gmapsPopup div.ui-dialog-titlebar')
-          .append('<a href="#" id="gmapsBoundKml" onclick="gmaps.maps[gmaps.currentMapLoadIndex].gMap.fitBounds(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.getDefaultViewport()); $(this).css(\'display\', \'none\').blur(); return(false);">'+
+          .append('<a href="#" id="gmapsBoundKml" onclick="fitToBounds(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.getDefaultViewport()); $(this).css(\'display\', \'none\').blur(); return(false);">'+
                   '<span>&sim;</span></a>');
         $('#gmapsBoundKml').attr('title', gmaps.lang.boundkml);
Index: extensions/GMaps/js/gmapsCategory.packed.js
===================================================================
--- extensions/GMaps/js/gmapsCategory.packed.js	(revision 7178)
+++ extensions/GMaps/js/gmapsCategory.packed.js	(revision 7308)
@@ -1,2 +1,2 @@
-/* file: gmapsCategory.js - v1.0.0 | packed on 2010/10/13 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}('I O,W=[p,{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:3P,x:4,y:39},];7 2A(k,1B){I 5=o g.3.2W($("#"+k.s).23(0),{3e:\'#38\',2Y:k.2X,2Z:k.2I,3V:2.B.2r(),1m:(k.1m==-1)?u:z,2R:(k.1m==-1)?u:z,1T:(k.1T==\'n\')?u:z,1V:(k.1V==\'n\')?u:z,1t:(k.1t==-1)?u:z,2S:{1z:k.1t},3d:\'\',});9(k.1O!=\'\'){F=o g.3.3i(k.1O,{3g:z})}E{F=p}1N=/^3a(\\d\\d)35.*/i;D=1N.36(k.P);9(D!=p)D=o 37(D[1]);9(D!=p){5.P=o g.3.34(\'1h/1p/2n/\'+k.P,o g.3.33(W[D].w,W[D].h),o g.3.29(0,0),o g.3.29(W[D].x,W[D].y))}E{5.P=p}5.F=F;5.f=o 3b();5.1B=1B;k.m=5;k.1J=u}7 1j(5){1a={1F:2.1F,B:{2s:5.1e().28().1M(),2E:5.1e().28().1G(),1S:5.1e().2a().1M(),2f:5.1e().2a().1G()},K:$(5.1Y()).K(),J:$(5.1Y()).J(),2K:20};O=5;$(\'#1y\').l(\'j\',\'R-14\');$(\'#1l\').M(\'\');$(\'#1U\').l({K:$(\'#1i\').K()+\'Q\',J:$(\'#1i\').J()+\'Q\',1R:$(\'#1i\').1D().1R+\'Q\',22:$(\'#1i\').1D().22+\'Q\',j:\'14\'});$.2k({2j:"2g",2h:"1h/1p/2i.2o",2p:z,1k:{2v:"2w.3.2U",1a:1a},2u:7(13){1b=$.2Q(13);1b.f.2M(21);1W(O,1b.f);$(\'#1y\').l(\'j\',\'G\');$(\'#1l\').M(\'[\'+1b.1a.2P+\']\');$(\'#1U\').l(\'j\',\'G\')}})}7 1W(5,f){9(O==p)H(u);9(5.f.N>0){I i=0;3r(i<5.f.N){1I=25(5.f[i].C,f);9(1I==-1){5.f[i].r.2m(p);5.f.1P(i,1)}E{f.1P(1I,1);i++}}}18(I i=0;i<f.N;i++){I r=o g.3.3I({1D:o g.3.1K(f[i].1M,f[i].1G),5:O,V:f[i].1w});9(5.P!=p)r.3k(5.P);r.1r=f[i];r.1r.t=0;5.f.3M({r:r,C:f[i].C});g.3.Y.12(r,\'2c\',7(){24(T)})}O=p}7 21(1H,1L){9(1H.C<1L.C){H(-1)}E 9(1H.C<1L.C){H(1)}H(0)}7 25(C,1x){18(I i=0;i<1x.N;i++){9(1x[i].C==C)H(i)}H(-1)}7 24(r){2.6=r.1r;2.L.2q();2.L.2B($(\'#2D\').3S().1Z(1o).23(0));2.L.2z(r.5,r);19(2.6.t)}7 1o(i,e){9(e.s!=\'\')e.s=\'c\'+e.s;$(e).3G().1Z(1o)}7 19(q){2.6.t=q;9(2.6.27[q]==\'\'){$(\'#26\').M(\'&3E;\')}E{$(\'#26\').M(2.6.27[q])}$(\'#Z\').1n(\'2l\',\'./3s/\'+2.6.3t[q]);$(\'#Z\').2C();9(2.6.17[q].N==1){$(\'#Z\').1A(\'2c\',7(){16.3q=2.6.17[2.6.t][0]})}E{$(\'#2d\').M(\'\');18(I i=0;i<2.6.17[q].N;i++){$(\'#2d\').S(\'<2b><a 1C="\'+2.6.17[q][i]+\'">\'+2.6.3m[q][i]+\'</a></2b>\')}$(\'#Z, #1s\').1A(\'3n\',7(){$(\'#1s\').l(\'j\',\'14\')}).1A(\'3u\',7(){$(\'#1s\').l(\'j\',\'G\')})}9(2.6.1u>1){$(\'#2e\').M((q+1)+\'/\'+2.6.1w);$(\'#1X, #1Q\').l(\'j\',\'R-14\')}E{$(\'#2e\').M(2.6.1w);$(\'#1X, #1Q\').l(\'j\',\'G\')}}7 3C(){2.6.t--;9(2.6.t<0)2.6.t=2.6.1u-1;19(2.6.t)}7 3D(){2.6.t++;9(2.6.t>=2.6.1u)2.6.t=0;19(2.6.t)}$(16).3w(7(){2.6=p;2.B=o g.3.3y(o g.3.1K(2.B.1S,2.B.2f),o g.3.1K(2.B.2s,2.B.2E));2.L=o g.3.3x();g.3.Y.12(2.L,\'3z\',7(){$(\'3A\').S($(\'#2D\'));2.L.2B(\'\');$(\'#Z\').2C()});18(I i=0;i<2.3.N;i++){2A(2.3[i],i);9(2.3[i].3B==\'A\'){$(\'#\'+2.3[i].s).l({K:($(16).K()*0.8)+\'Q\',J:($(16).J()*0.8)+\'Q\'})}$(\'#\'+2.3[i].s+\'3v\').11({3o:u,K:\'2y\',J:\'2y\',3l:z,3p:\'X\',3F:\'1d\',V:2.3[i].V,2z:7(){2.b=$(T).1k(\'q\');$.2k({2j:"2g",2h:"1h/1p/2i.2o",2p:z,1k:{2v:"2w.3.3U",3T:2.3O},2u:7(13){2.1F=13;9(2.3[2.b].1J==u){g.3.Y.3N(2.3[2.b].m,\'3H\');9(2.3[2.b].3L){2.3[2.b].m.1E(2.B)}E{2.3[2.b].m.3K(2.B.2r())}$(\'#\'+2.3[2.b].s+\' v, #\'+2.3[2.b].s+\' a\').l(\'3J-3R\',\'3Q.0%\');9(2.3[2.b].m.F!=p)2.3[2.b].m.F.2m(2.3[2.b].m);g.3.Y.12(2.3[2.b].m,\'2O\',7(){1j(T);$(\'#1g\').l(\'j\',\'R\');$(\'#1f\').l(\'j\',\'R\')});g.3.Y.12(2.3[2.b].m,\'2N\',7(){1j(T);2.L.2q();$(\'#1g\').l(\'j\',\'R\');$(\'#1f\').l(\'j\',\'R\')});1j(2.3[2.b].m);2.3[2.b].1J=z}}})}}).1k(\'q\',i);$(\'U.1d U.1c-11-1q\').S(\'<a 1C="#" s="1g" 1z="j:G;" 2t="2.3[2.b].m.1E(2.B); $(T).l(\\\'j\\\', \\\'G\\\').2x(); H(u);">\'+\'<v>&2L;</v></a>\');$(\'#1g\').1n(\'V\',2.1v.2V);9(2.3[i].m.F!=p){$(\'U.1d U.1c-11-1q\').S(\'<a 1C="#" s="1f" 2t="2.3[2.b].m.1E(2.3[2.b].m.F.2H()); $(T).l(\\\'j\\\', \\\'G\\\').2x(); H(u);">\'+\'<v>&2J;</v></a>\');$(\'#1f\').1n(\'V\',2.1v.3f)}$(\'U.1d U.1c-11-1q\').S(\'<v s="1y" 1z="j:G;"><2n 2l="./1h/3c/3h/3j.2F"><v>\'+2.1v.2G+\'</v></v>\');$(\'#1c-11-V-2T\').S(\'<v s="1l"></v>\')}});',62,244,'||gmaps|maps||map|currentInfo|function||if||currentMapLoadIndex||||markers|google|||display|properties|css|gMap||new|null|index|marker|id|displayed|false|span||||true||bounds|uniqueId|iM|else|kmlFile|none|return|var|height|width|infoWindow|html|length|currentMapLoad|markerImg|px|inline|append|this|div|title|markerImgProp||event|ciGMIWC_img||dialog|addListener|msg|block||window|imgCatsUrl|for|displayPictureInfo|datas|tmp|ui|gmapsPopup|getBounds|gmapsBoundKml|gmapsBoundMap|plugins|iGMapsIcon|loadMarkers|data|gmapsNbPhotos|navigationControl|attr|renameId|GMaps|titlebar|info|ciGMIWC_showcat|mapTypeControl|nbImages|lang|nbImgTxt|markerList|gmapsLoading|style|bind|gmapsIndex|href|position|fitBounds|requestId|lng|m1|newListIndex|viewportInitialized|LatLng|m2|lat|re|kmlFileUrl|splice|ciWARight|top|south|scaleControl|iDialogGMapWaiting|streetViewControl|applyMarkers|ciWALeft|getDiv|each||compareMarkers|left|get|displayWindowInfo|markerInList|ciGMIWC_title|imgName|getNorthEast|Point|getSouthWest|li|click|ciGMIWC_showcatList|ciGMIWC_picnum|west|POST|url|gmaps_ajax|type|ajax|src|setMap|img|php|async|close|getCenter|north|onclick|success|ajaxfct|public|blur|auto|open|createMap|setContent|unbind|iGMapsInfoWindowContent|east|gif|loading|getDefaultViewport|zoomLevel|sim|distanceTreshold|there4|sort|zoom_changed|dragend|nbPhotos|parseJSON|scrollwheel|mapTypeControlOptions|iGMapsIconContent|getMarkers|boundmap|Map|mapType|mapTypeId|zoom||||Size|MarkerImage|_|exec|Number|ffffff||mS|Array|GrumPluginClasses|markerTitle|backgroundColor|boundkml|preserveViewport|icons|KmlLayer|processing|setIcon|modal|imgCatsNames|mouseenter|autoOpen|closeText|location|while|galleries|imgTn|mouseleave|Content|load|InfoWindow|LatLngBounds|closeclick|body|sizeMode|displayPicturePrev|displayPictureNext|nbsp|dialogClass|children|resize|Marker|font|setCenter|fitToBounds|push|trigger|categoryId|40|55|size|clone|category|init|center'.split('|'),0,{}))
+/* file: gmapsCategory.js - v1.1.0 | packed on 2010/10/20 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}('E R,12=[q,{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 2h(g,1D){E 6=l f.3.2I($("#"+g.o).1W(0),{3d:\'#2U\',2K:g.3b,34:g.1s,2O:2.t.1S(),1u:(g.1u==-1)?u:z,2R:(g.1u==-1)?u:z,2p:(g.2p==\'n\')?u:z,2n:(g.2n==\'n\')?u:z,1p:(g.1p==-1)?u:z,2P:{1H:g.1p},2Q:\'\',});8(g.2m!=\'\'){D=l f.3.2N(g.2m,{2L:z})}F{D=q}2s=/^2M(\\d\\d)36.*/i;B=2s.3a(g.Q);8(B!=q)B=l 2Y(B[1]);8(B!=q){6.Q=l f.3.33(\'14/1K/2E/\'+g.Q,l f.3.2Z(12[B].w,12[B].h),l f.3.2z(0,0),l f.3.2z(12[B].x,12[B].y))}F{6.Q=q}6.D=D;6.b=l 2S();6.1D=1D;g.j=6;g.1k=u}9 1j(6){2.T++;16={1B:2.1B,T:2.T,t:{2B:6.1d().1O().1J(),2a:6.1d().1O().1I(),2C:6.1d().1Q().1J(),2A:6.1d().1Q().1I()},Z:$(6.1R()).Z(),Y:$(6.1R()).Y(),2H:20,};R=6;$(\'#1E\').k(\'m\',\'M-1l\');$(\'#1q\').I(\'\');$.2g({2w:"2f",2b:"14/1K/2c.2d",2e:z,1i:{2k:"2l.3.2T",16:16},2t:9(13){W=$.3c(13);8(2.T==W.T){W.b.2V(2v);29(R,W.b);$(\'#1E\').k(\'m\',\'K\');$(\'#1q\').I(\'[\'+W.16.2X+\']\')}}})}9 29(6,b){8(R==q)C(u);8(6.b.J>0){E i=0;38(i<6.b.J){1L=1Y(6.b[i].G,b);8(1L==-1){6.b[i].p.1P(q);6.b.26(i,1)}F{b.26(1L,1);i++}}}1b(E i=0;i<b.J;i++){E p=l f.3.2W({35:l f.3.1M(b[i].1J,b[i].1I),6:R,O:b[i].1n});8(6.Q!=q)p.37(6.Q);p.1G=b[i];p.1G.s=0;6.b.2J({p:p,G:b[i].G});f.3.U.17(p,\'1T\',9(){1X(S)})}R=q}9 2v(1t,1v){8(1t.G<1v.G){C(-1)}F 8(1t.G<1v.G){C(1)}C(0)}9 1Y(1Z,1r){1b(E i=0;i<1r.J;i++){8(1r[i].G==1Z)C(i)}C(-1)}9 1X(p){2.5=p.1G;2.H.22();2.H.2G($(\'#2D\').3i().1U(1C).1W(0));2.H.1h(p.6,p);19(2.5.s)}9 1C(i,e){8(e.o!=\'\')e.o=\'c\'+e.o;$(e).3L().1U(1C)}9 19(r){2.5.s=r;8(2.5.21[r]==\'\'){$(\'#1V\').I(\'&3M;\')}F{$(\'#1V\').I(2.5.21[r])}$(\'#11\').1w(\'2y\',\'./3I/\'+2.5.3H[r]);$(\'#11\').2F();8(2.5.1c[r].J==1){$(\'#11\').1A(\'1T\',9(){1a.3D=2.5.1c[2.5.s][0]})}F{$(\'#27\').I(\'\');1b(E i=0;i<2.5.1c[r].J;i++){$(\'#27\').P(\'<28><a 1x="\'+2.5.1c[r][i]+\'">\'+2.5.3E[r][i]+\'</a></28>\')}$(\'#11, #1y\').1A(\'3F\',9(){$(\'#1y\').k(\'m\',\'1l\')}).1A(\'3G\',9(){$(\'#1y\').k(\'m\',\'K\')})}8(2.5.1z>1){$(\'#25\').I((r+1)+\'/\'+2.5.1n);$(\'#23, #24\').k(\'m\',\'M-1l\')}F{$(\'#25\').I(2.5.1n);$(\'#23, #24\').k(\'m\',\'K\')}}9 3N(){2.5.s--;8(2.5.s<0)2.5.s=2.5.1z-1;19(2.5.s)}9 3O(){2.5.s++;8(2.5.s>=2.5.1z)2.5.s=0;19(2.5.s)}9 V(t){2.3[2.7].j.3V(t);8(2.3[2.7].3W&&2.3[2.7].j.3X()>2.3[2.7].1s){2.3[2.7].j.3Y(2.3[2.7].1s)}}9 1F(1m){8(2.7>-1&&($(\'#\'+2.3[2.7].o+\'2r\').L(\'3U\')&&1m==\'2u\'||1m==\'1h\')&&(2.3[2.7].1k==u)){f.3.U.3T(2.3[2.7].j,\'3P\');8(2.3[2.7].V){V(2.t)}F{2.3[2.7].j.3e(2.t.1S())}$(\'#\'+2.3[2.7].o+\' v, #\'+2.3[2.7].o+\' a\').k(\'3R-3S\',\'3C.0%\');8(2.3[2.7].j.D!=q)2.3[2.7].j.D.1P(2.3[2.7].j);f.3.U.17(2.3[2.7].j,\'3B\',9(){1j(S);$(\'#1e\').k(\'m\',\'M\');$(\'#1f\').k(\'m\',\'M\')});f.3.U.17(2.3[2.7].j,\'3l\',9(){1j(S);2.H.22();$(\'#1e\').k(\'m\',\'M\');$(\'#1f\').k(\'m\',\'M\')});2.3[2.7].1k=z}8(2.7>-1)1j(2.3[2.7].j)}$(1a).3m(9(){2.5=q;2.7=-1;2.t=l f.3.3o(l f.3.1M(2.t.2C,2.t.2A),l f.3.1M(2.t.2B,2.t.2a));2.H=l f.3.3j();f.3.U.17(2.H,\'3f\',9(){$(\'3h\').P($(\'#2D\'));2.H.2G(\'\');$(\'#11\').2F()});1b(E i=0;i<2.3.J;i++){2h(2.3[i],i);8(2.3[i].3x==\'A\'){$(\'#\'+2.3[i].o).k({Z:($(1a).Z()*2.2i)+\'2j\',Y:($(1a).Y()*2.2i)+\'2j\'})}$.2g({2w:"2f",2b:"14/1K/2c.2d",2e:z,1i:{2k:"2l.3.3z",3A:2.3w},2t:9(13){2.1B=13;1F(\'2u\')}});$(\'#\'+2.3[i].o+\'2r\').L({3r:u,Z:\'2q\',Y:\'2q\',3s:z,3t:\'X\',3Z:\'1g\',O:2.3[i].O,1h:9(){2.7=$(S).1i(\'r\');1F(\'1h\')}}).1i(\'r\',i);$(\'N.1g N.18-L-1N\').P(\'<a 1x="#" o="1e" 1H="m:K;" 2o="V(2.t); $(S).k(\\\'m\\\', \\\'K\\\').2x(); C(u);">\'+\'<v>&3q;</v></a>\');$(\'#1e\').1w(\'O\',2.1o.3p);8(2.3[i].j.D!=q){$(\'N.1g N.18-L-1N\').P(\'<a 1x="#" o="1f" 2o="V(2.3[2.7].j.D.3Q()); $(S).k(\\\'m\\\', \\\'K\\\').2x(); C(u);">\'+\'<v>&3K;</v></a>\');$(\'#1f\').1w(\'O\',2.1o.3n)}$(\'N.1g N.18-L-1N\').P(\'<v o="1E" 1H="m:K;"><2E 2y="./14/3J/3k/3g.3u"><v>\'+2.1o.3v+\'</v></v>\');$(\'#18-L-O-3y\').P(\'<v o="1q"></v>\')}});',62,249,'||gmaps|maps||currentInfo|map|currentMapLoadIndex|if|function||markers||||google|properties|||gMap|css|new|display||id|marker|null|index|displayed|bounds|false|span||||true||iM|return|kmlFile|var|else|uId|infoWindow|html|length|none|dialog|inline|div|title|append|markerImg|currentMapLoad|this|callId|event|fitToBounds|tmp||height|width||ciGMIWC_img|markerImgProp|msg|plugins||datas|addListener|ui|displayPictureInfo|window|for|imgCatsUrl|getBounds|gmapsBoundMap|gmapsBoundKml|gmapsPopup|open|data|loadMarkers|viewportInitialized|block|mode|nbImgTxt|lang|mapTypeControl|gmapsNbPhotos|markerList|zoomLevel|m1|navigationControl|m2|attr|href|ciGMIWC_showcat|nbImg|bind|requestId|renameId|gmapsIndex|gmapsLoading|initializeMapViewport|info|style|lng|lat|GMaps|newListIndex|LatLng|titlebar|getNorthEast|setMap|getSouthWest|getDiv|getCenter|click|each|ciGMIWC_title|get|displayWindowInfo|markerInList|uniqueId||imgName|close|ciWALeft|ciWARight|ciGMIWC_picnum|splice|ciGMIWC_showcatList|li|applyMarkers|east|url|gmaps_ajax|php|async|POST|ajax|createMap|popupAutomaticSize|px|ajaxfct|public|kmlFileUrl|streetViewControl|onclick|scaleControl|auto|Content|re|success|loaded|compareMarkers|type|blur|src|Point|west|north|south|iGMapsInfoWindowContent|img|unbind|setContent|distanceTreshold|Map|push|mapTypeId|preserveViewport|mS|KmlLayer|center|mapTypeControlOptions|markerTitle|scrollwheel|Array|getMarkers|ffffff|sort|Marker|nbPhotos|Number|Size||||MarkerImage|zoom|position|_|setIcon|while||exec|mapType|parseJSON|backgroundColor|setCenter|closeclick|processing|body|clone|InfoWindow|icons|zoom_changed|load|boundkml|LatLngBounds|boundmap|there4|autoOpen|modal|closeText|gif|loading|categoryId|sizeMode|iGMapsIconContent|init|category|dragend|55|location|imgCatsNames|mouseenter|mouseleave|imgTn|galleries|GrumPluginClasses|sim|children|nbsp|displayPicturePrev|displayPictureNext|resize|getDefaultViewport|font|size|trigger|isOpen|fitBounds|zoomLevelMaxActivated|getZoom|setZoom|dialogClass|'.split('|'),0,{}))
Index: extensions/GMaps/js/gmapsPicture.js
===================================================================
--- extensions/GMaps/js/gmapsPicture.js	(revision 7178)
+++ extensions/GMaps/js/gmapsPicture.js	(revision 7308)
@@ -2,6 +2,6 @@
  * -----------------------------------------------------------------------------
  * file: gmapsPicture.js
- * file version: 1.0.0
- * date: 2010-10-10
+ * file version: 1.1.0
+ * date: 2010-10-20
  */
 
@@ -106,6 +106,6 @@
           $('#iGMapsIcon').css(
             {
-              width: ($(window).width()*0.8)+'px',
-              height:($(window).height()*0.8)+'px'
+              width: ($(window).width()*gmaps.popupAutomaticSize)+'px',
+              height:($(window).height()*gmaps.popupAutomaticSize)+'px'
             }
           );
Index: extensions/GMaps/js/gmapsPicture.packed.js
===================================================================
--- extensions/GMaps/js/gmapsPicture.packed.js	(revision 7178)
+++ extensions/GMaps/js/gmapsPicture.packed.js	(revision 7308)
@@ -1,2 +1,2 @@
-/* file: gmapsPicture.js - v1.0.0 | packed on 2010/10/13 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}('C s={N:b,R:b};C v=[p,{w:r,h:r,x:15,y:Y},{w:r,h:r,x:15,y:Y},{w:r,h:r,x:10,y:Y},{w:1H,h:1V,x:4,y:1B},];q 1l(6){C G=k c.3.1C(2.18.1E,2.18.1I),z=k c.3.1K($("#"+6.l).16(0),{1X:6.1S,1R:6.1M,1L:G,P:(6.P==-1)?b:g,1P:(6.P==-1)?b:g,1k:(6.1k==\'n\')?b:g,1b:(6.1b==\'n\')?b:g,O:(6.O==-1)?b:g,1Q:{1s:6.O},17:\'\',}),1f=k c.3.1O({1N:G,z:z,B:6.17});1d=/^1W(\\d\\d)1T.*/i;j=1d.1U(6.F);9(j!=p)j=k 1Y(j[1]);9(j!=p){C F=k c.3.1A(\'1J/1D/1G/\'+6.F,k c.3.1F(v[j].w,v[j].h),k c.3.1r(0,0),k c.3.1r(v[j].x,v[j].y));1f.2l(F)}9(6.1i!=\'\'){f=k c.3.2i(6.1i,{2n:g})}2o{f=p}z.f=f;6.5=z;6.t=G}$(Q).2h(q(){2.7=-1;1a(i=0;i<2.3.K;i++){1l(2.3[i]);2.3[i].5.L(2.3[i].t);$(\'#\'+2.3[i].l+\' o, #\'+2.3[i].l+\' a\').e(\'W-V\',\'M.0%\');9(2.3[i].5.f!=p)2.3[i].5.f.1p(2.3[i].5);9(2.3[i].19==\'2p\'){2.7=i;9(2.3[i].2j==\'A\'){$(\'#T\').e({S:($(Q).S()*0.8)+\'1n\',U:($(Q).U()*0.8)+\'1n\'})}}}9($(\'#1c\').K>0){u=$(\'#1c\').16(0).14.14.l;u=\'2m\'+u.2k().2f(0,1)+u.25(1);$("#"+u+" a").26(\'1Z\',q(){9(s.R==b){1a(i=0;i<2.3.K;i++){9(2.3[i].19==\'24\'){c.3.I.1t(2.3[i].5,\'1x\');2.3[i].5.L(2.3[1].t);$(\'#\'+2.3[i].l+\' o, #\'+2.3[i].l+\' a\').e(\'W-V\',\'M.0%\')}}s.R=g}})}9($(\'#1v\').K>0){$(\'#1v\').11({23:b,S:\'1u\',U:\'1u\',20:g,21:\'X\',22:\'12\',B:2.3[2.7].B,27:q(){9(s.N==b&&2.7!=-1){c.3.I.1t(2.3[2.7].5,\'1x\');2.3[2.7].5.L(2.3[2.7].t);$(\'#T o, #T a\').e(\'W-V\',\'M.0%\');9(2.3[2.7].5.f!=p)2.3[2.7].5.f.1p(2.3[2.7].5);s.N=g}c.3.I.1y(2.3[2.7].5,\'28\',q(){$(\'#E\').e(\'m\',\'D\');$(\'#J\').e(\'m\',\'D\')});c.3.I.1y(2.3[2.7].5,\'2d\',q(){$(\'#E\').e(\'m\',\'D\');$(\'#J\').e(\'m\',\'D\')})}});$(\'H.12 H.1z-11-1w\').1q(\'<a 1o="#" l="E" 1s="m:Z;" 13="2.3[2.7].5.L(2.3[2.7].t); $(1m).e(\\\'m\\\', \\\'Z\\\').1j(); 1e(b);">\'+\'<o>&2e;</o></a>\');$(\'#E\').1g(\'B\',2.1h.2c);9(2.3[2.7].5.f!=p){$(\'H.12 H.1z-11-1w\').1q(\'<a 1o="#" l="J" 13="2.3[2.7].5.2b(2.3[2.7].5.f.29()); $(1m).e(\\\'m\\\', \\\'Z\\\').1j(); 1e(b);">\'+\'<o>&2a;</o></a>\');$(\'#J\').1g(\'B\',2.1h.2g)}}});',62,150,'||gmaps|maps||gMap|properties|currentMapLoadIndex||if||false|google||css|kmlFile|true|||iM|new|id|display||span|null|function|32|viewportInitialized|gMapCenter|tabId|markerImgProp||||map||title|var|inline|gmapsCenterMap|markerImg|latlng|div|event|gmapsBoundKml|length|setCenter|55|icon|mapTypeControl|navigationControl|window|meta|width|iGMapsIcon|height|size|font||31|none||dialog|gmapsPopup|onclick|parentNode||get|markerTitle|coords|displayType|for|streetViewControl|iGMapContent|re|return|marker|attr|lang|kmlFileUrl|blur|scaleControl|applyMap|this|px|href|setMap|append|Point|style|trigger|auto|iGMapsIconContent|titlebar|resize|addListener|ui|MarkerImage|39|LatLng|GMaps|latitude|Size|img|30|longitude|plugins|Map|center|zoomLevel|position|Marker|scrollwheel|mapTypeControlOptions|zoom|mapType|_|exec|40|mS|mapTypeId|Number|click|modal|closeText|dialogClass|autoOpen|MP|substr|bind|open|dragend|getDefaultViewport|sim|fitBounds|centermap|zoom_changed|bull|substring|boundkml|load|KmlLayer|sizeMode|toUpperCase|setIcon|tab|preserveViewport|else|IP'.split('|'),0,{}))
+/* file: gmapsPicture.js - v1.1.0 | packed on 2010/10/20 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}('B r={M:9,Q:9};B u=[o,{w:q,h:q,x:15,y:W},{w:q,h:q,x:15,y:W},{w:q,h:q,x:10,y:W},{w:1Y,h:1X,x:4,y:1D},];p 1k(6){B F=j b.3.1J(2.19.1G,2.19.1H),v=j b.3.1T($("#"+6.k).13(0),{1K:6.1S,1R:6.1M,1L:F,O:(6.O==-1)?9:f,1Q:(6.O==-1)?9:f,1r:(6.1r==\'n\')?9:f,18:(6.18==\'n\')?9:f,N:(6.N==-1)?9:f,1P:{1s:6.N},1b:\'\',}),1d=j b.3.1O({1N:F,v:v,z:6.1b});1c=/^1W(\\d\\d)1V.*/i;g=1c.1U(6.E);8(g!=o)g=j 1C(g[1]);8(g!=o){B E=j b.3.1B(\'1I/1E/1F/\'+6.E,j b.3.1A(u[g].w,u[g].h),j b.3.1g(0,0),j b.3.1g(u[g].x,u[g].y));1d.2m(E)}8(6.1i!=\'\'){e=j b.3.2k(6.1i,{2l:f})}2j{e=o}v.e=e;6.5=v;6.s=F}$(P).2g(p(){2.7=-1;17(i=0;i<2.3.J;i++){1k(2.3[i]);2.3[i].5.K(2.3[i].s);$(\'#\'+2.3[i].k+\' m, #\'+2.3[i].k+\' a\').c(\'V-U\',\'L.0%\');8(2.3[i].5.e!=o)2.3[i].5.e.1u(2.3[i].5);8(2.3[i].1j==\'2h\'){2.7=i;8(2.3[i].2n==\'A\'){$(\'#S\').c({R:($(P).R()*2.1n)+\'1a\',T:($(P).T()*2.1n)+\'1a\'})}}}8($(\'#12\').J>0){t=$(\'#12\').13(0).14.14.k;t=\'2o\'+t.2p().2i(0,1)+t.2e(1);$("#"+t+" a").24(\'1Z\',p(){8(r.Q==9){17(i=0;i<2.3.J;i++){8(2.3[i].1j==\'2f\'){b.3.H.1q(2.3[i].5,\'1z\');2.3[i].5.K(2.3[1].s);$(\'#\'+2.3[i].k+\' m, #\'+2.3[i].k+\' a\').c(\'V-U\',\'L.0%\')}}r.Q=f}})}8($(\'#1x\').J>0){$(\'#1x\').11({23:9,R:\'1p\',T:\'1p\',22:f,20:\'X\',21:\'Z\',z:2.3[2.7].z,26:p(){8(r.M==9&&2.7!=-1){b.3.H.1q(2.3[2.7].5,\'1z\');2.3[2.7].5.K(2.3[2.7].s);$(\'#S m, #S a\').c(\'V-U\',\'L.0%\');8(2.3[2.7].5.e!=o)2.3[2.7].5.e.1u(2.3[2.7].5);r.M=f}b.3.H.1y(2.3[2.7].5,\'27\',p(){$(\'#D\').c(\'l\',\'C\');$(\'#I\').c(\'l\',\'C\')});b.3.H.1y(2.3[2.7].5,\'2c\',p(){$(\'#D\').c(\'l\',\'C\');$(\'#I\').c(\'l\',\'C\')})}});$(\'G.Z G.1t-11-1v\').1w(\'<a 1o="#" k="D" 1s="l:Y;" 16="2.3[2.7].5.K(2.3[2.7].s); $(1l).c(\\\'l\\\', \\\'Y\\\').1m(); 1h(9);">\'+\'<m>&2d;</m></a>\');$(\'#D\').1e(\'z\',2.1f.2b);8(2.3[2.7].5.e!=o){$(\'G.Z G.1t-11-1v\').1w(\'<a 1o="#" k="I" 16="2.3[2.7].5.2a(2.3[2.7].5.e.28()); $(1l).c(\\\'l\\\', \\\'Y\\\').1m(); 1h(9);">\'+\'<m>&29;</m></a>\');$(\'#I\').1e(\'z\',2.1f.25)}}});',62,150,'||gmaps|maps||gMap|properties|currentMapLoadIndex|if|false||google|css||kmlFile|true|iM|||new|id|display|span||null|function|32|viewportInitialized|gMapCenter|tabId|markerImgProp|map||||title||var|inline|gmapsCenterMap|markerImg|latlng|div|event|gmapsBoundKml|length|setCenter|55|icon|mapTypeControl|navigationControl|window|meta|width|iGMapsIcon|height|size|font|31||none|gmapsPopup||dialog|iGMapContent|get|parentNode||onclick|for|streetViewControl|coords|px|markerTitle|re|marker|attr|lang|Point|return|kmlFileUrl|displayType|applyMap|this|blur|popupAutomaticSize|href|auto|trigger|scaleControl|style|ui|setMap|titlebar|append|iGMapsIconContent|addListener|resize|Size|MarkerImage|Number|39|GMaps|img|latitude|longitude|plugins|LatLng|mapTypeId|center|zoomLevel|position|Marker|mapTypeControlOptions|scrollwheel|zoom|mapType|Map|exec|_|mS|40|30|click|closeText|dialogClass|modal|autoOpen|bind|boundkml|open|dragend|getDefaultViewport|sim|fitBounds|centermap|zoom_changed|bull|substr|MP|load|IP|substring|else|KmlLayer|preserveViewport|setIcon|sizeMode|tab|toUpperCase'.split('|'),0,{}))
Index: extensions/GMaps/main.inc.php
===================================================================
--- extensions/GMaps/main.inc.php	(revision 7178)
+++ extensions/GMaps/main.inc.php	(revision 7308)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: GMaps
-Version: 0.2.0
+Version: 1.1.0
 Description: Display and manage (google) maps
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=454
@@ -25,13 +25,27 @@
 |         |            |   . release not published
 |         |            |
-| 0.2.0   | 2010-09-30 | * first official release
+| 1.0.0   | 2010-09-30 | * first official release
 |         |            |
+| 1.1.0   | 2010-10-20 | * mantis bug:1926
+|         |            |   . key not translated
 |         |            |
+|         |            | * mantis bug:1927
+|         |            |   . Autozoom on categories maps : needs a min/max level
 |         |            |
+|         |            | * mantis bug:1929
+|         |            |   . allowing to set the size for automatic size
 |         |            |
+|         |            | * mantis bug:1930
+|         |            |   . Improve loading time for markers
 |         |            |
+|         |            | * mantis bug:1931
+|         |            |   . when an association is modified, it's possible to
+|         |            |     set a category already associated
 |         |            |
+|         |            | * mantis bug:1939
+|         |            |   . compatibility with ExtendedDescription
 |         |            |
-|         |            |
+|         |            | * mantis bug:1946
+|         |            |   . Save KML files in local directory
 |         |            |
 |         |            |
Index: extensions/GMaps/templates/gmaps_category.tpl
===================================================================
--- extensions/GMaps/templates/gmaps_category.tpl	(revision 7178)
+++ extensions/GMaps/templates/gmaps_category.tpl	(revision 7308)
@@ -8,5 +8,4 @@
   <div id='iGMapsIconContent' style='display:none;'>
       <div id='iGMapsIcon' style='width:{$map.width}px;height:{$map.height}px;{$map.style}'></div>
-      <div id='iDialogGMapWaiting' style="display:none;"></div>
   </div>
 {/foreach}
Index: extensions/GMaps/templates/gmaps_dialog_area_choose.tpl
===================================================================
--- extensions/GMaps/templates/gmaps_dialog_area_choose.tpl	(revision 7178)
+++ extensions/GMaps/templates/gmaps_dialog_area_choose.tpl	(revision 7308)
@@ -15,17 +15,17 @@
 {
   var bounds = {
-    north:0,
-    south:0,
-    east:0,
-    west:0
-  }
-  var requestId = '';
-
-  var dialogGMapsOptions = {
-      id:'',
-      eventOk:null,
-      cBuilder:null,
-      gMap:null,
-    };
+        north:0,
+        south:0,
+        east:0,
+        west:0
+      },
+      requestId = '',
+      callId=0,
+      dialogGMapsOptions = {
+        id:'',
+        eventOk:null,
+        cBuilder:null,
+        gMap:null,
+      };
 
 
@@ -194,8 +194,11 @@
    * load markers from the server
    */
-  function loadMarkers()
-  {
+  var loadMarkers = function ()
+  {
+    callId++;
+
     datas={
       requestId:requestId,
+      callId:callId,
       bounds:{
           north:bounds.north,
@@ -211,13 +214,4 @@
 
     $('#iDialogGMapNfo').html('<img src="./plugins/GrumPluginClasses/icons/processing.gif"><span>{/literal}{"gmaps_loading"|@translate}{literal}</span>');
-    $('#iDialogGMapWaiting').css(
-      {
-        width:$('#iDialogGMapsMap').width()+'px',
-        height:$('#iDialogGMapsMap').height()+'px',
-        top:(1+$('#iDialogGMapsMap').position().top)+'px',
-        left:(1+$('#iDialogGMapsMap').position().left)+'px',
-        display:'block'
-      }
-    );
 
     $.ajax(
@@ -231,8 +225,10 @@
           {
             tmp=$.parseJSON(msg);
-            tmp.markers.sort(compareMarkers);
-            applyMarkers(tmp.markers);
-            $('#iDialogGMapNfo').html(tmp.datas.nbPhotos);
-            $('#iDialogGMapWaiting').css('display', 'none');
+            if(tmp.callId==callId)
+            {
+              tmp.markers.sort(compareMarkers);
+              applyMarkers(tmp.markers);
+              $('#iDialogGMapNfo').html(tmp.datas.nbPhotos);
+            }
           }
       }
@@ -257,5 +253,5 @@
       while(i<dialogGMapsOptions.gMap.markers.length)
       {
-        newListIndex=markerInList(dialogGMapsOptions.gMap.markers[i].uniqueId, markers);
+        newListIndex=markerInList(dialogGMapsOptions.gMap.markers[i].uId, markers);
         if(newListIndex==-1)
         {
@@ -290,5 +286,5 @@
         {
           marker:marker,
-          uniqueId:markers[i].uniqueId
+          uId:markers[i].uId
         }
       );
@@ -298,9 +294,9 @@
   function compareMarkers(m1,m2)
   {
-    if(m1.uniqueId<m2.uniqueId)
+    if(m1.uId<m2.uId)
     {
       return(-1);
     }
-    else if(m1.uniqueId<m2.uniqueId)
+    else if(m1.uId<m2.uId)
     {
       return(1);
@@ -309,9 +305,9 @@
   }
 
-  function markerInList(uniqueId, markerList)
+  function markerInList(uId, markerList)
   {
     for(var i=0;i<markerList.length;i++)
     {
-      if(markerList[i].uniqueId==uniqueId) return(i)
+      if(markerList[i].uId==uId) return(i)
     }
     return(-1);
@@ -473,5 +469,4 @@
   <div id='iDialogGMapNfo'>&nbsp;</div>
   <div id='iDialogGMapsMap' style='width:95%; height:95%;margin-left:auto;margin-right:auto;border:1px solid;'></div>
-  <div id='iDialogGMapWaiting' style="display:none;"></div>
 </div>
 
Index: extensions/GMaps/templates/gmaps_picture_icon.tpl
===================================================================
--- extensions/GMaps/templates/gmaps_picture_icon.tpl	(revision 7178)
+++ extensions/GMaps/templates/gmaps_picture_icon.tpl	(revision 7308)
@@ -7,4 +7,3 @@
 <div id='iGMapsIconContent' style='display:none;'>
     <div id='iGMapsIcon' style='width:{$map.width}px;height:{$map.height}px;{$map.style}'></div>
-    <div id='iDialogGMapWaiting' style="display:none;"></div>
 </div>
