[guides on map] convertion of tracks length from kilometers to meters is added.

This commit is contained in:
Arsentiy Milchakov 2020-06-15 14:55:52 +03:00 committed by Vladimir Byko-Ianko
parent 44c6371783
commit c88df120ea

View file

@ -57,6 +57,8 @@ void ParseGallery(std::string const & src, guides_on_map::GuidesOnMap & result)
FromJSONObjectOptionalField(extraObj, "bookmark_count", info.m_bookmarksCount);
FromJSONObject(extraObj, "has_track", info.m_hasTrack);
FromJSONObjectOptionalField(extraObj, "tracks_length", info.m_tracksLength);
// Convert kilometers to meters.
info.m_tracksLength *= 1000;
auto const durationObj = json_object_get(extraObj, "tour_duration");
if (json_is_object(durationObj))
{