diff options
Diffstat (limited to 'map/framework.cpp')
-rw-r--r-- | map/framework.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/map/framework.cpp b/map/framework.cpp index 1b4961de69..6094a12a64 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -1394,6 +1394,9 @@ string Framework::GetCountryName(m2::PointD const & pt) const bool Framework::Search(search::SearchParams const & params) { + if (ParseDrapeDebugCommand(params.m_query)) + return false; + auto const mode = params.m_mode; auto & intent = m_searchIntents[static_cast<size_t>(mode)]; @@ -2868,6 +2871,29 @@ uint32_t GetBestType(FeatureType const & ft) } } +bool Framework::ParseDrapeDebugCommand(std::string const & query) +{ + MapStyle desiredStyle = MapStyleCount; + if (query == "?dark" || query == "mapstyle:dark") + desiredStyle = MapStyleDark; + else if (query == "?light" || query == "mapstyle:light") + desiredStyle = MapStyleClear; + else if (query == "?vdark" || query == "mapstyle:vehicle_dark") + desiredStyle = MapStyleVehicleDark; + else if (query == "?vlight" || query == "mapstyle:vehicle_light") + desiredStyle = MapStyleVehicleClear; + else + return false; + +#if defined(OMIM_OS_ANDROID) + MarkMapStyle(desiredStyle); +#else + SetMapStyle(desiredStyle); +#endif + + return true; +} + bool Framework::ParseEditorDebugCommand(search::SearchParams const & params) { if (params.m_query == "?edits") |