- max_lat = Tracepoint.where(:gpx_id => id).maximum(:latitude)
- min_lat = Tracepoint.where(:gpx_id => id).minimum(:latitude)
- max_lon = Tracepoint.where(:gpx_id => id).maximum(:longitude)
- min_lon = Tracepoint.where(:gpx_id => id).minimum(:longitude)
+ max_lat = Tracepoint.where(:trace => id).maximum(:latitude)
+ min_lat = Tracepoint.where(:trace => id).minimum(:latitude)
+ max_lon = Tracepoint.where(:trace => id).maximum(:longitude)
+ min_lon = Tracepoint.where(:trace => id).minimum(:longitude)