MCPcopy Create free account
hub / github.com/comaps/comaps / ParseDrapeDebugCommand

Method ParseDrapeDebugCommand

libs/map/framework.cpp:2642–2751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2640}
2641
2642bool Framework::ParseDrapeDebugCommand(string const & query)
2643{
2644 MapStyle desiredStyle = MapStyleCount;
2645 if (query == "?dark" || query == "mapstyle:dark")
2646 desiredStyle = MapStyleDefaultDark;
2647 else if (query == "?light" || query == "mapstyle:light")
2648 desiredStyle = MapStyleDefaultLight;
2649 else if (query == "?vlight" || query == "mapstyle:vehicle_light")
2650 desiredStyle = MapStyleVehicleLight;
2651 else if (query == "?vdark" || query == "mapstyle:vehicle_dark")
2652 desiredStyle = MapStyleVehicleDark;
2653 else if (query == "?olight" || query == "mapstyle:outdoors_light")
2654 desiredStyle = MapStyleOutdoorsLight;
2655 else if (query == "?odark" || query == "mapstyle:outdoors_dark")
2656 desiredStyle = MapStyleOutdoorsDark;
2657
2658 if (desiredStyle != MapStyleCount)
2659 {
2660#if defined(OMIM_OS_ANDROID)
2661 if (m_drapeEngine->GetApiVersion() == dp::ApiVersion::Vulkan)
2662 {
2663 // See comment in android/jni/app/organicmaps/Framework.cpp Framework::MarkMapStyle().
2664 SetMapStyle(desiredStyle);
2665 }
2666 else
2667 MarkMapStyle(desiredStyle);
2668#else
2669 SetMapStyle(desiredStyle);
2670#endif
2671 return true;
2672 }
2673
2674 if (query == "?aa" || query == "effect:antialiasing")
2675 {
2676 m_drapeEngine->SetPosteffectEnabled(df::PostprocessRenderer::Antialiasing, true /* enabled */);
2677 return true;
2678 }
2679 if (query == "?no-aa" || query == "effect:no-antialiasing")
2680 {
2681 m_drapeEngine->SetPosteffectEnabled(df::PostprocessRenderer::Antialiasing, false /* enabled */);
2682 return true;
2683 }
2684 if (query == "?scheme")
2685 {
2686 m_transitManager.EnableTransitSchemeMode(true /* enable */);
2687 return true;
2688 }
2689 if (query == "?no-scheme")
2690 {
2691 m_transitManager.EnableTransitSchemeMode(false /* enable */);
2692 return true;
2693 }
2694 if (query == "?isolines")
2695 {
2696 m_isolinesManager.SetEnabled(true /* enable */);
2697 return true;
2698 }
2699 if (query == "?no-isolines")

Callers

nothing calls this directly

Calls 7

SetPosteffectEnabledMethod · 0.80
ShowDebugInfoMethod · 0.80
SetFunction · 0.50
GetApiVersionMethod · 0.45
SetEnabledMethod · 0.45

Tested by

no test coverage detected