Changeset 26331 for extensions/rv_gmaps/trunk/include
- Timestamp:
- Dec 29, 2013, 3:14:42 PM (10 years ago)
- Location:
- extensions/rv_gmaps/trunk/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_gmaps/trunk/include/functions.php
r23519 r26331 29 29 $query = ' 30 30 SELECT id FROM '.IMAGES_TABLE.' 31 WHERE lat IS NOT NULL31 WHERE latitude IS NOT NULL 32 32 AND id IN ('.implode(',', $items).') 33 33 ORDER BY NULL -
extensions/rv_gmaps/trunk/include/functions_map.php
r22180 r26331 129 129 if ( !isset($b) or empty($b) ) 130 130 return null; 131 $sql_where = 'i.lat BETWEEN '.$b['s'].' AND '.($b['n']);131 $sql_where = 'i.latitude BETWEEN '.$b['s'].' AND '.($b['n']); 132 132 $sql_where .= ' AND '; 133 133 if ($b['e'] >= $b['w']) 134 $sql_where .= 'i.lon BETWEEN '.$b['w'].' AND '.($b['e']);134 $sql_where .= 'i.longitude BETWEEN '.$b['w'].' AND '.($b['e']); 135 135 else 136 $sql_where .= 'i.lon NOT BETWEEN '.($b['e']+1e-7).' AND '.($b['w']-1e-7);136 $sql_where .= 'i.longitude NOT BETWEEN '.($b['e']+1e-7).' AND '.($b['w']-1e-7); 137 137 return $sql_where; 138 138 } … … 172 172 if ($bounds['e']>180) $bounds['e']-=360; 173 173 $where_sql = rvm_bounds_to_sql( $bounds ); 174 $order_by = 'ORDER BY POW('.$ll['lat'].'-i.lat ,2)+POW('.$cos_lat.'*('.$ll['lon'].'-i.lon),2)';174 $order_by = 'ORDER BY POW('.$ll['lat'].'-i.latitude,2)+POW('.$cos_lat.'*('.$ll['lon'].'-i.longitude),2)'; 175 175 return $where_sql; 176 176 } … … 300 300 301 301 $query = ' 302 SELECT category_id cat_id, uppercats, MAX(lat ) AS n, MIN(lat) AS s, MAX(lon) AS e, MIN(lon) AS w, COUNT(i.id) count, MIN(i.date_creation) min_date, MAX(i.date_creation) max_date302 SELECT category_id cat_id, uppercats, MAX(latitude) AS n, MIN(latitude) AS s, MAX(longitude) AS e, MIN(longitude) AS w, COUNT(i.id) count, MIN(i.date_creation) min_date, MAX(i.date_creation) max_date 303 303 FROM 304 304 '.CATEGORIES_TABLE.' as c … … 369 369 370 370 if (empty($where_sql)) 371 $where_sql .= 'i.lat IS NOT NULL';371 $where_sql .= 'i.latitude IS NOT NULL'; 372 372 $where_sql_images_only = $where_sql; 373 373 $where_sql .= get_sql_condition_FandF( -
extensions/rv_gmaps/trunk/include/picture_map.inc.php
r24745 r26331 36 36 'MAP_TYPE' => rvm_get_config_var('map_type', 'ROADMAP'), 37 37 'U_NO_MAP' => duplicate_picture_url(), 38 'U_BLOWUP' => rvm_make_blowup_url( array('ll'=> $picture), array('start','box') ),38 'U_BLOWUP' => rvm_make_blowup_url( array('ll'=> array('lat'=>$picture['latitude'],'lon'=>$picture['longitude'])), array('start','box') ), 39 39 'COMMENT_IMG' => trigger_event('render_element_description', $picture['comment']) 40 40 ) 41 41 ); 42 if ( isset($picture['lat ']) )42 if ( isset($picture['latitude']) ) 43 43 { 44 44 $template->assign( 'coordinates', 45 45 array( 46 'LAT' => $picture['lat '],47 'LON' => $picture['lon '],46 'LAT' => $picture['latitude'], 47 'LON' => $picture['longitude'], 48 48 ) 49 49 );
Note: See TracChangeset
for help on using the changeset viewer.