mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
Use old calculation of city visits in right sidebar on Map page due to performance issues
This commit is contained in:
parent
dc6736942d
commit
ad164b0edd
2 changed files with 1 additions and 2 deletions
|
|
@ -15,7 +15,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||
|
||||
### Changed
|
||||
|
||||
- Calculation of city visits that are shown in right sidebar on Map page was reworked and now is more accurate.
|
||||
- Order of points on Points page is now descending by timestamp instead of ascending.
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ class MapController < ApplicationController
|
|||
def index
|
||||
@points = current_user.tracked_points.without_raw_data.where('timestamp >= ? AND timestamp <= ?', start_at, end_at).order(timestamp: :asc)
|
||||
|
||||
@countries_and_cities = Visits::Calculate.new(@points).uniq_visits
|
||||
@countries_and_cities = CountriesAndCities.new(@points).call
|
||||
@coordinates =
|
||||
@points.pluck(:latitude, :longitude, :battery, :altitude, :timestamp, :velocity, :id)
|
||||
.map { [_1.to_f, _2.to_f, _3.to_s, _4.to_s, _5.to_s, _6.to_s, _7] }
|
||||
|
|
|
|||
Loading…
Reference in a new issue