mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
feat: Add zoom level clamping for WMS layer switching and improve message filtering in simple mode
This commit is contained in:
@@ -752,6 +752,14 @@ MapOptions(
|
|||||||
|
|
||||||
#### Troubleshooting
|
#### Troubleshooting
|
||||||
|
|
||||||
|
**RangeError: Invalid value: Not in inclusive range 0..15: 16**:
|
||||||
|
- **Cause**: Map zoom level exceeds the number of resolutions defined in Slovenian CRS
|
||||||
|
- **Fix**: Zoom level is automatically clamped when switching to WMS layers
|
||||||
|
- **Implementation**:
|
||||||
|
- Layer switching clamps zoom to `layer.maxZoom` if current zoom exceeds it
|
||||||
|
- Layer loading from settings clamps `_savedMapZoom` to layer's maximum
|
||||||
|
- Prevents crash when switching from high-zoom layer (19+) to WMS layer (15 max)
|
||||||
|
|
||||||
**400 Bad Request Errors**:
|
**400 Bad Request Errors**:
|
||||||
- **Cause**: Tile grid misalignment (wrong origin, bounds, or resolutions)
|
- **Cause**: Tile grid misalignment (wrong origin, bounds, or resolutions)
|
||||||
- **Fix**: Verify values match WMTS GetCapabilities exactly
|
- **Fix**: Verify values match WMTS GetCapabilities exactly
|
||||||
|
|||||||
Binary file not shown.
BIN
ios/Runner.ipa
BIN
ios/Runner.ipa
Binary file not shown.
@@ -489,7 +489,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 40;
|
CURRENT_PROJECT_VERSION = 41;
|
||||||
DEVELOPMENT_TEAM = JND55328G8;
|
DEVELOPMENT_TEAM = JND55328G8;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -511,7 +511,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 40;
|
CURRENT_PROJECT_VERSION = 41;
|
||||||
DEVELOPMENT_TEAM = JND55328G8;
|
DEVELOPMENT_TEAM = JND55328G8;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
@@ -530,7 +530,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 40;
|
CURRENT_PROJECT_VERSION = 41;
|
||||||
DEVELOPMENT_TEAM = JND55328G8;
|
DEVELOPMENT_TEAM = JND55328G8;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
@@ -547,7 +547,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 40;
|
CURRENT_PROJECT_VERSION = 41;
|
||||||
DEVELOPMENT_TEAM = JND55328G8;
|
DEVELOPMENT_TEAM = JND55328G8;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
@@ -679,7 +679,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 40;
|
CURRENT_PROJECT_VERSION = 41;
|
||||||
DEVELOPMENT_TEAM = JND55328G8;
|
DEVELOPMENT_TEAM = JND55328G8;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -702,7 +702,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 40;
|
CURRENT_PROJECT_VERSION = 41;
|
||||||
DEVELOPMENT_TEAM = JND55328G8;
|
DEVELOPMENT_TEAM = JND55328G8;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>40</string>
|
<string>41</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSBluetoothAlwaysUsageDescription</key>
|
<key>NSBluetoothAlwaysUsageDescription</key>
|
||||||
|
|||||||
@@ -5,22 +5,24 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000194">
|
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000198">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="1: increment_build_number" time="0.915439">
|
<testcase classname="fastlane.lanes" name="1: increment_build_number" time="0.469741">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="2: build_app" time="119.588068">
|
<testcase classname="fastlane.lanes" name="2: build_app" time="119.511839">
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="3: upload_to_testflight" time="295.803061">
|
<testcase classname="fastlane.lanes" name="3: upload_to_testflight" time="39.581916">
|
||||||
|
|
||||||
|
<failure message="/opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/actions/actions_helper.rb:67:in 'Fastlane::Actions.execute_action' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/runner.rb:255:in 'block in Fastlane::Runner#execute_action' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/runner.rb:229:in 'Dir.chdir' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/runner.rb:229:in 'Fastlane::Runner#execute_action' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/runner.rb:157:in 'Fastlane::Runner#trigger_action_by_name' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/fast_file.rb:159:in 'Fastlane::FastFile#method_missing' Fastfile:23:in 'block (2 levels) in Fastlane::FastFile#parsing_binding' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/lane.rb:41:in 'Fastlane::Lane#call' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/runner.rb:49:in 'block in Fastlane::Runner#execute' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/runner.rb:45:in 'Dir.chdir' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/runner.rb:45:in 'Fastlane::Runner#execute' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/lane_manager.rb:46:in 'Fastlane::LaneManager.cruise_lane' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/command_line_handler.rb:34:in 'Fastlane::CommandLineHandler.handle' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/commands_generator.rb:110:in 'block (2 levels) in Fastlane::CommandsGenerator#run' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in 'Commander::Command#call' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in 'Commander::Command#run' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in 'Commander::Runner#run_active_command' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in 'Commander::Runner#run!' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in 'Commander::Delegates#run!' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/commands_generator.rb:363:in 'Fastlane::CommandsGenerator#run' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/commands_generator.rb:43:in 'Fastlane::CommandsGenerator.start' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in 'Fastlane::CLIToolsDistributor.take_off' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/gems/fastlane-2.228.0/bin/fastlane:23:in '<top (required)>' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/bin/fastlane:25:in 'Kernel#load' /opt/homebrew/Cellar/fastlane/2.228.0/libexec/bin/fastlane:25:in '<main>' Invalid username and password combination. Used 'hey@dz0ny.dev' as the username." />
|
||||||
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
|
||||||
|
|||||||
@@ -1683,6 +1683,16 @@
|
|||||||
"description": "Beschreibung für Karte-drehen-Umschalter"
|
"description": "Beschreibung für Karte-drehen-Umschalter"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"resetMapRotation": "Drehung zurücksetzen",
|
||||||
|
"@resetMapRotation": {
|
||||||
|
"description": "Schaltfläche zum Zurücksetzen der Kartendrehung nach Norden"
|
||||||
|
},
|
||||||
|
|
||||||
|
"resetMapRotationTooltip": "Karte nach Norden zurücksetzen",
|
||||||
|
"@resetMapRotationTooltip": {
|
||||||
|
"description": "Tooltip für Drehung-zurücksetzen-Schaltfläche"
|
||||||
|
},
|
||||||
|
|
||||||
"showMapDebugInfo": "Karten-Debug-Info anzeigen",
|
"showMapDebugInfo": "Karten-Debug-Info anzeigen",
|
||||||
"@showMapDebugInfo": {
|
"@showMapDebugInfo": {
|
||||||
"description": "Umschalter zum Anzeigen von Karten-Debug-Informationen"
|
"description": "Umschalter zum Anzeigen von Karten-Debug-Informationen"
|
||||||
|
|||||||
@@ -1683,6 +1683,16 @@
|
|||||||
"description": "Description for rotate map toggle"
|
"description": "Description for rotate map toggle"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"resetMapRotation": "Reset Rotation",
|
||||||
|
"@resetMapRotation": {
|
||||||
|
"description": "Button to reset map rotation to north"
|
||||||
|
},
|
||||||
|
|
||||||
|
"resetMapRotationTooltip": "Reset map to north",
|
||||||
|
"@resetMapRotationTooltip": {
|
||||||
|
"description": "Tooltip for reset rotation button"
|
||||||
|
},
|
||||||
|
|
||||||
"showMapDebugInfo": "Show Map Debug Info",
|
"showMapDebugInfo": "Show Map Debug Info",
|
||||||
"@showMapDebugInfo": {
|
"@showMapDebugInfo": {
|
||||||
"description": "Toggle for showing map debug information"
|
"description": "Toggle for showing map debug information"
|
||||||
|
|||||||
@@ -1683,6 +1683,16 @@
|
|||||||
"description": "Descripción del alternar de rotar mapa"
|
"description": "Descripción del alternar de rotar mapa"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"resetMapRotation": "Restablecer rotación",
|
||||||
|
"@resetMapRotation": {
|
||||||
|
"description": "Botón para restablecer la rotación del mapa al norte"
|
||||||
|
},
|
||||||
|
|
||||||
|
"resetMapRotationTooltip": "Restablecer mapa al norte",
|
||||||
|
"@resetMapRotationTooltip": {
|
||||||
|
"description": "Tooltip para botón de restablecer rotación"
|
||||||
|
},
|
||||||
|
|
||||||
"showMapDebugInfo": "Mostrar información de depuración del mapa",
|
"showMapDebugInfo": "Mostrar información de depuración del mapa",
|
||||||
"@showMapDebugInfo": {
|
"@showMapDebugInfo": {
|
||||||
"description": "Alternar para mostrar información de depuración del mapa"
|
"description": "Alternar para mostrar información de depuración del mapa"
|
||||||
|
|||||||
@@ -1683,6 +1683,16 @@
|
|||||||
"description": "Description de l'interrupteur de rotation de la carte"
|
"description": "Description de l'interrupteur de rotation de la carte"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"resetMapRotation": "Réinitialiser la rotation",
|
||||||
|
"@resetMapRotation": {
|
||||||
|
"description": "Bouton pour réinitialiser la rotation de la carte vers le nord"
|
||||||
|
},
|
||||||
|
|
||||||
|
"resetMapRotationTooltip": "Réinitialiser la carte vers le nord",
|
||||||
|
"@resetMapRotationTooltip": {
|
||||||
|
"description": "Infobulle pour le bouton de réinitialisation de rotation"
|
||||||
|
},
|
||||||
|
|
||||||
"showMapDebugInfo": "Afficher les infos de débogage de la carte",
|
"showMapDebugInfo": "Afficher les infos de débogage de la carte",
|
||||||
"@showMapDebugInfo": {
|
"@showMapDebugInfo": {
|
||||||
"description": "Interrupteur pour afficher les informations de débogage de la carte"
|
"description": "Interrupteur pour afficher les informations de débogage de la carte"
|
||||||
|
|||||||
@@ -567,6 +567,10 @@
|
|||||||
|
|
||||||
"mapFollowsDirection": "Karta slijedi vaš smjer pri kretanju",
|
"mapFollowsDirection": "Karta slijedi vaš smjer pri kretanju",
|
||||||
|
|
||||||
|
"resetMapRotation": "Resetiraj rotaciju",
|
||||||
|
|
||||||
|
"resetMapRotationTooltip": "Vrati kartu na sjever",
|
||||||
|
|
||||||
"showMapDebugInfo": "Prikaži debug informacije karte",
|
"showMapDebugInfo": "Prikaži debug informacije karte",
|
||||||
|
|
||||||
"displayZoomLevelBounds": "Prikaži razinu zumiranja i granice",
|
"displayZoomLevelBounds": "Prikaži razinu zumiranja i granice",
|
||||||
|
|||||||
@@ -1683,6 +1683,16 @@
|
|||||||
"description": "Descrizione per l'interruttore ruota mappa"
|
"description": "Descrizione per l'interruttore ruota mappa"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"resetMapRotation": "Ripristina Rotazione",
|
||||||
|
"@resetMapRotation": {
|
||||||
|
"description": "Pulsante per ripristinare la rotazione della mappa verso nord"
|
||||||
|
},
|
||||||
|
|
||||||
|
"resetMapRotationTooltip": "Ripristina mappa verso nord",
|
||||||
|
"@resetMapRotationTooltip": {
|
||||||
|
"description": "Tooltip per il pulsante di ripristino rotazione"
|
||||||
|
},
|
||||||
|
|
||||||
"showMapDebugInfo": "Mostra Info Debug Mappa",
|
"showMapDebugInfo": "Mostra Info Debug Mappa",
|
||||||
"@showMapDebugInfo": {
|
"@showMapDebugInfo": {
|
||||||
"description": "Interruttore per mostrare informazioni di debug della mappa"
|
"description": "Interruttore per mostrare informazioni di debug della mappa"
|
||||||
|
|||||||
@@ -1810,6 +1810,18 @@ abstract class AppLocalizations {
|
|||||||
/// **'Map follows your direction when moving'**
|
/// **'Map follows your direction when moving'**
|
||||||
String get mapFollowsDirection;
|
String get mapFollowsDirection;
|
||||||
|
|
||||||
|
/// Button to reset map rotation to north
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Reset Rotation'**
|
||||||
|
String get resetMapRotation;
|
||||||
|
|
||||||
|
/// Tooltip for reset rotation button
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Reset map to north'**
|
||||||
|
String get resetMapRotationTooltip;
|
||||||
|
|
||||||
/// Toggle for showing map debug information
|
/// Toggle for showing map debug information
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
|
|||||||
@@ -991,6 +991,12 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
String get mapFollowsDirection =>
|
String get mapFollowsDirection =>
|
||||||
'Karte folgt Ihrer Richtung während der Bewegung';
|
'Karte folgt Ihrer Richtung während der Bewegung';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotation => 'Drehung zurücksetzen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotationTooltip => 'Karte nach Norden zurücksetzen';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get showMapDebugInfo => 'Karten-Debug-Info anzeigen';
|
String get showMapDebugInfo => 'Karten-Debug-Info anzeigen';
|
||||||
|
|
||||||
|
|||||||
@@ -987,6 +987,12 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get mapFollowsDirection => 'Map follows your direction when moving';
|
String get mapFollowsDirection => 'Map follows your direction when moving';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotation => 'Reset Rotation';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotationTooltip => 'Reset map to north';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get showMapDebugInfo => 'Show Map Debug Info';
|
String get showMapDebugInfo => 'Show Map Debug Info';
|
||||||
|
|
||||||
|
|||||||
@@ -993,6 +993,12 @@ class AppLocalizationsEs extends AppLocalizations {
|
|||||||
String get mapFollowsDirection =>
|
String get mapFollowsDirection =>
|
||||||
'El mapa sigue tu dirección cuando te mueves';
|
'El mapa sigue tu dirección cuando te mueves';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotation => 'Restablecer rotación';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotationTooltip => 'Restablecer mapa al norte';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get showMapDebugInfo => 'Mostrar información de depuración del mapa';
|
String get showMapDebugInfo => 'Mostrar información de depuración del mapa';
|
||||||
|
|
||||||
|
|||||||
@@ -995,6 +995,12 @@ class AppLocalizationsFr extends AppLocalizations {
|
|||||||
String get mapFollowsDirection =>
|
String get mapFollowsDirection =>
|
||||||
'La carte suit votre direction lorsque vous vous déplacez';
|
'La carte suit votre direction lorsque vous vous déplacez';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotation => 'Réinitialiser la rotation';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotationTooltip => 'Réinitialiser la carte vers le nord';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get showMapDebugInfo => 'Afficher les infos de débogage de la carte';
|
String get showMapDebugInfo => 'Afficher les infos de débogage de la carte';
|
||||||
|
|
||||||
|
|||||||
@@ -985,6 +985,12 @@ class AppLocalizationsHr extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get mapFollowsDirection => 'Karta slijedi vaš smjer pri kretanju';
|
String get mapFollowsDirection => 'Karta slijedi vaš smjer pri kretanju';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotation => 'Resetiraj rotaciju';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotationTooltip => 'Vrati kartu na sjever';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get showMapDebugInfo => 'Prikaži debug informacije karte';
|
String get showMapDebugInfo => 'Prikaži debug informacije karte';
|
||||||
|
|
||||||
|
|||||||
@@ -992,6 +992,12 @@ class AppLocalizationsIt extends AppLocalizations {
|
|||||||
String get mapFollowsDirection =>
|
String get mapFollowsDirection =>
|
||||||
'La mappa segue la tua direzione quando ti muovi';
|
'La mappa segue la tua direzione quando ti muovi';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotation => 'Ripristina Rotazione';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotationTooltip => 'Ripristina mappa verso nord';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get showMapDebugInfo => 'Mostra Info Debug Mappa';
|
String get showMapDebugInfo => 'Mostra Info Debug Mappa';
|
||||||
|
|
||||||
|
|||||||
@@ -985,6 +985,12 @@ class AppLocalizationsSl extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get mapFollowsDirection => 'Zemljevid sledi vaši smeri pri gibanju';
|
String get mapFollowsDirection => 'Zemljevid sledi vaši smeri pri gibanju';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotation => 'Ponastavi rotacijo';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get resetMapRotationTooltip => 'Ponastavi zemljevid na sever';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get showMapDebugInfo => 'Prikaži debug informacije zemljevida';
|
String get showMapDebugInfo => 'Prikaži debug informacije zemljevida';
|
||||||
|
|
||||||
|
|||||||
@@ -567,6 +567,10 @@
|
|||||||
|
|
||||||
"mapFollowsDirection": "Zemljevid sledi vaši smeri pri gibanju",
|
"mapFollowsDirection": "Zemljevid sledi vaši smeri pri gibanju",
|
||||||
|
|
||||||
|
"resetMapRotation": "Ponastavi rotacijo",
|
||||||
|
|
||||||
|
"resetMapRotationTooltip": "Ponastavi zemljevid na sever",
|
||||||
|
|
||||||
"showMapDebugInfo": "Prikaži debug informacije zemljevida",
|
"showMapDebugInfo": "Prikaži debug informacije zemljevida",
|
||||||
|
|
||||||
"displayZoomLevelBounds": "Prikaži nivo povečave in meje",
|
"displayZoomLevelBounds": "Prikaži nivo povečave in meje",
|
||||||
|
|||||||
@@ -291,6 +291,9 @@ class _MapTabState extends State<MapTab> with AutomaticKeepAliveClientMixin {
|
|||||||
orElse: () => MapLayer.openStreetMap,
|
orElse: () => MapLayer.openStreetMap,
|
||||||
);
|
);
|
||||||
_currentLayer = mbtilesLayer;
|
_currentLayer = mbtilesLayer;
|
||||||
|
} else if (layerType == MapLayerType.wmsBase) {
|
||||||
|
// Use Slovenian aerial layer if that's what was saved
|
||||||
|
_currentLayer = _slovenianAerialLayer;
|
||||||
} else {
|
} else {
|
||||||
// Use default layer
|
// Use default layer
|
||||||
_currentLayer = MapLayer.allLayers.firstWhere(
|
_currentLayer = MapLayer.allLayers.firstWhere(
|
||||||
@@ -299,6 +302,12 @@ class _MapTabState extends State<MapTab> with AutomaticKeepAliveClientMixin {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clamp saved zoom if it exceeds the current layer's maximum
|
||||||
|
// For WMS layers, use a middle zoom (11) instead of max zoom to avoid extreme close-up
|
||||||
|
if (_savedMapZoom != null && _savedMapZoom! > _currentLayer.maxZoom) {
|
||||||
|
_savedMapZoom = _currentLayer.isWms ? 11.0 : _currentLayer.maxZoom;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -436,6 +445,18 @@ class _MapTabState extends State<MapTab> with AutomaticKeepAliveClientMixin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset map rotation to north (0 degrees)
|
||||||
|
void _resetMapRotation() {
|
||||||
|
if (!_isMapReady) return;
|
||||||
|
try {
|
||||||
|
final camera = _mapController.camera;
|
||||||
|
_mapController.moveAndRotate(camera.center, camera.zoom, 0);
|
||||||
|
} catch (e) {
|
||||||
|
// Silently fail if map controller not ready
|
||||||
|
debugPrint('Failed to reset map rotation: $e');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LatLng _calculateCenter(List<Contact> contacts, List<SarMarker> sarMarkers) {
|
LatLng _calculateCenter(List<Contact> contacts, List<SarMarker> sarMarkers) {
|
||||||
return _markerService.calculateCenter(
|
return _markerService.calculateCenter(
|
||||||
contacts: contacts,
|
contacts: contacts,
|
||||||
@@ -540,6 +561,13 @@ class _MapTabState extends State<MapTab> with AutomaticKeepAliveClientMixin {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
_currentLayer = layer;
|
_currentLayer = layer;
|
||||||
|
// Clamp zoom level if current zoom exceeds new layer's max
|
||||||
|
if (_isMapReady && _mapController.camera.zoom > layer.maxZoom) {
|
||||||
|
_mapController.move(
|
||||||
|
_mapController.camera.center,
|
||||||
|
layer.maxZoom,
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
_saveSettings();
|
_saveSettings();
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
@@ -557,6 +585,14 @@ class _MapTabState extends State<MapTab> with AutomaticKeepAliveClientMixin {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
_currentLayer = _slovenianAerialLayer;
|
_currentLayer = _slovenianAerialLayer;
|
||||||
|
// Clamp zoom level if current zoom exceeds new layer's max
|
||||||
|
// For WMS layers, use a middle zoom (11) instead of max zoom to avoid extreme close-up
|
||||||
|
if (_isMapReady && _mapController.camera.zoom > _slovenianAerialLayer.maxZoom) {
|
||||||
|
_mapController.move(
|
||||||
|
_mapController.camera.center,
|
||||||
|
11.0, // Middle zoom for WMS
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
_saveSettings();
|
_saveSettings();
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
@@ -592,6 +628,13 @@ class _MapTabState extends State<MapTab> with AutomaticKeepAliveClientMixin {
|
|||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_currentLayer = layer;
|
_currentLayer = layer;
|
||||||
|
// Clamp zoom level if current zoom exceeds new layer's max
|
||||||
|
if (_isMapReady && _mapController.camera.zoom > layer.maxZoom) {
|
||||||
|
_mapController.move(
|
||||||
|
_mapController.camera.center,
|
||||||
|
layer.maxZoom,
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
_saveSettings();
|
_saveSettings();
|
||||||
|
|
||||||
@@ -601,9 +644,10 @@ class _MapTabState extends State<MapTab> with AutomaticKeepAliveClientMixin {
|
|||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
// WMS Overlays section (only for Slovenian/Croatian regions)
|
// WMS Overlays section (only for Slovenian/Croatian regions and when WMS base layer is selected)
|
||||||
if (AppLocalizations.of(context)!.localeName == 'sl' ||
|
if ((AppLocalizations.of(context)!.localeName == 'sl' ||
|
||||||
AppLocalizations.of(context)!.localeName == 'hr') ...[
|
AppLocalizations.of(context)!.localeName == 'hr') &&
|
||||||
|
_currentLayer.isWms) ...[
|
||||||
const Divider(),
|
const Divider(),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||||
@@ -1156,6 +1200,10 @@ class _MapTabState extends State<MapTab> with AutomaticKeepAliveClientMixin {
|
|||||||
if (event is MapEventMoveEnd || event is MapEventScrollWheelZoom) {
|
if (event is MapEventMoveEnd || event is MapEventScrollWheelZoom) {
|
||||||
_saveMapPosition();
|
_saveMapPosition();
|
||||||
}
|
}
|
||||||
|
// Trigger rebuild on rotation change to show/hide reset button
|
||||||
|
if (event is MapEventRotateEnd || event is MapEventRotateStart) {
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onLongPress: (tapPosition, point) {
|
onLongPress: (tapPosition, point) {
|
||||||
// Handle measurement mode - set measurement points
|
// Handle measurement mode - set measurement points
|
||||||
@@ -1828,6 +1876,13 @@ class _MapTabState extends State<MapTab> with AutomaticKeepAliveClientMixin {
|
|||||||
FloatingActionButton.small(
|
FloatingActionButton.small(
|
||||||
heroTag: 'center_map',
|
heroTag: 'center_map',
|
||||||
onPressed: !_isMapReady ? null : () async {
|
onPressed: !_isMapReady ? null : () async {
|
||||||
|
// First tap: reset rotation if not 0
|
||||||
|
// Second tap (or if rotation is 0): jump to current location
|
||||||
|
if (_getMapRotation() != 0) {
|
||||||
|
_resetMapRotation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Force update GPS location and jump to it
|
// Force update GPS location and jump to it
|
||||||
final position = await _locationService.getCurrentPosition();
|
final position = await _locationService.getCurrentPosition();
|
||||||
if (position != null && mounted) {
|
if (position != null && mounted) {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import '../providers/contacts_provider.dart';
|
|||||||
import '../providers/map_provider.dart';
|
import '../providers/map_provider.dart';
|
||||||
import '../providers/connection_provider.dart';
|
import '../providers/connection_provider.dart';
|
||||||
import '../providers/drawing_provider.dart';
|
import '../providers/drawing_provider.dart';
|
||||||
|
import '../providers/app_provider.dart';
|
||||||
import '../models/message.dart';
|
import '../models/message.dart';
|
||||||
import '../models/contact.dart';
|
import '../models/contact.dart';
|
||||||
import '../models/sar_marker.dart';
|
import '../models/sar_marker.dart';
|
||||||
@@ -564,20 +565,25 @@ class _MessagesTabState extends State<MessagesTab> {
|
|||||||
// Get all recent messages
|
// Get all recent messages
|
||||||
final allMessages = messagesProvider.getRecentMessages(count: 100);
|
final allMessages = messagesProvider.getRecentMessages(count: 100);
|
||||||
|
|
||||||
|
// Get simple mode setting from AppProvider
|
||||||
|
final appProvider = context.read<AppProvider>();
|
||||||
|
final isSimpleMode = appProvider.isSimpleMode;
|
||||||
|
|
||||||
|
List<Message> filteredMessages;
|
||||||
|
|
||||||
// If public channel is selected, show ALL messages
|
// If public channel is selected, show ALL messages
|
||||||
if (_destinationType ==
|
if (_destinationType ==
|
||||||
MessageDestinationPreferences.destinationTypeChannel &&
|
MessageDestinationPreferences.destinationTypeChannel &&
|
||||||
_selectedRecipient == null) {
|
_selectedRecipient == null) {
|
||||||
return allMessages;
|
filteredMessages = allMessages;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a contact or room is selected, filter by recipient
|
// If a contact or room is selected, filter by recipient
|
||||||
if ((_destinationType ==
|
else if ((_destinationType ==
|
||||||
MessageDestinationPreferences.destinationTypeContact ||
|
MessageDestinationPreferences.destinationTypeContact ||
|
||||||
_destinationType ==
|
_destinationType ==
|
||||||
MessageDestinationPreferences.destinationTypeRoom) &&
|
MessageDestinationPreferences.destinationTypeRoom) &&
|
||||||
_selectedRecipient != null) {
|
_selectedRecipient != null) {
|
||||||
return allMessages.where((message) {
|
filteredMessages = allMessages.where((message) {
|
||||||
// Include messages sent TO this recipient
|
// Include messages sent TO this recipient
|
||||||
if (message.recipientPublicKey != null &&
|
if (message.recipientPublicKey != null &&
|
||||||
message.recipientPublicKey!.length >= 6 &&
|
message.recipientPublicKey!.length >= 6 &&
|
||||||
@@ -603,10 +609,19 @@ class _MessagesTabState extends State<MessagesTab> {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}).toList();
|
}).toList();
|
||||||
|
} else {
|
||||||
|
// Default: show all messages (fallback case)
|
||||||
|
filteredMessages = allMessages;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default: show all messages (fallback case)
|
// In simple mode, filter out system messages (toast logs)
|
||||||
return allMessages;
|
if (isSimpleMode) {
|
||||||
|
filteredMessages = filteredMessages
|
||||||
|
.where((message) => !message.isSystemMessage)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
return filteredMessages;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user