Changeset 18609
- Timestamp:
- Oct 11, 2012, 10:46:47 PM (11 years ago)
- Location:
- extensions/rv_gmaps/trunk
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_gmaps/trunk/changelog.txt
r18578 r18609 4 4 - minor javascript changes for maps api v3.9 5 5 - code optimization 6 - use colorbox instead of nyroModal 6 7 7 8 2.4.d -
extensions/rv_gmaps/trunk/map_data.php
r18578 r18609 77 77 } 78 78 79 $out='';80 function rvo($s) {81 //global $out; $out.=$s;82 echo $s;83 }84 85 function rvf() {86 //global $out; echo $out; $out=''; ob_flush();87 }88 89 79 $start_output = get_moment(); 90 80 91 81 92 rvo( "{\ntitle:".jsgm_str( strip_tags(trigger_event('render_element_description', $page['title']) ) ) ); 82 echo "{\ntitle:", jsgm_str( strip_tags(trigger_event('render_element_description', $page['title']) ) ) 83 , ",\npage_url:", jsgm_str( duplicate_index_url( array('start'=>0) ) ) 84 , ",\nblowup_url:", jsgm_str( rvm_duplicate_blowup_url( array('start'=>0) ) ) 85 , ",\nkml_url:", jsgm_str( rvm_duplicate_kml_index_url( array('start'=>0, 'flat'=>1) ) ) 86 , ",\nnb_items:", count($page['items']); 93 87 94 rvo( ",\npage_url:".jsgm_str( duplicate_index_url( array('start'=>0) ) ) ); 88 echo ",\nbounds:"; 89 if ( isset($cm) ) 90 echo jsgm_bounds( $cm->bounds ); 91 else 92 echo "null"; 95 93 96 rvo( ",\nblowup_url:".jsgm_str( rvm_duplicate_blowup_url( array('start'=>0) ) ));94 echo ",\n\nnb_clusters:", count($clusters); 97 95 98 rvo( ",\nkml_url:".jsgm_str( rvm_duplicate_kml_index_url( array('start'=>0, 'flat'=>1) ) ) ); 99 100 rvo( ",\nnb_items:".count($page['items']) ); 101 102 rvo( ",\nbounds:" ); 103 if ( isset($cm) ) 104 rvo( jsgm_bounds( $cm->bounds ) ); 105 else 106 rvo( "null" ); 107 108 rvo( ",\n\nnb_clusters:".count($clusters) ); 109 110 rvo( ",\nimage_clusters:[\n" ); 96 echo ",\nimage_clusters:[\n"; 111 97 $i=0; 112 98 $thumb_params = ImageStdParams::get_by_type(IMG_THUMB); … … 122 108 foreach( $clusters as $c ) 123 109 { 124 if ($i) rvo( ",\n\n" );125 rvo( '{position:'. jsgm_position( bounds_center($c->bounds)) );126 rvo( ",\nbounds:". jsgm_bounds( $c->bounds ));127 rvo( ",\nnb_items:".count($c->items));128 rvo( ",\n" );110 if ($i) echo ",\n\n" ; 111 echo '{position:', jsgm_position( bounds_center($c->bounds) ); 112 echo ",\nbounds:", jsgm_bounds( $c->bounds ); 113 echo ",\nnb_items:", count($c->items); 114 echo ",\n"; 129 115 130 rvo( 'blowup_url:"'.rvm_duplicate_blowup_url(array('box'=>$c->bounds), array('start') ). '"' );116 echo 'blowup_url:"', rvm_duplicate_blowup_url(array('box'=>$c->bounds), array('start') ), '"'; 131 117 132 118 $max_per_cluster = rvm_get_config_var('nb_images_per_marker',20); 133 119 if ( count($c->items) > $max_per_cluster ) 134 {135 120 $c->items = array_slice($c->items, 0, $max_per_cluster); 136 } 137 rvo( ",\nitems:[" );121 122 echo ",\nitems:["; 138 123 for ($j=0; $j<count($c->items); $j++) 139 124 { … … 142 127 $page_url = str_replace(array('123456789','dummy_file'), array($img['id'], get_filename_wo_extension($img['file'])), $page_url_model); 143 128 144 if ($j) rvo( "," );145 rvo( "{tn:".jsgm_str( DerivativeImage::url( $thumb_params,$img )) );146 rvo( ",name:".jsgm_str( render_element_name($img)) );147 rvo( ",comment:".jsgm_str( render_element_description($img)) );148 rvo( ",page_url:".jsgm_str( $page_url ));149 rvo( "}" );129 if ($j) echo( "," ); 130 echo "{tn:", jsgm_str( DerivativeImage::url( $thumb_params,$img ) ); 131 echo ",name:", jsgm_str( render_element_name($img) ); 132 echo ",comment:", jsgm_str( render_element_description($img) ); 133 echo ",page_url:", jsgm_str( $page_url ); 134 echo "}"; 150 135 } 151 rvo( "]\n}" ); 152 rvf(); 136 echo "]\n}"; 153 137 $i++; 154 138 } 155 rvo( "] /*clusters*/\n" );139 echo "] /*clusters*/\n"; 156 140 157 141 $time = get_elapsed_time($t2, get_moment()); 158 142 $page['queries_time'] = number_format($page['queries_time'],3,'.',' '); 159 rvo( "\n,debug:'$time; out:".get_elapsed_time($start_output,get_moment()).";$cluster_debug queries:".$page['count_queries']." in ".$page['queries_time']."s'\n" );143 echo "\n,debug:'$time; out:", get_elapsed_time($start_output,get_moment()), ";$cluster_debug queries:", $page['count_queries'], " in ", $page['queries_time'], "s'\n" ; 160 144 161 rvo( '}' ); 162 rvf(); 145 echo '}'; 163 146 ?> -
extensions/rv_gmaps/trunk/template/data_handler.js
r12719 r18609 283 283 PwgDataHandler.blowupUrl = function(theUrl) 284 284 { 285 jQuery.fx.off = true; 286 jQuery.nyroModalManual( { 287 url: theUrl, 288 forceType: 'iframe', 289 width: 1920 285 jQuery.colorbox( { 286 href: theUrl, 287 iframe: 1, 288 width: "95%", height: "98%" 290 289 }); 291 290 return false; -
extensions/rv_gmaps/trunk/template/map.tpl
r14181 r18609 8 8 9 9 <script src="http://maps.googleapis.com/maps/api/js?sensor=false&language={$lang_info.code}&libraries=places" type="text/javascript"></script> 10 {combine_script id='jquery' load='header' path='http://ajax.googleapis.com/ajax/libs/jquery/1. 7.2/jquery.min.js'}11 {combine_script id='jquery. nyroModal' load='async' path="`$PLUGIN_LOCATION`/template/nyroModal/jquery.nyroModal-1.6.2.js" version='1.6.2'}10 {combine_script id='jquery' load='header' path='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'} 11 {combine_script id='jquery.colorbox' load='async' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} 12 12 {combine_css path="`$PLUGIN_LOCATION`/template/style.css" version=$RVM_PLUGIN_VERSION} 13 {combine_css path= "`$PLUGIN_LOCATION`/template/nyroModal/nyroModal.css" version=$RVM_PLUGIN_VERSION}13 {combine_css path='themes/default/js/plugins/colorbox/style2/colorbox.css'} 14 14 {combine_script id='rvm.dl' load='header' path="`$PLUGIN_LOCATION`/template/data_loader.js" version=$RVM_PLUGIN_VERSION} 15 15 {combine_script id='rvm.dh' load='header' path="`$PLUGIN_LOCATION`/template/data_handler.js" version=$RVM_PLUGIN_VERSION} -
extensions/rv_gmaps/trunk/template/picture_map_content.tpl
r13092 r18609 2 2 <script src="http://maps.googleapis.com/maps/api/js?sensor=false&language={$lang_info.code}" type="text/javascript"></script> 3 3 {combine_script id='jquery' load='header' path='themes/default/js/jquery.min.js'} 4 {combine_script id='jquery. nyroModal' load='async' path="`$PLUGIN_LOCATION`/template/nyroModal/jquery.nyroModal-1.6.2.js" version='1.6.2'}5 <link href="{$PLUGIN_ROOT_URL}/template/nyroModal/nyroModal.css" rel="stylesheet" type="text/css"> 4 {combine_script id='jquery.colorbox' load='async' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'} 5 {combine_css path='themes/default/js/plugins/colorbox/style2/colorbox.css'} 6 6 {/html_head}{html_style}{literal} 7 7 #mapPicture { … … 61 61 function blowupUrl(theUrl) 62 62 { 63 jQuery.fx.off = true; 64 jQuery.nyroModalManual( { 65 url: theUrl, 66 forceType: 'iframe', 67 width: 1920 68 }); 63 jQuery.colorbox({href: theUrl, iframe: 1, width: "95%", height: "98%"}); 69 64 return false; 70 65 }
Note: See TracChangeset
for help on using the changeset viewer.