Index: extensions/GMaps/admin/gmaps_category_maps.tpl
===================================================================
--- extensions/GMaps/admin/gmaps_category_maps.tpl	(revision 7457)
+++ extensions/GMaps/admin/gmaps_category_maps.tpl	(revision 7479)
@@ -29,5 +29,5 @@
             autoOpen:false,
             width:800,
-            height:480,
+            height:510,
             modal: true,
             dialogClass: 'gcBgTabSheet gcBorder',
@@ -114,4 +114,5 @@
           $('#iBDAssocKmlFileUrl').css('display', 'none');
           $('#iBDKmlWarning').css('display', 'none');
+          $('#iBDAssocForceDisplayDiv').css('display', 'none');
           break;
         case 'S':
@@ -119,4 +120,5 @@
           $('#iBDAssocKmlFileUrl').css('display', 'none');
           $('#iBDKmlWarning').css('display', 'block');
+          $('#iBDAssocForceDisplayDiv').css('display', 'block');
           break;
         case 'U':
@@ -124,4 +126,5 @@
           $('#iBDAssocKmlFileUrl').css('display', 'block');
           $('#iBDKmlWarning').css('display', 'block');
+          $('#iBDAssocForceDisplayDiv').css('display', 'block');
           break;
       }
@@ -275,4 +278,5 @@
         $('#iBDAssocIcon, #iBDAssocMarker').iconSelector('value', ':first');
         $('#iBDAssocTitle').val('');
+        $('#iBDAssocForceDisplay').attr('checked', false);
       }
       else
@@ -300,4 +304,5 @@
         $('#iBDAssocMarker').iconSelector('value', 'plugins/GMaps/img/'+tmp.marker);
         $('#iBDAssocTitle').val(tmp.title);
+        $('#iBDAssocForceDisplay').attr('checked', tmp.forceDisplay=='y');
       }
 
@@ -365,4 +370,5 @@
         marker:$('#iBDAssocMarker').iconSelector('value'),
         title:$('#iBDAssocTitle').val(),
+        forceDisplay:$('#iBDAssocForceDisplay').attr('checked')?'y':'n',
       }
 
@@ -539,4 +545,6 @@
               <p id='iBDKmlWarning' class='helps' style="width:520px;padding-right:20px;">{'gmaps_kml_file_access'|@translate}</p>
 
+              <div id='iBDAssocForceDisplayDiv' style='display:none;'><label><input type="checkbox" id='iBDAssocForceDisplay'>&nbsp;{'gmaps_force_display'|@translate}</label></div>
+
             </td>
           </tr>
Index: extensions/GMaps/gmaps_ajax.php
===================================================================
--- extensions/GMaps/gmaps_ajax.php	(revision 7457)
+++ extensions/GMaps/gmaps_ajax.php	(revision 7479)
@@ -228,4 +228,8 @@
               if(!($_REQUEST['datas']['applySubCat']=='y' or
                    $_REQUEST['datas']['applySubCat']=='n')) $_REQUEST['datas']['applySubCat']='y';
+
+              if(!isset($_REQUEST['datas']['forceDisplay'])) $_REQUEST['datas']['forceDisplay']='n';
+              if(!($_REQUEST['datas']['forceDisplay']=='y' or
+                   $_REQUEST['datas']['forceDisplay']=='n')) $_REQUEST['datas']['forceDisplay']='n';
             }
           }
@@ -565,5 +569,5 @@
                    pgmm.name AS mapName, pgmm.displayType,
                    pgcm.kmlFileId, pgcm.kmlFileUrl, pgcm.imgSort, pgcm.applySubCat, pgcm.icon,
-                   pgcm.title, pgkf.name AS kmlName
+                   pgcm.title, pgkf.name AS kmlName, pgcm.forceDisplay
             FROM ((".$this->tables['category_maps']." pgcm
                   LEFT JOIN ".CATEGORIES_TABLE." pct ON pct.id=pgcm.categoryId)
@@ -604,5 +608,6 @@
             'icon' => $row['icon'],
             'displayType' => l10n('gmaps_displayTypeShort'.$row['displayType']),
-            'title' => $row['title']
+            'title' => $row['title'],
+            'forceDisplay' => l10n('gmaps_'.$row['forceDisplay']),
           );
 
@@ -685,5 +690,6 @@
                 basename($properties['icon'])."', '".
                 basename($properties['marker'])."', '".
-                mysql_escape_string($properties['title'])."');";
+                mysql_escape_string($properties['title'])."', '".
+                $properties['forceDisplay']."');";
         $result=pwg_query($sql);
         $id=pwg_db_insert_id();
@@ -700,5 +706,6 @@
                 basename($properties['icon'])."', marker='".
                 basename($properties['marker'])."', title='".
-                mysql_escape_string($properties['title'])."'
+                mysql_escape_string($properties['title'])."', forceDisplay='".
+                $properties['forceDisplay']."'
               WHERE id='$id';";
         $result=pwg_query($sql);
@@ -728,9 +735,10 @@
         'icon' => '',
         'marker' => '',
-        'title' => ''
+        'title' => '',
+        'forceDisplay' => 'n'
       );
 
       $sql="SELECT id, categoryId, mapId, applySubCat, kmlFileId, kmlFileUrl,
-                   icon, marker, title
+                   icon, marker, title, forceDisplay
             FROM ".$this->tables['category_maps']."
             WHERE id='$id';";
@@ -1275,5 +1283,5 @@
             $coords['lng']+=$point['longitude'];
 
-            $coords['imgTn'][]=$point['imageTnFile'];
+            $coords['imgTn'][]=$this->replaceImgRoot($point['imageTnFile']);
             $coords['imgCatsNames'][]=$tmpCatsNames;
             $coords['imgName'][]=GPCCore::getUserLanguageDesc($point['imageName']);
