Changeset 7500
- Timestamp:
- Oct 30, 2010, 4:44:53 PM (13 years ago)
- Location:
- extensions/GMaps
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GMaps/gmaps_ajax.php
r7479 r7500 283 283 $_REQUEST['ajaxfct']=''; 284 284 } 285 if(!isset($_REQUEST['datas']['loadIndex'])) $_REQUEST['datas']['loadIndex']=''; 285 286 } 286 287 } … … 291 292 if($_REQUEST['ajaxfct']=="public.maps.init") 292 293 { 293 if(!isset($_REQUEST['category'])) 294 { 295 $_REQUEST['ajaxfct']=''; 296 } 294 if(!isset($_REQUEST['category'])) $_REQUEST['ajaxfct']=''; 295 if(!isset($_REQUEST['mapId'])) $_REQUEST['mapId']=null; 297 296 } 298 297 } … … 347 346 348 347 case 'public.maps.init': 349 $result=$this->ajax_gmaps_public_mapsInit($_REQUEST['category'] );348 $result=$this->ajax_gmaps_public_mapsInit($_REQUEST['category'], $_REQUEST['mapId']); 350 349 break; 351 350 case 'public.maps.getMarkers': … … 1029 1028 * @return String : the requestId 1030 1029 */ 1031 private function ajax_gmaps_public_mapsInit($category )1030 private function ajax_gmaps_public_mapsInit($category, $mapId) 1032 1031 { 1033 1032 global $prefixeTable, $template, $user, $conf; … … 1035 1034 $requestId=''; 1036 1035 1037 $this->buildMapList($category, 'C'); 1036 if($mapId==null) 1037 { 1038 $this->buildMapList($category, 'C', self::ID_MODE_CATEGORY); 1039 } 1038 1040 if($category>0) 1039 1041 { … … 1045 1047 } 1046 1048 1047 if(count($this->maps)>0 )1049 if(count($this->maps)>0 or $mapId!=null) 1048 1050 { 1049 1051 $scripts=array(); … … 1058 1060 $requestId=date('Y-m-d h:i:s'); 1059 1061 1060 // delete cache (for user and data having more than 2 4h)1062 // delete cache (for user and data having more than 2h) 1061 1063 $sql="DELETE FROM ".$this->tables['cache']." 1062 WHERE userId='".$user['id']."' 1063 OR requestId<'".date('Y-m-d h:i:s', time()-86400)."';"; 1064 WHERE requestId<'".date('Y-m-d h:i:s', time()-7200)."';"; 1064 1065 pwg_query($sql); 1065 1066 … … 1147 1148 1148 1149 $returned=array( 1150 'loadIndex' => $datas['loadIndex'], 1149 1151 'callId' => $datas['callId'], 1150 1152 'markers' => array(), -
extensions/GMaps/gmaps_pip.class.inc.php
r7482 r7500 18 18 class GMaps_PIP extends GMaps_root 19 19 { 20 const CAT_ID_HOME = 0; 21 const CAT_ID_TAGS = -1; 22 20 23 protected $category=array( 21 24 'id' => 0, … … 85 88 86 89 add_event_handler('loc_begin_index', array(&$this, 'displayCategoryPageMap')); 87 add_event_handler('loc_begin_picture', array(&$this, 'displayPicturePageMap'), 55);90 add_event_handler('loc_begin_picture', array(&$this, 'displayPicturePageMap'), EVENT_HANDLER_PRIORITY_NEUTRAL+5); 88 91 add_event_handler('amd_jpegMD_loaded', array(&$this, 'preparePictureMaps')); 89 92 add_event_handler('loc_end_page_header', array(&$this->css2, 'applyCSS')); 93 add_event_handler('render_category_description', array(&$this, 'categoryMarkup'), EVENT_HANDLER_PRIORITY_NEUTRAL+5, 2); 90 94 } 91 95 … … 95 99 FUNCTIONS TO MANAGE GMAPS 96 100 ------------------------------------------------------------------------- */ 101 102 103 /** 104 * this function display maps defined as markup in the categories description 105 * [gmaps=id:999;with:999;height:999;kmlId:999;kmlUrl:"xxx";kmlZoom:y|n;markerImg:xxx;markerVisible:y|n;allowBubble:y|n;] 106 * 107 * the function is called on the 'render_category_description' event 108 * maps are displayed only for 'main_page_category_description' page 109 * 110 * @param String $desc : category description 111 * @param String $param : category page (expected value: 'main_page_category_description') 112 * @return String : the modified description 113 */ 114 public function categoryMarkup($desc, $param='') 115 { 116 global $template, $page; 117 118 $mapParams=array(); 119 if(preg_match_all('/\[gmaps=(?:id:(?<id>\d+);|width:(?<width>\d+);|height:(?<height>\d+);|markerImg:(?<markerImg>.+);|kmlId:(?<kmlId>\d+);|kmlUrl:"(?<kmlUrl>.+)";|allowBubble:(?<allowBubble>y|n);|kmlZoom:(?<kmlZoom>y|n);|markerVisible:(?<markerVisible>y|n);)+\]/i',$desc,$mapParams,PREG_SET_ORDER)>0) 120 { 121 122 if($param!='main_page_category_description') 123 { 124 // if not main page, just remove the [gmaps] markup 125 $desc = preg_replace('/\[gmaps=(?:.*)\]/i','',$desc); 126 return($desc); 127 } 128 129 GPCCore::addHeaderJS("jquery", "themes/default/js/jquery.packed.js"); 130 GPCCore::addHeaderJS("maps.google.com/api", "http://maps.google.com/maps/api/js?sensor=false"); 131 GPCCore::addHeaderJS("gmaps.category", "plugins/GMaps/js/gmapsMarkup.packed.js"); 132 133 $desc = preg_replace( 134 '/\[gmaps=(?:id:(?<id>\d+);|width:(?<width>\d+);|height:(?<height>\d+);|markerImg:(?<markerImg>.+);|kmlId:(?<kmlId>\d+);|kmlUrl:"(?<kmlUrl>.+)";|allowBubble:(?<allowBubble>y|n);|kmlZoom:(?<kmlZoom>y|n);|markerVisible:(?<markerVisible>y|n);)+\]/i', 135 "<div class='gmapsMarkup' id='gmapsMarkupId$1'></div>", $desc); 136 137 $scripts=array(); 138 139 foreach($mapParams as $mapParam) 140 { 141 $nb=$this->prepareCategoryMap($page['category']['id'], $mapParam['id']); 142 143 if(!isset($mapParam['allowBubble'])) $mapParam['allowBubble']='y'; 144 if(!isset($mapParam['kmlZoom'])) $mapParam['kmlZoom']='n'; 145 if(!isset($mapParam['width'])) $mapParam['width']=''; 146 if(!isset($mapParam['height'])) $mapParam['height']=''; 147 if(!isset($mapParam['markerImg']) or $mapParam['markerImg']=='') $mapParam['markerImg']='mS01_11.png'; 148 if(!isset($mapParam['markerVisible']) or $mapParam['markerVisible']=='') $mapParam['markerVisible']='y'; 149 if(isset($mapParam['kmlId']) and $mapParam['kmlId']!='') 150 { 151 $sql="SELECT file 152 FROM ".$this->tables['kmlfiles']." 153 WHERE id=".$mapParam['kmlId']; 154 $result=pwg_query($sql); 155 if($result) 156 { 157 while($row=pwg_db_fetch_assoc($result)) 158 { 159 $mapParam['kmlUrl']=dirname($_SERVER['SCRIPT_URI']).self::KML_DIRECTORY.$row[0]; 160 } 161 } 162 } 163 if(!isset($mapParam['kmlUrl'])) $mapParam['kmlUrl']=''; 164 165 foreach($this->maps as $map) 166 { 167 $scripts[]=" 168 { 169 id:'gmapsMarkupId".$mapParam['id']."', 170 mapId:".$mapParam['id'].", 171 zoomLevel:".$map['zoomLevel'].", 172 markerImg:'".$mapParam['markerImg']."', 173 markerVisible:".($mapParam['markerVisible']=='y'?'true':'false').", 174 mapType:'".$map['mapType']."', 175 mapTypeControl:'".$map['mapTypeControl']."', 176 navigationControl:'".$map['navigationControl']."', 177 scaleControl:'".$map['scaleControl']."', 178 streetViewControl:'".$map['streetViewControl']."', 179 kmlFileUrl:'".$mapParam['kmlUrl']."', 180 displayType:'".$map['displayType']."', 181 width:".($mapParam['width']==''?$map['width']:$mapParam['width']).", 182 height:".($mapParam['height']==''?$map['height']:$mapParam['height']).", 183 markers:[], 184 fitToBounds:true, 185 zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false').", 186 mapBounds: 187 { 188 north:".$this->category['bounds']['N'].", 189 south:".$this->category['bounds']['S'].", 190 east:".$this->category['bounds']['E'].", 191 west:".$this->category['bounds']['W']." 192 }, 193 geolocated:".($nb>0?'true':'false').", 194 kmlZoom:".($mapParam['kmlZoom']=='y'?'true':'false').", 195 allowBubble:".($mapParam['allowBubble']=='y'?'true':'false').", 196 } 197 "; 198 } 199 } 200 201 $template->append('head_elements', 202 "<script type=\"text/javascript\"> 203 var gmapsMarkup = 204 { 205 categoryId:".$page['category']['id'].", 206 maps: 207 [".implode(',', $scripts)."], 208 }; 209 </script>", false); 210 } 211 return($desc); 212 } 213 214 97 215 98 216 /** … … 107 225 if(isset($page['category'])) 108 226 { 109 $this->category['id']=$page['category']['id']; 110 $this->buildMapList($page['category']['id'], 'C'); 111 112 // check if there is picture with gps tag in the selected category 113 $sql="SELECT paut.tagId, MAX(CAST(pait.value AS DECIMAL(20,17))) AS maxValue, MIN(CAST(pait.value AS DECIMAL(20,17))) AS minValue 114 FROM (((".USER_CACHE_CATEGORIES_TABLE." pucc 115 LEFT JOIN ".CATEGORIES_TABLE." pct ON pucc.cat_id = pct.id) 116 LEFT JOIN ".IMAGE_CATEGORY_TABLE." pic ON pic.category_id = pucc.cat_id) 117 LEFT JOIN ".$prefixeTable."amd_images_tags pait ON pait.imageId = pic.image_id) 118 LEFT JOIN ".$prefixeTable."amd_used_tags paut ON pait.numId = paut.numId 119 WHERE pucc.user_id = '".$user['id']."' 120 AND (paut.tagId = 'magic.GPS.LatitudeNum' OR paut.tagId = 'magic.GPS.LongitudeNum') 121 AND pic.image_id IS NOT NULL 122 AND FIND_IN_SET(".$page['category']['id'].", pct.uppercats)!=0 123 GROUP BY paut.tagId"; 124 } 125 elseif(isset($page['items'])) 126 { 127 if(count($page['items'])==0) return(false); 128 // 'tags' 129 $sql="SELECT paut.tagId, MAX(CAST(pait.value AS DECIMAL(20,17))) AS maxValue, MIN(CAST(pait.value AS DECIMAL(20,17))) AS minValue 130 FROM ".$prefixeTable."amd_images_tags pait 131 LEFT JOIN ".$prefixeTable."amd_used_tags paut ON pait.numId = paut.numId 132 WHERE (paut.tagId = 'magic.GPS.LatitudeNum' OR paut.tagId = 'magic.GPS.LongitudeNum') 133 AND pait.imageId IN (".implode(',', $page['items']).") 134 GROUP BY paut.tagId"; 135 $this->category['id']=0; 136 $this->buildMapList(0, 'C'); 227 $nb=$this->prepareCategoryMap($page['category']['id'], null); 137 228 } 138 229 else 139 230 { 140 // 'home' 141 $this->category['id']=0; 142 $this->buildMapList(0, 'C'); 143 // check if there is picture with gps tag in the selected category 144 $sql="SELECT paut.tagId, MAX(CAST(pait.value AS DECIMAL(20,17))) AS maxValue, MIN(CAST(pait.value AS DECIMAL(20,17))) AS minValue 145 FROM (((".USER_CACHE_CATEGORIES_TABLE." pucc 146 LEFT JOIN ".CATEGORIES_TABLE." pct ON pucc.cat_id = pct.id) 147 LEFT JOIN ".IMAGE_CATEGORY_TABLE." pic ON pic.category_id = pucc.cat_id) 148 LEFT JOIN ".$prefixeTable."amd_images_tags pait ON pait.imageId = pic.image_id) 149 LEFT JOIN ".$prefixeTable."amd_used_tags paut ON pait.numId = paut.numId 150 WHERE pucc.user_id = '".$user['id']."' 151 AND (paut.tagId = 'magic.GPS.LatitudeNum' OR paut.tagId = 'magic.GPS.LongitudeNum') 152 AND pic.image_id IS NOT NULL 153 GROUP BY paut.tagId"; 231 $nb=$this->prepareCategoryMap(0, null); 154 232 } 155 233 … … 158 236 $scripts=array(); 159 237 160 $result=pwg_query($sql); 161 if($result) 238 if($nb>0 or $this->forceDisplay>0) 162 239 { 163 $nb=0; 164 while($row=pwg_db_fetch_assoc($result)) 240 /* 241 * prepare js script for each map 242 */ 243 244 foreach($this->maps as $keyMap => $map) 165 245 { 166 switch($row['tagId']) 246 if($nb>0 or 247 $map['forceDisplay']=='y' and ($map['kmlFileUrl']!='' or $map['kmlFileId']!=0) 248 ) 167 249 { 168 case 'magic.GPS.LatitudeNum': 169 $this->category['bounds']['N']=$row['maxValue']; 170 $this->category['bounds']['S']=$row['minValue']; 171 break; 172 case 'magic.GPS.LongitudeNum': 173 $this->category['bounds']['E']=$row['maxValue']; 174 $this->category['bounds']['W']=$row['minValue']; 175 break; 250 $scripts[]=" 251 { 252 id:'iGMapsIcon', 253 zoomLevel:".$map['zoomLevel'].", 254 markerImg:'".$map['marker']."', 255 mapType:'".$map['mapType']."', 256 mapTypeControl:'".$map['mapTypeControl']."', 257 navigationControl:'".$map['navigationControl']."', 258 scaleControl:'".$map['scaleControl']."', 259 streetViewControl:'".$map['streetViewControl']."', 260 kmlFileUrl:'".$map['kmlFileUrl']."', 261 displayType:'".$map['displayType']."', 262 sizeMode:'".$map['sizeMode']."', 263 title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title'] )."', 264 markers:[], 265 fitToBounds:true, 266 zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false').", 267 }"; 268 269 preg_match('/^i(\d+)x(\d+).*/i', basename($map['icon']), $result); 270 $this->category['icon']['iconStyle']=$map['iconStyle']; 271 $this->category['icon']['file']=$map['icon']; 272 $this->category['icon']['width']=isset($result[1])?$result[1]:-1; 273 $this->category['icon']['height']=isset($result[2])?$result[2]:-1; 176 274 } 177 $nb++;178 275 } 179 276 180 if($nb>0 or $this->forceDisplay>0) 277 $template->assign('maps', $this->maps); 278 $template->set_filename('gmapsCatMap', 279 dirname($this->getFileLocation()).'/templates/gmaps_category.tpl'); 280 $template->append('footer_elements', $template->parse('gmapsCatMap', true), false); 281 282 if(is_array($this->category['icon'])) 181 283 { 182 /* 183 * prepare js script for each map 184 */ 185 186 foreach($this->maps as $keyMap => $map) 187 { 188 if($nb>0 or 189 $map['forceDisplay']=='y' and ($map['kmlFileUrl']!='' or $map['kmlFileId']!=0) 190 ) 191 { 192 $scripts[]=" 193 { 194 id:'iGMapsIcon', 195 zoomLevel:".$map['zoomLevel'].", 196 markerImg:'".$map['marker']."', 197 mapType:'".$map['mapType']."', 198 mapTypeControl:'".$map['mapTypeControl']."', 199 navigationControl:'".$map['navigationControl']."', 200 scaleControl:'".$map['scaleControl']."', 201 streetViewControl:'".$map['streetViewControl']."', 202 kmlFileUrl:'".$map['kmlFileUrl']."', 203 displayType:'".$map['displayType']."', 204 sizeMode:'".$map['sizeMode']."', 205 title:'".addslashes( ($map['title']=='')?l10n('gmaps_geolocation'):$map['title'] )."', 206 markers:[], 207 fitToBounds:true, 208 zoomLevelMaxActivated:".($map['zoomLevelMaxActivated']=='y'?'true':'false')." 209 }"; 210 211 preg_match('/^i(\d+)x(\d+).*/i', basename($map['icon']), $result); 212 $this->category['icon']['iconStyle']=$map['iconStyle']; 213 $this->category['icon']['file']=$map['icon']; 214 $this->category['icon']['width']=isset($result[1])?$result[1]:-1; 215 $this->category['icon']['height']=isset($result[2])?$result[2]:-1; 216 } 217 } 218 219 $template->assign('maps', $this->maps); 220 $template->set_filename('gmapsCatMap', 221 dirname($this->getFileLocation()).'/templates/gmaps_category.tpl'); 222 $template->append('footer_elements', $template->parse('gmapsCatMap', true), false); 223 224 if(is_array($this->category['icon'])) 225 { 226 $template->assign('mapIcon', $this->category['icon']); 227 $template->set_filename('gmapsIconButton', 228 dirname($this->getFileLocation()).'/templates/gmaps_category_iconbutton.tpl'); 229 $template->concat('PLUGIN_INDEX_ACTIONS', $template->parse('gmapsIconButton', true), false); 230 $template->assign('mapIcon'); 231 } 232 233 234 $template->append('head_elements', 235 "<script type=\"text/javascript\"> 236 gmaps = 237 { 238 geolocated:".($nb>0?'true':'false').", 239 forceDisplay:".($nb==0?'true':'false').", 240 lang:{ 241 boundmap:'".l10n('gmaps_i_boundmap')."', 242 boundkml:'".l10n('gmaps_i_boundkml')."', 243 loading:'".l10n('gmaps_loading')."' 284 $template->assign('mapIcon', $this->category['icon']); 285 $template->set_filename('gmapsIconButton', 286 dirname($this->getFileLocation()).'/templates/gmaps_category_iconbutton.tpl'); 287 $template->concat('PLUGIN_INDEX_ACTIONS', $template->parse('gmapsIconButton', true), false); 288 $template->assign('mapIcon'); 289 } 290 291 $template->append('head_elements', 292 "<script type=\"text/javascript\"> 293 var gmaps = 294 { 295 geolocated:".($nb>0?'true':'false').", 296 forceDisplay:".($nb==0?'true':'false').", 297 lang:{ 298 boundmap:'".l10n('gmaps_i_boundmap')."', 299 boundkml:'".l10n('gmaps_i_boundkml')."', 300 loading:'".l10n('gmaps_loading')."' 301 }, 302 requestId:'', 303 categoryId:".$this->category['id'].", 304 bounds: 305 { 306 north:".$this->category['bounds']['N'].", 307 south:".$this->category['bounds']['S'].", 308 east:".$this->category['bounds']['E'].", 309 west:".$this->category['bounds']['W']." 244 310 }, 245 requestId:'', 246 categoryId:".$this->category['id'].", 247 bounds: 311 maps: 312 [".implode(',', $scripts)."], 313 popupAutomaticSize:".$this->config['popupAutomaticSize'].", 314 }; 315 </script>", false); 316 317 } 318 319 } 320 } 321 } 322 323 324 /** 325 * this function prepare data ($this->category var) for a category map 326 * $this->maps must be initialized 327 * 328 * if a map id is given, datas are prepared for the given map otherwise maps 329 * are automatically searched from the current category 330 * 331 * @param Integer $catId : category id 332 * @param Integer $mapId : mapId if already know ; otherwise null 333 * @return Integer : number 334 */ 335 private function prepareCategoryMap($catId, $mapId=null) 336 { 337 global $page, $prefixeTable, $template, $user, $conf; 338 339 if($catId>0) 340 { 341 $this->category['id']=$catId; 342 343 if($mapId!=null) 344 { 345 $this->buildMapList($mapId, 'C', self::ID_MODE_MAP); 346 } 347 else 348 { 349 $this->buildMapList($catId, 'C', self::ID_MODE_CATEGORY); 350 } 351 352 // check if there is picture with gps tag in the selected category 353 $sql="SELECT paut.tagId, MAX(CAST(pait.value AS DECIMAL(20,17))) AS maxValue, MIN(CAST(pait.value AS DECIMAL(20,17))) AS minValue 354 FROM (((".USER_CACHE_CATEGORIES_TABLE." pucc 355 LEFT JOIN ".CATEGORIES_TABLE." pct ON pucc.cat_id = pct.id) 356 LEFT JOIN ".IMAGE_CATEGORY_TABLE." pic ON pic.category_id = pucc.cat_id) 357 LEFT JOIN ".$prefixeTable."amd_images_tags pait ON pait.imageId = pic.image_id) 358 LEFT JOIN ".$prefixeTable."amd_used_tags paut ON pait.numId = paut.numId 359 WHERE pucc.user_id = '".$user['id']."' 360 AND (paut.tagId = 'magic.GPS.LatitudeNum' OR paut.tagId = 'magic.GPS.LongitudeNum') 361 AND pic.image_id IS NOT NULL 362 AND FIND_IN_SET(".$catId.", pct.uppercats)!=0 363 GROUP BY paut.tagId"; 364 } 365 elseif($catId==self::CAT_ID_TAGS and isset($page['items'])) 366 { 367 if(count($page['items'])==0) return(false); 368 // 'tags' 369 $sql="SELECT paut.tagId, MAX(CAST(pait.value AS DECIMAL(20,17))) AS maxValue, MIN(CAST(pait.value AS DECIMAL(20,17))) AS minValue 370 FROM ".$prefixeTable."amd_images_tags pait 371 LEFT JOIN ".$prefixeTable."amd_used_tags paut ON pait.numId = paut.numId 372 WHERE (paut.tagId = 'magic.GPS.LatitudeNum' OR paut.tagId = 'magic.GPS.LongitudeNum') 373 AND pait.imageId IN (".implode(',', $page['items']).") 374 GROUP BY paut.tagId"; 375 $this->category['id']=0; 376 $this->buildMapList(0, 'C', self::ID_MODE_CATEGORY); 377 } 378 elseif($catId==self::CAT_ID_HOME) 379 { 380 // 'home' 381 $this->category['id']=0; 382 $this->buildMapList(0, 'C', self::ID_MODE_CATEGORY); 383 // check if there is picture with gps tag in the selected category 384 $sql="SELECT paut.tagId, MAX(CAST(pait.value AS DECIMAL(20,17))) AS maxValue, MIN(CAST(pait.value AS DECIMAL(20,17))) AS minValue 385 FROM (((".USER_CACHE_CATEGORIES_TABLE." pucc 386 LEFT JOIN ".CATEGORIES_TABLE." pct ON pucc.cat_id = pct.id) 387 LEFT JOIN ".IMAGE_CATEGORY_TABLE." pic ON pic.category_id = pucc.cat_id) 388 LEFT JOIN ".$prefixeTable."amd_images_tags pait ON pait.imageId = pic.image_id) 389 LEFT JOIN ".$prefixeTable."amd_used_tags paut ON pait.numId = paut.numId 390 WHERE pucc.user_id = '".$user['id']."' 391 AND (paut.tagId = 'magic.GPS.LatitudeNum' OR paut.tagId = 'magic.GPS.LongitudeNum') 392 AND pic.image_id IS NOT NULL 393 GROUP BY paut.tagId"; 394 } 395 else 396 { 397 return(0); 398 } 399 400 $nb=0; 401 if(count($this->maps)>0) 402 { 403 $result=pwg_query($sql); 404 if($result) 405 { 406 while($row=pwg_db_fetch_assoc($result)) 248 407 { 249 north:".$this->category['bounds']['N'].", 250 south:".$this->category['bounds']['S'].", 251 east:".$this->category['bounds']['E'].", 252 west:".$this->category['bounds']['W']." 253 }, 254 maps: 255 [".implode(',', $scripts)."], 256 popupAutomaticSize:".$this->config['popupAutomaticSize'].", 257 callId:0 258 } 259 </script>", false); 260 408 switch($row['tagId']) 409 { 410 case 'magic.GPS.LatitudeNum': 411 $this->category['bounds']['N']=$row['maxValue']; 412 $this->category['bounds']['S']=$row['minValue']; 413 break; 414 case 'magic.GPS.LongitudeNum': 415 $this->category['bounds']['E']=$row['maxValue']; 416 $this->category['bounds']['W']=$row['minValue']; 417 break; 261 418 } 419 $nb++; 262 420 } 263 421 } 264 422 } 265 }266 423 return($nb); 424 } 267 425 268 426 … … 328 486 $template->append('head_elements', 329 487 "<script type=\"text/javascript\"> 330 gmaps =488 var gmaps = 331 489 { 332 490 geolocated:".($this->picture['geolocated']?'true':'false').", … … 344 502 [".implode(',', $this->picture['properties'])."], 345 503 popupAutomaticSize:".$this->config['popupAutomaticSize']." 346 } 504 }; 347 505 </script>", false); 348 506 } … … 372 530 if(isset($page['category'])) 373 531 { 374 $this->buildMapList($page['category']['id'], 'P' );532 $this->buildMapList($page['category']['id'], 'P', self::ID_MODE_CATEGORY); 375 533 } 376 534 else … … 394 552 while(count($this->maps)==0 and $i<count($cats)) 395 553 { 396 $this->buildMapList($cats[$i], 'P' );554 $this->buildMapList($cats[$i], 'P', self::ID_MODE_CATEGORY); 397 555 $i++; 398 556 } -
extensions/GMaps/gmaps_root.class.inc.php
r7479 r7500 19 19 { 20 20 const KML_DIRECTORY='/local/plugins/GMaps/kml/'; 21 const ID_MODE_CATEGORY = 'C'; 22 const ID_MODE_MAP='M'; 23 21 24 protected $css; 22 25 protected $maps=array(); … … 189 192 * used by GMaps_ajax & GMaps_pip classes 190 193 * 191 * @param Array $categories : array of categories id (cat + parent list)194 * @param String $category : id of categories id 192 195 * @param String $page : 'P' for picture page, 'C' for category page 193 */ 194 protected function buildMapList($category, $page) 196 * @param String $mode : self::ID_MODE_CATEGORY = given id is a category id 197 * self::ID_MODE_MAP = given id is a map id 198 */ 199 protected function buildMapList($id, $page, $mode) 195 200 { 196 201 global $template ; … … 199 204 $this->forceDisplay=0; 200 205 201 if($page=='C') 202 { 203 $where=" displayType='IC' "; 206 if($mode==self::ID_MODE_CATEGORY) 207 { 208 if($page=='C') 209 { 210 $where=" displayType='IC' "; 211 } 212 else 213 { 214 $where=" (displayType='IP' or displayType='MP') "; 215 } 216 217 /* 218 * sql request select all possible association, sorted from the highest to 219 * the lowest priority 220 */ 221 $sql="SELECT DISTINCT pgcm.id, pgcm.categoryId, 222 pgcm.imgSort, pgcm.applySubCat, pgcm.kmlFileUrl, pgcm.kmlFileId, pgkf.file AS kmlFileUrlId, 223 pgcm.icon, pgcm.title, pgcm.marker, 224 pgmm.displayType, pgmm.sizeMode, 225 pgmm.width, pgmm.height, pgmm.zoomLevel, 226 pgmm.mapType, pgmm.mapTypeControl, pgmm.scaleControl, pgmm.streetViewControl, 227 pgmm.navigationControl, pgmm.style, pgmm.zoomLevelMaxActivated, 228 IF(pgcm.categoryId=0, 0, pct.global_rank) AS priorityRank, 229 pgcm.forceDisplay 230 FROM ((".$this->tables['category_maps']." pgcm 231 LEFT JOIN ".$this->tables['maps']." pgmm ON pgcm.mapId = pgmm.id) 232 LEFT JOIN ".CATEGORIES_TABLE." pct ON (FIND_IN_SET(pgcm.categoryId, pct.uppercats)!=0 OR pgcm.categoryId=0)) 233 LEFT JOIN ".$this->tables['kmlfiles']." pgkf ON pgkf.id = pgcm.kmlFileId 234 WHERE $where "; 235 if($id!=0) 236 { 237 $sql.=" AND pct.id = '$id' "; 238 } 239 else 240 { 241 $sql.=" AND pgcm.categoryId = 0 "; 242 } 243 $sql.=" AND pgcm.applySubCat='y' 244 ORDER BY priorityRank DESC, pgmm.displayType ASC, pgcm.categoryId ASC, pgcm.imgSort ASC;"; 245 } 246 elseif($mode==self::ID_MODE_MAP) 247 { 248 $sql="SELECT DISTINCT 249 pgmm.displayType, pgmm.sizeMode, 250 pgmm.width, pgmm.height, pgmm.zoomLevel, 251 pgmm.mapType, pgmm.mapTypeControl, pgmm.scaleControl, pgmm.streetViewControl, 252 pgmm.navigationControl, pgmm.style, pgmm.zoomLevelMaxActivated, 253 '' AS kmlFileUrl, 0 AS kmlFileId, 'y' AS forceDisplay 254 FROM ".$this->tables['maps']." pgmm 255 WHERE pgmm.id=$id"; 204 256 } 205 257 else 206 258 { 207 $where=" (displayType='IP' or displayType='MP') "; 208 } 209 210 /* 211 * sql request select all possible association, sorted from the highest to 212 * the lowest priority 213 */ 214 $sql="SELECT DISTINCT pgcm.id, pgcm.categoryId, 215 pgcm.imgSort, pgcm.applySubCat, pgcm.kmlFileUrl, pgcm.kmlFileId, pgkf.file AS kmlFileUrlId, 216 pgcm.icon, pgcm.title, pgcm.marker, 217 pgmm.displayType, pgmm.sizeMode, 218 pgmm.width, pgmm.height, pgmm.zoomLevel, 219 pgmm.mapType, pgmm.mapTypeControl, pgmm.scaleControl, pgmm.streetViewControl, 220 pgmm.navigationControl, pgmm.style, pgmm.zoomLevelMaxActivated, 221 IF(pgcm.categoryId=0, 0, pct.global_rank) AS priorityRank, 222 pgcm.forceDisplay 223 FROM ((".$this->tables['category_maps']." pgcm 224 LEFT JOIN ".$this->tables['maps']." pgmm ON pgcm.mapId = pgmm.id) 225 LEFT JOIN ".CATEGORIES_TABLE." pct ON (FIND_IN_SET(pgcm.categoryId, pct.uppercats)!=0 OR pgcm.categoryId=0)) 226 LEFT JOIN ".$this->tables['kmlfiles']." pgkf ON pgkf.id = pgcm.kmlFileId 227 WHERE $where "; 228 if($category!=0) 229 { 230 $sql.=" AND pct.id = '$category' "; 231 } 232 else 233 { 234 $sql.=" AND pgcm.categoryId = 0 "; 235 } 236 $sql.=" AND pgcm.applySubCat='y' 237 ORDER BY priorityRank DESC, pgmm.displayType ASC, pgcm.categoryId ASC, pgcm.imgSort ASC;"; 259 return(false); 260 } 261 238 262 $result=pwg_query($sql); 239 263 … … 252 276 if($row['kmlFileId']>0 and $row['kmlFileUrlId']!='') $row['kmlFileUrl']=dirname($_SERVER['SCRIPT_URI']).self::KML_DIRECTORY.$row['kmlFileUrlId']; 253 277 254 if($row['displayType']!='MP' )278 if($row['displayType']!='MP' and $mode==self::ID_MODE_CATEGORY) 255 279 { 256 280 $themeConf=$template->get_template_vars('themeconf'); … … 288 312 } 289 313 290 291 292 314 } //class 293 315 … … 295 317 296 318 class GMaps_functions 319 { 320 static private $tables = Array(); 321 static private $config = Array(); 322 323 /** 324 * initialise the class 325 * 326 * @param String $prefixeTable : the piwigo prefixe used on tables name 327 * @param String $pluginNameFile : the plugin name used for tables name 328 */ 329 static public function init($prefixeTable) 297 330 { 298 static private $tables = Array(); 299 static private $config = Array(); 300 301 /** 302 * initialise the class 303 * 304 * @param String $prefixeTable : the piwigo prefixe used on tables name 305 * @param String $pluginNameFile : the plugin name used for tables name 306 */ 307 static public function init($prefixeTable) 308 { 309 GPCCore::loadConfig(GMaps_root::$pluginNameFile, self::$config); 310 $list=GMaps_root::$pluginTables; 311 312 for($i=0;$i<count($list);$i++) 313 { 314 self::$tables[$list[$i]]=$prefixeTable.GMaps_root::$pluginNameFile.'_'.$list[$i]; 315 } 316 } 317 318 319 /** 320 * return all HTML&JS code necessary to display a dialogbox to choose 321 * geographic area 322 */ 323 static public function dialogBoxGMaps() 324 { 325 global $template; 326 327 $template->set_filename('gmaps_choose', 328 dirname(__FILE__).'/templates/gmaps_dialog_area_choose.tpl'); 329 330 $datas=Array(); 331 332 $template->assign('datas', $datas); 333 334 return($template->parse('gmaps_choose', true)); 335 } 336 337 /** 338 * convert a decimal degree to D°M'S' 339 * 340 * @param Float $value : the value to convert 341 * @return String : value converted in DMS 342 */ 343 static public function DDtoDMS($value) 344 { 345 $degrees=(int)$value; 346 $value=($value-$degrees)*60; 347 $minutes=(int)$value; 348 $seconds=($value-$minutes)*60; 349 350 return(sprintf('%d° %d\' %.2f"', $degrees, $minutes, $seconds)); 351 } 352 353 } //GMaps_functions 331 GPCCore::loadConfig(GMaps_root::$pluginNameFile, self::$config); 332 $list=GMaps_root::$pluginTables; 333 334 for($i=0;$i<count($list);$i++) 335 { 336 self::$tables[$list[$i]]=$prefixeTable.GMaps_root::$pluginNameFile.'_'.$list[$i]; 337 } 338 } 339 340 341 /** 342 * return all HTML&JS code necessary to display a dialogbox to choose 343 * geographic area 344 */ 345 static public function dialogBoxGMaps() 346 { 347 global $template; 348 349 $template->set_filename('gmaps_choose', 350 dirname(__FILE__).'/templates/gmaps_dialog_area_choose.tpl'); 351 352 $datas=Array(); 353 354 $template->assign('datas', $datas); 355 356 return($template->parse('gmaps_choose', true)); 357 } 358 359 /** 360 * convert a decimal degree to D°M'S' 361 * 362 * @param Float $value : the value to convert 363 * @return String : value converted in DMS 364 */ 365 static public function DDtoDMS($value) 366 { 367 $degrees=(int)$value; 368 $value=($value-$degrees)*60; 369 $minutes=(int)$value; 370 $seconds=($value-$minutes)*60; 371 372 return(sprintf('%d° %d\' %.2f"', $degrees, $minutes, $seconds)); 373 } 374 } //GMaps_functions 354 375 355 376 -
extensions/GMaps/js/gmapsCategory.js
r7479 r7500 6 6 */ 7 7 8 var currentMapLoad, 9 markerImgProp = [ 8 var markerImgProp = [ 10 9 null, 11 10 { w:32, h:32, x:15, y:31 }, // s01 … … 77 76 map.markers=new Array(); 78 77 map.gmapsIndex=gmapsIndex; 78 map.viewportInitialized=false; 79 map.callId=0; 79 80 properties.gMap=map; 80 properties.viewportInitialized=false;81 81 } 82 82 … … 88 88 function loadMarkers(map) 89 89 { 90 gmaps.callId++;90 map.callId++; 91 91 92 92 datas={ 93 93 requestId:gmaps.requestId, 94 callId: gmaps.callId,94 callId:map.callId, 95 95 bounds:{ 96 96 north:map.getBounds().getNorthEast().lat(), … … 102 102 height:$(map.getDiv()).height(), 103 103 distanceTreshold:20, 104 loadIndex:map.gmapsIndex, 104 105 }; 105 106 106 currentMapLoad=map;107 107 108 108 $('#gmapsLoading').css('display', 'inline-block'); … … 119 119 { 120 120 tmp=$.parseJSON(msg); 121 if(gmaps. callId==tmp.callId)121 if(gmaps.maps[tmp.loadIndex].gMap.callId==tmp.callId) 122 122 { 123 123 tmp.markers.sort(compareMarkers); 124 applyMarkers( currentMapLoad, tmp.markers);124 applyMarkers(gmaps.maps[tmp.loadIndex].gMap, tmp.markers); 125 125 $('#gmapsLoading').css('display', 'none'); 126 126 $('#gmapsNbPhotos').html('['+tmp.datas.nbPhotos+']'); … … 141 141 function applyMarkers(map, markers) 142 142 { 143 if(currentMapLoad==null) return(false);144 145 143 /* 146 144 * deleting markers from the map only if they are not in the new list … … 173 171 { 174 172 position:new google.maps.LatLng(markers[i].lat, markers[i].lng), 175 map: currentMapLoad,173 map: map, 176 174 title:markers[i].nbImgTxt 177 175 } … … 212 210 } 213 211 } 214 currentMapLoad=null;215 212 } 216 213 … … 332 329 * check if zoomLevel 333 330 */ 334 function fitToBounds(bounds )335 { 336 gmaps.maps[ gmaps.currentMapLoadIndex].gMap.fitBounds(bounds);337 338 if(gmaps.maps[ gmaps.currentMapLoadIndex].zoomLevelMaxActivated &&339 gmaps.maps[ gmaps.currentMapLoadIndex].gMap.getZoom() > gmaps.maps[gmaps.currentMapLoadIndex].zoomLevel)340 { 341 gmaps.maps[ gmaps.currentMapLoadIndex].gMap.setZoom(gmaps.maps[gmaps.currentMapLoadIndex].zoomLevel);342 } 343 } 344 345 function initializeMapViewport(mode )346 { 347 if( gmaps.currentMapLoadIndex>-1 &&348 ($('#'+gmaps.maps[ gmaps.currentMapLoadIndex].id+'Content').dialog('isOpen') && mode=='loaded' || mode=='open') &&349 (gmaps.maps[ gmaps.currentMapLoadIndex].viewportInitialized==false)331 function fitToBounds(bounds, mapIndex) 332 { 333 gmaps.maps[mapIndex].gMap.fitBounds(bounds); 334 335 if(gmaps.maps[mapIndex].zoomLevelMaxActivated && 336 gmaps.maps[mapIndex].gMap.getZoom() > gmaps.maps[mapIndex].zoomLevel) 337 { 338 gmaps.maps[mapIndex].gMap.setZoom(gmaps.maps[mapIndex].zoomLevel); 339 } 340 } 341 342 function initializeMapViewport(mode, mapIndex) 343 { 344 if(mapIndex>-1 && 345 ($('#'+gmaps.maps[mapIndex].id+'Content').dialog('isOpen') && mode=='loaded' || mode=='open') && 346 (gmaps.maps[mapIndex].gMap.viewportInitialized==false) 350 347 ) 351 348 { … … 361 358 * allowing to reload markers according to the new viewport 362 359 */ 363 google.maps.event.trigger(gmaps.maps[ gmaps.currentMapLoadIndex].gMap, 'resize');360 google.maps.event.trigger(gmaps.maps[mapIndex].gMap, 'resize'); 364 361 365 362 // reduce copyright size... ^_^ 366 $('#'+gmaps.maps[ gmaps.currentMapLoadIndex].id+' span, #'+gmaps.maps[gmaps.currentMapLoadIndex].id+' a').css('font-size', '55.0%');363 $('#'+gmaps.maps[mapIndex].id+' span, #'+gmaps.maps[mapIndex].id+' a').css('font-size', '55.0%'); 367 364 368 365 369 366 if(gmaps.geolocated) 370 367 { 371 if(gmaps.maps[ gmaps.currentMapLoadIndex].fitToBounds)372 { 373 fitToBounds(gmaps.bounds );368 if(gmaps.maps[mapIndex].fitToBounds, mapIndex) 369 { 370 fitToBounds(gmaps.bounds, mapIndex); 374 371 } 375 372 else 376 373 { 377 gmaps.maps[ gmaps.currentMapLoadIndex].gMap.setCenter(gmaps.bounds.getCenter());374 gmaps.maps[mapIndex].gMap.setCenter(gmaps.bounds.getCenter()); 378 375 } 379 376 } 380 377 else 381 378 { 382 fitToBounds(gmaps.maps[ gmaps.currentMapLoadIndex].gMap.kmlFile.getDefaultViewport());379 fitToBounds(gmaps.maps[mapIndex].gMap.kmlFile.getDefaultViewport(), mapIndex); 383 380 } 384 381 385 382 google.maps.event.addListener( 386 gmaps.maps[ gmaps.currentMapLoadIndex].gMap,383 gmaps.maps[mapIndex].gMap, 387 384 'dragend', 388 385 function() … … 395 392 396 393 google.maps.event.addListener( 397 gmaps.maps[ gmaps.currentMapLoadIndex].gMap,394 gmaps.maps[mapIndex].gMap, 398 395 'zoom_changed', 399 396 function() … … 406 403 ); 407 404 408 gmaps.maps[ gmaps.currentMapLoadIndex].viewportInitialized=true;409 } 410 411 if( gmaps.currentMapLoadIndex>-1) loadMarkers(gmaps.maps[gmaps.currentMapLoadIndex].gMap);405 gmaps.maps[mapIndex].gMap.viewportInitialized=true; 406 } 407 408 if(mapIndex>-1) loadMarkers(gmaps.maps[mapIndex].gMap); 412 409 } 413 410 … … 417 414 // all maps have the same initials bounds 418 415 gmaps.currentInfo=null; 419 gmaps.currentMapLoadIndex=-1;420 416 421 417 gmaps.bounds = new google.maps.LatLngBounds( … … 435 431 ); 436 432 433 /* 434 * initialize map on the server side (call the 'public.maps.init' 435 * function) 436 */ 437 $.ajax( 438 { 439 type: "POST", 440 url: "plugins/GMaps/gmaps_ajax.php", 441 async: true, 442 data: { ajaxfct:"public.maps.init", category:gmaps.categoryId, mapId:'n' }, 443 success: 444 function(msg) 445 { 446 gmaps.requestId=msg; 447 for(var i=0;i<gmaps.maps.length;i++) 448 { 449 initializeMapViewport('loaded', i); 450 } 451 } 452 } 453 ); 437 454 438 455 for(var i=0;i<gmaps.maps.length;i++) … … 451 468 ); 452 469 } 453 454 /*455 * initialize map on the server side (call the 'public.maps.init'456 * function)457 */458 $.ajax(459 {460 type: "POST",461 url: "plugins/GMaps/gmaps_ajax.php",462 async: true,463 data: { ajaxfct:"public.maps.init", category:gmaps.categoryId },464 success:465 function(msg)466 {467 gmaps.requestId=msg;468 initializeMapViewport('loaded');469 }470 }471 );472 473 470 474 471 // initialize dialog box for maps … … 484 481 open: function () 485 482 { 486 gmaps.currentMapLoadIndex=$(this).data('index'); 487 initializeMapViewport('open'); 483 initializeMapViewport('open', $(this).data('index')); 488 484 } 489 485 } … … 493 489 { 494 490 $('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);">'+491 .append('<a href="#" id="gmapsBoundMap" style="display:none;" onclick="fitToBounds(gmaps.bounds, '+i+'); $(this).css(\'display\', \'none\').blur(); return(false);">'+ 496 492 '<span>∴</span></a>'); 497 493 $('#gmapsBoundMap').attr('title', gmaps.lang.boundmap); … … 501 497 { 502 498 $('div.gmapsPopup div.ui-dialog-titlebar') 503 .append('<a href="#" id="gmapsBoundKml" onclick="fitToBounds(gmaps.maps[ gmaps.currentMapLoadIndex].gMap.kmlFile.getDefaultViewport()); $(this).css(\'display\', \'none\').blur(); return(false);">'+499 .append('<a href="#" id="gmapsBoundKml" onclick="fitToBounds(gmaps.maps['+i+'].gMap.kmlFile.getDefaultViewport(), '+i+'); $(this).css(\'display\', \'none\').blur(); return(false);">'+ 504 500 '<span>∼</span></a>'); 505 501 $('#gmapsBoundKml').attr('title', gmaps.lang.boundkml); -
extensions/GMaps/js/gmapsCategory.packed.js
r7479 r7500 1 /* file: gmapsCategory.js - v1.1.1 | packed on 2010/10/ 28with 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 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,{}))1 /* file: gmapsCategory.js - v1.1.1 | packed on 2010/10/30 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}('u 13=[E,{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(l,19){u 5=o j.3.2V($("#"+l.q).1W(0),{2U:\'#2Y\',33:l.2T,34:l.1q,2S:2.s.1R(),1G:(l.1G==-1)?v:z,2P:(l.1G==-1)?v:z,2r:(l.2r==\'n\')?v:z,2z:(l.2z==\'n\')?v:z,1P:(l.1P==-1)?v:z,3n:{1M:l.1P},3h:\'\',});8(l.2x!=\'\'){H=o j.3.3g(l.2x,{3m:z});H.29(5)}F{H=E}2B=/^3e(\\d\\d)38.*/i;C=2B.3a(l.S);8(C!=E)C=o 3b(C[1]);8(C!=E){5.S=o j.3.3d(\'1d/1w/2t/\'+l.S,o j.3.3c(13[C].w,13[C].h),o j.3.2o(0,0),o j.3.2o(13[C].x,13[C].y))}F{5.S=E}5.H=H;5.f=o 35();5.19=19;5.1B=v;5.T=0;l.k=5}9 1e(5){5.T++;1f={1r:2.1r,T:5.T,s:{2N:5.1i().2F().1N(),2L:5.1i().2F().1Q(),2I:5.1i().1X().1N(),2D:5.1i().1X().1Q()},16:$(5.1S()).16(),14:$(5.1S()).14(),2R:20,1o:5.19,};$(\'#1L\').p(\'m\',\'V-1t\');$(\'#1v\').K(\'\');$.2E({2f:"2J",2O:"1d/1w/2K.2M",2A:z,1k:{2m:"2n.3.2Q",1f:1f},2l:9(18){O=$.2Z(18);8(2.3[O.1o].k.T==O.T){O.f.3l(1Z);2e(2.3[O.1o].k,O.f);$(\'#1L\').p(\'m\',\'N\');$(\'#1v\').K(\'[\'+O.1f.36+\']\')}}})}9 2e(5,f){8(5.f.B>0){u i=0;3j(i<5.f.B){1K=1Y(5.f[i].I,f);8(1K==-1){5.f[i].g.29(E);5.f.2a(i,1)}F{f.2a(1K,1);i++}}}Z(u i=0;i<f.B;i++){u g=o j.3.3f({3k:o j.3.1J(f[i].1N,f[i].1Q),5:5,P:f[i].1s});8(5.S!=E)g.3i(5.S);g.D=f[i];g.D.r=0;5.f.2X({g:g,I:f[i].I});j.3.17.1n(g,\'2b\',9(){1V(11)});Z(u b=0;b<g.D.J.B;b++){2W(g.D.J[b].37(0)){21\'G\':g.D.J[b]=\'./3X/\'+g.D.J[b].22(1);23;21\'U\':g.D.J[b]=\'./3W/\'+g.D.J[b].22(1);23}}}}9 1Z(1z,1C){8(1z.I<1C.I){L(-1)}F 8(1z.I<1C.I){L(1)}L(0)}9 1Y(1U,1E){Z(u i=0;i<1E.B;i++){8(1E[i].I==1U)L(i)}L(-1)}9 1V(g){2.6=g.D;2.M.2g();2.M.2G($(\'#2C\').3Y().1T(1y).1W(0));2.M.1l(g.5,g);1j(2.6.r)}9 1y(i,e){8(e.q!=\'\')e.q=\'c\'+e.q;$(e).3Z().1T(1y)}9 1j(b){2.6.r=b;8(2.6.25[b]==\'\'){$(\'#24\').K(\'&41;\')}F{$(\'#24\').K(2.6.25[b])}$(\'#12\').1F(\'2u\',2.6.J[b]);$(\'#12\').2H();8(2.6.1a[b].B==1){$(\'#12\').1p(\'2b\',9(){1b.3V=2.6.1a[2.6.r][0]})}F{$(\'#2c\').K(\'\');Z(u i=0;i<2.6.1a[b].B;i++){$(\'#2c\').Y(\'<2d><a 1A="\'+2.6.1a[b][i]+\'">\'+2.6.3U[b][i]+\'</a></2d>\')}$(\'#12, #1x\').1p(\'3Q\',9(){$(\'#1x\').p(\'m\',\'1t\')}).1p(\'3P\',9(){$(\'#1x\').p(\'m\',\'N\')})}8(2.6.1u>1){$(\'#26\').K((b+1)+\'/\'+2.6.1s);$(\'#27, #28\').p(\'m\',\'V-1t\')}F{$(\'#26\').K(2.6.1s);$(\'#27, #28\').p(\'m\',\'N\')}}9 3R(){2.6.r--;8(2.6.r<0)2.6.r=2.6.1u-1;1j(2.6.r)}9 3S(){2.6.r++;8(2.6.r>=2.6.1u)2.6.r=0;1j(2.6.r)}9 W(s,7){2.3[7].k.3T(s);8(2.3[7].43&&2.3[7].k.44()>2.3[7].1q){2.3[7].k.49(2.3[7].1q)}}9 1O(1I,7){8(7>-1&&($(\'#\'+2.3[7].q+\'2p\').Q(\'4a\')&&1I==\'2k\'||1I==\'1l\')&&(2.3[7].k.1B==v)){j.3.17.3o(2.3[7].k,\'48\');$(\'#\'+2.3[7].q+\' t, #\'+2.3[7].q+\' a\').p(\'47-45\',\'46.0%\');8(2.2y){8(2.3[7].W,7){W(2.s,7)}F{2.3[7].k.42(2.s.1R())}}F{W(2.3[7].k.H.2v(),7)}j.3.17.1n(2.3[7].k,\'3N\',9(){1e(11);$(\'#1m\').p(\'m\',\'V\');$(\'#1g\').p(\'m\',\'V\')});j.3.17.1n(2.3[7].k,\'3O\',9(){1e(11);2.M.2g();$(\'#1m\').p(\'m\',\'V\');$(\'#1g\').p(\'m\',\'V\')});2.3[7].k.1B=z}8(7>-1)1e(2.3[7].k)}$(1b).3w(9(){2.6=E;2.s=o j.3.3x(o j.3.1J(2.s.2I,2.s.2D),o j.3.1J(2.s.2N,2.s.2L));2.M=o j.3.3y();j.3.17.1n(2.M,\'3z\',9(){$(\'3v\').Y($(\'#2C\'));2.M.2G(\'\');$(\'#12\').2H()});$.2E({2f:"2J",2O:"1d/1w/2K.2M",2A:z,1k:{2m:"2n.3.3u",3p:2.3r,3s:\'n\'},2l:9(18){2.1r=18;Z(u i=0;i<2.3.B;i++){1O(\'2k\',i)}}});Z(u i=0;i<2.3.B;i++){2h(2.3[i],i);8(2.3[i].3B==\'A\'){$(\'#\'+2.3[i].q).p({16:($(1b).16()*2.2i)+\'2j\',14:($(1b).14()*2.2i)+\'2j\'})}$(\'#\'+2.3[i].q+\'2p\').Q({3L:v,16:\'2q\',14:\'2q\',3M:z,3I:\'X\',3D:\'1h\',P:2.3[i].P,1l:9(){1O(\'1l\',$(11).1k(\'b\'))}}).1k(\'b\',i);8(2.2y){$(\'R.1h R.1c-Q-1D\').Y(\'<a 1A="#" q="1m" 1M="m:N;" 2w="W(2.s, \'+i+\'); $(11).p(\\\'m\\\', \\\'N\\\').2s(); L(v);">\'+\'<t>&3C;</t></a>\');$(\'#1m\').1F(\'P\',2.1H.3E)}8(2.3[i].k.H!=E){$(\'R.1h R.1c-Q-1D\').Y(\'<a 1A="#" q="1g" 2w="W(2.3[\'+i+\'].k.H.2v(), \'+i+\'); $(11).p(\\\'m\\\', \\\'N\\\').2s(); L(v);">\'+\'<t>&3G;</t></a>\');$(\'#1g\').1F(\'P\',2.1H.3F)}$(\'R.1h R.1c-Q-1D\').Y(\'<t q="1L" 1M="m:N;"><2t 2u="./1d/3H/3K/3J.3A"><t>\'+2.1H.3t+\'</t></t>\');$(\'#1c-Q-P-3q\').Y(\'<t q="1v"></t>\')}});',62,259,'||gmaps|maps||map|currentInfo|mapIndex|if|function||index||||markers|marker|||google|gMap|properties|display||new|css|id|displayed|bounds|span|var|false||||true||length|iM|info|null|else||kmlFile|uId|imgTn|html|return|infoWindow|none|tmp|title|dialog|div|markerImg|callId||inline|fitToBounds||append|for||this|ciGMIWC_img|markerImgProp|height||width|event|msg|gmapsIndex|imgCatsUrl|window|ui|plugins|loadMarkers|datas|gmapsBoundKml|gmapsPopup|getBounds|displayPictureInfo|data|open|gmapsBoundMap|addListener|loadIndex|bind|zoomLevel|requestId|nbImgTxt|block|nbImg|gmapsNbPhotos|GMaps|ciGMIWC_showcat|renameId|m1|href|viewportInitialized|m2|titlebar|markerList|attr|navigationControl|lang|mode|LatLng|newListIndex|gmapsLoading|style|lat|initializeMapViewport|mapTypeControl|lng|getCenter|getDiv|each|uniqueId|displayWindowInfo|get|getSouthWest|markerInList|compareMarkers||case|substr|break|ciGMIWC_title|imgName|ciGMIWC_picnum|ciWALeft|ciWARight|setMap|splice|click|ciGMIWC_showcatList|li|applyMarkers|type|close|createMap|popupAutomaticSize|px|loaded|success|ajaxfct|public|Point|Content|auto|scaleControl|blur|img|src|getDefaultViewport|onclick|kmlFileUrl|geolocated|streetViewControl|async|re|iGMapsInfoWindowContent|west|ajax|getNorthEast|setContent|unbind|south|POST|gmaps_ajax|east|php|north|url|scrollwheel|getMarkers|distanceTreshold|center|mapType|backgroundColor|Map|switch|push|ffffff|parseJSON||||mapTypeId|zoom|Array|nbPhotos|charAt|_||exec|Number|Size|MarkerImage|mS|Marker|KmlLayer|markerTitle|setIcon|while|position|sort|preserveViewport|mapTypeControlOptions|trigger|category|iGMapsIconContent|categoryId|mapId|loading|init|body|load|LatLngBounds|InfoWindow|closeclick|gif|sizeMode|there4|dialogClass|boundmap|boundkml|sim|GrumPluginClasses|closeText|processing|icons|autoOpen|modal|dragend|zoom_changed|mouseleave|mouseenter|displayPicturePrev|displayPictureNext|fitBounds|imgCatsNames|location|upload|galleries|clone|children||nbsp|setCenter|zoomLevelMaxActivated|getZoom|size|55|font|resize|setZoom|isOpen'.split('|'),0,{})) -
extensions/GMaps/js/gmapsPicture.js
r7479 r7500 8 8 9 9 var viewportInitialized = { 10 icon:false,11 meta:false12 }; 13 varmarkerImgProp = [14 null,15 { w:32, h:32, x:15, y:31 }, // s0116 { w:32, h:32, x:15, y:31 }, // s0217 { w:32, h:32, x:10, y:31 }, // s0318 { w:30, h:40, x:4, y:39 }, // s0419 ];10 icon:false, 11 meta:false 12 }, 13 markerImgProp = [ 14 null, 15 { w:32, h:32, x:15, y:31 }, // s01 16 { w:32, h:32, x:15, y:31 }, // s02 17 { w:32, h:32, x:10, y:31 }, // s03 18 { w:30, h:40, x:4, y:39 }, // s04 19 ]; 20 20 21 21 … … 67 67 68 68 69 70 71 72 69 if(properties.kmlFileUrl!='') 73 70 { … … 84 81 85 82 map.kmlFile=kmlFile; 86 87 83 88 84 properties.gMap=map; … … 116 112 $(window).load(function () 117 113 { 118 gmaps. currentMapLoadIndex=-1;114 gmaps.popupMapIndex=-1; 119 115 120 116 for(i=0;i<gmaps.maps.length;i++) … … 129 125 if(gmaps.maps[i].displayType=='IP') 130 126 { 131 gmaps. currentMapLoadIndex=i;127 gmaps.popupMapIndex=i; 132 128 if(gmaps.maps[i].sizeMode=='A') 133 129 { … … 190 186 closeText:'X', 191 187 dialogClass: 'gmapsPopup', 192 title: gmaps.maps[gmaps. currentMapLoadIndex].title,188 title: gmaps.maps[gmaps.popupMapIndex].title, 193 189 open: function () 194 190 { 195 if(viewportInitialized.icon==false && gmaps. currentMapLoadIndex!=-1)191 if(viewportInitialized.icon==false && gmaps.popupMapIndex!=-1) 196 192 { 197 if(gmaps.maps[gmaps. currentMapLoadIndex].gMap.kmlFile!=null)198 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]);193 if(gmaps.maps[gmaps.popupMapIndex].gMap.kmlFile!=null) 194 gmaps.maps[gmaps.popupMapIndex].gMap.kmlFile.setMap(gmaps.maps[gmaps.popupMapIndex].gMap); 195 196 google.maps.event.trigger(gmaps.maps[gmaps.popupMapIndex].gMap, 'resize'); 197 centerMap(gmaps.maps[gmaps.popupMapIndex]); 202 198 $('#iGMapsIcon span, #iGMapsIcon a').css('font-size', '55.0%'); 203 199 viewportInitialized.icon=true; … … 205 201 206 202 google.maps.event.addListener( 207 gmaps.maps[gmaps. currentMapLoadIndex].gMap,203 gmaps.maps[gmaps.popupMapIndex].gMap, 208 204 'dragend', 209 205 function() … … 215 211 216 212 google.maps.event.addListener( 217 gmaps.maps[gmaps. currentMapLoadIndex].gMap,213 gmaps.maps[gmaps.popupMapIndex].gMap, 218 214 'zoom_changed', 219 215 function() … … 230 226 { 231 227 $('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);">'+228 .append('<a href="#" id="gmapsCenterMap" style="display:none;" onclick="centerMap(gmaps.maps[gmaps.popupMapIndex]); $(this).css(\'display\', \'none\').blur(); return(false);">'+ 233 229 '<span>•</span></a>'); 234 230 $('#gmapsCenterMap').attr('title', gmaps.lang.centermap); 235 231 } 236 232 237 if(gmaps.maps[gmaps. currentMapLoadIndex].gMap.kmlFile!=null)233 if(gmaps.maps[gmaps.popupMapIndex].gMap.kmlFile!=null) 238 234 { 239 235 $('div.gmapsPopup div.ui-dialog-titlebar') 240 .append('<a href="#" id="gmapsBoundKml" onclick="fitKmlBounds(gmaps.maps[gmaps. currentMapLoadIndex]); $(this).css(\'display\', \'none\').blur(); return(false);">'+236 .append('<a href="#" id="gmapsBoundKml" onclick="fitKmlBounds(gmaps.maps[gmaps.popupMapIndex]); $(this).css(\'display\', \'none\').blur(); return(false);">'+ 241 237 '<span>∼</span></a>'); 242 238 $('#gmapsBoundKml').attr('title', gmaps.lang.boundkml); 243 239 } 244 245 246 240 } 247 241 248 249 242 } 250 243 ); -
extensions/GMaps/js/gmapsPicture.packed.js
r7479 r7500 1 /* file: gmapsPicture.js - v1.1.1 | packed on 2010/10/ 28with 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}(' 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,{}))1 /* file: gmapsPicture.js - v1.1.1 | packed on 2010/10/30 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}('12 t={M:b,L:b},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){12 E=l c.3.1Q(2.1D.1T,2.1D.21),9=l c.3.1P($("#"+5.m).1b(0),{1H:5.1I,1E:5.1J,1L:E,U:(5.U==-1)?b:k,1R:(5.U==-1)?b:k,19:(5.19==\'n\')?b:k,16:(5.16==\'n\')?b:k,S:(5.S==-1)?b:k,1G:{1q:5.S},1e:\'\',}),F=f;7(2.V){F=l c.3.22({1U:E,9:9,u:5.1e})}1c=/^1S(\\d\\d)1W.*/i;j=1c.1Z(5.I);7(j!=f)j=l 1N(j[1]);7(j!=f&&F!=f){12 I=l c.3.1F(\'1O/1M/1K/\'+5.I,l c.3.1Y(s[j].w,s[j].h),l c.3.1k(0,0),l c.3.1k(s[j].x,s[j].y));F.2o(I)}7(5.18!=\'\'){g=l c.3.2n(5.18,{2m:k})}1h{g=f}9.g=g;5.6=9;5.Z=E}o C(9){7(2.V){9.6.1f(9.Z)}1h{11(9)}}o 11(9){7(9.6!=f)9.6.2q(9.6.g.2l())}$(P).2p(o(){2.8=-1;17(i=0;i<2.3.G;i++){1d(2.3[i]);2.3[i].6.1f(2.3[i].Z);$(\'#\'+2.3[i].m+\' p, #\'+2.3[i].m+\' a\').e(\'R-N\',\'K.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\'){$(\'#O\').e({T:($(P).T()*2.1j)+\'1i\',Q:($(P).Q()*2.1j)+\'1i\'})}}}7($(\'#1l\').G>0){v=$(\'#1l\').1b(0).1a.1a.m;v=\'2k\'+v.2i().28(0,1)+v.23(1);$("#"+v+" a").2j(\'27\',o(){7(t.L==b){17(i=0;i<2.3.G;i++){7(2.3[i].1g==\'26\'){c.3.B.1z(2.3[i].6,\'1r\');C(2.3[i]);$(\'#\'+2.3[i].m+\' p, #\'+2.3[i].m+\' a\').e(\'R-N\',\'K.0%\')}}t.L=k}})}7($(\'#1C\').G>0){$(\'#1C\').W({24:b,T:\'1B\',Q:\'1B\',25:k,2a:\'X\',2b:\'Y\',u:2.3[2.8].u,2g:o(){7(t.M==b&&2.8!=-1){7(2.3[2.8].6.g!=f)2.3[2.8].6.g.1m(2.3[2.8].6);c.3.B.1z(2.3[2.8].6,\'1r\');C(2.3[2.8]);$(\'#O p, #O a\').e(\'R-N\',\'K.0%\');t.M=k}c.3.B.1A(2.3[2.8].6,\'2h\',o(){$(\'#D\').e(\'q\',\'z\');$(\'#H\').e(\'q\',\'z\')});c.3.B.1A(2.3[2.8].6,\'2f\',o(){$(\'#D\').e(\'q\',\'z\');$(\'#H\').e(\'q\',\'z\')})}});7(2.V){$(\'J.Y J.1p-W-1n\').1o(\'<a 1s="#" m="D" 1q="q:13;" 1t="C(2.3[2.8]); $(1y).e(\\\'q\\\', \\\'13\\\').1x(); 1w(b);">\'+\'<p>&2e;</p></a>\');$(\'#D\').1u(\'u\',2.1v.2c)}7(2.3[2.8].6.g!=f){$(\'J.Y J.1p-W-1n\').1o(\'<a 1s="#" m="H" 1t="11(2.3[2.8]); $(1y).e(\\\'q\\\', \\\'13\\\').1x(); 1w(b);">\'+\'<p>&2d;</p></a>\');$(\'#H\').1u(\'u\',2.1v.29)}}});',62,153,'||gmaps|maps||properties|gMap|if|popupMapIndex|map||false|google||css|null|kmlFile|||iM|true|new|id||function|span|display|32|markerImgProp|viewportInitialized|title|tabId||||inline||event|centerMap|gmapsCenterMap|latlng|marker|length|gmapsBoundKml|markerImg|div|55|meta|icon|size|iGMapsIcon|window|height|font|mapTypeControl|width|navigationControl|geolocated|dialog||gmapsPopup|gMapCenter||fitKmlBounds|var|none|31||streetViewControl|for|kmlFileUrl|scaleControl|parentNode|get|re|applyMap|markerTitle|setCenter|displayType|else|px|popupAutomaticSize|Point|iGMapContent|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
r7482 r7500 58 58 | | | . Maps are not displayed if user navigate with tag 59 59 | | | 60 | | | * mantis bug:1937 61 | | | . add possibility to add maps in descriptions 62 | | | 63 | | | 64 | | | 60 65 | | | 61 66 | | |
Note: See TracChangeset
for help on using the changeset viewer.