<commit_before>#include "framework.hpp"
#include "draw_processor.hpp"
#include "drawer_yg.hpp"
#include "feature_vec_model.hpp"
#include "benchmark_provider.hpp"

#include "../platform/languages.hpp"
#include "../platform/settings.hpp"

#include "../yg/rendercontext.hpp"

#include "../search/search_engine.hpp"
#include "../search/result.hpp"

#include "../indexer/categories_holder.hpp"
#include "../indexer/feature_visibility.hpp"
#include "../indexer/feature.hpp"
#include "../indexer/scales.hpp"
#include "../indexer/drawing_rules.hpp"
#include "../indexer/data_factory.hpp"

#include "../base/math.hpp"
#include "../base/string_utils.hpp"

#include "../std/algorithm.hpp"
#include "../std/fstream.hpp"
#include "../std/target_os.hpp"

#include "render_policy_st.hpp"
#include "render_policy_mt.hpp"

#include "tiling_render_policy_st.hpp"
#include "tiling_render_policy_mt.hpp"

using namespace feature;

template <typename TModel>
Framework<TModel>::~Framework()
{}

template <typename TModel>
void Framework<TModel>::AddMap(string const & file)
{
  LOG(LDEBUG, ("Loading map:", file));
  threads::MutexGuard lock(m_modelSyn);

  feature::DataHeader h;
  LoadMapHeader(GetPlatform().GetReader(file), h);

  m_model.AddWorldRect(h.GetBounds());
  m_model.AddMap(file);
}

template <typename TModel>
void Framework<TModel>::RemoveMap(string const & datFile)
{
  threads::MutexGuard lock(m_modelSyn);
  m_model.RemoveMap(datFile);
}

template <typename TModel>
void Framework<TModel>::OnLocationStatusChanged(location::TLocationStatus newStatus)
{
  if (newStatus == location::EStarted)
    // reset centering mode
    m_centeringMode = ECenterAndScale;
  else
  {
    m_centeringMode = EDoNothing;
    m_locationState.TurnOff();
    Invalidate();
  }
}

template <typename TModel>
void Framework<TModel>::OnGpsUpdate(location::GpsInfo const & info)<commit_msg>Fixed gps centering mode<commit_after>#include "framework.hpp"
#include "draw_processor.hpp"
#include "drawer_yg.hpp"
#include "feature_vec_model.hpp"
#include "benchmark_provider.hpp"

#include "../platform/languages.hpp"
#include "../platform/settings.hpp"

#include "../yg/rendercontext.hpp"

#include "../search/search_engine.hpp"
#include "../search/result.hpp"

#include "../indexer/categories_holder.hpp"
#include "../indexer/feature_visibility.hpp"
#include "../indexer/feature.hpp"
#include "../indexer/scales.hpp"
#include "../indexer/drawing_rules.hpp"
#include "../indexer/data_factory.hpp"

#include "../base/math.hpp"
#include "../base/string_utils.hpp"

#include "../std/algorithm.hpp"
#include "../std/fstream.hpp"
#include "../std/target_os.hpp"

#include "render_policy_st.hpp"
#include "render_policy_mt.hpp"

#include "tiling_render_policy_st.hpp"
#include "tiling_render_policy_mt.hpp"

using namespace feature;

template <typename TModel>
Framework<TModel>::~Framework()
{}

template <typename TModel>
void Framework<TModel>::AddMap(string const & file)
{
  LOG(LDEBUG, ("Loading map:", file));
  threads::MutexGuard lock(m_modelSyn);

  feature::DataHeader h;
  LoadMapHeader(GetPlatform().GetReader(file), h);

  m_model.AddWorldRect(h.GetBounds());
  m_model.AddMap(file);
}

template <typename TModel>
void Framework<TModel>::RemoveMap(string const & datFile)
{
  threads::MutexGuard lock(m_modelSyn);
  m_model.RemoveMap(datFile);
}

template <typename TModel>
void Framework<TModel>::OnLocationStatusChanged(location::TLocationStatus newStatus)
{
  switch (newStatus)
  {
  case location::EStarted:
  case location::EFirstEvent:
    // reset centering mode
    m_centeringMode = ECenterAndScale;
    break;
  default:
    m_centeringMode = EDoNothing;
    m_locationState.TurnOff();
    Invalidate();
  }
}

template <typename TModel>
void Framework<TModel>::OnGpsUpdate(location::GpsInfo const & info)
{'fraction_non_alphanumeric': 0.1549407114624506, 'fraction_numerical': 0.0, 'mean_word_length': 5.5111492281303605, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2310153', 'n_tokens_mistral': 1271, 'n_tokens_neox': 1257, 'n_words': 230}