TODO! To adjust GpsTrackFilter was added secret command "?gpstrackaccuracy:xxx;" where xxx is a new value for horizontal accuracy. This is temporary solution while we don't have a good filter.
| 140 | // where xxx is a new value for horizontal accuracy. |
| 141 | // This is temporary solution while we don't have a good filter. |
| 142 | bool ParseSetGpsTrackMinAccuracyCommand(string const & query) |
| 143 | { |
| 144 | char constexpr kGpsAccuracy[] = "?gpstrackaccuracy:"; |
| 145 | if (!query.starts_with(kGpsAccuracy)) |
| 146 | return false; |
| 147 | |
| 148 | size_t const end = query.find(';', sizeof(kGpsAccuracy) - 1); |
| 149 | if (end == string::npos) |
| 150 | return false; |
| 151 | |
| 152 | string s(query.begin() + sizeof(kGpsAccuracy) - 1, query.begin() + end); |
| 153 | double value; |
| 154 | if (!strings::to_double(s, value)) |
| 155 | return false; |
| 156 | |
| 157 | GpsTrackFilter::StoreMinHorizontalAccuracy(value); |
| 158 | return true; |
| 159 | } |
| 160 | } // namespace |
| 161 | |
| 162 | pair<MwmSet::MwmId, MwmSet::RegResult> Framework::RegisterMap(LocalCountryFile const & file) |
no test coverage detected