Changeset 7308 for extensions/GMaps
- Timestamp:
- Oct 20, 2010, 10:49:29 PM (14 years ago)
- Location:
- extensions/GMaps
- Files:
-
- 1 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GMaps/gmaps.css
r7176 r7308 70 70 margin-left:3px; 71 71 } 72 #iDialogGMapWaiting { 73 position:absolute; 74 z-index:1500; 75 background:#000000; 76 opacity:0.55; 77 filter:alpha(opacity:55); 72 73 74 div.cfgBloc { 75 margin-top:10px; 78 76 } 79 80 77 81 78 // fix IE8 compatibility bugs from GPC 3.2.0 (fixed in next release) -
extensions/GMaps/gmaps2.css
r7132 r7308 137 137 } 138 138 139 #iDialogGMapWaiting { 140 position:absolute; 141 z-index:1500; 142 background:#ffffff; 143 opacity:0.55; 144 filter:alpha(opacity:55); 145 } 139 -
extensions/GMaps/gmaps_aip.class.inc.php
r7177 r7308 57 57 l10n('gmaps_search'), 58 58 $this->getAdminLink()."&fGMaps_tabsheet=search"); 59 $this->tabsheet->add('config', 60 l10n('gmaps_config'), 61 $this->getAdminLink()."&fGMaps_tabsheet=config"); 62 59 63 /* $this->tabsheet->add('help', 60 64 l10n('gmaps_help'), … … 112 116 case 'search': 113 117 $this->displaySearch(); 118 break; 119 case 'config': 120 $this->displayConfig(); 114 121 break; 115 122 case 'help': … … 335 342 336 343 344 345 346 /** 347 * display the config page 348 * 349 */ 350 protected function displayConfig() 351 { 352 global $template; 353 354 $this->updateConfig(); 355 $this->configForTemplate(); 356 357 $template->set_filename('body_page', 358 dirname($this->getFileLocation()).'/admin/gmaps_config.tpl'); 359 360 $template->assign_var_from_handle('GMAPS_BODY_PAGE', 'body_page'); 361 } 362 363 /** 364 * update config values 365 */ 366 protected function updateConfig() 367 { 368 global $infos; 369 370 if(!isset($_POST) or count($_POST)==0) return(false); 371 372 373 if(isset($_POST['fBDPopupAutomaticSize']) and $_POST['fBDPopupAutomaticSize']>=0.5 and $_POST['fBDPopupAutomaticSize']<=0.95) 374 { 375 $this->config['popupAutomaticSize']=$_POST['fBDPopupAutomaticSize']; 376 } 377 else 378 { 379 return(false); 380 } 381 382 if($this->saveConfig()) 383 { 384 $this->displayResult(l10n('gmaps_config_saved'), true); 385 return(true); 386 } 387 return(false); 388 } 389 390 391 392 393 394 395 337 396 /** 338 397 * build an ordered category list … … 373 432 { 374 433 $row['level']=1+substr_count($row['rank'], '.'); 375 376 /* rank is in formated without leading zero, giving bad order377 * 1378 * 1.10379 * 1.11380 * 1.2381 * 1.3382 * ....383 *384 * this loop cp,vert all sub rank in four 0 format, allowing to order385 * categories easily386 * 0001387 * 0001.0010388 * 0001.0011389 * 0001.0002390 * 0001.0003391 */392 $row['rank']=explode('.', $row['rank']);393 foreach($row['rank'] as $key=>$rank)394 {395 $row['rank'][$key]=str_pad($rank, 4, '0', STR_PAD_LEFT);396 }397 $row['rank']=implode('.', $row['rank']);398 399 434 $returned[]=$row; 400 435 } … … 414 449 public function compareCat($catA, $catB) 415 450 { 416 if($catA['rank'] == $catB['rank']) 417 { 418 return(0); 419 } 420 return( ($catA['rank'] < $catB['rank'])?-1:1 ); 451 return(strnatcmp($catA['rank'], $catB['rank'])); 421 452 } 422 453 -
extensions/GMaps/gmaps_ajax.php
r7177 r7308 77 77 78 78 $_REQUEST['ajaxfct']=='public.maps.init' or 79 $_REQUEST['ajaxfct']=='public.maps.getMarkers' //or 80 //$_REQUEST['ajaxfct']=='public.maps.getMarkerInfos' 79 $_REQUEST['ajaxfct']=='public.maps.getMarkers' 81 80 )) $_REQUEST['ajaxfct']=''; 82 81 … … 133 132 else 134 133 { 135 if(!(isset($_REQUEST['datas']['displayType']) && 136 isset($_REQUEST['datas']['sizeMode']) && 137 isset($_REQUEST['datas']['name']) && 138 isset($_REQUEST['datas']['width']) && 139 isset($_REQUEST['datas']['height']) && 140 isset($_REQUEST['datas']['zoomLevel']) && 141 isset($_REQUEST['datas']['mapType']) && 142 isset($_REQUEST['datas']['mapTypeControl']) && 143 isset($_REQUEST['datas']['navigationControl']) && 144 isset($_REQUEST['datas']['scaleControl']) && 145 isset($_REQUEST['datas']['streetViewControl']) && 146 isset($_REQUEST['datas']['style']))) 134 if(!(isset($_REQUEST['datas']['displayType']) and 135 isset($_REQUEST['datas']['sizeMode']) and 136 isset($_REQUEST['datas']['name']) and 137 isset($_REQUEST['datas']['width']) and 138 isset($_REQUEST['datas']['height']) and 139 isset($_REQUEST['datas']['zoomLevel']) and 140 isset($_REQUEST['datas']['mapType']) and 141 isset($_REQUEST['datas']['mapTypeControl']) and 142 isset($_REQUEST['datas']['navigationControl']) and 143 isset($_REQUEST['datas']['scaleControl']) and 144 isset($_REQUEST['datas']['streetViewControl']) and 145 isset($_REQUEST['datas']['style']) and 146 isset($_REQUEST['datas']['zoomLevelMaxActivated']) 147 )) 147 148 { 148 149 $_REQUEST['ajaxfct']=''; … … 187 188 if(!($_REQUEST['datas']['streetViewControl']=='y' or 188 189 $_REQUEST['datas']['streetViewControl']=='n')) $_REQUEST['datas']['streetViewControl']='n'; 190 191 if(!($_REQUEST['datas']['zoomLevelMaxActivated']=='y' or 192 $_REQUEST['datas']['zoomLevelMaxActivated']=='n')) $_REQUEST['datas']['zoomLevelMaxActivated']='n'; 189 193 } 190 194 } … … 204 208 else 205 209 { 206 if(!(isset($_REQUEST['datas']['categoryId']) &&207 isset($_REQUEST['datas']['mapId']) &&208 isset($_REQUEST['datas']['applySubCat']) &&209 isset($_REQUEST['datas']['kmlFileId']) &&210 isset($_REQUEST['datas']['kmlFileUrl']) &&211 isset($_REQUEST['datas']['icon']) &&212 isset($_REQUEST['datas']['marker']) &&210 if(!(isset($_REQUEST['datas']['categoryId']) and 211 isset($_REQUEST['datas']['mapId']) and 212 isset($_REQUEST['datas']['applySubCat']) and 213 isset($_REQUEST['datas']['kmlFileId']) and 214 isset($_REQUEST['datas']['kmlFileUrl']) and 215 isset($_REQUEST['datas']['icon']) and 216 isset($_REQUEST['datas']['marker']) and 213 217 isset($_REQUEST['datas']['title']) )) 214 218 { … … 262 266 else 263 267 { 264 if(!(isset($_REQUEST['datas']['requestId']) && 265 isset($_REQUEST['datas']['bounds']) && 266 isset($_REQUEST['datas']['width']) && 267 isset($_REQUEST['datas']['height']) && 268 isset($_REQUEST['datas']['distanceTreshold']) && 269 isset($_REQUEST['datas']['bounds']['north']) && 270 isset($_REQUEST['datas']['bounds']['south']) && 271 isset($_REQUEST['datas']['bounds']['east']) && 268 if(!(isset($_REQUEST['datas']['requestId']) and 269 isset($_REQUEST['datas']['callId']) and 270 isset($_REQUEST['datas']['bounds']) and 271 isset($_REQUEST['datas']['width']) and 272 isset($_REQUEST['datas']['height']) and 273 isset($_REQUEST['datas']['distanceTreshold']) and 274 isset($_REQUEST['datas']['bounds']['north']) and 275 isset($_REQUEST['datas']['bounds']['south']) and 276 isset($_REQUEST['datas']['bounds']['east']) and 272 277 isset($_REQUEST['datas']['bounds']['west']) )) 273 278 { 274 279 $_REQUEST['ajaxfct']=''; 275 280 } 276 else277 {278 if(!isset($_REQUEST['datas']['levelInfo'])) $_REQUEST['datas']['levelInfo']=1;279 280 if(!($_REQUEST['datas']['levelInfo']==0 or281 $_REQUEST['datas']['levelInfo']==1)) $_REQUEST['datas']['levelInfo']=1;282 }283 281 } 284 282 } … … 293 291 $_REQUEST['ajaxfct']=''; 294 292 } 295 296 297 } 298 293 } 299 294 } 300 295 } //checkRequest … … 353 348 $result=$this->ajax_gmaps_public_mapsGetMarkers($_REQUEST['datas']); 354 349 break; 350 case 'public.maps.getMarkersInfos': 351 $result=$this->ajax_gmaps_public_mapsGetMarkersInfos($_REQUEST['datas']); 352 break; 355 353 } 356 354 GPCAjax::returnResult($result); … … 378 376 $datas=Array(); 379 377 380 $sql="SELECT id, name, displayType, sizeMode, width, height, zoomLevel, mapType, mapTypeControl, navigationControl, scaleControl, streetViewControl 378 $sql="SELECT id, name, displayType, sizeMode, width, height, zoomLevel, 379 mapType, mapTypeControl, navigationControl, scaleControl, 380 streetViewControl, zoomLevelMaxActivated 381 381 FROM ".$this->tables['maps']." 382 382 ORDER BY displayType ASC, name ASC"; … … 443 443 $properties['scaleControl']."', '". 444 444 $properties['streetViewControl']."', '". 445 mysql_escape_string($properties['style'])."');"; 445 mysql_escape_string($properties['style'])."', '". 446 $properties['zoomLevelMaxActivated']."');"; 446 447 $result=pwg_query($sql); 447 448 $id=pwg_db_insert_id(); … … 461 462 $properties['scaleControl']."', streetViewControl='". 462 463 $properties['streetViewControl']."', style='". 463 mysql_escape_string($properties['style'])."' 464 mysql_escape_string($properties['style'])."', zoomLevelMaxActivated='". 465 $properties['zoomLevelMaxActivated']."' 464 466 WHERE id='$id';"; 465 467 $result=pwg_query($sql); … … 490 492 'navigationControl' => 0, 491 493 'scaleControl' => 'y', 492 'streetViewControl' => 'n' 494 'streetViewControl' => 'n', 495 'zoomLevelMaxActivated' => 'n', 496 'associations' => 0, 493 497 ); 494 498 495 $sql="SELECT id, displayType, sizeMode, name, width, height, zoomLevel, mapType, mapTypeControl, navigationControl, scaleControl, streetViewControl 496 FROM ".$this->tables['maps']." 497 WHERE id='$id';"; 499 $sql="SELECT pgmm.id, pgmm.displayType, pgmm.sizeMode, pgmm.name, 500 pgmm.width, pgmm.height, pgmm.zoomLevel, pgmm.mapType, 501 pgmm.mapTypeControl, pgmm.navigationControl, 502 pgmm.scaleControl, pgmm.streetViewControl, 503 pgmm.zoomLevelMaxActivated, 504 COUNT(pgcm.id) AS nbAssoc 505 FROM ".$this->tables['maps']." pgmm 506 LEFT JOIN ".$this->tables['category_maps']." pgcm 507 ON pgcm.mapId=pgmm.id 508 WHERE pgmm.id='$id' 509 GROUP BY pgmm.id;"; 498 510 $result=pwg_query($sql); 499 511 if($result) … … 781 793 while($row=pwg_db_fetch_assoc($result)) 782 794 { 783 $row['fileSize']= $this->formatOctet($row['fileSize']);795 $row['fileSize']=GPCCore::formatOctet($row['fileSize']); 784 796 $datas[]=$row; 785 797 } … … 852 864 } 853 865 854 $file= dirname(__FILE__).'/kml/'.$file;866 $file=GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file; 855 867 856 868 if(file_exists($file)) unlink($file); … … 858 870 { 859 871 $currentInfo=$this->ajax_gmaps_admin_kmlFilesGetFile($id, false); 860 if(file_exists( dirname(__FILE__).'/kml/'.$currentInfo['file'])) unlink(dirname(__FILE__).'/kml/'.$currentInfo['file']);872 if(file_exists(self::KML_DIRECTORY.$currentInfo['file'])) unlink(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$currentInfo['file']); 861 873 } 862 874 … … 933 945 while($row=pwg_db_fetch_assoc($result)) 934 946 { 935 $row['fileSizeUnits']= $this->formatOctet($row['fileSize']);947 $row['fileSizeUnits']=GPCCore::formatOctet($row['fileSize']); 936 948 $returned=$row; 937 949 } … … 989 1001 if($result) 990 1002 { 991 if($file!='' and file_exists( dirname(__FILE__).'/kml/'.$file))992 { 993 unlink( dirname(__FILE__).'/kml/'.$file);1003 if($file!='' and file_exists(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file)) 1004 { 1005 unlink(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file); 994 1006 } 995 1007 return('ok'); … … 1092 1104 'latitude' => $coords[0], 1093 1105 'longitude' => $coords[1], 1094 'imageName' => mysql_escape_string($row['imageName']),1106 'imageName' => GPCCore::getUserLanguageDesc(mysql_escape_string($row['imageName'])), 1095 1107 'imageTnFile' => dirname($row['path']).'/'.$conf['dir_thumbnail'].'/'.$conf['prefix_thumbnail'].get_filename_wo_extension(basename($row['path'])).'.'.$row['tn_ext'], 1096 1108 'imageCatsId' => $row['imageCatsId'], … … 1119 1131 * 'width' : width of maps in pixels 1120 1132 * 'height' : height of maps in pixels 1121 * 'levelInfo' : 0 = don't return pictures info (name, url, ...)1122 * 1 = return pictures informations1123 1133 * @return Array|String : a JSON string of an array of points (nbPictures, lat, lng) 1124 1134 */ … … 1128 1138 1129 1139 $returned=array( 1140 'callId' => $datas['callId'], 1130 1141 'markers' => array(), 1131 1142 'datas' => array( … … 1200 1211 // works with the highest ratio 1201 1212 $ratio=max($ratioW, $ratioH); 1202 1203 1204 $points=array(); 1213 $datas['distanceTreshold']=pow($datas['distanceTreshold']*$ratio,2); 1214 1215 1205 1216 $groups=array(); 1206 1217 1207 while($row=pwg_db_fetch_assoc($result))1208 {1209 $points[]=$row;1210 }1211 1218 1212 1219 /* 1213 1220 * build groups 1214 1221 */ 1215 while(count($points)>0) 1216 { 1217 $currentGroup=array(); 1218 $currentGroup[]=array_shift($points); 1219 1220 $i=0; 1221 while($i<count($points)) 1222 { 1223 $dist=sqrt(pow($points[$i]['latitude']-$currentGroup[0]['latitude'],2) + pow($points[$i]['longitude']-$currentGroup[0]['longitude'],2))/$ratio; 1224 1225 if($dist <= $datas['distanceTreshold']) 1226 { 1227 $tmp=array_splice($points, $i, 1); 1228 $currentGroup[]=$tmp[0]; 1229 $points=array_values($points); // reset array index... 1230 } 1231 else 1232 { 1233 $i++; 1234 } 1235 } 1236 1237 $groups[]=$currentGroup; 1238 unset($currentGroup); 1239 } 1222 while($row=pwg_db_fetch_assoc($result)) 1223 { 1224 if(!$this->checkInGroup($row, $groups, $datas['distanceTreshold'])) 1225 { 1226 $groups[]=array($row); 1227 } 1228 } 1229 1240 1230 1241 1231 /* … … 1247 1237 $coords=array( 1248 1238 'nbImgTxt' => '', 1249 'nbIm ages' => 0,1239 'nbImg' => 0, 1250 1240 'lat' => 0, // 'lat' rather than 'latitude' 1251 1241 'lng' => 0, // 'lng' rather than 'longitude' … … 1270 1260 'category' => array( 1271 1261 'id' => $id, 1272 'name' => $tmpCatsNames[$key],1262 'name' => GPCCore::getUserLanguageDesc($tmpCatsNames[$key]), 1273 1263 'permalink' => (substr($tmpCatsPLinks[$key],0,1)=='*')?'':$tmpCatsPLinks[$key], 1274 1264 ) … … 1279 1269 if(count($tmpCatsId)<=1) $tmpCatsNames=''; 1280 1270 1281 $coords['nbIm ages']++;1271 $coords['nbImg']++; 1282 1272 1283 1273 $coords['lat']+=$point['latitude']; 1284 1274 $coords['lng']+=$point['longitude']; 1285 1275 1286 if($datas['levelInfo']==1) 1287 { 1288 $coords['imgTn'][]=substr($point['imageTnFile'],12); 1289 $coords['imgCatsNames'][]=$tmpCatsNames; 1290 $coords['imgName'][]=$point['imageName']; 1291 $coords['imgCatsUrl'][]=$tmpCatsUrl; 1292 } 1276 $coords['imgTn'][]=substr($point['imageTnFile'],12); 1277 $coords['imgCatsNames'][]=$tmpCatsNames; 1278 $coords['imgName'][]=GPCCore::getUserLanguageDesc($point['imageName']); 1279 $coords['imgCatsUrl'][]=$tmpCatsUrl; 1293 1280 } 1294 1281 $coords['lat']=$coords['lat']/count($group); 1295 1282 $coords['lng']=$coords['lng']/count($group); 1296 $coords['u niqueId']=md5($coords['lat'].$coords['lng']);1297 1298 if($coords['nbIm ages']==1)1283 $coords['uId']=md5($coords['lat'].$coords['lng']); 1284 1285 if($coords['nbImg']==1) 1299 1286 { 1300 1287 $coords['nbImgTxt']=l10n('gmaps_1_picture'); … … 1302 1289 else 1303 1290 { 1304 $coords['nbImgTxt']=sprintf(l10n('gmaps_nb_pictures'), $coords['nbIm ages']);1291 $coords['nbImgTxt']=sprintf(l10n('gmaps_nb_pictures'), $coords['nbImg']); 1305 1292 } 1306 1293 1307 1294 $returned['markers'][]=$coords; 1308 $returned['datas']['nbPhotos']+=$coords['nbIm ages'];1295 $returned['datas']['nbPhotos']+=$coords['nbImg']; 1309 1296 } 1310 1297 } … … 1324 1311 1325 1312 return(json_encode($returned)); 1313 } //ajax_gmaps_public_mapsGetMarkers 1314 1315 /** 1316 * check if a point is inside an existing group, and add it 1317 * @param Array $point : the point 1318 * @param Array &$groups : the groups 1319 * @param Float $maxDist : maximum distance to be inside group 1320 * @return Bool : true if added in a group, otherwise false 1321 */ 1322 private function checkInGroup($point, &$groups, $maxDist) 1323 { 1324 foreach($groups as $key=>$group) 1325 { 1326 $dist=pow($point['latitude']-$group[0]['latitude'],2) + pow($point['longitude']-$group[0]['longitude'],2); 1327 1328 if($dist<=$maxDist) 1329 { 1330 $groups[$key][]=$point; 1331 return(true); 1332 } 1333 } 1334 return(false); 1326 1335 } 1327 1328 1329 1330 1331 /**1332 * formats a file size into a human readable size1333 *1334 * @param String $format : "A" : auto1335 * "Ai" : auto (io)1336 * "O" : o1337 * "K" : Ko1338 * "M" : Mo1339 * "G" : Go1340 * "Ki" : Kio1341 * "Mi" : Mio1342 * "Gi" : Gio1343 * @param String $thsep : thousand separator1344 * @param Integer $prec : number of decimals1345 * @param Bool $visible : display or not the unit1346 * @return String : a formatted file size1347 */1348 private function formatOctet($octets, $format="Ai", $thsep="", $prec=2, $visible=true)1349 {1350 if($format=="Ai")1351 {1352 if($octets<1024)1353 { $format="O"; }1354 elseif($octets<1024000)1355 { $format="Ki"; }1356 elseif($octets<1024000000)1357 { $format="Mi"; }1358 else1359 { $format="Gi"; }1360 }1361 elseif($format=="A")1362 {1363 if($octets<1000)1364 { $format="O"; }1365 elseif($octets<1000000)1366 { $format="Ki"; }1367 elseif($octets<1000000000)1368 { $format="Mi"; }1369 else1370 { $format="Gi"; }1371 }1372 1373 switch($format)1374 {1375 case "O":1376 $unit="o"; $div=1;1377 break;1378 case "K":1379 $unit="Ko"; $div=1000;1380 break;1381 case "M":1382 $unit="Mo"; $div=1000000;1383 break;1384 case "G":1385 $unit="Go"; $div=1000000000;1386 break;1387 case "Ki":1388 $unit="Kio"; $div=1024;1389 break;1390 case "Mi":1391 $unit="Mio"; $div=1024000;1392 break;1393 case "Gi":1394 $unit="Gio"; $div=1024000000;1395 break;1396 }1397 1398 $returned=number_format($octets/$div, $prec, '.', $thsep);1399 if($visible) $returned.=' '.$unit;1400 return($returned);1401 } //function formatOctet1402 1403 1404 1336 1405 1337 } //class -
extensions/GMaps/gmaps_install.class.inc.php
r7177 r7308 41 41 public function install() 42 42 { 43 if(!file_exists(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY)) 44 { 45 mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY, 0755, true); 46 } 47 43 48 $this->initConfig(); 44 49 $this->loadConfig(); … … 62 67 `streetViewControl` char(1) NOT NULL default 'n', 63 68 `style` varchar(512) NOT NULL, 69 `zoomLevelMaxActivated` char(1) NOT NULL default 'n', 64 70 PRIMARY KEY (`id`) 65 71 )", … … 131 137 switch($this->config['installed']) 132 138 { 133 // actually, there no migration possible from previous release 139 case '01.00.00'; 140 $this->updateFrom_010000(); 134 141 default: 135 142 // nothing to do... … … 150 157 } 151 158 159 160 /** 161 * update from release 1.0.0 162 * 163 * - create the /local/plugins/GMaps/kml directory 164 * - move kml files from /plugins/GMaps/kml directory to the new directory 165 * - remove the /plugins/GMaps/kml directory 166 */ 167 private function updateFrom_010000() 168 { 169 mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY, 0755, true); 170 171 $directory=scandir(GMAPS_PATH.'kml/'); 172 foreach($directory as $file) 173 { 174 $ext=(pathinfo($file, PATHINFO_EXTENSION)); 175 if(preg_match('/.*(?:\.kml|\.kmz)$/i', $file)) 176 { 177 rename(GMAPS_PATH.'kml/'.$file, GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY.$file); 178 } 179 } 180 181 mkdir(GPCCore::getPiwigoSystemPath().self::KML_DIRECTORY); 182 183 184 $tablesUpdate=array( 185 $this->tables['images_tags'] => array( 186 'zoomLevelMaxActivated' => " ADD COLUMN `zoomLevelMaxActivated` CHAR(1) NOT NULL DEFAULT 'n' AFTER `style` ", 187 ) 188 ); 189 190 $tablef=new GPCTables(array($this->tables['maps'])); 191 $tablef->updateTablesFields($tablesUpdate); 192 193 unset($tablesUpdate); 194 } 195 152 196 } //class 153 197 -
extensions/GMaps/gmaps_pip.class.inc.php
r7177 r7308 178 178 title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title'] )."', 179 179 markers:[], 180 fitToBounds:true 180 fitToBounds:true, 181 zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false')." 181 182 }"; 182 183 … … 224 225 maps: 225 226 [".implode(',', $scripts)."], 227 popupAutomaticSize:".$this->config['popupAutomaticSize'].", 228 callId:0 226 229 } 227 230 </script>", false); … … 304 307 maps: 305 308 [".implode(',', $this->picture['properties'])."], 309 popupAutomaticSize:".$this->config['popupAutomaticSize']." 306 310 } 307 311 </script>", false); -
extensions/GMaps/gmaps_root.class.inc.php
r7177 r7308 18 18 class GMaps_root extends CommonPlugin 19 19 { 20 const KML_DIRECTORY='/local/plugins/GMaps/kml/'; 20 21 protected $css; 21 22 protected $maps=array(); … … 121 122 //global $user; 122 123 $this->config=array( 124 'popupAutomaticSize' => 0.8 123 125 ); 124 126 } … … 214 216 pgmm.width, pgmm.height, pgmm.zoomLevel, 215 217 pgmm.mapType, pgmm.mapTypeControl, pgmm.scaleControl, pgmm.streetViewControl, 216 pgmm.navigationControl, pgmm.style, 218 pgmm.navigationControl, pgmm.style, pgmm.zoomLevelMaxActivated, 217 219 IF(pgcm.categoryId=0, 0, pct.global_rank) AS priorityRank 218 220 FROM ((".$this->tables['category_maps']." pgcm … … 245 247 { 246 248 // if an kml file id is given, apply the url of the file (needs to give the complete URI for google) 247 if($row['kmlFileId']>0 and $row['kmlFileUrlId']!='') $row['kmlFileUrl']=dirname($_SERVER['SCRIPT_URI']). '/plugins/GMaps/kml/'.$row['kmlFileUrlId'];249 if($row['kmlFileId']>0 and $row['kmlFileUrlId']!='') $row['kmlFileUrl']=dirname($_SERVER['SCRIPT_URI']).self::KML_DIRECTORY.$row['kmlFileUrlId']; 248 250 249 251 if($row['displayType']!='MP') -
extensions/GMaps/gmaps_version.inc.php
r7178 r7308 15 15 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 16 16 17 define('GMAPS_VERSION', '1. 0.0');18 define('GMAPS_VERSION2', '01.0 0.00');19 define('GMAPS_GPC_NEEDED', '3.3. 0');17 define('GMAPS_VERSION', '1.1.0'); 18 define('GMAPS_VERSION2', '01.01.00'); 19 define('GMAPS_GPC_NEEDED', '3.3.2'); 20 20 define('GMAPS_AMD_NEEDED', '0.5.2'); //advanced metadata plugin is needed 21 21 ?> -
extensions/GMaps/js/gmapsCategory.js
r7177 r7308 2 2 * ----------------------------------------------------------------------------- 3 3 * file: gmapsCategory.js 4 * file version: 1. 0.05 * date: 2010-10- 104 * file version: 1.1.0 5 * date: 2010-10-20 6 6 */ 7 7 … … 87 87 function loadMarkers(map) 88 88 { 89 gmaps.callId++; 90 89 91 datas={ 90 92 requestId:gmaps.requestId, 93 callId:gmaps.callId, 91 94 bounds:{ 92 95 north:map.getBounds().getNorthEast().lat(), … … 97 100 width:$(map.getDiv()).width(), 98 101 height:$(map.getDiv()).height(), 99 distanceTreshold:20 102 distanceTreshold:20, 100 103 }; 101 104 … … 104 107 $('#gmapsLoading').css('display', 'inline-block'); 105 108 $('#gmapsNbPhotos').html(''); 106 $('#iDialogGMapWaiting').css(107 {108 width:$('#iGMapsIcon').width()+'px',109 height:$('#iGMapsIcon').height()+'px',110 top:$('#iGMapsIcon').position().top+'px',111 left:$('#iGMapsIcon').position().left+'px',112 display:'block'113 }114 );115 109 116 110 $.ajax( … … 124 118 { 125 119 tmp=$.parseJSON(msg); 126 tmp.markers.sort(compareMarkers); 127 applyMarkers(currentMapLoad, tmp.markers); 128 $('#gmapsLoading').css('display', 'none'); 129 $('#gmapsNbPhotos').html('['+tmp.datas.nbPhotos+']'); 130 $('#iDialogGMapWaiting').css('display', 'none'); 120 if(gmaps.callId==tmp.callId) 121 { 122 tmp.markers.sort(compareMarkers); 123 applyMarkers(currentMapLoad, tmp.markers); 124 $('#gmapsLoading').css('display', 'none'); 125 $('#gmapsNbPhotos').html('['+tmp.datas.nbPhotos+']'); 126 } 131 127 } 132 128 } … … 140 136 * @param Array markers : array of markers properties 141 137 * each marker is an object with properties : 142 * latitude, longitude, nbIm ages138 * latitude, longitude, nbImg 143 139 */ 144 140 function applyMarkers(map, markers) … … 154 150 while(i<map.markers.length) 155 151 { 156 newListIndex=markerInList(map.markers[i].u niqueId, markers);152 newListIndex=markerInList(map.markers[i].uId, markers); 157 153 if(newListIndex==-1) 158 154 { … … 189 185 { 190 186 marker:marker, 191 u niqueId:markers[i].uniqueId187 uId:markers[i].uId 192 188 } 193 189 ); … … 207 203 function compareMarkers(m1,m2) 208 204 { 209 if(m1.u niqueId<m2.uniqueId)205 if(m1.uId<m2.uId) 210 206 { 211 207 return(-1); 212 208 } 213 else if(m1.u niqueId<m2.uniqueId)209 else if(m1.uId<m2.uId) 214 210 { 215 211 return(1); … … 222 218 for(var i=0;i<markerList.length;i++) 223 219 { 224 if(markerList[i].u niqueId==uniqueId) return(i)220 if(markerList[i].uId==uniqueId) return(i) 225 221 } 226 222 return(-1); … … 286 282 } 287 283 288 if(gmaps.currentInfo.nbIm ages>1)284 if(gmaps.currentInfo.nbImg>1) 289 285 { 290 286 $('#ciGMIWC_picnum').html((index+1)+'/'+gmaps.currentInfo.nbImgTxt); … … 304 300 { 305 301 gmaps.currentInfo.displayed--; 306 if(gmaps.currentInfo.displayed<0) gmaps.currentInfo.displayed=gmaps.currentInfo.nbIm ages-1;302 if(gmaps.currentInfo.displayed<0) gmaps.currentInfo.displayed=gmaps.currentInfo.nbImg-1; 307 303 displayPictureInfo(gmaps.currentInfo.displayed); 308 304 } … … 314 310 { 315 311 gmaps.currentInfo.displayed++; 316 if(gmaps.currentInfo.displayed>=gmaps.currentInfo.nbIm ages) gmaps.currentInfo.displayed=0;312 if(gmaps.currentInfo.displayed>=gmaps.currentInfo.nbImg) gmaps.currentInfo.displayed=0; 317 313 displayPictureInfo(gmaps.currentInfo.displayed); 318 314 } 319 315 320 316 317 /** 318 * check if zoomLevel 319 */ 320 function fitToBounds(bounds) 321 { 322 gmaps.maps[gmaps.currentMapLoadIndex].gMap.fitBounds(bounds); 323 324 if(gmaps.maps[gmaps.currentMapLoadIndex].zoomLevelMaxActivated && 325 gmaps.maps[gmaps.currentMapLoadIndex].gMap.getZoom() > gmaps.maps[gmaps.currentMapLoadIndex].zoomLevel) 326 { 327 gmaps.maps[gmaps.currentMapLoadIndex].gMap.setZoom(gmaps.maps[gmaps.currentMapLoadIndex].zoomLevel); 328 } 329 } 330 331 function initializeMapViewport(mode) 332 { 333 if(gmaps.currentMapLoadIndex>-1 && 334 ($('#'+gmaps.maps[gmaps.currentMapLoadIndex].id+'Content').dialog('isOpen') && mode=='loaded' || mode=='open') && 335 (gmaps.maps[gmaps.currentMapLoadIndex].viewportInitialized==false) 336 ) 337 { 338 /* 339 * if the container is not visible when map are built, they are 340 * not initialized correctly 341 * 342 * when dialog is opened for the first time, proceed to map 343 * finalization : 344 * - resize 345 * - center the map 346 * - add handlers on events 'dragend' and 'zoom_change' 347 * allowing to reload markers according to the new viewport 348 */ 349 google.maps.event.trigger(gmaps.maps[gmaps.currentMapLoadIndex].gMap, 'resize'); 350 351 352 if(gmaps.maps[gmaps.currentMapLoadIndex].fitToBounds) 353 { 354 fitToBounds(gmaps.bounds) 355 } 356 else 357 { 358 gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.bounds.getCenter()); 359 } 360 361 // reduce copyright size... ^_^ 362 $('#'+gmaps.maps[gmaps.currentMapLoadIndex].id+' span, #'+gmaps.maps[gmaps.currentMapLoadIndex].id+' a').css('font-size', '55.0%'); 363 364 if(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile!=null) 365 gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.setMap(gmaps.maps[gmaps.currentMapLoadIndex].gMap); 366 367 google.maps.event.addListener( 368 gmaps.maps[gmaps.currentMapLoadIndex].gMap, 369 'dragend', 370 function() 371 { 372 loadMarkers(this); 373 $('#gmapsBoundMap').css('display', 'inline'); 374 $('#gmapsBoundKml').css('display', 'inline'); 375 } 376 ); 377 378 google.maps.event.addListener( 379 gmaps.maps[gmaps.currentMapLoadIndex].gMap, 380 'zoom_changed', 381 function() 382 { 383 loadMarkers(this); 384 gmaps.infoWindow.close(); 385 $('#gmapsBoundMap').css('display', 'inline'); 386 $('#gmapsBoundKml').css('display', 'inline'); 387 } 388 ); 389 390 gmaps.maps[gmaps.currentMapLoadIndex].viewportInitialized=true; 391 } 392 393 if(gmaps.currentMapLoadIndex>-1) loadMarkers(gmaps.maps[gmaps.currentMapLoadIndex].gMap); 394 } 395 321 396 $(window).load(function () 322 397 { 323 // all maps have the same in tials bounds398 // all maps have the same initials bounds 324 399 gmaps.currentInfo=null; 400 gmaps.currentMapLoadIndex=-1; 325 401 326 402 gmaps.bounds = new google.maps.LatLngBounds( … … 351 427 $('#'+gmaps.maps[i].id).css( 352 428 { 353 width: ($(window).width()* 0.8)+'px',354 height:($(window).height()* 0.8)+'px'429 width: ($(window).width()*gmaps.popupAutomaticSize)+'px', 430 height:($(window).height()*gmaps.popupAutomaticSize)+'px' 355 431 } 356 432 ); 357 433 } 434 435 /* 436 * initialize map on the server side (call the 'public.maps.init' 437 * function 438 */ 439 $.ajax( 440 { 441 type: "POST", 442 url: "plugins/GMaps/gmaps_ajax.php", 443 async: true, 444 data: { ajaxfct:"public.maps.init", category:gmaps.categoryId }, 445 success: 446 function(msg) 447 { 448 gmaps.requestId=msg; 449 initializeMapViewport('loaded'); 450 } 451 } 452 ); 453 358 454 359 455 // initialize dialog box for maps … … 370 466 { 371 467 gmaps.currentMapLoadIndex=$(this).data('index'); 372 373 /* 374 * initialize map on the server side (call the 'public.maps.init' 375 * function 376 */ 377 $.ajax( 378 { 379 type: "POST", 380 url: "plugins/GMaps/gmaps_ajax.php", 381 async: true, 382 data: { ajaxfct:"public.maps.init", category:gmaps.categoryId }, 383 success: 384 function(msg) 385 { 386 gmaps.requestId=msg; 387 388 if(gmaps.maps[gmaps.currentMapLoadIndex].viewportInitialized==false) 389 { 390 /* 391 * if the container is not visible when map are built, they are 392 * not initialized correctly 393 * 394 * when dialog is opened for the first time, proceed to map 395 * finalization : 396 * - resize 397 * - center the map 398 * - add handlers on events 'dragend' and 'zoom_change' 399 * allowing to reload markers according to the new viewport 400 */ 401 google.maps.event.trigger(gmaps.maps[gmaps.currentMapLoadIndex].gMap, 'resize'); 402 403 404 if(gmaps.maps[gmaps.currentMapLoadIndex].fitToBounds) 405 { 406 gmaps.maps[gmaps.currentMapLoadIndex].gMap.fitBounds(gmaps.bounds); 407 } 408 else 409 { 410 gmaps.maps[gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.bounds.getCenter()); 411 } 412 413 // reduce copyright size... ^_^ 414 $('#'+gmaps.maps[gmaps.currentMapLoadIndex].id+' span, #'+gmaps.maps[gmaps.currentMapLoadIndex].id+' a').css('font-size', '55.0%'); 415 416 if(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile!=null) 417 gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.setMap(gmaps.maps[gmaps.currentMapLoadIndex].gMap); 418 419 google.maps.event.addListener( 420 gmaps.maps[gmaps.currentMapLoadIndex].gMap, 421 'dragend', 422 function() 423 { 424 loadMarkers(this); 425 $('#gmapsBoundMap').css('display', 'inline'); 426 $('#gmapsBoundKml').css('display', 'inline'); 427 } 428 ); 429 430 google.maps.event.addListener( 431 gmaps.maps[gmaps.currentMapLoadIndex].gMap, 432 'zoom_changed', 433 function() 434 { 435 loadMarkers(this); 436 gmaps.infoWindow.close(); 437 $('#gmapsBoundMap').css('display', 'inline'); 438 $('#gmapsBoundKml').css('display', 'inline'); 439 } 440 ); 441 442 // loads the markers 443 loadMarkers(gmaps.maps[gmaps.currentMapLoadIndex].gMap); 444 gmaps.maps[gmaps.currentMapLoadIndex].viewportInitialized=true; 445 } 446 447 } 448 } 449 ); 468 initializeMapViewport('open'); 450 469 } 451 470 } … … 453 472 454 473 $('div.gmapsPopup div.ui-dialog-titlebar') 455 .append('<a href="#" id="gmapsBoundMap" style="display:none;" onclick=" gmaps.maps[gmaps.currentMapLoadIndex].gMap.fitBounds(gmaps.bounds); $(this).css(\'display\', \'none\').blur(); return(false);">'+474 .append('<a href="#" id="gmapsBoundMap" style="display:none;" onclick="fitToBounds(gmaps.bounds); $(this).css(\'display\', \'none\').blur(); return(false);">'+ 456 475 '<span>∴</span></a>'); 457 476 $('#gmapsBoundMap').attr('title', gmaps.lang.boundmap); … … 460 479 { 461 480 $('div.gmapsPopup div.ui-dialog-titlebar') 462 .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);">'+481 .append('<a href="#" id="gmapsBoundKml" onclick="fitToBounds(gmaps.maps[gmaps.currentMapLoadIndex].gMap.kmlFile.getDefaultViewport()); $(this).css(\'display\', \'none\').blur(); return(false);">'+ 463 482 '<span>∼</span></a>'); 464 483 $('#gmapsBoundKml').attr('title', gmaps.lang.boundkml); -
extensions/GMaps/js/gmapsCategory.packed.js
r7177 r7308 1 /* file: gmapsCategory.js - v1. 0.0 | packed on 2010/10/13with 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}(' I O,W=[p,{w:32,h:32,x:15,y:31},{w:32,h:32,x:15,y:31},{w:32,h:32,x:10,y:31},{w:30,h:3P,x:4,y:39},];7 2A(k,1B){I 5=o g.3.2W($("#"+k.s).23(0),{3e:\'#38\',2Y:k.2X,2Z:k.2I,3V:2.B.2r(),1m:(k.1m==-1)?u:z,2R:(k.1m==-1)?u:z,1T:(k.1T==\'n\')?u:z,1V:(k.1V==\'n\')?u:z,1t:(k.1t==-1)?u:z,2S:{1z:k.1t},3d:\'\',});9(k.1O!=\'\'){F=o g.3.3i(k.1O,{3g:z})}E{F=p}1N=/^3a(\\d\\d)35.*/i;D=1N.36(k.P);9(D!=p)D=o 37(D[1]);9(D!=p){5.P=o g.3.34(\'1h/1p/2n/\'+k.P,o g.3.33(W[D].w,W[D].h),o g.3.29(0,0),o g.3.29(W[D].x,W[D].y))}E{5.P=p}5.F=F;5.f=o 3b();5.1B=1B;k.m=5;k.1J=u}7 1j(5){1a={1F:2.1F,B:{2s:5.1e().28().1M(),2E:5.1e().28().1G(),1S:5.1e().2a().1M(),2f:5.1e().2a().1G()},K:$(5.1Y()).K(),J:$(5.1Y()).J(),2K:20};O=5;$(\'#1y\').l(\'j\',\'R-14\');$(\'#1l\').M(\'\');$(\'#1U\').l({K:$(\'#1i\').K()+\'Q\',J:$(\'#1i\').J()+\'Q\',1R:$(\'#1i\').1D().1R+\'Q\',22:$(\'#1i\').1D().22+\'Q\',j:\'14\'});$.2k({2j:"2g",2h:"1h/1p/2i.2o",2p:z,1k:{2v:"2w.3.2U",1a:1a},2u:7(13){1b=$.2Q(13);1b.f.2M(21);1W(O,1b.f);$(\'#1y\').l(\'j\',\'G\');$(\'#1l\').M(\'[\'+1b.1a.2P+\']\');$(\'#1U\').l(\'j\',\'G\')}})}7 1W(5,f){9(O==p)H(u);9(5.f.N>0){I i=0;3r(i<5.f.N){1I=25(5.f[i].C,f);9(1I==-1){5.f[i].r.2m(p);5.f.1P(i,1)}E{f.1P(1I,1);i++}}}18(I i=0;i<f.N;i++){I r=o g.3.3I({1D:o g.3.1K(f[i].1M,f[i].1G),5:O,V:f[i].1w});9(5.P!=p)r.3k(5.P);r.1r=f[i];r.1r.t=0;5.f.3M({r:r,C:f[i].C});g.3.Y.12(r,\'2c\',7(){24(T)})}O=p}7 21(1H,1L){9(1H.C<1L.C){H(-1)}E 9(1H.C<1L.C){H(1)}H(0)}7 25(C,1x){18(I i=0;i<1x.N;i++){9(1x[i].C==C)H(i)}H(-1)}7 24(r){2.6=r.1r;2.L.2q();2.L.2B($(\'#2D\').3S().1Z(1o).23(0));2.L.2z(r.5,r);19(2.6.t)}7 1o(i,e){9(e.s!=\'\')e.s=\'c\'+e.s;$(e).3G().1Z(1o)}7 19(q){2.6.t=q;9(2.6.27[q]==\'\'){$(\'#26\').M(\'&3E;\')}E{$(\'#26\').M(2.6.27[q])}$(\'#Z\').1n(\'2l\',\'./3s/\'+2.6.3t[q]);$(\'#Z\').2C();9(2.6.17[q].N==1){$(\'#Z\').1A(\'2c\',7(){16.3q=2.6.17[2.6.t][0]})}E{$(\'#2d\').M(\'\');18(I i=0;i<2.6.17[q].N;i++){$(\'#2d\').S(\'<2b><a 1C="\'+2.6.17[q][i]+\'">\'+2.6.3m[q][i]+\'</a></2b>\')}$(\'#Z, #1s\').1A(\'3n\',7(){$(\'#1s\').l(\'j\',\'14\')}).1A(\'3u\',7(){$(\'#1s\').l(\'j\',\'G\')})}9(2.6.1u>1){$(\'#2e\').M((q+1)+\'/\'+2.6.1w);$(\'#1X, #1Q\').l(\'j\',\'R-14\')}E{$(\'#2e\').M(2.6.1w);$(\'#1X, #1Q\').l(\'j\',\'G\')}}7 3C(){2.6.t--;9(2.6.t<0)2.6.t=2.6.1u-1;19(2.6.t)}7 3D(){2.6.t++;9(2.6.t>=2.6.1u)2.6.t=0;19(2.6.t)}$(16).3w(7(){2.6=p;2.B=o g.3.3y(o g.3.1K(2.B.1S,2.B.2f),o g.3.1K(2.B.2s,2.B.2E));2.L=o g.3.3x();g.3.Y.12(2.L,\'3z\',7(){$(\'3A\').S($(\'#2D\'));2.L.2B(\'\');$(\'#Z\').2C()});18(I i=0;i<2.3.N;i++){2A(2.3[i],i);9(2.3[i].3B==\'A\'){$(\'#\'+2.3[i].s).l({K:($(16).K()*0.8)+\'Q\',J:($(16).J()*0.8)+\'Q\'})}$(\'#\'+2.3[i].s+\'3v\').11({3o:u,K:\'2y\',J:\'2y\',3l:z,3p:\'X\',3F:\'1d\',V:2.3[i].V,2z:7(){2.b=$(T).1k(\'q\');$.2k({2j:"2g",2h:"1h/1p/2i.2o",2p:z,1k:{2v:"2w.3.3U",3T:2.3O},2u:7(13){2.1F=13;9(2.3[2.b].1J==u){g.3.Y.3N(2.3[2.b].m,\'3H\');9(2.3[2.b].3L){2.3[2.b].m.1E(2.B)}E{2.3[2.b].m.3K(2.B.2r())}$(\'#\'+2.3[2.b].s+\' v, #\'+2.3[2.b].s+\' a\').l(\'3J-3R\',\'3Q.0%\');9(2.3[2.b].m.F!=p)2.3[2.b].m.F.2m(2.3[2.b].m);g.3.Y.12(2.3[2.b].m,\'2O\',7(){1j(T);$(\'#1g\').l(\'j\',\'R\');$(\'#1f\').l(\'j\',\'R\')});g.3.Y.12(2.3[2.b].m,\'2N\',7(){1j(T);2.L.2q();$(\'#1g\').l(\'j\',\'R\');$(\'#1f\').l(\'j\',\'R\')});1j(2.3[2.b].m);2.3[2.b].1J=z}}})}}).1k(\'q\',i);$(\'U.1d U.1c-11-1q\').S(\'<a 1C="#" s="1g" 1z="j:G;" 2t="2.3[2.b].m.1E(2.B); $(T).l(\\\'j\\\', \\\'G\\\').2x(); H(u);">\'+\'<v>&2L;</v></a>\');$(\'#1g\').1n(\'V\',2.1v.2V);9(2.3[i].m.F!=p){$(\'U.1d U.1c-11-1q\').S(\'<a 1C="#" s="1f" 2t="2.3[2.b].m.1E(2.3[2.b].m.F.2H()); $(T).l(\\\'j\\\', \\\'G\\\').2x(); H(u);">\'+\'<v>&2J;</v></a>\');$(\'#1f\').1n(\'V\',2.1v.3f)}$(\'U.1d U.1c-11-1q\').S(\'<v s="1y" 1z="j:G;"><2n 2l="./1h/3c/3h/3j.2F"><v>\'+2.1v.2G+\'</v></v>\');$(\'#1c-11-V-2T\').S(\'<v s="1l"></v>\')}});',62,244,'||gmaps|maps||map|currentInfo|function||if||currentMapLoadIndex||||markers|google|||display|properties|css|gMap||new|null|index|marker|id|displayed|false|span||||true||bounds|uniqueId|iM|else|kmlFile|none|return|var|height|width|infoWindow|html|length|currentMapLoad|markerImg|px|inline|append|this|div|title|markerImgProp||event|ciGMIWC_img||dialog|addListener|msg|block||window|imgCatsUrl|for|displayPictureInfo|datas|tmp|ui|gmapsPopup|getBounds|gmapsBoundKml|gmapsBoundMap|plugins|iGMapsIcon|loadMarkers|data|gmapsNbPhotos|navigationControl|attr|renameId|GMaps|titlebar|info|ciGMIWC_showcat|mapTypeControl|nbImages|lang|nbImgTxt|markerList|gmapsLoading|style|bind|gmapsIndex|href|position|fitBounds|requestId|lng|m1|newListIndex|viewportInitialized|LatLng|m2|lat|re|kmlFileUrl|splice|ciWARight|top|south|scaleControl|iDialogGMapWaiting|streetViewControl|applyMarkers|ciWALeft|getDiv|each||compareMarkers|left|get|displayWindowInfo|markerInList|ciGMIWC_title|imgName|getNorthEast|Point|getSouthWest|li|click|ciGMIWC_showcatList|ciGMIWC_picnum|west|POST|url|gmaps_ajax|type|ajax|src|setMap|img|php|async|close|getCenter|north|onclick|success|ajaxfct|public|blur|auto|open|createMap|setContent|unbind|iGMapsInfoWindowContent|east|gif|loading|getDefaultViewport|zoomLevel|sim|distanceTreshold|there4|sort|zoom_changed|dragend|nbPhotos|parseJSON|scrollwheel|mapTypeControlOptions|iGMapsIconContent|getMarkers|boundmap|Map|mapType|mapTypeId|zoom||||Size|MarkerImage|_|exec|Number|ffffff||mS|Array|GrumPluginClasses|markerTitle|backgroundColor|boundkml|preserveViewport|icons|KmlLayer|processing|setIcon|modal|imgCatsNames|mouseenter|autoOpen|closeText|location|while|galleries|imgTn|mouseleave|Content|load|InfoWindow|LatLngBounds|closeclick|body|sizeMode|displayPicturePrev|displayPictureNext|nbsp|dialogClass|children|resize|Marker|font|setCenter|fitToBounds|push|trigger|categoryId|40|55|size|clone|category|init|center'.split('|'),0,{}))1 /* file: gmapsCategory.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}('E R,12=[q,{w:32,h:32,x:15,y:31},{w:32,h:32,x:15,y:31},{w:32,h:32,x:10,y:31},{w:30,h:40,x:4,y:39},];9 2h(g,1D){E 6=l f.3.2I($("#"+g.o).1W(0),{3d:\'#2U\',2K:g.3b,34:g.1s,2O:2.t.1S(),1u:(g.1u==-1)?u:z,2R:(g.1u==-1)?u:z,2p:(g.2p==\'n\')?u:z,2n:(g.2n==\'n\')?u:z,1p:(g.1p==-1)?u:z,2P:{1H:g.1p},2Q:\'\',});8(g.2m!=\'\'){D=l f.3.2N(g.2m,{2L:z})}F{D=q}2s=/^2M(\\d\\d)36.*/i;B=2s.3a(g.Q);8(B!=q)B=l 2Y(B[1]);8(B!=q){6.Q=l f.3.33(\'14/1K/2E/\'+g.Q,l f.3.2Z(12[B].w,12[B].h),l f.3.2z(0,0),l f.3.2z(12[B].x,12[B].y))}F{6.Q=q}6.D=D;6.b=l 2S();6.1D=1D;g.j=6;g.1k=u}9 1j(6){2.T++;16={1B:2.1B,T:2.T,t:{2B:6.1d().1O().1J(),2a:6.1d().1O().1I(),2C:6.1d().1Q().1J(),2A:6.1d().1Q().1I()},Z:$(6.1R()).Z(),Y:$(6.1R()).Y(),2H:20,};R=6;$(\'#1E\').k(\'m\',\'M-1l\');$(\'#1q\').I(\'\');$.2g({2w:"2f",2b:"14/1K/2c.2d",2e:z,1i:{2k:"2l.3.2T",16:16},2t:9(13){W=$.3c(13);8(2.T==W.T){W.b.2V(2v);29(R,W.b);$(\'#1E\').k(\'m\',\'K\');$(\'#1q\').I(\'[\'+W.16.2X+\']\')}}})}9 29(6,b){8(R==q)C(u);8(6.b.J>0){E i=0;38(i<6.b.J){1L=1Y(6.b[i].G,b);8(1L==-1){6.b[i].p.1P(q);6.b.26(i,1)}F{b.26(1L,1);i++}}}1b(E i=0;i<b.J;i++){E p=l f.3.2W({35:l f.3.1M(b[i].1J,b[i].1I),6:R,O:b[i].1n});8(6.Q!=q)p.37(6.Q);p.1G=b[i];p.1G.s=0;6.b.2J({p:p,G:b[i].G});f.3.U.17(p,\'1T\',9(){1X(S)})}R=q}9 2v(1t,1v){8(1t.G<1v.G){C(-1)}F 8(1t.G<1v.G){C(1)}C(0)}9 1Y(1Z,1r){1b(E i=0;i<1r.J;i++){8(1r[i].G==1Z)C(i)}C(-1)}9 1X(p){2.5=p.1G;2.H.22();2.H.2G($(\'#2D\').3i().1U(1C).1W(0));2.H.1h(p.6,p);19(2.5.s)}9 1C(i,e){8(e.o!=\'\')e.o=\'c\'+e.o;$(e).3L().1U(1C)}9 19(r){2.5.s=r;8(2.5.21[r]==\'\'){$(\'#1V\').I(\'&3M;\')}F{$(\'#1V\').I(2.5.21[r])}$(\'#11\').1w(\'2y\',\'./3I/\'+2.5.3H[r]);$(\'#11\').2F();8(2.5.1c[r].J==1){$(\'#11\').1A(\'1T\',9(){1a.3D=2.5.1c[2.5.s][0]})}F{$(\'#27\').I(\'\');1b(E i=0;i<2.5.1c[r].J;i++){$(\'#27\').P(\'<28><a 1x="\'+2.5.1c[r][i]+\'">\'+2.5.3E[r][i]+\'</a></28>\')}$(\'#11, #1y\').1A(\'3F\',9(){$(\'#1y\').k(\'m\',\'1l\')}).1A(\'3G\',9(){$(\'#1y\').k(\'m\',\'K\')})}8(2.5.1z>1){$(\'#25\').I((r+1)+\'/\'+2.5.1n);$(\'#23, #24\').k(\'m\',\'M-1l\')}F{$(\'#25\').I(2.5.1n);$(\'#23, #24\').k(\'m\',\'K\')}}9 3N(){2.5.s--;8(2.5.s<0)2.5.s=2.5.1z-1;19(2.5.s)}9 3O(){2.5.s++;8(2.5.s>=2.5.1z)2.5.s=0;19(2.5.s)}9 V(t){2.3[2.7].j.3V(t);8(2.3[2.7].3W&&2.3[2.7].j.3X()>2.3[2.7].1s){2.3[2.7].j.3Y(2.3[2.7].1s)}}9 1F(1m){8(2.7>-1&&($(\'#\'+2.3[2.7].o+\'2r\').L(\'3U\')&&1m==\'2u\'||1m==\'1h\')&&(2.3[2.7].1k==u)){f.3.U.3T(2.3[2.7].j,\'3P\');8(2.3[2.7].V){V(2.t)}F{2.3[2.7].j.3e(2.t.1S())}$(\'#\'+2.3[2.7].o+\' v, #\'+2.3[2.7].o+\' a\').k(\'3R-3S\',\'3C.0%\');8(2.3[2.7].j.D!=q)2.3[2.7].j.D.1P(2.3[2.7].j);f.3.U.17(2.3[2.7].j,\'3B\',9(){1j(S);$(\'#1e\').k(\'m\',\'M\');$(\'#1f\').k(\'m\',\'M\')});f.3.U.17(2.3[2.7].j,\'3l\',9(){1j(S);2.H.22();$(\'#1e\').k(\'m\',\'M\');$(\'#1f\').k(\'m\',\'M\')});2.3[2.7].1k=z}8(2.7>-1)1j(2.3[2.7].j)}$(1a).3m(9(){2.5=q;2.7=-1;2.t=l f.3.3o(l f.3.1M(2.t.2C,2.t.2A),l f.3.1M(2.t.2B,2.t.2a));2.H=l f.3.3j();f.3.U.17(2.H,\'3f\',9(){$(\'3h\').P($(\'#2D\'));2.H.2G(\'\');$(\'#11\').2F()});1b(E i=0;i<2.3.J;i++){2h(2.3[i],i);8(2.3[i].3x==\'A\'){$(\'#\'+2.3[i].o).k({Z:($(1a).Z()*2.2i)+\'2j\',Y:($(1a).Y()*2.2i)+\'2j\'})}$.2g({2w:"2f",2b:"14/1K/2c.2d",2e:z,1i:{2k:"2l.3.3z",3A:2.3w},2t:9(13){2.1B=13;1F(\'2u\')}});$(\'#\'+2.3[i].o+\'2r\').L({3r:u,Z:\'2q\',Y:\'2q\',3s:z,3t:\'X\',3Z:\'1g\',O:2.3[i].O,1h:9(){2.7=$(S).1i(\'r\');1F(\'1h\')}}).1i(\'r\',i);$(\'N.1g N.18-L-1N\').P(\'<a 1x="#" o="1e" 1H="m:K;" 2o="V(2.t); $(S).k(\\\'m\\\', \\\'K\\\').2x(); C(u);">\'+\'<v>&3q;</v></a>\');$(\'#1e\').1w(\'O\',2.1o.3p);8(2.3[i].j.D!=q){$(\'N.1g N.18-L-1N\').P(\'<a 1x="#" o="1f" 2o="V(2.3[2.7].j.D.3Q()); $(S).k(\\\'m\\\', \\\'K\\\').2x(); C(u);">\'+\'<v>&3K;</v></a>\');$(\'#1f\').1w(\'O\',2.1o.3n)}$(\'N.1g N.18-L-1N\').P(\'<v o="1E" 1H="m:K;"><2E 2y="./14/3J/3k/3g.3u"><v>\'+2.1o.3v+\'</v></v>\');$(\'#18-L-O-3y\').P(\'<v o="1q"></v>\')}});',62,249,'||gmaps|maps||currentInfo|map|currentMapLoadIndex|if|function||markers||||google|properties|||gMap|css|new|display||id|marker|null|index|displayed|bounds|false|span||||true||iM|return|kmlFile|var|else|uId|infoWindow|html|length|none|dialog|inline|div|title|append|markerImg|currentMapLoad|this|callId|event|fitToBounds|tmp||height|width||ciGMIWC_img|markerImgProp|msg|plugins||datas|addListener|ui|displayPictureInfo|window|for|imgCatsUrl|getBounds|gmapsBoundMap|gmapsBoundKml|gmapsPopup|open|data|loadMarkers|viewportInitialized|block|mode|nbImgTxt|lang|mapTypeControl|gmapsNbPhotos|markerList|zoomLevel|m1|navigationControl|m2|attr|href|ciGMIWC_showcat|nbImg|bind|requestId|renameId|gmapsIndex|gmapsLoading|initializeMapViewport|info|style|lng|lat|GMaps|newListIndex|LatLng|titlebar|getNorthEast|setMap|getSouthWest|getDiv|getCenter|click|each|ciGMIWC_title|get|displayWindowInfo|markerInList|uniqueId||imgName|close|ciWALeft|ciWARight|ciGMIWC_picnum|splice|ciGMIWC_showcatList|li|applyMarkers|east|url|gmaps_ajax|php|async|POST|ajax|createMap|popupAutomaticSize|px|ajaxfct|public|kmlFileUrl|streetViewControl|onclick|scaleControl|auto|Content|re|success|loaded|compareMarkers|type|blur|src|Point|west|north|south|iGMapsInfoWindowContent|img|unbind|setContent|distanceTreshold|Map|push|mapTypeId|preserveViewport|mS|KmlLayer|center|mapTypeControlOptions|markerTitle|scrollwheel|Array|getMarkers|ffffff|sort|Marker|nbPhotos|Number|Size||||MarkerImage|zoom|position|_|setIcon|while||exec|mapType|parseJSON|backgroundColor|setCenter|closeclick|processing|body|clone|InfoWindow|icons|zoom_changed|load|boundkml|LatLngBounds|boundmap|there4|autoOpen|modal|closeText|gif|loading|categoryId|sizeMode|iGMapsIconContent|init|category|dragend|55|location|imgCatsNames|mouseenter|mouseleave|imgTn|galleries|GrumPluginClasses|sim|children|nbsp|displayPicturePrev|displayPictureNext|resize|getDefaultViewport|font|size|trigger|isOpen|fitBounds|zoomLevelMaxActivated|getZoom|setZoom|dialogClass|'.split('|'),0,{})) -
extensions/GMaps/js/gmapsPicture.js
r7177 r7308 2 2 * ----------------------------------------------------------------------------- 3 3 * file: gmapsPicture.js 4 * file version: 1. 0.05 * date: 2010-10- 104 * file version: 1.1.0 5 * date: 2010-10-20 6 6 */ 7 7 … … 106 106 $('#iGMapsIcon').css( 107 107 { 108 width: ($(window).width()* 0.8)+'px',109 height:($(window).height()* 0.8)+'px'108 width: ($(window).width()*gmaps.popupAutomaticSize)+'px', 109 height:($(window).height()*gmaps.popupAutomaticSize)+'px' 110 110 } 111 111 ); -
extensions/GMaps/js/gmapsPicture.packed.js
r7177 r7308 1 /* file: gmapsPicture.js - v1. 0.0 | packed on 2010/10/13with 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}(' C s={N:b,R:b};C v=[p,{w:r,h:r,x:15,y:Y},{w:r,h:r,x:15,y:Y},{w:r,h:r,x:10,y:Y},{w:1H,h:1V,x:4,y:1B},];q 1l(6){C G=k c.3.1C(2.18.1E,2.18.1I),z=k c.3.1K($("#"+6.l).16(0),{1X:6.1S,1R:6.1M,1L:G,P:(6.P==-1)?b:g,1P:(6.P==-1)?b:g,1k:(6.1k==\'n\')?b:g,1b:(6.1b==\'n\')?b:g,O:(6.O==-1)?b:g,1Q:{1s:6.O},17:\'\',}),1f=k c.3.1O({1N:G,z:z,B:6.17});1d=/^1W(\\d\\d)1T.*/i;j=1d.1U(6.F);9(j!=p)j=k 1Y(j[1]);9(j!=p){C F=k c.3.1A(\'1J/1D/1G/\'+6.F,k c.3.1F(v[j].w,v[j].h),k c.3.1r(0,0),k c.3.1r(v[j].x,v[j].y));1f.2l(F)}9(6.1i!=\'\'){f=k c.3.2i(6.1i,{2n:g})}2o{f=p}z.f=f;6.5=z;6.t=G}$(Q).2h(q(){2.7=-1;1a(i=0;i<2.3.K;i++){1l(2.3[i]);2.3[i].5.L(2.3[i].t);$(\'#\'+2.3[i].l+\' o, #\'+2.3[i].l+\' a\').e(\'W-V\',\'M.0%\');9(2.3[i].5.f!=p)2.3[i].5.f.1p(2.3[i].5);9(2.3[i].19==\'2p\'){2.7=i;9(2.3[i].2j==\'A\'){$(\'#T\').e({S:($(Q).S()*0.8)+\'1n\',U:($(Q).U()*0.8)+\'1n\'})}}}9($(\'#1c\').K>0){u=$(\'#1c\').16(0).14.14.l;u=\'2m\'+u.2k().2f(0,1)+u.25(1);$("#"+u+" a").26(\'1Z\',q(){9(s.R==b){1a(i=0;i<2.3.K;i++){9(2.3[i].19==\'24\'){c.3.I.1t(2.3[i].5,\'1x\');2.3[i].5.L(2.3[1].t);$(\'#\'+2.3[i].l+\' o, #\'+2.3[i].l+\' a\').e(\'W-V\',\'M.0%\')}}s.R=g}})}9($(\'#1v\').K>0){$(\'#1v\').11({23:b,S:\'1u\',U:\'1u\',20:g,21:\'X\',22:\'12\',B:2.3[2.7].B,27:q(){9(s.N==b&&2.7!=-1){c.3.I.1t(2.3[2.7].5,\'1x\');2.3[2.7].5.L(2.3[2.7].t);$(\'#T o, #T a\').e(\'W-V\',\'M.0%\');9(2.3[2.7].5.f!=p)2.3[2.7].5.f.1p(2.3[2.7].5);s.N=g}c.3.I.1y(2.3[2.7].5,\'28\',q(){$(\'#E\').e(\'m\',\'D\');$(\'#J\').e(\'m\',\'D\')});c.3.I.1y(2.3[2.7].5,\'2d\',q(){$(\'#E\').e(\'m\',\'D\');$(\'#J\').e(\'m\',\'D\')})}});$(\'H.12 H.1z-11-1w\').1q(\'<a 1o="#" l="E" 1s="m:Z;" 13="2.3[2.7].5.L(2.3[2.7].t); $(1m).e(\\\'m\\\', \\\'Z\\\').1j(); 1e(b);">\'+\'<o>&2e;</o></a>\');$(\'#E\').1g(\'B\',2.1h.2c);9(2.3[2.7].5.f!=p){$(\'H.12 H.1z-11-1w\').1q(\'<a 1o="#" l="J" 13="2.3[2.7].5.2b(2.3[2.7].5.f.29()); $(1m).e(\\\'m\\\', \\\'Z\\\').1j(); 1e(b);">\'+\'<o>&2a;</o></a>\');$(\'#J\').1g(\'B\',2.1h.2g)}}});',62,150,'||gmaps|maps||gMap|properties|currentMapLoadIndex||if||false|google||css|kmlFile|true|||iM|new|id|display||span|null|function|32|viewportInitialized|gMapCenter|tabId|markerImgProp||||map||title|var|inline|gmapsCenterMap|markerImg|latlng|div|event|gmapsBoundKml|length|setCenter|55|icon|mapTypeControl|navigationControl|window|meta|width|iGMapsIcon|height|size|font||31|none||dialog|gmapsPopup|onclick|parentNode||get|markerTitle|coords|displayType|for|streetViewControl|iGMapContent|re|return|marker|attr|lang|kmlFileUrl|blur|scaleControl|applyMap|this|px|href|setMap|append|Point|style|trigger|auto|iGMapsIconContent|titlebar|resize|addListener|ui|MarkerImage|39|LatLng|GMaps|latitude|Size|img|30|longitude|plugins|Map|center|zoomLevel|position|Marker|scrollwheel|mapTypeControlOptions|zoom|mapType|_|exec|40|mS|mapTypeId|Number|click|modal|closeText|dialogClass|autoOpen|MP|substr|bind|open|dragend|getDefaultViewport|sim|fitBounds|centermap|zoom_changed|bull|substring|boundkml|load|KmlLayer|sizeMode|toUpperCase|setIcon|tab|preserveViewport|else|IP'.split('|'),0,{}))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,{})) -
extensions/GMaps/main.inc.php
r7178 r7308 2 2 /* 3 3 Plugin Name: GMaps 4 Version: 0.2.04 Version: 1.1.0 5 5 Description: Display and manage (google) maps 6 6 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=454 … … 25 25 | | | . release not published 26 26 | | | 27 | 0.2.0 | 2010-09-30 | * first official release27 | 1.0.0 | 2010-09-30 | * first official release 28 28 | | | 29 | 1.1.0 | 2010-10-20 | * mantis bug:1926 30 | | | . key not translated 29 31 | | | 32 | | | * mantis bug:1927 33 | | | . Autozoom on categories maps : needs a min/max level 30 34 | | | 35 | | | * mantis bug:1929 36 | | | . allowing to set the size for automatic size 31 37 | | | 38 | | | * mantis bug:1930 39 | | | . Improve loading time for markers 32 40 | | | 41 | | | * mantis bug:1931 42 | | | . when an association is modified, it's possible to 43 | | | set a category already associated 33 44 | | | 45 | | | * mantis bug:1939 46 | | | . compatibility with ExtendedDescription 34 47 | | | 35 | | | 48 | | | * mantis bug:1946 49 | | | . Save KML files in local directory 36 50 | | | 37 51 | | | -
extensions/GMaps/templates/gmaps_category.tpl
r7176 r7308 8 8 <div id='iGMapsIconContent' style='display:none;'> 9 9 <div id='iGMapsIcon' style='width:{$map.width}px;height:{$map.height}px;{$map.style}'></div> 10 <div id='iDialogGMapWaiting' style="display:none;"></div>11 10 </div> 12 11 {/foreach} -
extensions/GMaps/templates/gmaps_dialog_area_choose.tpl
r7177 r7308 15 15 { 16 16 var bounds = { 17 north:0,18 south:0,19 east:0,20 west:021 }22 var requestId = '';23 24 vardialogGMapsOptions = {25 id:'',26 eventOk:null,27 cBuilder:null,28 gMap:null,29 };17 north:0, 18 south:0, 19 east:0, 20 west:0 21 }, 22 requestId = '', 23 callId=0, 24 dialogGMapsOptions = { 25 id:'', 26 eventOk:null, 27 cBuilder:null, 28 gMap:null, 29 }; 30 30 31 31 … … 194 194 * load markers from the server 195 195 */ 196 function loadMarkers() 197 { 196 var loadMarkers = function () 197 { 198 callId++; 199 198 200 datas={ 199 201 requestId:requestId, 202 callId:callId, 200 203 bounds:{ 201 204 north:bounds.north, … … 211 214 212 215 $('#iDialogGMapNfo').html('<img src="./plugins/GrumPluginClasses/icons/processing.gif"><span>{/literal}{"gmaps_loading"|@translate}{literal}</span>'); 213 $('#iDialogGMapWaiting').css(214 {215 width:$('#iDialogGMapsMap').width()+'px',216 height:$('#iDialogGMapsMap').height()+'px',217 top:(1+$('#iDialogGMapsMap').position().top)+'px',218 left:(1+$('#iDialogGMapsMap').position().left)+'px',219 display:'block'220 }221 );222 216 223 217 $.ajax( … … 231 225 { 232 226 tmp=$.parseJSON(msg); 233 tmp.markers.sort(compareMarkers); 234 applyMarkers(tmp.markers); 235 $('#iDialogGMapNfo').html(tmp.datas.nbPhotos); 236 $('#iDialogGMapWaiting').css('display', 'none'); 227 if(tmp.callId==callId) 228 { 229 tmp.markers.sort(compareMarkers); 230 applyMarkers(tmp.markers); 231 $('#iDialogGMapNfo').html(tmp.datas.nbPhotos); 232 } 237 233 } 238 234 } … … 257 253 while(i<dialogGMapsOptions.gMap.markers.length) 258 254 { 259 newListIndex=markerInList(dialogGMapsOptions.gMap.markers[i].u niqueId, markers);255 newListIndex=markerInList(dialogGMapsOptions.gMap.markers[i].uId, markers); 260 256 if(newListIndex==-1) 261 257 { … … 290 286 { 291 287 marker:marker, 292 u niqueId:markers[i].uniqueId288 uId:markers[i].uId 293 289 } 294 290 ); … … 298 294 function compareMarkers(m1,m2) 299 295 { 300 if(m1.u niqueId<m2.uniqueId)296 if(m1.uId<m2.uId) 301 297 { 302 298 return(-1); 303 299 } 304 else if(m1.u niqueId<m2.uniqueId)300 else if(m1.uId<m2.uId) 305 301 { 306 302 return(1); … … 309 305 } 310 306 311 function markerInList(u niqueId, markerList)307 function markerInList(uId, markerList) 312 308 { 313 309 for(var i=0;i<markerList.length;i++) 314 310 { 315 if(markerList[i].u niqueId==uniqueId) return(i)311 if(markerList[i].uId==uId) return(i) 316 312 } 317 313 return(-1); … … 473 469 <div id='iDialogGMapNfo'> </div> 474 470 <div id='iDialogGMapsMap' style='width:95%; height:95%;margin-left:auto;margin-right:auto;border:1px solid;'></div> 475 <div id='iDialogGMapWaiting' style="display:none;"></div>476 471 </div> 477 472 -
extensions/GMaps/templates/gmaps_picture_icon.tpl
r7176 r7308 7 7 <div id='iGMapsIconContent' style='display:none;'> 8 8 <div id='iGMapsIcon' style='width:{$map.width}px;height:{$map.height}px;{$map.style}'></div> 9 <div id='iDialogGMapWaiting' style="display:none;"></div>10 9 </div>
Note: See TracChangeset
for help on using the changeset viewer.