Changeset 7479


Ignore:
Timestamp:
Oct 29, 2010, 3:01:40 PM (13 years ago)
Author:
grum
Message:

implement feature:1950

Location:
extensions/GMaps
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/admin/gmaps_category_maps.tpl

    r7309 r7479  
    2929            autoOpen:false,
    3030            width:800,
    31             height:480,
     31            height:510,
    3232            modal: true,
    3333            dialogClass: 'gcBgTabSheet gcBorder',
     
    114114          $('#iBDAssocKmlFileUrl').css('display', 'none');
    115115          $('#iBDKmlWarning').css('display', 'none');
     116          $('#iBDAssocForceDisplayDiv').css('display', 'none');
    116117          break;
    117118        case 'S':
     
    119120          $('#iBDAssocKmlFileUrl').css('display', 'none');
    120121          $('#iBDKmlWarning').css('display', 'block');
     122          $('#iBDAssocForceDisplayDiv').css('display', 'block');
    121123          break;
    122124        case 'U':
     
    124126          $('#iBDAssocKmlFileUrl').css('display', 'block');
    125127          $('#iBDKmlWarning').css('display', 'block');
     128          $('#iBDAssocForceDisplayDiv').css('display', 'block');
    126129          break;
    127130      }
     
    275278        $('#iBDAssocIcon, #iBDAssocMarker').iconSelector('value', ':first');
    276279        $('#iBDAssocTitle').val('');
     280        $('#iBDAssocForceDisplay').attr('checked', false);
    277281      }
    278282      else
     
    300304        $('#iBDAssocMarker').iconSelector('value', 'plugins/GMaps/img/'+tmp.marker);
    301305        $('#iBDAssocTitle').val(tmp.title);
     306        $('#iBDAssocForceDisplay').attr('checked', tmp.forceDisplay=='y');
    302307      }
    303308
     
    365370        marker:$('#iBDAssocMarker').iconSelector('value'),
    366371        title:$('#iBDAssocTitle').val(),
     372        forceDisplay:$('#iBDAssocForceDisplay').attr('checked')?'y':'n',
    367373      }
    368374
     
    539545              <p id='iBDKmlWarning' class='helps' style="width:520px;padding-right:20px;">{'gmaps_kml_file_access'|@translate}</p>
    540546
     547              <div id='iBDAssocForceDisplayDiv' style='display:none;'><label><input type="checkbox" id='iBDAssocForceDisplay'>&nbsp;{'gmaps_force_display'|@translate}</label></div>
     548
    541549            </td>
    542550          </tr>
  • extensions/GMaps/gmaps_ajax.php

    r7453 r7479  
    228228              if(!($_REQUEST['datas']['applySubCat']=='y' or
    229229                   $_REQUEST['datas']['applySubCat']=='n')) $_REQUEST['datas']['applySubCat']='y';
     230
     231              if(!isset($_REQUEST['datas']['forceDisplay'])) $_REQUEST['datas']['forceDisplay']='n';
     232              if(!($_REQUEST['datas']['forceDisplay']=='y' or
     233                   $_REQUEST['datas']['forceDisplay']=='n')) $_REQUEST['datas']['forceDisplay']='n';
    230234            }
    231235          }
     
    565569                   pgmm.name AS mapName, pgmm.displayType,
    566570                   pgcm.kmlFileId, pgcm.kmlFileUrl, pgcm.imgSort, pgcm.applySubCat, pgcm.icon,
    567                    pgcm.title, pgkf.name AS kmlName
     571                   pgcm.title, pgkf.name AS kmlName, pgcm.forceDisplay
    568572            FROM ((".$this->tables['category_maps']." pgcm
    569573                  LEFT JOIN ".CATEGORIES_TABLE." pct ON pct.id=pgcm.categoryId)
     
    604608            'icon' => $row['icon'],
    605609            'displayType' => l10n('gmaps_displayTypeShort'.$row['displayType']),
    606             'title' => $row['title']
     610            'title' => $row['title'],
     611            'forceDisplay' => l10n('gmaps_'.$row['forceDisplay']),
    607612          );
    608613
     
    685690                basename($properties['icon'])."', '".
    686691                basename($properties['marker'])."', '".
    687                 mysql_escape_string($properties['title'])."');";
     692                mysql_escape_string($properties['title'])."', '".
     693                $properties['forceDisplay']."');";
    688694        $result=pwg_query($sql);
    689695        $id=pwg_db_insert_id();
     
    700706                basename($properties['icon'])."', marker='".
    701707                basename($properties['marker'])."', title='".
    702                 mysql_escape_string($properties['title'])."'
     708                mysql_escape_string($properties['title'])."', forceDisplay='".
     709                $properties['forceDisplay']."'
    703710              WHERE id='$id';";
    704711        $result=pwg_query($sql);
     
    728735        'icon' => '',
    729736        'marker' => '',
    730         'title' => ''
     737        'title' => '',
     738        'forceDisplay' => 'n'
    731739      );
    732740
    733741      $sql="SELECT id, categoryId, mapId, applySubCat, kmlFileId, kmlFileUrl,
    734                    icon, marker, title
     742                   icon, marker, title, forceDisplay
    735743            FROM ".$this->tables['category_maps']."
    736744            WHERE id='$id';";
     
    12751283            $coords['lng']+=$point['longitude'];
    12761284
    1277             $coords['imgTn'][]=$point['imageTnFile'];
     1285            $coords['imgTn'][]=$this->replaceImgRoot($point['imageTnFile']);
    12781286            $coords['imgCatsNames'][]=$tmpCatsNames;
    12791287            $coords['imgName'][]=GPCCore::getUserLanguageDesc($point['imageName']);
     
    13471355    private function replaceImgRoot($value)
    13481356    {
     1357      return($value);
    13491358      if(preg_match('/^\.\/galleries\//i', $value)>0)
    13501359      {
    13511360        return("G".substr($value,12));
    13521361      }
    1353       elseif("U".preg_match('/^\.\/upload\//i', $value)>0)
    1354       {
    1355         return(substr($value,9));
     1362      elseif(preg_match('/^\.\/upload\//i', $value)>0)
     1363      {
     1364        return("U".substr($value,9));
    13561365      }
    13571366      return($value);
  • extensions/GMaps/gmaps_install.class.inc.php

    r7386 r7479  
    8282  `marker` varchar(255) NOT NULL,
    8383  `title` varchar(200) NOT NULL,
     84  `forceDisplay` char(1) NOT NULL default 'n',
    8485  PRIMARY KEY  (`id`),
    8586  KEY `byCategorie` (`categoryId`,`mapId`)
     
    139140      switch($this->config['installed'])
    140141      {
    141         case '01.00.00';
     142        case '01.00.00':
    142143          $this->updateFrom_010000();
     144        case '01.00.01':
     145        case '01.00.02':
     146          $this->updateFrom_010002();
    143147        default:
    144148          // nothing to do...
     
    196200    }
    197201
     202    /**
     203     * update from release 1.0.2
     204     *
     205     */
     206    private function updateFrom_010002()
     207    {
     208
     209      $tablesUpdate=array(
     210        $this->tables['category_maps'] => array(
     211          'forceDisplay' => " ADD COLUMN `forceDisplay` CHAR(1)  NOT NULL DEFAULT 'n' AFTER `title` ",
     212        )
     213      );
     214
     215      $tablef=new GPCTables(array($this->tables['category_maps']));
     216      $tablef->updateTablesFields($tablesUpdate);
     217
     218      unset($tablesUpdate);
     219    }
     220
     221
     222
    198223  } //class
    199224
  • extensions/GMaps/gmaps_pip.class.inc.php

    r7308 r7479  
    1818class GMaps_PIP extends GMaps_root
    1919{
    20   protected $maps = array(); //list of maps
    2120  protected $category=array(
    2221    'id' => 0,
     
    3635  protected $picture=array(
    3736    'geolocated' => false,
     37    'forceDisplay' => false,
    3838    'coords' => array('lat' => 0, 'lng' => 0),
    3939    'content' => array(
     
    155155          }
    156156
    157           if($nb>0)
     157          if($nb>0 or $this->forceDisplay>0)
    158158          {
    159159            /*
     
    163163            foreach($this->maps as $keyMap => $map)
    164164            {
    165               $scripts[]="
     165              if($nb>0 or
     166                 $map['forceDisplay']=='y' and ($map['kmlFileUrl']!='' or $map['kmlFileId']!=0)
     167                )
    166168              {
    167                 id:'iGMapsIcon',
    168                 zoomLevel:".$map['zoomLevel'].",
    169                 markerImg:'".$map['marker']."',
    170                 mapType:'".$map['mapType']."',
    171                 mapTypeControl:'".$map['mapTypeControl']."',
    172                 navigationControl:'".$map['navigationControl']."',
    173                 scaleControl:'".$map['scaleControl']."',
    174                 streetViewControl:'".$map['streetViewControl']."',
    175                 kmlFileUrl:'".$map['kmlFileUrl']."',
    176                 displayType:'".$map['displayType']."',
    177                 sizeMode:'".$map['sizeMode']."',
    178                 title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title']  )."',
    179                 markers:[],
    180                 fitToBounds:true,
    181                 zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false')."
    182               }";
    183 
    184               preg_match('/^i(\d+)x(\d+).*/i', basename($map['icon']), $result);
    185               $this->category['icon']['iconStyle']=$map['iconStyle'];
    186               $this->category['icon']['file']=$map['icon'];
    187               $this->category['icon']['width']=isset($result[1])?$result[1]:-1;
    188               $this->category['icon']['height']=isset($result[2])?$result[2]:-1;
     169                $scripts[]="
     170                {
     171                  id:'iGMapsIcon',
     172                  zoomLevel:".$map['zoomLevel'].",
     173                  markerImg:'".$map['marker']."',
     174                  mapType:'".$map['mapType']."',
     175                  mapTypeControl:'".$map['mapTypeControl']."',
     176                  navigationControl:'".$map['navigationControl']."',
     177                  scaleControl:'".$map['scaleControl']."',
     178                  streetViewControl:'".$map['streetViewControl']."',
     179                  kmlFileUrl:'".$map['kmlFileUrl']."',
     180                  displayType:'".$map['displayType']."',
     181                  sizeMode:'".$map['sizeMode']."',
     182                  title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title']  )."',
     183                  markers:[],
     184                  fitToBounds:true,
     185                  zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false')."
     186                }";
     187
     188                preg_match('/^i(\d+)x(\d+).*/i', basename($map['icon']), $result);
     189                $this->category['icon']['iconStyle']=$map['iconStyle'];
     190                $this->category['icon']['file']=$map['icon'];
     191                $this->category['icon']['width']=isset($result[1])?$result[1]:-1;
     192                $this->category['icon']['height']=isset($result[2])?$result[2]:-1;
     193              }
    189194            }
    190 
    191195
    192196            $template->assign('maps', $this->maps);
     
    209213  gmaps =
    210214    {
     215      geolocated:".($nb>0?'true':'false').",
     216      forceDisplay:".($nb==0?'true':'false').",
    211217      lang:{
    212218        boundmap:'".l10n('gmaps_i_boundmap')."',
     
    249255    global $page, $template;
    250256
    251     if($this->picture['geolocated']==false) return(false);
     257    if($this->picture['geolocated']==false and $this->picture['forceDisplay']==false) return(false);
    252258
    253259    if(isset($this->picture['content']['MP']) and count($this->picture['content']['MP'])>0)
     
    258264      $template->assign('maps', $this->picture['content']['MP']);
    259265
     266      $metaTitle='';
     267      foreach($this->picture['content']['MP'] as $map)
     268      {
     269        if($metaTitle=='') $metaTitle=$map['title'];
     270      }
     271
    260272      $metadata=array
    261273        (
    262           'TITLE' => l10n('gmaps_geolocation'),
     274          'TITLE' => ($metaTitle=='')?l10n('gmaps_geolocation'):$metaTitle,
    263275          'lines' =>
    264276            array(
     
    296308  gmaps =
    297309    {
     310      geolocated:".($this->picture['geolocated']?'true':'false').",
     311      forceDisplay:".($this->picture['forceDisplay']?'true':'false').",
    298312      lang:{
    299313        centermap:'".l10n('gmaps_i_centermap')."',
     
    328342    global $template, $page;
    329343
     344    $isGeolocated=true;
     345
    330346    if(is_null($jpegMD->getTag('magic.GPS.LatitudeNum')) or
    331347       is_null($jpegMD->getTag('magic.GPS.LongitudeNum')) or
    332        $page['section']!='categories') return(false);
    333 
    334 
    335     $this->picture['geolocated']=true;
    336     $this->picture['coords']['lat']=$jpegMD->getTag('magic.GPS.LatitudeNum')->getValue();
    337     $this->picture['coords']['lng']=$jpegMD->getTag('magic.GPS.LongitudeNum')->getValue();
     348       $page['section']!='categories') $isGeolocated=false;
    338349
    339350
     
    347358    }
    348359
     360    if($this->forceDisplay==0 and !$isGeolocated) return(false);
     361
     362    $this->picture['geolocated']=$isGeolocated;
     363    $this->picture['forceDisplay']=!$isGeolocated;
     364    if($isGeolocated)
     365    {
     366      $this->picture['coords']['lat']=$jpegMD->getTag('magic.GPS.LatitudeNum')->getValue();
     367      $this->picture['coords']['lng']=$jpegMD->getTag('magic.GPS.LongitudeNum')->getValue();
     368    }
     369
    349370
    350371    foreach($this->maps as $map)
    351372    {
    352       if($map['displayType']=='IP')
    353       {
    354         preg_match('/^i(\d+)x(\d+).*/i', basename($map['icon']), $result);
    355         $this->picture['icon']=array(
    356           'iconStyle' => $map['iconStyle'],
    357           'file' => $map['icon'],
    358           'width' => isset($result[1])?$result[1]:-1,
    359           'height' => isset($result[2])?$result[2]:-1
     373      if($isGeolocated or
     374         $map['forceDisplay']=='y' and ($map['kmlFileUrl']!='' or $map['kmlFileId']!=0)
     375        )
     376      {
     377        if($map['displayType']=='IP')
     378        {
     379          preg_match('/^i(\d+)x(\d+).*/i', basename($map['icon']), $result);
     380          $this->picture['icon']=array(
     381            'iconStyle' => $map['iconStyle'],
     382            'file' => $map['icon'],
     383            'width' => isset($result[1])?$result[1]:-1,
     384            'height' => isset($result[2])?$result[2]:-1
     385          );
     386        }
     387
     388
     389        $this->picture['content'][$map['displayType']][]=array(
     390          'id' => $map['id'],
     391          'width' => $map['width'],
     392          'height' => $map['height'],
     393          'style' => $map['style'],
     394          'displayType' => $map['displayType'],
     395          'title' => $map['title'],
    360396        );
     397
     398        $this->picture['properties'][]="
     399        {
     400          id:'iGMaps".(($map['displayType']=='IP')?'Icon':$map['id'])."',
     401          zoomLevel:".$map['zoomLevel'].",
     402          markerImg:'".$map['marker']."',
     403          mapType:'".$map['mapType']."',
     404          mapTypeControl:'".$map['mapTypeControl']."',
     405          navigationControl:'".$map['navigationControl']."',
     406          scaleControl:'".$map['scaleControl']."',
     407          streetViewControl:'".$map['streetViewControl']."',
     408          kmlFileUrl:'".$map['kmlFileUrl']."',
     409          displayType:'".$map['displayType']."',
     410          sizeMode:'".$map['sizeMode']."',
     411          title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title']  )."'
     412        }";
    361413      }
    362 
    363 
    364       $this->picture['content'][$map['displayType']][]=array(
    365         'id' => $map['id'],
    366         'width' => $map['width'],
    367         'height' => $map['height'],
    368         'style' => $map['style'],
    369         'displayType' => $map['displayType']
    370       );
    371 
    372       $this->picture['properties'][]="
    373       {
    374         id:'iGMaps".(($map['displayType']=='IP')?'Icon':$map['id'])."',
    375         zoomLevel:".$map['zoomLevel'].",
    376         markerImg:'".$map['marker']."',
    377         mapType:'".$map['mapType']."',
    378         mapTypeControl:'".$map['mapTypeControl']."',
    379         navigationControl:'".$map['navigationControl']."',
    380         scaleControl:'".$map['scaleControl']."',
    381         streetViewControl:'".$map['streetViewControl']."',
    382         kmlFileUrl:'".$map['kmlFileUrl']."',
    383         displayType:'".$map['displayType']."',
    384         sizeMode:'".$map['sizeMode']."',
    385         title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title']  )."'
    386       }";
    387414    }
    388415  }
  • extensions/GMaps/gmaps_root.class.inc.php

    r7308 r7479  
    2121    protected $css;
    2222    protected $maps=array();
     23    protected $forceDisplay=0;
    2324
    2425    /**
     
    196197
    197198      $this->maps=array();
     199      $this->forceDisplay=0;
    198200
    199201      if($page=='C')
     
    217219              pgmm.mapType, pgmm.mapTypeControl, pgmm.scaleControl, pgmm.streetViewControl,
    218220              pgmm.navigationControl, pgmm.style, pgmm.zoomLevelMaxActivated,
    219               IF(pgcm.categoryId=0, 0, pct.global_rank) AS priorityRank
     221              IF(pgcm.categoryId=0, 0, pct.global_rank) AS priorityRank,
     222              pgcm.forceDisplay
    220223            FROM ((".$this->tables['category_maps']." pgcm
    221224                  LEFT JOIN ".$this->tables['maps']." pgmm ON pgcm.mapId = pgmm.id)
     
    278281              $this->maps[]=$row;
    279282              $displayType[$row['displayType']]=false;
     283              if($row['forceDisplay']=='y' and ($row['kmlFileUrl']!='' or $row['kmlFileId']!=0)) $this->forceDisplay++;
    280284            }
    281285          }
  • extensions/GMaps/gmaps_version.inc.php

    r7453 r7479  
    1515  if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    1616
    17   define('GMAPS_VERSION',  '1.1.1');
    18   define('GMAPS_VERSION2', '01.01.01');
     17  define('GMAPS_VERSION',  '1.2.0');
     18  define('GMAPS_VERSION2', '01.02.00');
    1919  define('GMAPS_GPC_NEEDED', '3.3.2');
    2020  define('GMAPS_AMD_NEEDED', '0.5.2'); //advanced metadata plugin is needed
  • extensions/GMaps/js/gmapsCategory.js

    r7453 r7479  
    5151      }
    5252    );
     53    kmlFile.setMap(map);
    5354  }
    5455  else
     
    203204      {
    204205        case 'G':
    205           marker.info.imgTn[index]='./galleries/'.marker.info.imgTn[index].substr(1);
     206          marker.info.imgTn[index]='./galleries/'+marker.info.imgTn[index].substr(1);
    206207          break;
    207208        case 'U':
    208           marker.info.imgTn[index]='./upload/'.marker.info.imgTn[index].substr(1);
     209          marker.info.imgTn[index]='./upload/'+marker.info.imgTn[index].substr(1);
    209210          break;
    210211      }
     
    362363    google.maps.event.trigger(gmaps.maps[gmaps.currentMapLoadIndex].gMap, 'resize');
    363364
    364 
    365     if(gmaps.maps[gmaps.currentMapLoadIndex].fitToBounds)
    366     {
    367       fitToBounds(gmaps.bounds)
    368     }
    369     else
    370     {
    371       gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.bounds.getCenter());
    372     }
    373 
    374365    // reduce copyright size... ^_^
    375366    $('#'+gmaps.maps[gmaps.currentMapLoadIndex].id+' span, #'+gmaps.maps[gmaps.currentMapLoadIndex].id+' a').css('font-size', '55.0%');
    376367
    377     if(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile!=null)
    378       gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.setMap(gmaps.maps[gmaps.currentMapLoadIndex].gMap);
     368
     369    if(gmaps.geolocated)
     370    {
     371      if(gmaps.maps[gmaps.currentMapLoadIndex].fitToBounds)
     372      {
     373        fitToBounds(gmaps.bounds);
     374      }
     375      else
     376      {
     377        gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.bounds.getCenter());
     378      }
     379    }
     380    else
     381    {
     382      fitToBounds(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.getDefaultViewport());
     383    }
    379384
    380385    google.maps.event.addListener(
     
    406411  if(gmaps.currentMapLoadIndex>-1) loadMarkers(gmaps.maps[gmaps.currentMapLoadIndex].gMap);
    407412}
     413
    408414
    409415$(window).load(function ()
     
    448454      /*
    449455       * initialize map on the server side (call the 'public.maps.init'
    450        * function
     456       * function)
    451457       */
    452458      $.ajax(
     
    484490      ).data('index', i);
    485491
    486       $('div.gmapsPopup div.ui-dialog-titlebar')
    487       .append('<a href="#" id="gmapsBoundMap" style="display:none;" onclick="fitToBounds(gmaps.bounds); $(this).css(\'display\', \'none\').blur(); return(false);">'+
    488               '<span>&there4;</span></a>');
    489       $('#gmapsBoundMap').attr('title', gmaps.lang.boundmap);
     492      if(gmaps.geolocated)
     493      {
     494        $('div.gmapsPopup div.ui-dialog-titlebar')
     495        .append('<a href="#" id="gmapsBoundMap" style="display:none;" onclick="fitToBounds(gmaps.bounds); $(this).css(\'display\', \'none\').blur(); return(false);">'+
     496                '<span>&there4;</span></a>');
     497        $('#gmapsBoundMap').attr('title', gmaps.lang.boundmap);
     498      }
    490499
    491500      if(gmaps.maps[i].gMap.kmlFile!=null)
  • extensions/GMaps/js/gmapsCategory.packed.js

    r7453 r7479  
    11/* file: gmapsCategory.js - v1.1.1 | packed on 2010/10/28 with http://joliclic.free.fr/php/javascript-packer/ */
    2 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,{}))
     2eval(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,{}))
  • extensions/GMaps/js/gmapsPicture.js

    r7308 r7479  
    4040              }
    4141            ),
    42       marker = new google.maps.Marker(
    43                   {
    44                     position:latlng,
    45                     map: map,
    46                     title:properties.markerTitle
    47                   }
    48                 );
    49 
     42      marker = null;
     43
     44  if(gmaps.geolocated)
     45  {
     46    marker= new google.maps.Marker(
     47      {
     48        position:latlng,
     49        map: map,
     50        title:properties.markerTitle
     51      }
     52    );
     53  }
    5054
    5155  re=/^mS(\d\d)_.*/i;
     
    5357  if(iM!=null) iM=new Number(iM[1]);
    5458
    55   if(iM!=null)
     59  if(iM!=null && marker!=null)
    5660  {
    5761    var markerImg = new google.maps.MarkerImage('plugins/GMaps/img/'+properties.markerImg,
     
    8488  properties.gMap=map;
    8589  properties.gMapCenter=latlng;
     90}
     91
     92/**
     93 * if picture is geolocated, center map on geolocation
     94 * otherwise, try to center on the kml file (by fitting bounds)
     95 */
     96function centerMap(map)
     97{
     98  if(gmaps.geolocated)
     99  {
     100    map.gMap.setCenter(map.gMapCenter);
     101  }
     102  else
     103  {
     104    fitKmlBounds(map);
     105  }
     106}
     107
     108/**
     109 * if map have a kml file, fit to kml bounds
     110 */
     111function fitKmlBounds(map)
     112{
     113  if(map.gMap!=null) map.gMap.fitBounds(map.gMap.kmlFile.getDefaultViewport());
    86114}
    87115
     
    127155      tabId='tab'+tabId.toUpperCase().substring(0,1)+tabId.substr(1);
    128156      $("#"+tabId+" a").bind('click', function ()
    129        {
     157        {
    130158          if(viewportInitialized.meta==false)
    131159          {
     
    135163              {
    136164                google.maps.event.trigger(gmaps.maps[i].gMap, 'resize');
    137                 gmaps.maps[i].gMap.setCenter(gmaps.maps[1].gMapCenter);
     165                centerMap(gmaps.maps[i]);
    138166                $('#'+gmaps.maps[i].id+' span, #'+gmaps.maps[i].id+' a').css('font-size', '55.0%');
    139167              }
     
    141169            viewportInitialized.meta=true;
    142170          }
    143        }
     171        }
    144172      );
    145173    }
     
    167195              if(viewportInitialized.icon==false && gmaps.currentMapLoadIndex!=-1)
    168196              {
    169                 google.maps.event.trigger(gmaps.maps[gmaps.currentMapLoadIndex].gMap, 'resize');
    170                 gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.maps[gmaps.currentMapLoadIndex].gMapCenter);
    171                 $('#iGMapsIcon span, #iGMapsIcon a').css('font-size', '55.0%');
    172197                if(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile!=null)
    173198                  gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.setMap(gmaps.maps[gmaps.currentMapLoadIndex].gMap);
     199
     200                google.maps.event.trigger(gmaps.maps[gmaps.currentMapLoadIndex].gMap, 'resize');
     201                centerMap(gmaps.maps[gmaps.currentMapLoadIndex]);
     202                $('#iGMapsIcon span, #iGMapsIcon a').css('font-size', '55.0%');
    174203                viewportInitialized.icon=true;
    175204              }
     
    198227      );
    199228
    200       $('div.gmapsPopup div.ui-dialog-titlebar')
    201       .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);">'+
    202               '<span>&bull;</span></a>');
    203       $('#gmapsCenterMap').attr('title', gmaps.lang.centermap);
     229      if(gmaps.geolocated)
     230      {
     231        $('div.gmapsPopup div.ui-dialog-titlebar')
     232        .append('<a href="#" id="gmapsCenterMap" style="display:none;" onclick="centerMap(gmaps.maps[gmaps.currentMapLoadIndex]); $(this).css(\'display\', \'none\').blur(); return(false);">'+
     233                '<span>&bull;</span></a>');
     234        $('#gmapsCenterMap').attr('title', gmaps.lang.centermap);
     235      }
    204236
    205237      if(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile!=null)
    206238      {
    207239        $('div.gmapsPopup div.ui-dialog-titlebar')
    208           .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);">'+
     240          .append('<a href="#" id="gmapsBoundKml" onclick="fitKmlBounds(gmaps.maps[gmaps.currentMapLoadIndex]); $(this).css(\'display\', \'none\').blur(); return(false);">'+
    209241                  '<span>&sim;</span></a>');
    210242        $('#gmapsBoundKml').attr('title', gmaps.lang.boundkml);
  • extensions/GMaps/js/gmapsPicture.packed.js

    r7308 r7479  
    1 /* file: gmapsPicture.js - v1.1.0 | packed on 2010/10/20 with http://joliclic.free.fr/php/javascript-packer/ */
    2 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,{}))
     1/* file: gmapsPicture.js - v1.1.1 | packed on 2010/10/28 with http://joliclic.free.fr/php/javascript-packer/ */
     2eval(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,{}))
  • extensions/GMaps/main.inc.php

    r7453 r7479  
    22/*
    33Plugin Name: GMaps
    4 Version: 1.1.0
     4Version: 1.2.0
    55Description: Display and manage (google) maps
    66Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=454
     
    4949|         |            |   . Save KML files in local directory
    5050|         |            |
    51 | 1.1.1   | 2010-10-28 | * mantis:1972
     51| 1.2.0   | 2010-10-28 | * mantis bug:1972
    5252|         |            |   . thumbnails are not displayed in maps bubble box
     53|         |            |
     54|         |            | * mantis bug:1950
     55|         |            |   . Display map if a kml file is associated
     56|         |            |
     57|         |            |
    5358|         |            |
    5459|         |            |
Note: See TracChangeset for help on using the changeset viewer.