forked from organicmaps/organicmaps
Fixed map style switching on Android
This commit is contained in:
parent
3dc6d2f411
commit
912e395b11
3 changed files with 4 additions and 3 deletions
|
@ -23,9 +23,8 @@ import java.lang.annotation.RetentionPolicy;
|
|||
*/
|
||||
public class Framework
|
||||
{
|
||||
public static final int MAP_STYLE_LIGHT = 0;
|
||||
public static final int MAP_STYLE_CLEAR = 0;
|
||||
public static final int MAP_STYLE_DARK = 1;
|
||||
public static final int MAP_STYLE_CLEAR = 2;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({ROUTER_TYPE_VEHICLE, ROUTER_TYPE_PEDESTRIAN, ROUTER_TYPE_BICYCLE, ROUTER_TYPE_TAXI})
|
||||
|
|
|
@ -447,7 +447,7 @@ public class SearchFragment extends BaseMwmFragment
|
|||
hideSearch();
|
||||
|
||||
// change map style for the Map activity
|
||||
final int mapStyle = isOld ? Framework.MAP_STYLE_LIGHT : (isDark ? Framework.MAP_STYLE_DARK : Framework.MAP_STYLE_CLEAR);
|
||||
final int mapStyle = isDark ? Framework.MAP_STYLE_DARK : Framework.MAP_STYLE_CLEAR;
|
||||
Framework.nativeSetMapStyle(mapStyle);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1837,6 +1837,8 @@ void Framework::OnUpdateGpsTrackPointsCallback(vector<pair<size_t, location::Gps
|
|||
|
||||
void Framework::MarkMapStyle(MapStyle mapStyle)
|
||||
{
|
||||
ASSERT_NOT_EQUAL(mapStyle, MapStyle::MapStyleMerged, ());
|
||||
|
||||
// Store current map style before classificator reloading
|
||||
std::string mapStyleStr = MapStyleToString(mapStyle);
|
||||
if (mapStyleStr.empty())
|
||||
|
|
Loading…
Add table
Reference in a new issue