@@ -1347,11 +1355,12 @@
     private function replaceImgRoot($value)
     {
+      return($value);
       if(preg_match('/^\.\/galleries\//i', $value)>0)
       {
         return("G".substr($value,12));
       }
-      elseif("U".preg_match('/^\.\/upload\//i', $value)>0)
-      {
-        return(substr($value,9));
+      elseif(preg_match('/^\.\/upload\//i', $value)>0)
+      {
+        return("U".substr($value,9));
       }
       return($value);
Index: extensions/GMaps/gmaps_install.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_install.class.inc.php	(revision 7457)
+++ extensions/GMaps/gmaps_install.class.inc.php	(revision 7479)
@@ -82,4 +82,5 @@
   `marker` varchar(255) NOT NULL,
   `title` varchar(200) NOT NULL,
+  `forceDisplay` char(1) NOT NULL default 'n',
   PRIMARY KEY  (`id`),
   KEY `byCategorie` (`categoryId`,`mapId`)
@@ -139,6 +140,9 @@
       switch($this->config['installed'])
       {
-        case '01.00.00';
+        case '01.00.00':
           $this->updateFrom_010000();
+        case '01.00.01':
+        case '01.00.02':
+          $this->updateFrom_010002();
         default:
           // nothing to do...
@@ -196,4 +200,25 @@
     }
 
+    /**
+     * update from release 1.0.2
+     *
+     */
+    private function updateFrom_010002()
+    {
+
+      $tablesUpdate=array(
+        $this->tables['category_maps'] => array(
+          'forceDisplay' => " ADD COLUMN `forceDisplay` CHAR(1)  NOT NULL DEFAULT 'n' AFTER `title` ",
+        )
+      );
+
+      $tablef=new GPCTables(array($this->tables['category_maps']));
+      $tablef->updateTablesFields($tablesUpdate);
+
+      unset($tablesUpdate);
+    }
+
+
+
   } //class
 
Index: extensions/GMaps/gmaps_pip.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_pip.class.inc.php	(revision 7457)
+++ extensions/GMaps/gmaps_pip.class.inc.php	(revision 7479)
@@ -18,5 +18,4 @@
 class GMaps_PIP extends GMaps_root
 {
-  protected $maps = array(); //list of maps
   protected $category=array(
     'id' => 0,
@@ -36,4 +35,5 @@
   protected $picture=array(
     'geolocated' => false,
+    'forceDisplay' => false,
     'coords' => array('lat' => 0, 'lng' => 0),
     'content' => array(
@@ -155,5 +155,5 @@
           }
 
-          if($nb>0)
+          if($nb>0 or $this->forceDisplay>0)
           {
             /*
@@ -163,30 +163,34 @@
             foreach($this->maps as $keyMap => $map)
             {
-              $scripts[]="
+              if($nb>0 or
+                 $map['forceDisplay']=='y' and ($map['kmlFileUrl']!='' or $map['kmlFileId']!=0)
+                )
               {
-                id:'iGMapsIcon',
-                zoomLevel:".$map['zoomLevel'].",
-                markerImg:'".$map['marker']."',
-                mapType:'".$map['mapType']."',
-                mapTypeControl:'".$map['mapTypeControl']."',
-                navigationControl:'".$map['navigationControl']."',
-                scaleControl:'".$map['scaleControl']."',
-                streetViewControl:'".$map['streetViewControl']."',
-                kmlFileUrl:'".$map['kmlFileUrl']."',
-                displayType:'".$map['displayType']."',
-                sizeMode:'".$map['sizeMode']."',
-                title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title']  )."',
-                markers:[],
-                fitToBounds:true,
-                zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false')."
-              }";
-
-              preg_match('/^i(\d+)x(\d+).*/i', basename($map['icon']), $result);
-              $this->category['icon']['iconStyle']=$map['iconStyle'];
-              $this->category['icon']['file']=$map['icon'];
-              $this->category['icon']['width']=isset($result[1])?$result[1]:-1;
-              $this->category['icon']['height']=isset($result[2])?$result[2]:-1;
+                $scripts[]="
+                {
+                  id:'iGMapsIcon',
+                  zoomLevel:".$map['zoomLevel'].",
+                  markerImg:'".$map['marker']."',
+                  mapType:'".$map['mapType']."',
+                  mapTypeControl:'".$map['mapTypeControl']."',
+                  navigationControl:'".$map['navigationControl']."',
+                  scaleControl:'".$map['scaleControl']."',
+                  streetViewControl:'".$map['streetViewControl']."',
+                  kmlFileUrl:'".$map['kmlFileUrl']."',
+                  displayType:'".$map['displayType']."',
+                  sizeMode:'".$map['sizeMode']."',
+                  title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title']  )."',
+                  markers:[],
+                  fitToBounds:true,
+                  zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false')."
+                }";
+
+                preg_match('/^i(\d+)x(\d+).*/i', basename($map['icon']), $result);
+                $this->category['icon']['iconStyle']=$map['iconStyle'];
+                $this->category['icon']['file']=$map['icon'];
+                $this->category['icon']['width']=isset($result[1])?$result[1]:-1;
+                $this->category['icon']['height']=isset($result[2])?$result[2]:-1;
+              }
             }
-
 
             $template->assign('maps', $this->maps);
@@ -209,4 +213,6 @@
   gmaps =
     {
+      geolocated:".($nb>0?'true':'false').",
+      forceDisplay:".($nb==0?'true':'false').",
       lang:{
         boundmap:'".l10n('gmaps_i_boundmap')."',
@@ -249,5 +255,5 @@
     global $page, $template;
 
-    if($this->picture['geolocated']==false) return(false);
+    if($this->picture['geolocated']==false and $this->picture['forceDisplay']==false) return(false);
 
     if(isset($this->picture['content']['MP']) and count($this->picture['content']['MP'])>0)
@@ -258,7 +264,13 @@
       $template->assign('maps', $this->picture['content']['MP']);
 
+      $metaTitle='';
+      foreach($this->picture['content']['MP'] as $map)
+      {
+        if($metaTitle=='') $metaTitle=$map['title'];
+      }
+
       $metadata=array
         (
-          'TITLE' => l10n('gmaps_geolocation'),
+          'TITLE' => ($metaTitle=='')?l10n('gmaps_geolocation'):$metaTitle,
           'lines' =>
             array(
@@ -296,4 +308,6 @@
   gmaps =
     {
+      geolocated:".($this->picture['geolocated']?'true':'false').",
+      forceDisplay:".($this->picture['forceDisplay']?'true':'false').",
       lang:{
         centermap:'".l10n('gmaps_i_centermap')."',
@@ -328,12 +342,9 @@
     global $template, $page;
 
+    $isGeolocated=true;
+
     if(is_null($jpegMD->getTag('magic.GPS.LatitudeNum')) or
        is_null($jpegMD->getTag('magic.GPS.LongitudeNum')) or
-       $page['section']!='categories') return(false);
-
-
-    $this->picture['geolocated']=true;
-    $this->picture['coords']['lat']=$jpegMD->getTag('magic.GPS.LatitudeNum')->getValue();
-    $this->picture['coords']['lng']=$jpegMD->getTag('magic.GPS.LongitudeNum')->getValue();
+       $page['section']!='categories') $isGeolocated=false;
 
 
@@ -347,42 +358,58 @@
     }
 
+    if($this->forceDisplay==0 and !$isGeolocated) return(false);
+
+    $this->picture['geolocated']=$isGeolocated;
+    $this->picture['forceDisplay']=!$isGeolocated;
+    if($isGeolocated)
+    {
+      $this->picture['coords']['lat']=$jpegMD->getTag('magic.GPS.LatitudeNum')->getValue();
+      $this->picture['coords']['lng']=$jpegMD->getTag('magic.GPS.LongitudeNum')->getValue();
+    }
+
 
     foreach($this->maps as $map)
     {
-      if($map['displayType']=='IP')
-      {
-        preg_match('/^i(\d+)x(\d+).*/i', basename($map['icon']), $result);
-        $this->picture['icon']=array(
-          'iconStyle' => $map['iconStyle'],
-          'file' => $map['icon'],
-          'width' => isset($result[1])?$result[1]:-1,
-          'height' => isset($result[2])?$result[2]:-1
+      if($isGeolocated or
+         $map['forceDisplay']=='y' and ($map['kmlFileUrl']!='' or $map['kmlFileId']!=0)
+        )
+      {
+        if($map['displayType']=='IP')
+        {
+          preg_match('/^i(\d+)x(\d+).*/i', basename($map['icon']), $result);
+          $this->picture['icon']=array(
+            'iconStyle' => $map['iconStyle'],
+            'file' => $map['icon'],
+            'width' => isset($result[1])?$result[1]:-1,
+            'height' => isset($result[2])?$result[2]:-1
+          );
+        }
+
+
+        $this->picture['content'][$map['displayType']][]=array(
+          'id' => $map['id'],
+          'width' => $map['width'],
+          'height' => $map['height'],
+          'style' => $map['style'],
+          'displayType' => $map['displayType'],
+          'title' => $map['title'],
         );
+
+        $this->picture['properties'][]="
+        {
+          id:'iGMaps".(($map['displayType']=='IP')?'Icon':$map['id'])."',
+          zoomLevel:".$map['zoomLevel'].",
+          markerImg:'".$map['marker']."',
+          mapType:'".$map['mapType']."',
+          mapTypeControl:'".$map['mapTypeControl']."',
+          navigationControl:'".$map['navigationControl']."',
+          scaleControl:'".$map['scaleControl']."',
+          streetViewControl:'".$map['streetViewControl']."',
+          kmlFileUrl:'".$map['kmlFileUrl']."',
+          displayType:'".$map['displayType']."',
+          sizeMode:'".$map['sizeMode']."',
+          title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title']  )."'
+        }";
       }
-
-
-      $this->picture['content'][$map['displayType']][]=array(
-        'id' => $map['id'],
-        'width' => $map['width'],
-        'height' => $map['height'],
-        'style' => $map['style'],
-        'displayType' => $map['displayType']
-      );
-
-      $this->picture['properties'][]="
-      {
-        id:'iGMaps".(($map['displayType']=='IP')?'Icon':$map['id'])."',
-        zoomLevel:".$map['zoomLevel'].",
-        markerImg:'".$map['marker']."',
-        mapType:'".$map['mapType']."',
-        mapTypeControl:'".$map['mapTypeControl']."',
-        navigationControl:'".$map['navigationControl']."',
-        scaleControl:'".$map['scaleControl']."',
-        streetViewControl:'".$map['streetViewControl']."',
-        kmlFileUrl:'".$map['kmlFileUrl']."',
-        displayType:'".$map['displayType']."',
-        sizeMode:'".$map['sizeMode']."',
-        title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title']  )."'
-      }";
     }
   }
Index: extensions/GMaps/gmaps_root.class.inc.php
===================================================================
--- extensions/GMaps/gmaps_root.class.inc.php	(revision 7457)
+++ extensions/GMaps/gmaps_root.class.inc.php	(revision 7479)
@@ -21,4 +21,5 @@
     protected $css;
     protected $maps=array();
+    protected $forceDisplay=0;
 
     /**
@@ -196,4 +197,5 @@
 
       $this->maps=array();
+      $this->forceDisplay=0;
 
       if($page=='C')
@@ -217,5 +219,6 @@
               pgmm.mapType, pgmm.mapTypeControl, pgmm.scaleControl, pgmm.streetViewControl,
               pgmm.navigationControl, pgmm.style, pgmm.zoomLevelMaxActivated,
-              IF(pgcm.categoryId=0, 0, pct.global_rank) AS priorityRank
+              IF(pgcm.categoryId=0, 0, pct.global_rank) AS priorityRank,
+              pgcm.forceDisplay
             FROM ((".$this->tables['category_maps']." pgcm
                   LEFT JOIN ".$this->tables['maps']." pgmm ON pgcm.mapId = pgmm.id)
@@ -278,4 +281,5 @@
               $this->maps[]=$row;
               $displayType[$row['displayType']]=false;
+              if($row['forceDisplay']=='y' and ($row['kmlFileUrl']!='' or $row['kmlFileId']!=0)) $this->forceDisplay++;
             }
           }
Index: extensions/GMaps/gmaps_version.inc.php
===================================================================
--- extensions/GMaps/gmaps_version.inc.php	(revision 7457)
+++ extensions/GMaps/gmaps_version.inc.php	(revision 7479)
@@ -15,6 +15,6 @@
   if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-  define('GMAPS_VERSION',  '1.1.1');
-  define('GMAPS_VERSION2', '01.01.01');
+  define('GMAPS_VERSION',  '1.2.0');
+  define('GMAPS_VERSION2', '01.02.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 7457)
+++ extensions/GMaps/js/gmapsCategory.js	(revision 7479)
@@ -51,4 +51,5 @@
       }
     );
+    kmlFile.setMap(map);
   }
   else
@@ -203,8 +204,8 @@
       {
         case 'G':
-          marker.info.imgTn[index]='./galleries/'.marker.info.imgTn[index].substr(1);
+          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);
+          marker.info.imgTn[index]='./upload/'+marker.info.imgTn[index].substr(1);
           break;
       }
@@ -362,19 +363,23 @@
     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);
+
+    if(gmaps.geolocated)
+    {
+      if(gmaps.maps[gmaps.currentMapLoadIndex].fitToBounds)
+      {
+        fitToBounds(gmaps.bounds);
+      }
+      else
+      {
+        gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.bounds.getCenter());
+      }
+    }
+    else
+    {
+      fitToBounds(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.getDefaultViewport());
+    }
 
     google.maps.event.addListener(
@@ -406,4 +411,5 @@
   if(gmaps.currentMapLoadIndex>-1) loadMarkers(gmaps.maps[gmaps.currentMapLoadIndex].gMap);
 }
+
 
 $(window).load(function ()
@@ -448,5 +454,5 @@
       /*
        * initialize map on the server side (call the 'public.maps.init'
-       * function
+       * function)
        */
       $.ajax(
@@ -484,8 +490,11 @@
       ).data('index', i);
 
-      $('div.gmapsPopup div.ui-dialog-titlebar')
-      .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);
+      if(gmaps.geolocated)
+      {
+        $('div.gmapsPopup div.ui-dialog-titlebar')
+        .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);
+      }
 
       if(gmaps.maps[i].gMap.kmlFile!=null)
Index: extensions/GMaps/js/gmapsCategory.packed.js
===================================================================
--- extensions/GMaps/js/gmapsCategory.packed.js	(revision 7457)
+++ extensions/GMaps/js/gmapsCategory.packed.js	(revision 7479)
@@ -1,2 +1,2 @@
 /* file: gmapsCategory.js - v1.1.1 | packed on 2010/10/28 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 P,16=[t,{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(k,1A){B 6=p j.3.3j($("#"+k.q).1T(0),{3k:\'#3l\',3i:k.3h,3d:k.1z,3e:2.s.2M(),1u:(k.1u==-1)?u:z,3f:(k.1u==-1)?u:z,2d:(k.2d==\'n\')?u:z,2e:(k.2e==\'n\')?u:z,1w:(k.1w==-1)?u:z,3m:{1L:k.1w},3u:\'\',});8(k.2f!=\'\'){E=p j.3.3v(k.2f,{3t:z})}H{E=t}2c=/^3s(\\d\\d)3o.*/i;D=2c.3q(k.W);8(D!=t)D=p 3r(D[1]);8(D!=t){6.W=p j.3.3c(\'1i/1H/2h/\'+k.W,p j.3.3b(16[D].w,16[D].h),p j.3.2b(0,0),p j.3.2b(16[D].x,16[D].y))}H{6.W=t}6.E=E;6.g=p 2V();6.1A=1A;k.o=6;k.1E=u}9 1e(6){2.11++;1j={1O:2.1O,11:2.11,s:{2t:6.1g().28().1p(),2u:6.1g().28().1r(),2v:6.1g().29().1p(),2r:6.1g().29().1r()},Z:$(6.2a()).Z(),Y:$(6.2a()).Y(),2X:20,};P=6;$(\'#1J\').l(\'m\',\'R-1C\');$(\'#1N\').N(\'\');$.2G({2I:"2B",2A:"1i/1H/2L.2s",2w:z,1h:{2z:"2y.3.37",1j:1j},2l:9(1d){12=$.38(1d);8(2.11==12.11){12.g.36(2j);2n(P,12.g);$(\'#1J\').l(\'m\',\'L\');$(\'#1N\').N(\'[\'+12.1j.2Z+\']\')}}})}9 2n(6,g){8(P==t)I(u);8(6.g.F>0){B i=0;34(i<6.g.F){1q=2p(6.g[i].J,g);8(1q==-1){6.g[i].f.2K(t);6.g.2o(i,1)}H{g.2o(1q,1);i++}}}14(B i=0;i<g.F;i++){B f=p j.3.3Y({48:p j.3.1x(g[i].1p,g[i].1r),6:P,S:g[i].1y});8(6.W!=t)f.46(6.W);f.C=g[i];f.C.r=0;6.g.43({f:f,J:g[i].J});j.3.13.19(f,\'1V\',9(){1S(V)});14(B b=0;b<f.C.K.F;b++){3W(f.C.K[b].3X(0)){2m\'G\':f.C.K[b]=\'./3Z/\'.f.C.K[b].27(1);2i;2m\'U\':f.C.K[b]=\'./3V/\'.f.C.K[b].27(1);2i}}}P=t}9 2j(1v,1s){8(1v.J<1s.J){I(-1)}H 8(1v.J<1s.J){I(1)}I(0)}9 2p(2q,1o){14(B i=0;i<1o.F;i++){8(1o[i].J==2q)I(i)}I(-1)}9 1S(f){2.5=f.C;2.M.2x();2.M.2J($(\'#2H\').3A().1R(1B).1T(0));2.M.1l(f.6,f);1a(2.5.r)}9 1B(i,e){8(e.q!=\'\')e.q=\'c\'+e.q;$(e).3I().1R(1B)}9 1a(b){2.5.r=b;8(2.5.26[b]==\'\'){$(\'#1U\').N(\'&3Q;\')}H{$(\'#1U\').N(2.5.26[b])}$(\'#17\').1K(\'2g\',2.5.K[b]);$(\'#17\').2F();8(2.5.1f[b].F==1){$(\'#17\').1D(\'1V\',9(){1b.3L=2.5.1f[2.5.r][0]})}H{$(\'#24\').N(\'\');14(B i=0;i<2.5.1f[b].F;i++){$(\'#24\').T(\'<25><a 1M="\'+2.5.1f[b][i]+\'">\'+2.5.3N[b][i]+\'</a></25>\')}$(\'#17, #1t\').1D(\'3z\',9(){$(\'#1t\').l(\'m\',\'1C\')}).1D(\'3G\',9(){$(\'#1t\').l(\'m\',\'L\')})}8(2.5.1F>1){$(\'#22\').N((b+1)+\'/\'+2.5.1y);$(\'#1W, #1X\').l(\'m\',\'R-1C\')}H{$(\'#22\').N(2.5.1y);$(\'#1W, #1X\').l(\'m\',\'L\')}}9 2W(){2.5.r--;8(2.5.r<0)2.5.r=2.5.1F-1;1a(2.5.r)}9 2Q(){2.5.r++;8(2.5.r>=2.5.1F)2.5.r=0;1a(2.5.r)}9 18(s){2.3[2.7].o.3p(s);8(2.3[2.7].3w&&2.3[2.7].o.3g()>2.3[2.7].1z){2.3[2.7].o.3U(2.3[2.7].1z)}}9 1P(1G){8(2.7>-1&&($(\'#\'+2.3[2.7].q+\'1Y\').O(\'2S\')&&1G==\'1Z\'||1G==\'1l\')&&(2.3[2.7].1E==u)){j.3.13.2N(2.3[2.7].o,\'33\');8(2.3[2.7].18){18(2.s)}H{2.3[2.7].o.44(2.s.2M())}$(\'#\'+2.3[2.7].q+\' v, #\'+2.3[2.7].q+\' a\').l(\'3J-3M\',\'3K.0%\');8(2.3[2.7].o.E!=t)2.3[2.7].o.E.2K(2.3[2.7].o);j.3.13.19(2.3[2.7].o,\'3O\',9(){1e(V);$(\'#1m\').l(\'m\',\'R\');$(\'#1k\').l(\'m\',\'R\')});j.3.13.19(2.3[2.7].o,\'3R\',9(){1e(V);2.M.2x();$(\'#1m\').l(\'m\',\'R\');$(\'#1k\').l(\'m\',\'R\')});2.3[2.7].1E=z}8(2.7>-1)1e(2.3[2.7].o)}$(1b).3E(9(){2.5=t;2.7=-1;2.s=p j.3.3S(p j.3.1x(2.s.2v,2.s.2r),p j.3.1x(2.s.2t,2.s.2u));2.M=p j.3.3D();j.3.13.19(2.M,\'2Y\',9(){$(\'35\').T($(\'#2H\'));2.M.2J(\'\');$(\'#17\').2F()});14(B i=0;i<2.3.F;i++){2E(2.3[i],i);8(2.3[i].3T==\'A\'){$(\'#\'+2.3[i].q).l({Z:($(1b).Z()*2.2D)+\'2C\',Y:($(1b).Y()*2.2D)+\'2C\'})}$.2G({2I:"2B",2A:"1i/1H/2L.2s",2w:z,1h:{2z:"2y.3.3B",3x:2.2U},2l:9(1d){2.1O=1d;1P(\'1Z\')}});$(\'#\'+2.3[i].q+\'1Y\').O({47:u,Z:\'21\',Y:\'21\',41:z,42:\'X\',3a:\'1n\',S:2.3[i].S,1l:9(){2.7=$(V).1h(\'b\');1P(\'1l\')}}).1h(\'b\',i);$(\'Q.1n Q.1c-O-1Q\').T(\'<a 1M="#" q="1m" 1L="m:L;" 23="18(2.s); $(V).l(\\\'m\\\', \\\'L\\\').2k(); I(u);">\'+\'<v>&3P;</v></a>\');$(\'#1m\').1K(\'S\',2.1I.3C);8(2.3[i].o.E!=t){$(\'Q.1n Q.1c-O-1Q\').T(\'<a 1M="#" q="1k" 23="18(2.3[2.7].o.E.3H()); $(V).l(\\\'m\\\', \\\'L\\\').2k(); I(u);">\'+\'<v>&3F;</v></a>\');$(\'#1k\').1K(\'S\',2.1I.45)}$(\'Q.1n Q.1c-O-1Q\').T(\'<v q="1J" 1L="m:L;"><2h 2g="./1i/3y/2O/2P.2R"><v>\'+2.1I.2T+\'</v></v>\');$(\'#1c-O-S-3n\').T(\'<v q="1N"></v>\')}});',62,257,'||gmaps|maps||currentInfo|map|currentMapLoadIndex|if|function||index||||marker|markers|||google|properties|css|display||gMap|new|id|displayed|bounds|null|false|span||||true||var|info|iM|kmlFile|length||else|return|uId|imgTn|none|infoWindow|html|dialog|currentMapLoad|div|inline|title|append||this|markerImg||height|width||callId|tmp|event|for||markerImgProp|ciGMIWC_img|fitToBounds|addListener|displayPictureInfo|window|ui|msg|loadMarkers|imgCatsUrl|getBounds|data|plugins|datas|gmapsBoundKml|open|gmapsBoundMap|gmapsPopup|markerList|lat|newListIndex|lng|m2|ciGMIWC_showcat|navigationControl|m1|mapTypeControl|LatLng|nbImgTxt|zoomLevel|gmapsIndex|renameId|block|bind|viewportInitialized|nbImg|mode|GMaps|lang|gmapsLoading|attr|style|href|gmapsNbPhotos|requestId|initializeMapViewport|titlebar|each|displayWindowInfo|get|ciGMIWC_title|click|ciWALeft|ciWARight|Content|loaded||auto|ciGMIWC_picnum|onclick|ciGMIWC_showcatList|li|imgName|substr|getNorthEast|getSouthWest|getDiv|Point|re|scaleControl|streetViewControl|kmlFileUrl|src|img|break|compareMarkers|blur|success|case|applyMarkers|splice|markerInList|uniqueId|west|php|north|east|south|async|close|public|ajaxfct|url|POST|px|popupAutomaticSize|createMap|unbind|ajax|iGMapsInfoWindowContent|type|setContent|setMap|gmaps_ajax|getCenter|trigger|icons|processing|displayPictureNext|gif|isOpen|loading|categoryId|Array|displayPicturePrev|distanceTreshold|closeclick|nbPhotos||||resize|while|body|sort|getMarkers|parseJSON||dialogClass|Size|MarkerImage|zoom|center|scrollwheel|getZoom|mapType|mapTypeId|Map|backgroundColor|ffffff|mapTypeControlOptions|iGMapsIconContent|_|fitBounds|exec|Number|mS|preserveViewport|markerTitle|KmlLayer|zoomLevelMaxActivated|category|GrumPluginClasses|mouseenter|clone|init|boundmap|InfoWindow|load|sim|mouseleave|getDefaultViewport|children|font|55|location|size|imgCatsNames|dragend|there4|nbsp|zoom_changed|LatLngBounds|sizeMode|setZoom|upload|switch|charAt|Marker|galleries||modal|closeText|push|setCenter|boundkml|setIcon|autoOpen|position'.split('|'),0,{}))
+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 T,12=[u,{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 2N(k,1s){B 5=m j.3.3d($("#"+k.p).1V(0),{3e:\'#3f\',3g:k.3c,3b:k.1F,36:2.s.2u(),1r:(k.1r==-1)?t:z,35:(k.1r==-1)?t:z,2e:(k.2e==\'n\')?t:z,2f:(k.2f==\'n\')?t:z,1p:(k.1p==-1)?t:z,38:{1L:k.1p},3h:\'\',});7(k.2g!=\'\'){I=m j.3.3i(k.2g,{3p:z});I.2p(5)}C{I=u}2d=/^3q(\\d\\d)3r.*/i;E=2d.3s(k.R);7(E!=u)E=m 3o(E[1]);7(E!=u){5.R=m j.3.3n(\'1k/1M/2i/\'+k.R,m j.3.3j(12[E].w,12[E].h),m j.3.2c(0,0),m j.3.2c(12[E].x,12[E].y))}C{5.R=u}5.I=I;5.f=m 34();5.1s=1s;k.q=5;k.1q=t}9 19(5){2.Z++;1n={1O:2.1O,Z:2.Z,s:{2J:5.1j().29().1u(),2D:5.1j().29().1t(),2G:5.1j().2a().1u(),2F:5.1j().2a().1t()},11:$(5.2b()).11(),13:$(5.2b()).13(),2P:20,};T=5;$(\'#1K\').l(\'o\',\'V-1C\');$(\'#1P\').M(\'\');$.2z({2A:"2C",2H:"1k/1M/2I.2K",2L:z,1i:{2t:"2y.3.33",1n:1n},2M:9(1e){16=$.2Y(1e);7(2.Z==16.Z){16.f.2Z(2k);2o(T,16.f);$(\'#1K\').l(\'o\',\'K\');$(\'#1P\').M(\'[\'+16.1n.2X+\']\')}}})}9 2o(5,f){7(T==u)H(t);7(5.f.J>0){B i=0;2V(i<5.f.J){1y=2r(5.f[i].F,f);7(1y==-1){5.f[i].g.2p(u);5.f.2q(i,1)}C{f.2q(1y,1);i++}}}17(B i=0;i<f.J;i++){B g=m j.3.3u({2S:m j.3.1o(f[i].1u,f[i].1t),5:T,W:f[i].1A});7(5.R!=u)g.3F(5.R);g.D=f[i];g.D.r=0;5.f.48({g:g,F:f[i].F});j.3.14.1f(g,\'1W\',9(){1T(Y)});17(B b=0;b<g.D.L.J;b++){3X(g.D.L[b].42(0)){2n\'G\':g.D.L[b]=\'./46/\'+g.D.L[b].28(1);2j;2n\'U\':g.D.L[b]=\'./45/\'+g.D.L[b].28(1);2j}}}T=u}9 2k(1x,1w){7(1x.F<1w.F){H(-1)}C 7(1x.F<1w.F){H(1)}H(0)}9 2r(2s,1v){17(B i=0;i<1v.J;i++){7(1v[i].F==2s)H(i)}H(-1)}9 1T(g){2.6=g.D;2.N.2x();2.N.2B($(\'#2w\').3W().1U(1z).1V(0));2.N.1h(g.5,g);1a(2.6.r)}9 1z(i,e){7(e.p!=\'\')e.p=\'c\'+e.p;$(e).44().1U(1z)}9 1a(b){2.6.r=b;7(2.6.27[b]==\'\'){$(\'#1R\').M(\'&3D;\')}C{$(\'#1R\').M(2.6.27[b])}$(\'#18\').1I(\'2h\',2.6.L[b]);$(\'#18\').2E();7(2.6.1m[b].J==1){$(\'#18\').1E(\'1W\',9(){1g.3A=2.6.1m[2.6.r][0]})}C{$(\'#26\').M(\'\');17(B i=0;i<2.6.1m[b].J;i++){$(\'#26\').Q(\'<23><a 1Q="\'+2.6.1m[b][i]+\'">\'+2.6.3x[b][i]+\'</a></23>\')}$(\'#18, #1D\').1E(\'3z\',9(){$(\'#1D\').l(\'o\',\'1C\')}).1E(\'3H\',9(){$(\'#1D\').l(\'o\',\'K\')})}7(2.6.1B>1){$(\'#22\').M((b+1)+\'/\'+2.6.1A);$(\'#1Y, #1Z\').l(\'o\',\'V-1C\')}C{$(\'#22\').M(2.6.1A);$(\'#1Y, #1Z\').l(\'o\',\'K\')}}9 3N(){2.6.r--;7(2.6.r<0)2.6.r=2.6.1B-1;1a(2.6.r)}9 3J(){2.6.r++;7(2.6.r>=2.6.1B)2.6.r=0;1a(2.6.r)}9 S(s){2.3[2.8].q.3M(s);7(2.3[2.8].2Q&&2.3[2.8].q.3L()>2.3[2.8].1F){2.3[2.8].q.3K(2.3[2.8].1F)}}9 1H(1G){7(2.8>-1&&($(\'#\'+2.3[2.8].p+\'21\').O(\'3O\')&&1G==\'2m\'||1G==\'1h\')&&(2.3[2.8].1q==t)){j.3.14.3S(2.3[2.8].q,\'3Q\');$(\'#\'+2.3[2.8].p+\' v, #\'+2.3[2.8].p+\' a\').l(\'3y-3v\',\'3w.0%\');7(2.24){7(2.3[2.8].S){S(2.s)}C{2.3[2.8].q.3B(2.s.2u())}}C{S(2.3[2.8].q.I.25())}j.3.14.1f(2.3[2.8].q,\'3E\',9(){19(Y);$(\'#1l\').l(\'o\',\'V\');$(\'#1c\').l(\'o\',\'V\')});j.3.14.1f(2.3[2.8].q,\'3T\',9(){19(Y);2.N.2x();$(\'#1l\').l(\'o\',\'V\');$(\'#1c\').l(\'o\',\'V\')});2.3[2.8].1q=z}7(2.8>-1)19(2.3[2.8].q)}$(1g).41(9(){2.6=u;2.8=-1;2.s=m j.3.47(m j.3.1o(2.s.2G,2.s.2F),m j.3.1o(2.s.2J,2.s.2D));2.N=m j.3.2T();j.3.14.1f(2.N,\'2R\',9(){$(\'2U\').Q($(\'#2w\'));2.N.2B(\'\');$(\'#18\').2E()});17(B i=0;i<2.3.J;i++){2N(2.3[i],i);7(2.3[i].37==\'A\'){$(\'#\'+2.3[i].p).l({11:($(1g).11()*2.2O)+\'2v\',13:($(1g).13()*2.2O)+\'2v\'})}$.2z({2A:"2C",2H:"1k/1M/2I.2K",2L:z,1i:{2t:"2y.3.3Y",3V:2.3U},2M:9(1e){2.1O=1e;1H(\'2m\')}});$(\'#\'+2.3[i].p+\'21\').O({3I:t,11:\'1X\',13:\'1X\',3R:z,3P:\'X\',3G:\'1b\',W:2.3[i].W,1h:9(){2.8=$(Y).1i(\'b\');1H(\'1h\')}}).1i(\'b\',i);7(2.24){$(\'P.1b P.1d-O-1J\').Q(\'<a 1Q="#" p="1l" 1L="o:K;" 1S="S(2.s); $(Y).l(\\\'o\\\', \\\'K\\\').2l(); H(t);">\'+\'<v>&3C;</v></a>\');$(\'#1l\').1I(\'W\',2.1N.43)}7(2.3[i].q.I!=u){$(\'P.1b P.1d-O-1J\').Q(\'<a 1Q="#" p="1c" 1S="S(2.3[2.8].q.I.25()); $(Y).l(\\\'o\\\', \\\'K\\\').2l(); H(t);">\'+\'<v>&49;</v></a>\');$(\'#1c\').1I(\'W\',2.1N.3Z)}$(\'P.1b P.1d-O-1J\').Q(\'<v p="1K" 1L="o:K;"><2i 2h="./1k/2W/3t/3m.3l"><v>\'+2.1N.3k+\'</v></v>\');$(\'#1d-O-W-3a\').Q(\'<v p="1P"></v>\')}});',62,258,'||gmaps|maps||map|currentInfo|if|currentMapLoadIndex|function||index||||markers|marker|||google|properties|css|new||display|id|gMap|displayed|bounds|false|null|span||||true||var|else|info|iM|uId||return|kmlFile|length|none|imgTn|html|infoWindow|dialog|div|append|markerImg|fitToBounds|currentMapLoad||inline|title||this|callId||width|markerImgProp|height|event||tmp|for|ciGMIWC_img|loadMarkers|displayPictureInfo|gmapsPopup|gmapsBoundKml|ui|msg|addListener|window|open|data|getBounds|plugins|gmapsBoundMap|imgCatsUrl|datas|LatLng|mapTypeControl|viewportInitialized|navigationControl|gmapsIndex|lng|lat|markerList|m2|m1|newListIndex|renameId|nbImgTxt|nbImg|block|ciGMIWC_showcat|bind|zoomLevel|mode|initializeMapViewport|attr|titlebar|gmapsLoading|style|GMaps|lang|requestId|gmapsNbPhotos|href|ciGMIWC_title|onclick|displayWindowInfo|each|get|click|auto|ciWALeft|ciWARight||Content|ciGMIWC_picnum|li|geolocated|getDefaultViewport|ciGMIWC_showcatList|imgName|substr|getNorthEast|getSouthWest|getDiv|Point|re|scaleControl|streetViewControl|kmlFileUrl|src|img|break|compareMarkers|blur|loaded|case|applyMarkers|setMap|splice|markerInList|uniqueId|ajaxfct|getCenter|px|iGMapsInfoWindowContent|close|public|ajax|type|setContent|POST|east|unbind|west|south|url|gmaps_ajax|north|php|async|success|createMap|popupAutomaticSize|distanceTreshold|zoomLevelMaxActivated|closeclick|position|InfoWindow|body|while|GrumPluginClasses|nbPhotos|parseJSON|sort||||getMarkers|Array|scrollwheel|center|sizeMode|mapTypeControlOptions||iGMapsIconContent|zoom|mapType|Map|backgroundColor|ffffff|mapTypeId|markerTitle|KmlLayer|Size|loading|gif|processing|MarkerImage|Number|preserveViewport|mS|_|exec|icons|Marker|size|55|imgCatsNames|font|mouseenter|location|setCenter|there4|nbsp|dragend|setIcon|dialogClass|mouseleave|autoOpen|displayPictureNext|setZoom|getZoom|fitBounds|displayPicturePrev|isOpen|closeText|resize|modal|trigger|zoom_changed|categoryId|category|clone|switch|init|boundkml||load|charAt|boundmap|children|upload|galleries|LatLngBounds|push|sim'.split('|'),0,{}))
Index: extensions/GMaps/js/gmapsPicture.js
===================================================================
--- extensions/GMaps/js/gmapsPicture.js	(revision 7457)
+++ extensions/GMaps/js/gmapsPicture.js	(revision 7479)
@@ -40,12 +40,16 @@
               }
             ),
-      marker = new google.maps.Marker(
-                  {
-                    position:latlng,
-                    map: map,
-                    title:properties.markerTitle
-                  }
-                );
-
+      marker = null;
+
+  if(gmaps.geolocated)
+  {
+    marker= new google.maps.Marker(
+      {
+        position:latlng,
+        map: map,
+        title:properties.markerTitle
+      }
+    );
+  }
 
   re=/^mS(\d\d)_.*/i;
@@ -53,5 +57,5 @@
   if(iM!=null) iM=new Number(iM[1]);
 
-  if(iM!=null)
+  if(iM!=null && marker!=null)
   {
     var markerImg = new google.maps.MarkerImage('plugins/GMaps/img/'+properties.markerImg,
@@ -84,4 +88,28 @@
   properties.gMap=map;
   properties.gMapCenter=latlng;
+}
+
+/**
+ * if picture is geolocated, center map on geolocation
+ * otherwise, try to center on the kml file (by fitting bounds)
+ */
+function centerMap(map)
+{
+  if(gmaps.geolocated)
+  {
+    map.gMap.setCenter(map.gMapCenter);
+  }
+  else
+  {
+    fitKmlBounds(map);
+  }
+}
+
+/**
+ * if map have a kml file, fit to kml bounds
+ */
+function fitKmlBounds(map)
+{
+  if(map.gMap!=null) map.gMap.fitBounds(map.gMap.kmlFile.getDefaultViewport());
 }
 
@@ -127,5 +155,5 @@
       tabId='tab'+tabId.toUpperCase().substring(0,1)+tabId.substr(1);
       $("#"+tabId+" a").bind('click', function ()
-       {
+        {
           if(viewportInitialized.meta==false)
           {
@@ -135,5 +163,5 @@
               {
                 google.maps.event.trigger(gmaps.maps[i].gMap, 'resize');
-                gmaps.maps[i].gMap.setCenter(gmaps.maps[1].gMapCenter);
+                centerMap(gmaps.maps[i]);
                 $('#'+gmaps.maps[i].id+' span, #'+gmaps.maps[i].id+' a').css('font-size', '55.0%');
               }
@@ -141,5 +169,5 @@
             viewportInitialized.meta=true;
           }
-       }
+        }
       );
     }
@@ -167,9 +195,10 @@
               if(viewportInitialized.icon==false && gmaps.currentMapLoadIndex!=-1)
               {
-                google.maps.event.trigger(gmaps.maps[gmaps.currentMapLoadIndex].gMap, 'resize');
-                gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.maps[gmaps.currentMapLoadIndex].gMapCenter);
-                $('#iGMapsIcon span, #iGMapsIcon 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.trigger(gmaps.maps[gmaps.currentMapLoadIndex].gMap, 'resize');
+                centerMap(gmaps.maps[gmaps.currentMapLoadIndex]);
+                $('#iGMapsIcon span, #iGMapsIcon a').css('font-size', '55.0%');
                 viewportInitialized.icon=true;
               }
@@ -198,13 +227,16 @@
       );
 
-      $('div.gmapsPopup div.ui-dialog-titlebar')
-      .append('<a href="#" id="gmapsCenterMap" style="display:none;" onclick="gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.maps[gmaps.currentMapLoadIndex].gMapCenter); $(this).css(\'display\', \'none\').blur(); return(false);">'+
-              '<span>&bull;</span></a>');
-      $('#gmapsCenterMap').attr('title', gmaps.lang.centermap);
+      if(gmaps.geolocated)
+      {
+        $('div.gmapsPopup div.ui-dialog-titlebar')
+        .append('<a href="#" id="gmapsCenterMap" style="display:none;" onclick="centerMap(gmaps.maps[gmaps.currentMapLoadIndex]); $(this).css(\'display\', \'none\').blur(); return(false);">'+
+                '<span>&bull;</span></a>');
+        $('#gmapsCenterMap').attr('title', gmaps.lang.centermap);
+      }
 
       if(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile!=null)
       {
         $('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="fitKmlBounds(gmaps.maps[gmaps.currentMapLoadIndex]); $(this).css(\'display\', \'none\').blur(); return(false);">'+
                   '<span>&sim;</span></a>');
         $('#gmapsBoundKml').attr('title', gmaps.lang.boundkml);
Index: extensions/GMaps/js/gmapsPicture.packed.js
===================================================================
--- extensions/GMaps/js/gmapsPicture.packed.js	(revision 7457)
+++ extensions/GMaps/js/gmapsPicture.packed.js	(revision 7479)
@@ -1,2 +1,2 @@
-/* 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,{}))
+/* file: gmapsPicture.js - v1.1.1 | packed on 2010/10/28 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}('J v={T:c,P:c};J s=[f,{w:r,h:r,x:15,y:14},{w:r,h:r,x:15,y:14},{w:r,h:r,x:10,y:14},{w:1X,h:20,x:4,y:1V},];o 1d(5){J K=l b.3.1Q(2.1D.1T,2.1D.21),9=l b.3.1P($("#"+5.m).1b(0),{1H:5.1I,1E:5.1J,1L:K,U:(5.U==-1)?c:j,1R:(5.U==-1)?c:j,1a:(5.1a==\'n\')?c:j,16:(5.16==\'n\')?c:j,N:(5.N==-1)?c:j,1G:{1q:5.N},1f:\'\',}),H=f;7(2.W){H=l b.3.22({1U:K,9:9,u:5.1f})}1c=/^1S(\\d\\d)1W.*/i;k=1c.1Z(5.F);7(k!=f)k=l 1N(k[1]);7(k!=f&&H!=f){J F=l b.3.1F(\'1O/1M/1K/\'+5.F,l b.3.1Y(s[k].w,s[k].h),l b.3.19(0,0),l b.3.19(s[k].x,s[k].y));H.2o(F)}7(5.17!=\'\'){g=l b.3.2n(5.17,{2m:j})}1h{g=f}9.g=g;5.6=9;5.12=K}o z(9){7(2.W){9.6.1e(9.12)}1h{Y(9)}}o Y(9){7(9.6!=f)9.6.2q(9.6.g.2l())}$(M).2p(o(){2.8=-1;18(i=0;i<2.3.G;i++){1d(2.3[i]);2.3[i].6.1e(2.3[i].12);$(\'#\'+2.3[i].m+\' p, #\'+2.3[i].m+\' a\').e(\'S-O\',\'L.0%\');7(2.3[i].6.g!=f)2.3[i].6.g.1m(2.3[i].6);7(2.3[i].1g==\'2r\'){2.8=i;7(2.3[i].2s==\'A\'){$(\'#V\').e({R:($(M).R()*2.1k)+\'1j\',Q:($(M).Q()*2.1k)+\'1j\'})}}}7($(\'#1i\').G>0){t=$(\'#1i\').1b(0).1l.1l.m;t=\'2k\'+t.2i().28(0,1)+t.23(1);$("#"+t+" a").2j(\'27\',o(){7(v.P==c){18(i=0;i<2.3.G;i++){7(2.3[i].1g==\'26\'){b.3.C.1z(2.3[i].6,\'1r\');z(2.3[i]);$(\'#\'+2.3[i].m+\' p, #\'+2.3[i].m+\' a\').e(\'S-O\',\'L.0%\')}}v.P=j}})}7($(\'#1C\').G>0){$(\'#1C\').Z({24:c,R:\'1B\',Q:\'1B\',25:j,2a:\'X\',2b:\'11\',u:2.3[2.8].u,2g:o(){7(v.T==c&&2.8!=-1){7(2.3[2.8].6.g!=f)2.3[2.8].6.g.1m(2.3[2.8].6);b.3.C.1z(2.3[2.8].6,\'1r\');z(2.3[2.8]);$(\'#V p, #V a\').e(\'S-O\',\'L.0%\');v.T=j}b.3.C.1A(2.3[2.8].6,\'2h\',o(){$(\'#D\').e(\'q\',\'B\');$(\'#I\').e(\'q\',\'B\')});b.3.C.1A(2.3[2.8].6,\'2f\',o(){$(\'#D\').e(\'q\',\'B\');$(\'#I\').e(\'q\',\'B\')})}});7(2.W){$(\'E.11 E.1p-Z-1n\').1o(\'<a 1s="#" m="D" 1q="q:13;" 1t="z(2.3[2.8]); $(1y).e(\\\'q\\\', \\\'13\\\').1x(); 1w(c);">\'+\'<p>&2e;</p></a>\');$(\'#D\').1u(\'u\',2.1v.2c)}7(2.3[2.8].6.g!=f){$(\'E.11 E.1p-Z-1n\').1o(\'<a 1s="#" m="I" 1t="Y(2.3[2.8]); $(1y).e(\\\'q\\\', \\\'13\\\').1x(); 1w(c);">\'+\'<p>&2d;</p></a>\');$(\'#I\').1u(\'u\',2.1v.29)}}});',62,153,'||gmaps|maps||properties|gMap|if|currentMapLoadIndex|map||google|false||css|null|kmlFile|||true|iM|new|id||function|span|display|32|markerImgProp|tabId|title|viewportInitialized||||centerMap||inline|event|gmapsCenterMap|div|markerImg|length|marker|gmapsBoundKml|var|latlng|55|window|mapTypeControl|size|meta|height|width|font|icon|navigationControl|iGMapsIcon|geolocated||fitKmlBounds|dialog||gmapsPopup|gMapCenter|none|31||streetViewControl|kmlFileUrl|for|Point|scaleControl|get|re|applyMap|setCenter|markerTitle|displayType|else|iGMapContent|px|popupAutomaticSize|parentNode|setMap|titlebar|append|ui|style|resize|href|onclick|attr|lang|return|blur|this|trigger|addListener|auto|iGMapsIconContent|coords|zoom|MarkerImage|mapTypeControlOptions|mapTypeId|mapType|zoomLevel|img|center|GMaps|Number|plugins|Map|LatLng|scrollwheel|mS|latitude|position|39|_|30|Size|exec|40|longitude|Marker|substr|autoOpen|modal|MP|click|substring|boundkml|closeText|dialogClass|centermap|sim|bull|zoom_changed|open|dragend|toUpperCase|bind|tab|getDefaultViewport|preserveViewport|KmlLayer|setIcon|load|fitBounds|IP|sizeMode'.split('|'),0,{}))
Index: extensions/GMaps/main.inc.php
===================================================================
--- extensions/GMaps/main.inc.php	(revision 7457)
+++ extensions/GMaps/main.inc.php	(revision 7479)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: GMaps
-Version: 1.1.0
+Version: 1.2.0
 Description: Display and manage (google) maps
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=454
@@ -49,6 +49,11 @@
 |         |            |   . Save KML files in local directory
 |         |            |
-| 1.1.1   | 2010-10-28 | * mantis:1972
+| 1.2.0   | 2010-10-28 | * mantis bug:1972
 |         |            |   . thumbnails are not displayed in maps bubble box
+|         |            |
+|         |            | * mantis bug:1950
+|         |            |   . Display map if a kml file is associated
+|         |            |
+|         |            |
 |         |            |
 |         |            |
