Changeset 26331 for extensions/rv_gmaps/trunk/include/functions_map.php
- Timestamp:
- Dec 29, 2013, 3:14:42 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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(
Note: See TracChangeset
for help on using the changeset viewer.